/* special-tests.css — SabaqGuide Special Test Series */

/* ── Page Base ── */
.st-page {
    min-height: 100vh;
    background: #07091A;
    color: #F1F5F9;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Container ── */
.st-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Hero ── */
.st-hero {
    padding: 100px 24px 56px;
    text-align: center;
    position: relative;
}
.st-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 700px; height: 360px;
    background: radial-gradient(ellipse, rgba(30,64,175,0.14) 0%, transparent 70%);
    pointer-events: none;
}
.st-hero-eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0891B2;
    margin-bottom: 14px;
}
.st-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    background: linear-gradient(135deg, #F1F5F9 30%, #94A3B8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 14px;
    line-height: 1.15;
}
.st-hero p {
    color: #64748B;
    font-size: 1.05rem;
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── Subject Filter ── */
.st-subject-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 24px 0 4px;
}
.st-subject-chip {
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #94A3B8;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.st-subject-chip:hover { color: #E2E8F0; border-color: rgba(255,255,255,0.2); }
.st-subject-chip.active {
    background: rgba(8,145,178,0.15);
    border-color: #0891B2;
    color: #38BDF8;
}

/* ── Auth Bar ── */
.st-auth-bar {
    margin: 0 24px 0;
    background: rgba(16,185,129,0.07);
    border: 1px solid rgba(16,185,129,0.18);
    border-radius: 10px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    max-width: 1100px;
    margin: 0 auto 0;
}
.st-auth-bar-text { color: #34D399; }
.st-auth-bar-btn {
    background: none; border: none;
    color: #64748B; font-size: 0.8rem;
    cursor: pointer; font-family: inherit;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s;
}
.st-auth-bar-btn:hover { color: #EF4444; }

/* ── Badge ── */
.st-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.st-badge.free   { background: rgba(16,185,129,0.12); color: #10B981; border: 1px solid rgba(16,185,129,0.22); }
.st-badge.paid   { background: rgba(245,158,11,0.1);  color: #F59E0B; border: 1px solid rgba(245,158,11,0.22); }
.st-badge.locked { background: rgba(239,68,68,0.09);  color: #EF4444; border: 1px solid rgba(239,68,68,0.18); }

/* ── Category Grid ── */
.st-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    padding: 36px 0 60px;
}

.st-category-card {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 22px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.st-category-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, #1E40AF, #0891B2);
    opacity: 0; transition: opacity 0.3s;
}
.st-category-card.clickable { cursor: pointer; }
.st-category-card.clickable:hover {
    border-color: rgba(30,64,175,0.35);
    transform: translateY(-4px);
    box-shadow: 0 20px 44px rgba(0,0,0,0.32);
    background: rgba(255,255,255,0.035);
}
.st-category-card.clickable:hover::before { opacity: 1; }

.st-cat-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.st-cat-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, rgba(30,64,175,0.2), rgba(8,145,178,0.18));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
}
.st-cat-title { font-size: 1.05rem; font-weight: 700; margin: 10px 0 7px; color: #F1F5F9; line-height: 1.35; }
.st-cat-desc  { font-size: 0.85rem; color: #64748B; line-height: 1.55; margin-bottom: 16px; flex: 1; }
.st-cat-footer {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid rgba(255,255,255,0.05); padding-top: 13px; margin-top: auto;
}
.st-cat-count { font-size: 0.78rem; color: #475569; }
.st-cat-action { font-size: 0.84rem; font-weight: 600; color: #0891B2; }

/* ── Loading / Empty ── */
.st-loading {
    display: flex; align-items: center; justify-content: center;
    padding: 80px 24px; gap: 12px; color: #64748B; font-size: 0.9rem;
}
.st-spinner {
    width: 22px; height: 22px;
    border: 2px solid rgba(8,145,178,0.2);
    border-top-color: #0891B2;
    border-radius: 50%;
    animation: st-spin 0.65s linear infinite;
}
@keyframes st-spin { to { transform: rotate(360deg); } }
.st-empty { text-align: center; padding: 80px 24px; color: #64748B; }
.st-empty-icon { font-size: 2.4rem; margin-bottom: 12px; }

/* ═══════════════════════════════════
   MCQ VIEWER
═══════════════════════════════════ */

/* ── Viewer Header ── */
.st-viewer-header {
    padding: 80px 24px 32px;
    border-bottom: 1px solid rgba(255,255,255,0.055);
}
.st-back-btn {
    display: inline-flex; align-items: center; gap: 6px;
    color: #0891B2; font-size: 0.875rem; text-decoration: none;
    margin-bottom: 18px; transition: gap 0.2s; font-weight: 500;
}
.st-back-btn:hover { gap: 10px; }
.st-viewer-title { font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: 6px; line-height: 1.2; }
.st-viewer-meta  { color: #64748B; font-size: 0.875rem; }

/* ── Chapter Nav (sticky) ── */
.st-chapter-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(7,9,26,0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.055);
    padding: 0 24px;
    display: flex; gap: 2px;
    overflow-x: auto; scrollbar-width: none;
}
.st-chapter-nav::-webkit-scrollbar { display: none; }
.st-chap-btn {
    flex-shrink: 0; padding: 14px 14px;
    background: none; border: none; border-bottom: 2px solid transparent;
    color: #4B5563; font-size: 0.78rem; font-weight: 500;
    cursor: pointer; transition: all 0.2s; white-space: nowrap;
    font-family: inherit; letter-spacing: 0.01em;
}
.st-chap-btn:hover { color: #CBD5E1; }
.st-chap-btn.active { color: #0891B2; border-bottom-color: #0891B2; }

/* ── MCQ Section ── */
.st-mcq-section { padding: 32px 24px 60px; max-width: 860px; margin: 0 auto; }
.st-chapter-block { margin-bottom: 40px; }
.st-chapter-heading {
    font-size: 0.95rem; font-weight: 700; color: #0891B2;
    padding: 0 0 12px; margin-bottom: 18px;
    border-bottom: 1px solid rgba(8,145,178,0.2);
    scroll-margin-top: 58px; letter-spacing: 0.01em; text-transform: uppercase;
}

/* ── MCQ Card ── */
.st-mcq-card {
    background: rgba(255,255,255,0.022);
    border: 1px solid rgba(255,255,255,0.068);
    border-radius: 14px; padding: 22px;
    margin-bottom: 14px;
    transition: border-color 0.25s;
}
.st-mcq-card:hover { border-color: rgba(255,255,255,0.11); }

.st-mcq-q-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.st-mcq-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 27px; height: 27px; min-width: 27px;
    background: linear-gradient(135deg, #1E40AF, #0891B2);
    border-radius: 50%; font-size: 0.72rem; font-weight: 700;
    color: white; flex-shrink: 0; margin-top: 2px;
}
.st-mcq-question {
    font-size: 0.96rem; font-weight: 500; line-height: 1.7;
    color: #E2E8F0; flex: 1;
}

/* ── Options ── */
.st-options { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.st-option {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 9px 13px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.055);
    background: rgba(255,255,255,0.018);
    font-size: 0.885rem; color: #94A3B8; line-height: 1.5;
    transition: all 0.2s;
}
.st-option-key { font-weight: 700; color: #4B5563; flex-shrink: 0; min-width: 15px; padding-top: 1px; }
.st-option.correct {
    background: rgba(16,185,129,0.09);
    border-color: rgba(16,185,129,0.28);
    color: #D1FAE5;
}
.st-option.correct .st-option-key { color: #10B981; }

/* ── Reveal Button ── */
.st-reveal-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 16px;
    background: rgba(30,64,175,0.12);
    border: 1px solid rgba(30,64,175,0.28);
    border-radius: 8px; color: #60A5FA;
    font-size: 0.83rem; font-weight: 500; cursor: pointer;
    transition: all 0.2s; font-family: inherit;
}
.st-reveal-btn:hover { background: rgba(30,64,175,0.22); border-color: rgba(30,64,175,0.48); }
.st-reveal-btn.revealed { background: rgba(16,185,129,0.09); border-color: rgba(16,185,129,0.25); color: #34D399; pointer-events: none; }

/* ── Answer Panel ── */
.st-answer-panel {
    overflow: hidden; max-height: 0;
    transition: max-height 0.38s ease;
}
.st-answer-panel.open { max-height: 900px; }
.st-answer-inner {
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 12px;
}
.st-answer-label {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.07em; color: #475569; margin-bottom: 3px;
}
.st-answer-correct {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.92rem; font-weight: 700; color: #10B981; margin-bottom: 10px;
}
.st-answer-text { font-size: 0.885rem; color: #CBD5E1; line-height: 1.65; margin-bottom: 8px; }
.st-solution-box {
    background: rgba(30,64,175,0.08);
    border: 1px solid rgba(30,64,175,0.18);
    border-radius: 9px; padding: 12px 14px; margin-top: 10px;
}
.st-solution-box .st-answer-label { color: #3B82F6; }
.st-solution-text { font-size: 0.875rem; color: #CBD5E1; line-height: 1.7; }

/* ═══════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════ */
.st-login-wrap {
    min-height: 100vh; display: flex;
    align-items: center; justify-content: center; padding: 20px;
    position: relative;
}
.st-login-wrap::before {
    content: ''; position: fixed; inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(30,64,175,0.13) 0%, transparent 60%);
    pointer-events: none;
}
.st-login-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 20px; padding: 40px 36px;
    width: 100%; max-width: 420px; position: relative; z-index: 1;
}
.st-login-logo {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 28px; text-decoration: none;
    color: #F1F5F9; font-weight: 800; font-size: 1.1rem;
}
.st-login-logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #1E40AF, #0891B2);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 900; font-size: 1rem;
}
.st-login-card h1 { font-size: 1.55rem; font-weight: 800; margin-bottom: 5px; }
.st-login-card .st-login-sub { color: #64748B; font-size: 0.875rem; margin-bottom: 26px; line-height: 1.5; }

.st-field { margin-bottom: 14px; }
.st-field label { display: block; font-size: 0.78rem; font-weight: 600; color: #94A3B8; margin-bottom: 6px; letter-spacing: 0.02em; }
.st-field input {
    width: 100%;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; padding: 12px 14px;
    color: #F1F5F9; font-size: 0.93rem; font-family: inherit;
    outline: none; transition: border-color 0.2s;
}
.st-field input:focus { border-color: rgba(8,145,178,0.5); background: rgba(255,255,255,0.06); }

.st-login-btn {
    width: 100%; padding: 13px;
    background: linear-gradient(135deg, #1E40AF, #0891B2);
    border: none; border-radius: 10px;
    color: white; font-size: 0.94rem; font-weight: 700;
    cursor: pointer; transition: opacity 0.2s; font-family: inherit; margin-top: 6px;
}
.st-login-btn:hover { opacity: 0.9; }
.st-login-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.st-alert {
    border-radius: 9px; padding: 10px 14px;
    font-size: 0.84rem; margin-top: 12px; display: none; line-height: 1.5;
}
.st-alert.error   { background: rgba(239,68,68,0.09); border: 1px solid rgba(239,68,68,0.22); color: #FCA5A5; }
.st-alert.success { background: rgba(16,185,129,0.09); border: 1px solid rgba(16,185,129,0.22); color: #6EE7B7; }
.st-alert.warning { background: rgba(245,158,11,0.09); border: 1px solid rgba(245,158,11,0.22); color: #FCD34D; }

/* ── Anti-Copy Layer ── */
.no-select {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* ── KaTeX Dark Override ── */
.katex { color: #E2E8F0 !important; }
.katex-display { overflow-x: auto; overflow-y: hidden; }
.katex-display > .katex { white-space: normal; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .st-hero { padding: 80px 20px 40px; }
    .st-mcq-card { padding: 16px; }
    .st-login-card { padding: 28px 20px; }
    .st-mcq-question { font-size: 0.925rem; }
    .st-option { font-size: 0.855rem; }
    .st-chapter-heading { font-size: 0.85rem; }
}
