/* ========== RESET ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #0f0f2d;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --border-color: rgba(255, 255, 255, 0.08);
    --accent-blue: #6366f1;
    --accent: var(--accent-blue);
    --accent-light: #818cf8;
    --accent-dark: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.2);
    --text-primary: #f8fafc;
    --text-secondary: rgba(248, 250, 252, 0.65);
    --text-muted: rgba(248, 250, 252, 0.4);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.1);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --glass-blur: blur(20px);
    --glass-blur-sm: blur(12px);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --primary: var(--accent-blue);
    --on-primary: #ffffff;
    --card-bg: var(--bg-card);
    --border: var(--border-color);
    --text: var(--text-primary);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-secondary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Ambient glow */
body::before {
    content: '';
    position: fixed;
    top: -30%;
    left: -15%;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: floatOrb1 12s ease-in-out infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    right: -15%;
    width: 55%;
    height: 55%;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: floatOrb2 14s ease-in-out infinite alternate;
}

@keyframes floatOrb1 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 20px); }
}

@keyframes floatOrb2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-20px, -30px); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ========== PLAYSTATION FONT ========== */
@font-face {
    font-family: 'PlayStation';
    src: url('/fonts/playstation.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

/* ========== SPLASH SCREEN ========== */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #050510;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: splashFadeOut 0.8s ease 2.6s forwards;
}

.splash-text {
    font-family: 'PlayStation', var(--font);
    font-size: 5.5rem;
    font-weight: bold;
    letter-spacing: 0.15em;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow:
        0 0 30px rgba(99, 102, 241, 0.6),
        0 0 60px rgba(99, 102, 241, 0.3),
        0 0 120px rgba(99, 102, 241, 0.15);
    animation: splashTextIn 0.8s ease 0.3s both, splashTextUp 0.6s ease 2.6s forwards;
}

@keyframes splashTextIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes splashTextUp { to { opacity: 0; transform: translateY(-50px); } }
@keyframes splashFadeOut { to { opacity: 0; pointer-events: none; visibility: hidden; } }

/* ========== NAVBAR ========== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 56px;
    background: rgba(10, 10, 30, 0.75);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-icon {
    font-size: 1.25rem;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.4));
}

.nav-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
}

.nav-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.btn-theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
}

.btn-about {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.35rem 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-about:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* ========== CONTAINER ========== */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    position: relative;
    z-index: 1;
}

/* ========== HERO ========== */
.hero-section {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease;
}

.hero-emoji {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.4));
}

.hero-emoji svg {
    width: 48px;
    height: 48px;
    stroke-width: 1.5;
    color: var(--accent-light);
}

.hero-section h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ========== CARD ========== */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur-sm);
    -webkit-backdrop-filter: var(--glass-blur-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.glass-card {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.voucher-card {
    padding: 0;
    overflow: hidden;
}

/* ========== TAB BAR ========== */
.tab-bar {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    padding: 0.8rem 0.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.active {
    color: var(--accent-light);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 1px;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

.tab-content { display: none; animation: fadeInUp 0.35s ease; padding: 1.5rem; }
.tab-content.active { display: block; }

.tab-hint {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 0.75rem;
}

.tab-hint code {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-light);
    padding: 0.15em 0.4em;
    border-radius: 6px;
    font-size: 0.85em;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

/* ========== INPUT ========== */
.voucher-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.voucher-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.92rem;
    transition: var(--transition);
}

.voucher-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 0 15px rgba(99, 102, 241, 0.1);
}

.voucher-input::placeholder { color: var(--text-muted); }

.input-area {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    resize: vertical;
    transition: var(--transition);
    line-height: 1.6;
}

.input-area:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-area::placeholder { color: var(--text-muted); }

.output-area {
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    cursor: default;
}

/* ========== BUTTONS ========== */
.card-actions { display: flex; gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.2rem;
    border: none;
    border-radius: 9999px;
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.5s;
}

.btn:hover::before { left: 100%; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(99, 102, 241, 0.35); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }

.btn-success {
    background: linear-gradient(135deg, #059669, var(--success));
    color: #fff;
    box-shadow: 0 4px 15px rgba(52, 211, 153, 0.25);
}

.btn-success:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(52, 211, 153, 0.3); }

.btn-mini { padding: 0.2rem 0.45rem; font-size: 0.72rem; border-radius: 9999px; }
.btn-icon { font-size: 0.95rem; display: flex; align-items: center; }
.btn-icon svg { width: 14px; height: 14px; stroke-width: 2; }

.badge {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-light);
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ========== TIMER CARD ========== */
.timer-card { padding: 1rem 1.5rem; }

.timer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.timer-left { display: flex; align-items: center; gap: 0.75rem; }

.timer-service-badge {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    padding: 0.25rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timer-email { color: var(--text-secondary); font-size: 0.85rem; }
.timer-right { display: flex; align-items: center; gap: 0.4rem; }
.timer-icon { font-size: 1.2rem; }

.timer-countdown {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-light);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.timer-countdown.warning { color: var(--warning); }
.timer-countdown.danger { color: var(--danger); animation: timerPulse 1s infinite; }

@keyframes timerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Auto refresh */
.auto-refresh-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.auto-refresh-left { display: flex; align-items: center; gap: 0.5rem; }
.auto-refresh-icon { font-size: 1rem; }
.auto-refresh-label { font-weight: 600; font-size: 0.88rem; color: var(--text-primary); }
.auto-refresh-right { display: flex; align-items: center; gap: 0.75rem; }

.refresh-interval-select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.82rem;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
}

.refresh-interval-select:focus { outline: none; border-color: var(--accent); }
.refresh-interval-select option { background: var(--bg-secondary); color: var(--text-primary); }

.btn-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.toggle-label {
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition);
    min-width: 28px;
    text-align: right;
}

.toggle-track {
    position: relative;
    width: 40px;
    height: 22px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition);
}

.btn-toggle.active .toggle-label { color: var(--accent-light); }
.btn-toggle.active .toggle-track {
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}
.btn-toggle.active .toggle-thumb { left: 20px; background: var(--accent-light); }

.auto-refresh-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.refresh-pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-light);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

/* ========== RESULTS ========== */
.results-section { animation: fadeInUp 0.4s ease; margin-bottom: 1.25rem; }

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.results-header h2 { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }

.results-stats { display: flex; gap: 0.5rem; }

.stat {
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-success { background: var(--success-bg); color: var(--success); }
.stat-warning { background: var(--warning-bg); color: var(--warning); }

/* Email message cards */
.results-list { display: flex; flex-direction: column; gap: 0.5rem; }

.email-msg-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: var(--transition);
    animation: fadeInUp 0.3s ease both;
}

.email-msg-card:hover { border-color: rgba(255, 255, 255, 0.12); }

.email-msg-subject { font-weight: 600; font-size: 0.88rem; color: var(--text-primary); margin-bottom: 0.25rem; }
.email-msg-from { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.email-msg-preview { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

.otp-row { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }

.otp-badge {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-light);
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.btn-copy-otp {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 6px;
    color: var(--accent-light);
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy-otp:hover { background: rgba(99, 102, 241, 0.2); transform: scale(1.05); }
.btn-copy-otp.copied { background: var(--success-bg); color: var(--success); border-color: rgba(52, 211, 153, 0.3); }

.btn-expand {
    background: none;
    border: none;
    color: var(--accent-light);
    cursor: pointer;
    font-size: 0.82rem;
    padding: 0.3rem 0;
    font-family: inherit;
    transition: opacity 0.2s;
    margin-top: 0.5rem;
    display: block;
}

.btn-expand:hover { opacity: 0.7; }

/* No messages */
.no-messages, .no-msg-icon { text-align: center; }
.no-msg-icon { font-size: 2.5rem; margin-bottom: 0.5rem; opacity: 0.6; }
.no-messages p { color: var(--text-muted); font-size: 0.88rem; }

/* Error */
.error-card {
    background: var(--danger-bg);
    border: 1px solid rgba(248, 113, 113, 0.15);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: fadeInUp 0.3s ease;
    margin-bottom: 1.25rem;
}

.error-icon { font-size: 1.5rem; }
.error-msg { color: var(--danger); font-size: 0.88rem; font-weight: 500; }

/* ========== CHECK MAIL COLUMNS ========== */
.check-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.check-col {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.check-col-live { border-top: 3px solid var(--success); }
.check-col-suspended { border-top: 3px solid var(--danger); }
.check-col-die { border-top: 3px solid #fca5a5; }
.check-col-unknown { border-top: 3px solid var(--warning); }

.check-col-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.check-col-title { font-weight: 700; font-size: 0.8rem; color: var(--text-primary); flex: 1; }

.check-col-count {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    padding: 0.1rem 0.45rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 1.5rem;
    text-align: center;
}

.check-col-live .check-col-count { background: rgba(52, 211, 153, 0.15); color: #6ee7b7; }
.check-col-suspended .check-col-count { background: rgba(248, 113, 113, 0.15); color: #fca5a5; }
.check-col-die .check-col-count { background: rgba(248, 113, 113, 0.15); color: #fca5a5; }
.check-col-unknown .check-col-count { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }

.check-col-body { padding: 0.5rem; max-height: 300px; overflow-y: auto; flex: 1; min-height: 80px; }

.check-col-item, .check-item {
    padding: 0.35rem 0.45rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    word-break: break-all;
    line-height: 1.4;
}

.check-col-item:last-child, .check-item:last-child { border-bottom: none; }
.check-col-item:hover, .check-item:hover { background: rgba(99, 102, 241, 0.06); color: var(--text-primary); }
.check-col-empty { padding: 1.5rem 0.5rem; text-align: center; color: var(--text-muted); font-size: 0.78rem; font-style: italic; }

/* ========== PROGRESS ========== */
.progress-section { margin-bottom: 1.25rem; }

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

.progress-text {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* ========== DROP ZONE ========== */
.drop-zone {
    position: relative;
    border: 2px dashed rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 0.75rem;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.04);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.08);
}

.drop-zone-content {}
.drop-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.drop-zone h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.25rem; }
.drop-zone p { font-size: 0.8rem; color: var(--text-muted); }
.drop-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.divider-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0.75rem 0;
    position: relative;
}

.divider-text::before,
.divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: var(--border-color);
}

.divider-text::before { left: 0; }
.divider-text::after { right: 0; }

/* ========== TOAST ========== */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: rgba(15, 15, 45, 0.9);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.15rem;
    color: var(--text-primary);
    font-size: 0.82rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: slideInRight 0.3s ease;
    max-width: 340px;
}

.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-info { border-left: 3px solid var(--accent); }

/* ========== EMAIL BODY MODAL ========== */
.email-body-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(5, 5, 16, 0.8);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    backdrop-filter: blur(8px);
}

.email-body-overlay.active { display: flex; }

.email-body-modal {
    background: #ffffff;
    border-radius: var(--radius);
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.email-body-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.email-body-modal-header h3 { font-size: 0.9rem; font-weight: 600; color: #333; margin: 0; }
.email-body-modal-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #666; padding: 0.25rem; line-height: 1; }
.email-body-modal-close:hover { color: #000; }
.email-body-modal-content { padding: 0; overflow: hidden; flex: 1; min-height: 50vh; }

/* ========== ABOUT MODAL ========== */
.about-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(5, 5, 16, 0.8);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    backdrop-filter: blur(8px);
}

.about-overlay.active { display: flex; }

.about-modal {
    background: rgba(15, 15, 45, 0.95);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.1);
    animation: fadeInUp 0.25s ease;
}

.about-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.about-header h3 { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.about-close { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 0.25rem; }
.about-close:hover { color: var(--text-primary); }

.about-body { padding: 1.5rem 1.25rem; text-align: center; }
.about-logo { font-size: 3rem; margin-bottom: 0.5rem; }

.about-body h2 { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); margin-bottom: 0.25rem; }
.about-version { color: var(--accent-light); font-size: 0.82rem; font-weight: 600; margin-bottom: 1rem; }
.about-desc { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.6; margin-bottom: 1.25rem; }

.about-features { text-align: left; margin-bottom: 1.25rem; }

.about-feature {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.about-feature:last-child { border-bottom: none; }
.about-feature strong { color: var(--text-primary); }

.about-contact { margin-top: 1rem; }

.about-telegram {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-light);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: var(--transition);
}

.about-telegram:hover { opacity: 0.8; }

/* ========== FOOTER ========== */
.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    border-top: 1px solid var(--border-color);
}

.site-footer strong { color: var(--accent-light); }

/* ========== SPINNER ========== */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.7s linear infinite;
}

/* ========== UTILITY ========== */
.hidden { display: none !important; }

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
}

/* ========== BACKGROUND PATTERNS ========== */
.bg-dots {
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px) !important;
    background-size: 22px 22px !important;
    background-color: var(--bg-primary) !important;
}

.bg-lines {
    background-image: repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(255, 255, 255, 0.04) 8px, rgba(255, 255, 255, 0.04) 9px) !important;
    background-color: var(--bg-primary) !important;
}

.bg-glow {
    background:
        radial-gradient(ellipse at 15% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 90%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%) !important;
}

.bg-glow-move {
    background:
        radial-gradient(ellipse at 15% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 90%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%) !important;
    animation: glowShift 6s ease-in-out infinite alternate !important;
}

.bg-dots-move {
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px) !important;
    background-size: 22px 22px !important;
    background-color: var(--bg-primary) !important;
    animation: dotsFloat 8s linear infinite !important;
}

@keyframes glowShift {
    0% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(20deg) brightness(1.15); }
    100% { filter: hue-rotate(45deg) brightness(1); }
}

@keyframes dotsFloat {
    0% { background-position: 0 0; }
    100% { background-position: 44px 44px; }
}
/* ========== LIGHT MODE ========== */
body.light-mode {
    --bg-primary: #d2cbf7;
    --bg-secondary: #c5bdf0;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --border-color: rgba(99, 102, 241, 0.25);
    --text-primary: #1a1a2e;
    --text-secondary: #3d4263;
    --text-muted: #7c82a6;
    --accent-glow: rgba(99, 102, 241, 0.12);
    --card-bg: rgba(255, 255, 255, 0.75);
    --border: rgba(99, 102, 241, 0.25);
    --text: #1a1a2e;
    --shadow: 0 4px 24px rgba(99, 102, 241, 0.08);
}

body.light-mode .card,
body.light-mode .glass-card {
    border: 1.5px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.08);
}

body.light-mode .voucher-input,
body.light-mode .input-area,
body.light-mode .input-field {
    border: 1.5px solid rgba(99, 102, 241, 0.25);
}

body.light-mode {
    background: linear-gradient(135deg, #d2cbf7 0%, #c9c0f2 30%, #d8d0fa 60%, #ddd6fc 100%);
}

body.light-mode::before {
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    opacity: 0.6;
}

body.light-mode::after {
    background: radial-gradient(ellipse, rgba(167, 139, 250, 0.1) 0%, transparent 70%);
    opacity: 0.6;
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom-color: rgba(99, 102, 241, 0.08);
    box-shadow: 0 1px 12px rgba(99, 102, 241, 0.06);
}

body.light-mode .navbar .nav-title { color: #1a1a2e; }
body.light-mode .btn-theme-toggle { background: rgba(99, 102, 241, 0.06); border-color: rgba(99, 102, 241, 0.12); }
body.light-mode .btn-about { background: rgba(99, 102, 241, 0.06); border-color: rgba(99, 102, 241, 0.12); color: #3d4263; }

body.light-mode .card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    border-color: rgba(99, 102, 241, 0.08);
    box-shadow: 0 2px 16px rgba(99, 102, 241, 0.06);
}

body.light-mode .tab-btn { color: #7c82a6; }
body.light-mode .tab-btn.active { color: var(--accent-dark); }
body.light-mode .tab-btn.active::after {
    background: linear-gradient(90deg, var(--accent-dark), var(--accent));
}

body.light-mode .tab-bar { background: rgba(255, 255, 255, 0.4); border-bottom-color: rgba(99, 102, 241, 0.06); }

body.light-mode .voucher-input,
body.light-mode .input-area,
body.light-mode .refresh-interval-select {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(99, 102, 241, 0.12);
    color: #1a1a2e;
}

body.light-mode .voucher-input:focus,
body.light-mode .input-area:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

body.light-mode .btn-primary {
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.3);
}

body.light-mode .btn-secondary {
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.12);
    color: #3d4263;
}

body.light-mode .email-msg-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(99, 102, 241, 0.08);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.05);
}

body.light-mode .check-col {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(99, 102, 241, 0.08);
}

body.light-mode .toast {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(99, 102, 241, 0.08);
    color: #1a1a2e;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.1);
}

body.light-mode .splash-screen { background: #eef0f8; }
body.light-mode .splash-text { color: #1a1a2e; text-shadow: 0 0 30px rgba(99, 102, 241, 0.3); }
body.light-mode .about-modal { background: rgba(255, 255, 255, 0.95); border-color: rgba(99, 102, 241, 0.1); color: #1a1a2e; }
body.light-mode .about-header { border-bottom-color: rgba(99, 102, 241, 0.08); }
body.light-mode .about-body h2 { color: #1a1a2e; }
body.light-mode .about-desc { color: #3d4263; }
body.light-mode .about-feature { color: #3d4263; border-bottom-color: rgba(99, 102, 241, 0.06); }

body.light-mode .timer-countdown { color: var(--accent-dark); }
body.light-mode .hero-section h1 { color: #1a1a2e; }
body.light-mode .hero-desc { color: #7c82a6; }

body.light-mode .site-footer { border-top-color: rgba(99, 102, 241, 0.08); color: #7c82a6; }
body.light-mode .email-body-overlay { background: rgba(0, 0, 0, 0.4); }

/* Light mode pattern overrides — keep lavender background */
body.light-mode.bg-dots,
body.light-mode.bg-dots-move {
    background-color: #d2cbf7 !important;
    background-image: radial-gradient(rgba(99, 102, 241, 0.1) 1.2px, transparent 1.2px) !important;
}

body.light-mode.bg-lines {
    background-color: #d2cbf7 !important;
    background-image: repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(99, 102, 241, 0.06) 8px, rgba(99, 102, 241, 0.06) 9px) !important;
}

body.light-mode.bg-glow,
body.light-mode.bg-glow-move {
    background:
        radial-gradient(ellipse at 15% 50%, rgba(99, 102, 241, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 20%, rgba(167, 139, 250, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 90%, rgba(236, 72, 153, 0.06) 0%, transparent 50%),
        linear-gradient(135deg, #d2cbf7 0%, #c9c0f2 30%, #d8d0fa 60%, #ddd6fc 100%) !important;
}

/* Light mode body text color override (force) */
body.light-mode { color: #3d4263 !important; }
body.light-mode .drop-zone h3 { color: #1a1a2e; }
body.light-mode .drop-zone p { color: #7c82a6; }
body.light-mode .tab-hint { color: #7c82a6; }
body.light-mode .tab-hint code { background: rgba(99, 102, 241, 0.08); color: var(--accent-dark); }
body.light-mode .divider-text { color: #7c82a6; }
body.light-mode .divider-text::before,
body.light-mode .divider-text::after { background: rgba(99, 102, 241, 0.1); }
body.light-mode .input-area::placeholder,
body.light-mode .voucher-input::placeholder { color: #94a3b8; }
body.light-mode .output-area { background: rgba(99, 102, 241, 0.04); color: #1a1a2e; }
body.light-mode .otp-badge { background: rgba(99, 102, 241, 0.08); color: var(--accent-dark); }
body.light-mode .badge { background: rgba(99, 102, 241, 0.08); color: var(--accent-dark); }
body.light-mode .check-col-header { background: rgba(99, 102, 241, 0.04); }
body.light-mode .check-col-item { color: #3d4263; border-bottom-color: rgba(99, 102, 241, 0.04); }
body.light-mode .check-col-empty { color: #7c82a6; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .splash-text { font-size: 2.5rem; }
    .hero-section h1 { font-size: 1.5rem; }
    .check-columns { grid-template-columns: repeat(2, 1fr); }
    .voucher-input-wrapper { flex-direction: column; }
    .toast-container { left: 1rem; right: 1rem; bottom: 1rem; }
    .toast { max-width: 100%; }
    .auto-refresh-row { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .auto-refresh-right { width: 100%; justify-content: space-between; }
}

@media (max-width: 480px) {
    .check-columns { grid-template-columns: 1fr; }
    .container { padding: 1rem; }
}