/* --- Base Styles --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc; /* Tailwind slate-50 */
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

.page:not(.active) { display: none; }

/* --- Blocker & Overlays --- */
.blocker-overlay, .page-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(248, 250, 252, 0.95); /* Semi-transparent */
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

#telegram-blocker { display: none; }

.content { 
    max-width: 360px; 
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.content i { font-size: 3.5rem; margin-bottom: 1rem; display: block; }
.content h1 { font-size: 1.25rem; font-weight: 700; color: #0f172a; margin-bottom: 0.5rem; }
.content p { color: #64748b; font-size: 0.95rem; line-height: 1.5; }

#telegram-blocker .content i { color: #0088CC; }
#blocked-overlay .content i { color: #ef4444; }

/* --- Modern Loading Spinners --- */
@keyframes spin { 
    to { transform: rotate(360deg); } 
}

.loading-spinner { 
    width: 45px; 
    height: 45px; 
    border: 3.5px solid #e2e8f0;
    border-top-color: #2563eb; /* Primary Blue */
    border-radius: 50%; 
    animation: spin 0.8s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: none;
}

button.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    opacity: 0.8;
}

button.is-loading .btn-spinner {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

button.is-loading > span,
button.is-loading > i {
    visibility: hidden;
}

/* --- Ad Watch Timer Page --- */
#ad-timer-page .content { 
    background: #ffffff;
    border: 1px solid #f1f5f9;
}

.timer-circle {
    width: 90px; height: 90px; 
    border-radius: 50%; 
    background-color: #f1f5f9;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.25rem; font-weight: 800; 
    color: #2563eb; 
    margin-top: 1.5rem; 
    border: 5px solid #2563eb;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.1);
}

#ad-container {
    width: 100%;
    max-width: 300px;
    height: 200px;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
    border-radius: 1rem;
    border: 2px dashed #e2e8f0;
}

/* --- General UI Components --- */
.claimed { 
    background-color: #10b981 !important; /* Emerald 500 */
    border-color: #10b981 !important; 
    color: white !important;
    cursor: not-allowed; 
    opacity: 0.7 !important;
    box-shadow: none !important;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}

/* --- Custom Modern Dropdown --- */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-selected {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background-color: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.dropdown-selected:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.dropdown-selected img {
    width: 28px;
    height: 28px;
    margin-right: 12px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-selected span {
    flex-grow: 1;
    font-weight: 600;
    font-size: 0.95rem;
    color: #334155;
}

.dropdown-selected .arrow {
    width: 18px;
    height: 18px;
    color: #94a3b8;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-dropdown.open .dropdown-selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.custom-dropdown.open .dropdown-selected .arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.15);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-dropdown.open .dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s;
}

.dropdown-item:last-child { border-bottom: none; }

.dropdown-item:hover {
    background-color: #f1f5f9;
}

.dropdown-item img {
    width: 32px;
    height: 32px;
    margin-right: 14px;
    border-radius: 50%;
}

.dropdown-item .item-info .name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
    display: block;
}

.dropdown-item .item-info .min {
    font-size: 0.75rem;
    color: #64748b;
}

/* Scrollbar for Dropdown */
.dropdown-options::-webkit-scrollbar {
    width: 5px;
}
.dropdown-options::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}