/* ============================================================
   Sikh‑themed, dark glass, fully readable & responsive
   ============================================================ */

:root {
    --primary: #f4a261;
    --secondary: #ff8c42;
    --accent: #d4af37;
    --bg-solid: #0a0f19;
    --glass-bg: rgba(10, 15, 25, 0.88);
    --glass-border: rgba(255, 215, 140, 0.35);
    --text-primary: #ffffff;
    --text-secondary: #e0dcd5;
    --text-muted: #a0978a;
    --danger: #e74c3c;
    --success: #4caf50;
    --info: #4fc3f7;
    --radius-xl: 48px;
    --radius-lg: 32px;
    --radius-md: 24px;
    --radius-sm: 16px;
    --transition: 0.3s ease;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Cinzel', serif;
}

/* ========== GLOBAL RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-solid);
    min-height: 100vh;
    padding-top: 80px;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}



/* ========== VIDEO BACKGROUND ========== */
.video-background {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -3; overflow: hidden;
}
.video-background video {
    position: absolute; top: 50%; left: 50%;
    min-width: 100%; min-height: 100%;
    width: auto; height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: brightness(0.5);
}
.overlay-mist {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 30% 20%, rgba(0,0,0,0.55), rgba(0,0,0,0.8));
    z-index: -2; pointer-events: none;
}
.sikh-bg-motif, .khanda-bg {
    position: fixed; bottom: 2rem; right: 2rem; width: 120px; height: 120px;
    opacity: 0.25; pointer-events: none; z-index: -1;
}
.sikh-bg-motif svg, .khanda-bg svg {
    width: 100%; height: 100%;
    filter: drop-shadow(0 0 8px rgba(244,162,97,0.5));
}
.ek-onkar-bg {
    display: none !important;
    position: fixed; top: 8%; left: 4%; font-size: 4.5rem; font-weight: 800;
    font-family: 'Inter', sans-serif; letter-spacing: 6px;
    color: rgba(255,215,140,0.2); pointer-events: none; z-index: -1;
    white-space: nowrap; transform: rotate(-6deg);
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* ========== ORBS (leaderboard) ========== */
.orb {
    position: fixed; border-radius: 50%; filter: blur(100px); pointer-events: none;
    z-index: -1; opacity: 0.3;
    animation: floatOrb 25s infinite alternate ease-in-out;
}
.orb-1 { width: 60vw; height: 60vw; background: #f4a261; top: -25vh; left: -25vw; }
.orb-2 { width: 50vw; height: 50vw; background: #e76f51; bottom: -30vh; right: -20vw; animation-duration: 30s; }
.orb-3 { width: 45vw; height: 45vw; background: #ffb347; top: 40%; right: 5%; animation-duration: 20s; }
@keyframes floatOrb {
    0% { transform: translate(0,0) scale(1); opacity: 0.2; }
    100% { transform: translate(10%,15%) scale(1.2); opacity: 0.4; }
}

/* ========== HEADER ========== */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(10, 15, 25, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 1.8rem; height: 72px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap;
}
.header-left {
    display: flex; align-items: center; gap: 1.2rem;
    flex: 1 1 auto; min-width: 0;
}
.header-right {
    display: flex; align-items: center; gap: 0.8rem;
    flex: 0 0 auto; white-space: nowrap; flex-wrap: nowrap;
    margin-left: auto;
}

.home-btn {
    display: flex; align-items: center; gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #0f0f1a; padding: 0.45rem 1.5rem; border-radius: 40px;
    text-decoration: none; font-weight: 700; font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 4px 18px rgba(244,162,97,0.5);
    white-space: nowrap;
}
.home-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(244,162,97,0.7); }

.site-title {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-heading);
    white-space: nowrap;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none !important;
}

/* ========== USER MENU & DROPDOWN ========== */
.user-menu {
    position: relative; display: flex; align-items: center; gap: 0.5rem;
    cursor: pointer; text-decoration: none; color: inherit;
}
.user-menu img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }
.user-icon { font-size: 1.5rem; color: var(--primary); }
.dropdown {
    position: absolute; top: 100%; right: 0; margin-top: 0.5rem;
    background: rgba(10,15,25,0.95); backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border); border-radius: 20px;
    padding: 0.5rem 0; min-width: 170px; display: none; z-index: 1001;
}
.dropdown.show { display: block; }
.dropdown a {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1.2rem;
    color: var(--text-primary); text-decoration: none; transition: var(--transition);
}
.dropdown a:hover { background: rgba(244,162,97,0.15); color: var(--primary); }

/* ========== BADGE PILLS ========== */
.badge-pill {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #0f0f1a; padding: 0.3rem 1rem; border-radius: 30px; font-size: 0.8rem;
    font-weight: 700; letter-spacing: 0.5px; border: 1px solid rgba(255,255,245,0.3);
}

/* ========== LANGUAGE SELECT ========== */
.lang-select {
    background: rgba(255, 255, 255, 0.08); border: 1px solid var(--glass-border);
    color: var(--text-primary); border-radius: 30px;
    padding: 0.25rem 1.8rem 0.25rem 0.6rem; font-family: inherit; font-size: 0.8rem;
    cursor: pointer; outline: none; transition: 0.2s;
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23f4a261' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.4rem center;
    width: auto; min-width: auto; max-width: 100px; box-sizing: border-box;
}
.lang-select:hover { border-color: var(--primary); background-color: rgba(244, 162, 97, 0.1); }
.lang-select option { background: #1a1f2e; color: white; }

/* ========== MAIN CONTAINER ========== */
.container { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }

/* ========== UNIFIED GLASS CARDS ========== */
.card, .stat-card, .tier-card, .quiz-card, .quiz-card-enhanced, .attempt-card, .cert-item,
.page-header, .profile-card, .detail-card, .feature-card, .faq-item, .stat-box,
.glass-hero, .admin-card, .study-card {
    background: var(--glass-bg);
    backdrop-filter: blur(0px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    transition: all var(--transition);
}
.card:hover, .stat-card:hover, .quiz-card-enhanced:hover, .attempt-card:hover, .cert-item:hover,
.admin-card:hover, .study-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(244,162,97,0.2);
}

/* ========== CARD TITLES ========== */
.card-title, .page-header h1 {
    font-size: 1.7rem; font-weight: 700; font-family: var(--font-heading);
    margin-bottom: 1.2rem;
    color: #fff;
    background: linear-gradient(135deg, #fff5e6, #fad19e);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex; align-items: center; gap: 0.5rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.page-header h1 i, .card-title i { -webkit-text-fill-color: var(--primary); }
.page-subtitle { font-size: 1.1rem; color: var(--text-secondary); margin: 0; font-weight: 400; }

.quiz-card {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.quiz-section {
    margin-top: 2rem;
}

.quiz-user-info {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    font-size: 0.85rem;
    background: rgba(244, 162, 97, 0.08);
    border-radius: 10px;
    padding: 0.5rem 0.8rem;
    margin-top: 0.5rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0 1.5rem;
    align-items: center;
}
.search-box input {
    flex: 1;
    padding: 0.6rem 1.2rem;
    border-radius: 40px;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--glass-border);
    color: #fff;
}
.search-box input:focus {
    border-color: var(--primary);
}

.page-btn {
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    background: rgba(10,15,25,0.7);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.page-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #0f0f1a;
    border-color: transparent;
}
.page-btn:hover {
    background: rgba(244,162,97,0.2);
    border-color: var(--primary);
}

.refresh-btn {
    background: rgba(244,162,97,0.15);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.refresh-btn:hover {
    background: var(--primary);
    color: #0f0f1a;
}

.last-updated {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}
.next-tier-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin-top: 0.3rem;
    overflow: hidden;
}
.next-tier-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.motivation-card {
    background: rgba(244,162,97,0.08);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 0.8rem 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 0.95rem;
}

.progress-chart {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    height: 250px;
}

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem; margin-bottom: 2rem;
}
.stat-card { padding: 1.8rem 1.2rem; text-align: center; }
.stat-number {
    font-size: 2.8rem; font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    line-height: 1.2; text-shadow: 0 2px 10px rgba(244,162,97,0.4);
}
.stat-label {
    font-size: 0.9rem; color: var(--text-secondary); margin-top: 0.4rem;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.stat-label i { color: var(--primary); opacity: 0.9; }

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: linear-gradient(105deg, #d48a3c, #f4a261);
    border: none; border-radius: 50px; padding: 0.7rem 2rem;
    font-weight: 700; font-size: 0.9rem; color: #0f0f1a; text-decoration: none;
    cursor: pointer; transition: all 0.25s ease; box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(244,162,97,0.5); color: #0f0f1a; }
.btn:active { transform: translateY(0); }
.btn-outline {
    background: transparent; border: 2px solid var(--glass-border);
    color: var(--text-primary); box-shadow: none;
}
.btn-outline:hover { background: rgba(244,162,97,0.12); border-color: var(--primary); }
.btn-danger { background: linear-gradient(135deg, #c0392b, #e74c3c); }
.btn-success { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.btn-edit { background: linear-gradient(135deg, #2980b9, #3498db); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.qbank-btn {
    background: linear-gradient(105deg, #f4a261, #e76f51) !important;
    color: #0f0f1a !important;
    border: none !important;
    border-radius: 50px;
    padding: 0.55rem 1.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(244, 162, 97, 0.4);
}
.qbank-btn:hover {
    background: linear-gradient(105deg, #ffb347, #ff8c42) !important;
    box-shadow: 0 6px 20px rgba(244, 162, 97, 0.6);
    transform: translateY(-2px);
}
.qbank-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(244, 162, 97, 0.3);
}
.btn-small {
    display: inline-block; padding: 0.35rem 0.8rem; font-size: 0.75rem; font-weight: 600;
    border-radius: 20px; background: rgba(244,162,97,0.15); border: 1px solid rgba(244,162,97,0.4);
    color: #f4a261; text-decoration: none; transition: 0.2s; margin-left: 0.5rem; cursor: pointer;
}
.btn-small:hover { background: #f4a261; color: #1c1c2a; border-color: #f4a261; }
.btn-danger.btn-small { border-color: rgba(231,76,60,0.4); color: #e74c3c; background: rgba(231,76,60,0.1); }
.btn-danger.btn-small:hover { background: #e74c3c; color: white; }
.btn-review {
    background: transparent; border: 1px solid var(--primary); color: var(--primary);
    padding: 0.4rem 1rem; border-radius: 40px; font-weight: 500; transition: 0.2s;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn-review:hover { background: var(--primary); color: #0f0f1a; }

/* ========== FORMS ========== */
label { display: block; margin-top: 1.2rem; font-weight: 600; color: #fff; font-size: 0.9rem; }
input, textarea, select {
    width: 100%; padding: 0.85rem 1.2rem; margin-top: 0.4rem;
    background: rgba(10,15,25,0.5); border: 1px solid rgba(255,245,215,0.4);
    border-radius: 40px; color: white; font-family: inherit; font-size: 1rem;
    transition: var(--transition);
}
input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(244,162,97,0.5);
    background: rgba(10,15,25,0.7);
}
select option { background: #1a1f2e; color: white; }
textarea { border-radius: 24px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ========== TABLES ========== */
.table-wrapper {
    background: rgba(10,15,25,0.88); backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border); border-radius: var(--radius-md);
    overflow-x: auto; margin-bottom: 2rem;
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.9rem 1.2rem; text-align: left; border-bottom: 1px solid rgba(255,215,140,0.1); white-space: nowrap; }
th { background: rgba(255,255,245,0.05); color: #ffdcad; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,245,0.05); }
table tbody td { color: #f5f0eb; }

/* ========== BADGES ========== */
.badge-stat {
    display: inline-block; padding: 0.25rem 0.9rem; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
}
.badge-stat.passed { background: rgba(46,204,113,0.25); color: #6fcf97; border: 1px solid rgba(46,204,113,0.4); }
.badge-stat.failed { background: rgba(231,76,60,0.25); color: #ff8a7a; border: 1px solid rgba(231,76,60,0.4); }
.badge-stat.active { background: rgba(46,204,113,0.25); color: #6fcf97; }
.badge-stat.upcoming { background: rgba(255,152,0,0.25); color: #ffb74d; }
.badge-stat.past { background: rgba(158,158,158,0.2); color: #bdbdbd; }
.badge-status { display: inline-block; padding: 0.2rem 0.9rem; border-radius: 30px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-pass { background: var(--success); color: white; }
.badge-fail { background: var(--danger); color: white; }

/* ========== MODAL ========== */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9); z-index: 2000; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--glass-bg); backdrop-filter: blur(20px); border-radius: 32px;
    padding: 2.5rem; max-width: 520px; width: 90%; border: 1px solid var(--glass-border);
}

/* ========== PAGINATION ========== */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin: 2rem 0; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 0.5rem 1.2rem; border-radius: 40px;
    background: rgba(10,15,25,0.7); border: 1px solid var(--glass-border);
    color: var(--text-primary); text-decoration: none; transition: var(--transition);
}
.pagination a:hover { background: rgba(244,162,97,0.2); border-color: var(--primary); }
.pagination .current { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #0f0f1a; font-weight: 600; border-color: transparent; }

/* ========== MESSAGES ========== */
.msg { padding: 0.8rem 1.5rem; border-radius: 40px; margin-bottom: 1rem; font-weight: 500; backdrop-filter: blur(8px); background: rgba(0,0,0,0.6); }
.msg.success { background: rgba(46,204,113,0.2); border-left: 4px solid var(--success); color: #a5d6a7; }
.msg.error { background: rgba(231,76,60,0.2); border-left: 4px solid var(--danger); color: #ef9a9a; }
.flash-msg { padding: 0.8rem 1.2rem; border-radius: 14px; margin-bottom: 1.5rem; font-weight: 500; }
.flash-error { background: rgba(231,76,60,0.2); color: #ff9999; }
.flash-success { background: rgba(129,199,132,0.2); color: #a3e6a3; }

/* ========== FOOTER ========== */
.site-footer {
    text-align: center; padding: 2rem; background: rgba(10,15,25,0.88);
    backdrop-filter: blur(8px); border-top: 1px solid var(--glass-border);
    color: var(--text-muted); font-size: 0.85rem; margin-top: 3rem;
}
.site-footer a { color: var(--primary); text-decoration: none; }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-container { max-width: 1100px; width: 90%; margin: 2rem auto 3rem; display: flex; flex-direction: column; gap: 2rem; }
.profile-card {
    background: var(--glass-bg); backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
    padding: clamp(1.8rem, 4vw, 2.5rem);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.profile-top { display: flex; align-items: center; gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap; }
.avatar-img, .avatar-placeholder {
    width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--primary);
    box-shadow: 0 0 30px rgba(255,179,71,0.5); object-fit: cover;
}
.avatar-placeholder {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: #0f0f1a;
}
.profile-name {
    font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; line-height: 1.2;
    color: #fff;
    background: linear-gradient(135deg, #fff5e6, #fad19e);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.badge-row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin-top: 0.5rem; }
.pill {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.4rem 1.4rem; border-radius: 40px; font-weight: 700; font-size: 0.9rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #0f0f1a; border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.pill-badge { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #0f0f1a; }

span.pill.pill-points {
    background: rgba(244, 162, 97, 0.3);      /* slightly stronger orange glass */
    border: 1px solid var(--primary);
    color: #ffffff !important;                 /* white text guarantees contrast */
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.completeness-wrapper { display: flex; flex-direction: column; align-items: center; margin-left: auto; }
.completeness-ring {
    width: 80px; height: 80px; border-radius: 50%;
    background: conic-gradient(var(--primary) var(--completeness, 0%), rgba(255,255,255,0.08) var(--completeness, 0%));
    display: flex; align-items: center; justify-content: center;
    position: relative; margin: 0 auto 0.4rem;
}
.completeness-ring::before { content: ""; width: 64px; height: 64px; border-radius: 50%; background: var(--bg-solid); position: absolute; }
.completeness-value { position: relative; z-index: 1; font-weight: 700; color: var(--primary); font-size: 1.2rem; }

.detail-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
@media (max-width: 700px) { .detail-cards { grid-template-columns: 1fr; } }
.detail-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md); padding: 1.8rem;
}
.detail-card h3 { font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--primary); margin-bottom: 1rem; }
.detail-item { display: flex; align-items: flex-start; gap: 0.7rem; margin-bottom: 0.9rem; color: var(--text-secondary); }
.detail-item i { width: 20px; text-align: center; margin-right: 0.5rem; }

.edit-tabs { display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; justify-content: flex-start; }
.edit-tabs .tab {
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-secondary); padding: 0.6rem 1.5rem; border-radius: 30px;
    cursor: pointer; font-weight: 500; transition: 0.3s;
}
.edit-tabs .tab.active { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #0f0f1a; border-color: transparent; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.copy-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 0.85rem; padding: 0.2rem 0.4rem; border-radius: 4px; transition: color 0.2s, background 0.2s; }
.copy-btn:hover { color: var(--primary); background: rgba(255,179,71,0.1); }
.edit-photo-row { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.edit-photo-thumb, .edit-photo-placeholder { width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--primary); transition: border-color 0.3s; object-fit: cover; }
.edit-photo-placeholder { background: rgba(255,180,71,0.12); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--primary); border: 2px dashed var(--primary); }
.file-label-btn { display: inline-block; background: rgba(255,180,71,0.15); border: 1px solid rgba(255,180,71,0.4); border-radius: 20px; padding: 0.35rem 0.9rem; color: var(--primary); font-size: 0.82rem; cursor: pointer; transition: background 0.2s; user-select: none; }
.file-label-btn:hover { background: rgba(255,180,71,0.28); }
#new-photo-preview { max-width: 80px; max-height: 80px; border-radius: 8px; border: 2px solid var(--primary); display: none; margin-top: 0.5rem; object-fit: cover; }
#remove-photo-cb { margin: 0; width: auto; cursor: pointer; transform: scale(1.1); accent-color: var(--primary); vertical-align: middle; flex-shrink: 0; }
.remove-photo-label { display: flex !important; align-items: center !important; gap: 0.5rem; margin-top: 0.8rem !important; cursor: pointer; user-select: none; font-size: 0.84rem; color: #ff9a8b; }

.pincode-wrap { position: relative; }
.pincode-wrap > input { padding-right: 2.5rem !important; }
.pin-status { position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%); font-size: 0.85rem; pointer-events: none; }
.pin-status.ok { color: #4caf50 !important; }
.pin-status.err { color: #ff6b6b !important; }
#post-office-select { display: none; width: 100%; padding: 0.7rem 1rem; background: rgba(10,12,22,0.28); border: 1px solid rgba(255,245,215,0.5); border-radius: 20px; color: white; font-size: 0.9rem; }
#post-office-input:disabled { opacity: 0.6; cursor: not-allowed; }
.field-error { color: #ff6b6b; font-size: 0.8rem; margin-top: 0.2rem; display: block; }
.input-error { border-color: var(--danger) !important; box-shadow: 0 0 0 2px rgba(231,76,60,0.4); }
.char-counter { font-size: 0.7rem; color: var(--text-muted); text-align: right; margin-top: 0.15rem; transition: color 0.2s; }
.char-counter.near { color: #f39c12; }
.char-counter.over { color: var(--danger); font-weight: 600; }
.strength-wrap { margin-top: 0.35rem; }
.strength-track { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; margin-bottom: 0.2rem; }
.strength-fill { height: 100%; width: 0; border-radius: 2px; transition: width 0.4s ease, background-color 0.4s ease; }
.strength-fill.s1 { width: 25%;  background: #e74c3c; }
.strength-fill.s2 { width: 50%;  background: #f39c12; }
.strength-fill.s3 { width: 75%;  background: #3498db; }
.strength-fill.s4 { width: 100%; background: #2ecc71; }
.strength-text { font-size: 0.72rem; }
.strength-text.s1 { color: #e74c3c; }
.strength-text.s2 { color: #f39c12; }
.strength-text.s3 { color: #3498db; }
.strength-text.s4 { color: #2ecc71; }
.loader-overlay { display: none; position: fixed; inset: 0; background: rgba(11,11,20,0.85); backdrop-filter: blur(6px); z-index: 9999; justify-content: center; align-items: center; }
.loader-overlay.active { display: flex; }
.loader-ring { width: 60px; height: 60px; border: 4px solid rgba(255,180,71,0.2); border-top: 4px solid var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { color: var(--primary); margin-left: 1rem; font-weight: 600; }
.advanced-panel .detail-card h4 { margin-bottom: 0.75rem; font-size: 0.9rem; color: var(--primary); }

/* ---- GLOBAL FORM ROW / COL (used in profile & admin) ---- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.form-col {
    display: flex;
    flex-direction: column;
}
.form-col[style*="flex: 1 1 100%"] {
    grid-column: 1 / -1;
}

.whatsapp-combo {
    display: flex;
    gap: 0.5rem;
}
.whatsapp-combo select {
    flex: 0 0 auto;
    min-width: 130px;
}
.whatsapp-combo input {
    flex: 1;
}

#dirty-banner {
    display: none;
    background: rgba(244,162,97,0.15);
    border: 1px solid var(--primary);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    color: #ffffff;
    font-size: 0.85rem;
    align-items: center;
    gap: 0.5rem;
}

.advanced-panel {
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
}
.advanced-panel h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.form-row > .form-col:only-child {
    grid-column: 1 / -1;
}

/* ============================================================
   LEADERBOARD
   ============================================================ */
.lb-container { max-width: 700px; width: 90%; margin: 2rem auto; position: relative; z-index: 2; }
.tier-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.tier-left { display: flex; align-items: center; gap: 1rem; }
.tier-rank-circle { width: 70px; height: 70px; position: relative; }
.tier-info h4 { font-size: 1.1rem; color: #fff; }
.tier-info p { color: var(--text-secondary); }
.tier-badge { background: rgba(244,162,97,0.25); border-radius: 40px; padding: 0.5rem 1.2rem; text-align: center; }
.tier-badge span { font-weight: 700; font-size: 1rem; color: #fff; }
.period-tabs { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.period-tab {
    background: rgba(255,255,255,0.08); border: 1px solid var(--glass-border);
    padding: 0.45rem 1.2rem; border-radius: 40px; color: var(--text-secondary);
    font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: all 0.2s;
}
.period-tab.active, .period-tab:hover { background: var(--primary); color: #0f0f1a; border-color: var(--primary); }
.hero-rank-1 { background: rgba(10,15,25,0.88); border: 1px solid var(--primary); border-radius: 48px; padding: 1.8rem; text-align: center; margin-bottom: 2rem; }
.hero-avatar-wrapper { position: relative; width: 110px; height: 110px; margin: 0 auto; }
.hero-avatar { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary); }
.hero-crown { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); font-size: 2.5rem; color: gold; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5)); }
.hero-rank-badge { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #0f0f1a; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; border: 2px solid #fff; }
.hero-name { font-size: 1.4rem; font-weight: 700; margin-top: 0.8rem; color: #fff; }
.hero-pill { background: var(--primary); color: #0f0f1a; display: inline-block; padding: 0.3rem 1.5rem; border-radius: 40px; font-weight: 600; margin-top: 0.5rem; }
.lb-list { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 1.5rem; }
.lb-item {
    display: flex; align-items: center; background: rgba(10,15,25,0.88);
    backdrop-filter: blur(6px); border-radius: 60px; padding: 0.7rem 1.2rem;
    border: 1px solid rgba(255,255,255,0.1); transition: all 0.2s;
}
.lb-item:hover { border-color: var(--primary); transform: translateX(5px); }
.is-current-user { border: 2px solid var(--primary); background: rgba(244,162,97,0.2); }
.item-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; margin-right: 1rem; }
.item-info { flex: 1; }
.item-name { font-weight: 600; font-size: 1rem; color: #fff; }
.item-subtext { font-size: 0.75rem; color: var(--text-secondary); }
.you-badge { background: var(--primary); color: #0f0f1a; padding: 0.1rem 0.6rem; border-radius: 20px; font-size: 0.65rem; font-weight: 600; margin-left: 0.5rem; }
.item-rank { width: 38px; height: 38px; background: rgba(255,215,140,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; color: #fff; }

/* ============================================================
   USERNAME HANDLE – Single, Large, Clean Badge (no extra @)
   ============================================================ */
.lb-handle,
.podium-card .lb-handle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: linear-gradient(135deg, #f4a261 0%, #e76f51 100%);
    color: #0f0f1a !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    font-size: 0.85rem;                /* comfortable size */
    padding: 0.35rem 1.2rem;
    border-radius: 30px;
    text-decoration: none !important;
    letter-spacing: 0.2px;
    box-shadow: 0 3px 12px rgba(244, 162, 97, 0.4);
    transition: all 0.3s ease;
    text-shadow: none !important;
    line-height: 1.3;
}

/* REMOVED ::before pseudo-element – no extra @ */

.lb-handle:hover,
.podium-card .lb-handle:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(244, 162, 97, 0.7);
    background: linear-gradient(135deg, #ffb347, #ff8c42);
    color: #0f0f1a !important;
}

/* Tier card specific */
.tier-info .lb-handle {
    margin-left: 0;
    margin-top: 0.3rem;
}

/* Podium card alignment */
.podium-card .lb-handle {
    display: inline-flex;
    margin: 0.3rem auto 0;
    width: fit-content;
}

/* ============================================================
   QUIZ LIBRARY / STUDY CARDS
   ============================================================ */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-bottom: 2rem; }
.filter-btn {
    background: rgba(10,15,25,0.6); border: 1px solid var(--glass-border); color: var(--text-primary);
    padding: 0.5rem 1.5rem; border-radius: 30px; font-weight: 500; cursor: pointer; transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #0f0f1a; border-color: transparent;
}
.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.quiz-card-enhanced { padding: 0; overflow: hidden; }
.card-thumb { height: 180px; background-size: cover; background-position: center; display: flex; align-items: flex-end; padding: 1rem; position: relative; }
.card-thumb .badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.card-body { padding: 1.2rem; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1.25rem; color: #fff; margin-bottom: 0.3rem; }
.card-body p { color: var(--text-secondary); font-size: 0.9rem; flex: 1; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.lang-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.lang-pill { background: rgba(244,162,97,0.2); border: 1px solid var(--primary); border-radius: 20px; padding: 0.2rem 0.7rem; font-size: 0.7rem; font-weight: 600; color: var(--primary); }

/* ============================================================
   CERTIFICATES & ATTEMPTS
   ============================================================ */
.cert-list { display: flex; flex-direction: column; gap: 1rem; }
.cert-item { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.cert-info h3 { color: var(--primary); font-size: 1.2rem; }
.attempt-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.attempt-info { flex: 2; min-width: 200px; }
.attempt-title { font-size: 1.2rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 0.5rem; }
.attempt-date { color: var(--text-secondary); font-size: 0.8rem; margin-top: 4px; }

/* ============================================================
   GUEST LANDING PAGE – UNIFIED CENTRED LAYOUT
   ============================================================ */
body.guest-landing {
    padding-top: 0;
}

/* ---------- REUSABLE CENTRED CONTAINER ---------- */
.guest-container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}



.site-title-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 248, 240, 0.09);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 215, 140, 0.25);
    border-radius: 3rem;
    padding: 0.35rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    flex: 0 1 auto;
}
.logo-bar-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}
/* empty spacer to keep title centred */
.logo-bar-spacer {
    width: 50px;
    visibility: hidden;
}

@media (max-width: 600px) {
    .site-title-pill {
        max-width: 100%;
        padding: 0.2rem 0.8rem;
    }
    .site-title {
        font-size: 1rem;
        white-space: normal;          /* allow wrapping */
    }
}

/* ---------- HERO (everything centred) ---------- */
.glass-hero.landing-hero {
    max-width: 900px;
    margin: 2rem auto;
    text-align: center;
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
}
.hero-icon i {
    font-size: 3rem;
    color: var(--primary);
    filter: drop-shadow(0 0 10px var(--primary));
}
.glass-hero h1 {
    font-size: 2.4rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #fff;
}
.glass-hero h1 span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 1rem 0 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}
.hero-tagline span {
    display: block;
}

/* ---------- STATS ROW (equal-width cards, centred) ---------- */
.stats-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0 3rem;
}
.stat-box {
    text-align: center;
    padding: 1.8rem 2.5rem;
    background: rgba(255, 248, 240, 0.09);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 215, 140, 0.25);
    border-radius: 1.5rem;
    flex: 1 1 200px;
    max-width: 220px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}
.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}
.stat-num {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

/* ---------- LATEST QUIZ CARD – centered, fit-content ---------- */
.latest-quiz-card {
    display: flex;                    /* flex container, block-level */
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    width: fit-content;              /* only as wide as content */
    max-width: 90%;                  /* prevent overflow on small screens */
    margin: 1.5rem auto;             /* auto margins = perfect centering */
    padding: 0.6rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-align: center;
}

.latest-quiz-card h4 {
    color: #fff;
    margin: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.latest-quiz-card .quiz-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    color: var(--text-primary);
}

.latest-quiz-card .btn {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 0.3rem 1.2rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.8rem;
    transition: 0.2s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.latest-quiz-card .btn:hover {
    background: rgba(255,255,255,0.3);
}

/* ---------- Star icon in latest quiz card ---------- */
.latest-quiz-card .star-icon {
    color: #ffd700 !important;
}
/* ---------- Mobile: full-width and stacked ---------- */
@media (max-width: 600px) {
    .latest-quiz-card {
        width: 100%;                  /* full width on small screens */
        max-width: 100%;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0.5rem;
        padding: 0.6rem 1rem;
        margin: 1.5rem auto;          /* keep auto centering */
    }
    .latest-quiz-card .btn {
        width: 100%;
        justify-content: center;
        padding: 0.4rem;
    }
    .latest-quiz-card h4 {
        font-size: 0.75rem;
    }
    .latest-quiz-card .quiz-title {
        font-size: 0.9rem;
    }
}
/* ---------- SAMPLE QUIZ (centred container, 2-column options) ---------- */
#sample-quiz {
    text-align: center;
    margin: 4rem auto;
    max-width: 900px;
    padding: 0 1rem;
}
#sample-quiz h2,
#sample-quiz p {
    text-align: center;
}

#sampleQuizContainer .question-card {
    background: rgba(10, 15, 25, 0.75);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin: 0 auto 1rem auto;
    text-align: center;
    max-width: 600px;
}
#sampleQuizContainer .question-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: none;
}
#sampleQuizContainer .options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}
#sampleQuizContainer .option {
    flex: 0 1 calc(50% - 0.4rem);
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 215, 140, 0.3);
    border-radius: 40px;
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    text-shadow: none;
    transition: 0.2s;
    justify-content: center;
}
#sampleQuizContainer .option:hover {
    background: rgba(244, 162, 97, 0.25);
    border-color: var(--primary);
}
#sampleQuizContainer .option.selected {
    background: var(--primary);
    color: #0f0f1a;
    border-color: var(--primary);
}
#sampleQuizContainer .option-letter {
    font-weight: bold;
    width: auto;
    display: inline-block;
    color: inherit;
}
#sampleQuizContainer .option.selected .option-letter {
    color: #0f0f1a;
}
.sample-score-text {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* ---------- ABOUT SECTION (centred) ---------- */
.about-section {
    max-width: 800px;
    margin: 4rem auto;
    text-align: center;
    color: var(--text-secondary);
}
.about-section h2,
.why-join-heading {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.why-join-heading {
    text-align: center;
    margin-top: 3rem;
}

/* ---------- FAQ SECTION (centred block, questions centred, chevron right) ---------- */
.faq-section {
    max-width: 800px;
    margin: 4rem auto;
    text-align: center;
    padding: 0 1rem;
}
.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}
.faq-item {
    max-width: 600px;
    margin: 0 auto 1rem auto;
    padding: 1.5rem 0;
}
.faq-question {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0.8rem 2rem 0.8rem 0;
    min-height: 2rem;
    overflow: visible;
}
.faq-question i {
    position: absolute;
    right: 2.0rem;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
    font-size: 1rem;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-secondary);
    text-align: center;
    padding: 0 1rem;
}
.faq-item.active .faq-answer {
    max-height: 300px;
    margin-top: 0.5rem;
}

/* ---------- FOOTER (unchanged but with extra top margin) ---------- */
.landing-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

/* ---------- GLOBAL H2 CONSISTENCY ---------- */
.guest-landing h2 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

/* ---------- RESPONSIVE TWEAKS ---------- */
@media (max-width: 600px) {

    .stat-box {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .category-pill {
        flex: 0 1 auto;
        width: auto;
        white-space: normal;
    }
}


/* ============================================================
   REGISTRATION PAGE
   ============================================================ */
.slider-toggle {
    position: relative; width: 100%; height: 52px;
    background: rgba(0,0,0,0.15); backdrop-filter: blur(8px);
    border-radius: 50px; border: 1px solid rgba(255,245,215,0.5);
    margin: 1.5rem 0 0.5rem; display: flex; align-items: center; overflow: hidden; z-index: 1;
}
.slider-knob {
    position: absolute; width: 50%; height: 44px;
    background: linear-gradient(105deg, rgba(212,138,60,0.85), rgba(244,162,97,0.95));
    border-radius: 44px; top: 4px; left: calc(50% - 4px); z-index: 0;
    transition: left 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.toggle-option {
    flex: 1; height: 100%; background: transparent; border: none;
    font-size: 0.95rem; font-weight: 600; color: #fff6e8;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4); cursor: pointer; position: relative; z-index: 2;
    transition: color 0.3s; display: flex; align-items: center; justify-content: center; gap: 0.4rem;
}
.toggle-option.active { color: #1c1c2a; text-shadow: none; }

.register-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 0.2rem 1rem 4.5rem;
    animation: fadeSlideUp 0.6s ease-out;
}

.register-card {
    width: 100%;
    max-width: 460px;
    margin-top: 0.6rem;
    background: rgba(20,20,30,.75);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0,0,0,.6);
    padding: 1.2rem 1.5rem 1rem;
}

.btn-full { width: 100%; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

/* ---- scoped form-row for registration ---- */
.register-card .form-row {
    display: flex;
    gap: 8px;
}
.register-card .form-col {
    flex: 1;
    min-width: 0;
}
.register-card .form-col label {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
    display: block;
}
.register-card .form-col input,
.register-card .form-col select {
    width: 100%;
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    color: #fff;
}

.toggle-pwd {
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    transition: color 0.2s;
}
.toggle-pwd:hover { color: rgba(255, 255, 255, 0.9); }

.strength-meter {
    margin-top: 3px;
    font-size: 0.75rem;
}
.strength-bar {
    height: 4px;
    background: rgba(255,255,255,.2);
    border-radius: 2px;
    overflow: hidden;
}
.strength-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s;
}

.btn, .btn-outline, .btn-full, .toggle-method {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

.toggle-method {
    background: none;
    border: 1px solid rgba(255,255,255,.3);
    color: rgba(255,255,255,.8);
    border-radius: 8px;
    cursor: pointer;
    margin-top: 0.7rem;
    transition: .2s;
    width: 100%;
}
.toggle-method:hover {
    background: rgba(255,255,255,.1);
    border-color: var(--primary);
    color: var(--primary);
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0.4rem;
}
#socialRegister { display: none; }

.mismatch-warning {
    color: #e74c3c;
    font-size: 0.75rem;
    margin-top: 2px;
    display: none;
}

.divider {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,.7);
    margin: 0.8rem 0;
    font-size: 0.85rem;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255,255,255,.3);
}
.divider::before { margin-right: .75rem; }
.divider::after { margin-left: .75rem; }

.msg.error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeSlideDown 0.4s ease-out;
    font-size: 0.85rem;
    text-align: left;
    margin-bottom: 0.5rem;
}

.mobile-greeting {
    text-align: center;
    margin: 0 0 0.2rem;
    padding-top: 0.5rem;
}
.mobile-greeting h1 {
    font-size: 1.15rem;
    margin-bottom: 0.1rem;
}
.mobile-greeting .fas.fa-user-plus { font-size: 0.9rem; }
.mobile-greeting p {
    font-size: 0.75rem;
    color: rgba(255,255,255,.7);
    margin: 0;
}

@media(min-width: 768px) {
    /* FIX: allow scrolling on desktop */
    /* body { overflow: hidden; }  <-- REMOVED */
    .mobile-greeting { display: none; }
    .register-container {
        flex-direction: row;
        min-height: 100vh;
        margin: 0;
        padding: 0;
        justify-content: stretch;
        align-items: stretch;
        padding: 0.3rem 0 4.5rem;
    }
    .desktop-side {
        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, rgba(20,20,40,.8), rgba(40,20,20,.7));
        backdrop-filter: blur(10px);
        padding: 2rem;
        text-align: center;
        border-right: 1px solid rgba(255,255,255,.1);
    }
    .desktop-side h2 {
        font-size: 1.9rem;
        color: #fff;
        margin: 0.4rem 0;
    }
    .desktop-side p {
        color: rgba(255,255,255,.8);
        font-style: italic;
        max-width: 260px;
        font-size: 0.9rem;
    }
    .floating-letters span {
        display: inline-block;
        font-size: 2rem;
        color: rgba(245,158,11,.6);
        animation: float 4s ease-in-out infinite;
        margin: 0 80px;
    }
    .floating-letters span:nth-child(2) { animation-delay: 1.5s; }
    @keyframes float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
    }
    .register-card {
        flex: 1;
        max-width: 650px;
        margin: 0 2rem;
        padding: 1rem 1.5rem 0.8rem;
        max-height: 90vh;
        overflow-y: auto;
        align-self: center;
        margin-bottom: 1.5rem;
    }
    .form-grid {
        grid-template-columns: 1fr 1fr;
        column-gap: 1rem;
        row-gap: 0.6rem;
    }
    .register-card .form-row { gap: 6px; }
    .register-card .form-col label { font-size: 0.75rem; }
    .register-card .form-col input,
    .register-card .form-col select { padding: 0.4rem 0.6rem; font-size: 0.85rem; }
    .divider { margin: 0.6rem 0; }
    .btn, .btn-outline, .btn-full, .toggle-method {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   SECURITY SETTINGS
   ============================================================ */
.settings-container { max-width: 800px; width: 90%; margin: 2rem auto; display: flex; flex-direction: column; gap: 2rem; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group input { padding-right: 2.8rem !important; }
.toggle-pwd {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--primary);
    display: flex; align-items: center; justify-content: center; padding: 0;
}
.toggle-pwd svg { width: 20px; height: 20px; stroke: var(--primary); transition: 0.2s; }
.toggle-pwd:hover svg { stroke: #fff; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; }
.toggle-label { color: #fff; font-weight: 500; }
.switch { position: relative; display: inline-block; width: 52px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.2); border-radius: 34px; transition: 0.3s; border: 1px solid rgba(255,255,255,0.3);
}
.slider:before {
    position: absolute; content: ""; height: 22px; width: 22px; left: 3px; bottom: 2px;
    background: white; border-radius: 50%; transition: 0.3s;
}
input:checked + .slider { background: var(--primary); border-color: var(--primary); }
input:checked + .slider:before { transform: translateX(24px); }
.qr-box { background: #fff; padding: 1rem; border-radius: 16px; display: inline-block; box-shadow: 0 0 20px rgba(244,162,97,0.3); margin: 1rem 0; }
.qr-box #qrcode { display: flex; justify-content: center; }



/* ============================================================
   COMPACT LANGUAGE SELECT (already in header, but repeated for safety)
   ============================================================ */
.lang-select {
    background: rgba(255, 255, 255, 0.08); border: 1px solid var(--glass-border);
    color: var(--text-primary); border-radius: 30px;
    padding: 0.25rem 1.8rem 0.25rem 0.6rem; font-family: inherit; font-size: 0.75rem;
    cursor: pointer; outline: none; transition: 0.2s;
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23f4a261' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.4rem center;
    width: auto; min-width: auto; max-width: 100%; box-sizing: border-box;
}
.lang-select:hover { border-color: var(--primary); background-color: rgba(244, 162, 97, 0.1); }
.lang-select option { background: #1a1f2e; color: white; }

/* ============================================================
   UTILITY
   ============================================================ */
.hidden { display: none !important; }
.divider { display: flex; align-items: center; color: #ffeaca; font-size: 0.75rem; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.divider::before, .divider::after { content: ""; flex: 1; border-bottom: 1px solid rgba(255,255,235,0.4); }
.divider:not(:empty)::before { margin-right: 0.8rem; }
.divider:not(:empty)::after { margin-left: 0.8rem; }

/* ============================================================
   CARD BADGES (drill‑down)
   ============================================================ */
.card-badges { display: flex; gap: .5rem; flex-wrap: wrap; padding: 12px 18px 0; }
.card-thumb-link { display: block; text-decoration: none; }
.card-thumb { aspect-ratio: 16/9; background-size: cover; background-position: center; border-radius: 18px 18px 0 0; }
.card-body h3 a { color: inherit; text-decoration: none; }
.card-body h3 a:hover { color: var(--primary); }
.badge-main { background: #ff9800; }
.badge-sub { background: #7b61ff; }
.badge-level { background: #1e88e5; }


/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   QUIZ LIBRARY BUTTON – INLINE FIX (Punjabi)
   ============================================================ */
.nav-links a[href="index.php"] {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
    font-family: 'Poppins', 'Noto Sans Gurmukhi', 'Mukta', system-ui, sans-serif;
}

/* ============================================================
   FINAL OVERRIDE – SITE TITLE: NO SHADOW, GRADIENT COLOUR
   ============================================================ */
header.site-header .site-title,
.site-header .site-title,
.site-title.site-title-main,
.site-header h1.site-title {
    color: var(--primary) !important;
    text-shadow: none !important;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    letter-spacing: 0.01em;
}
header.site-header,
header.site-header * {
    text-shadow: none !important;
}
.site-header .nav-links a,
.site-header .nav-dropdown-toggle,
.site-header .user-menu span {
    color: #f5f0eb !important;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.site-header .nav-links a:hover,
.site-header .nav-links a.active,
.site-header .nav-dropdown-toggle:hover {
    color: var(--primary) !important;
    background: rgba(244,162,97,0.15);
}
.lang-select {
    color: #f5f0eb !important;
    text-shadow: none !important;
    border-color: rgba(255,215,140,0.4);
}
.user-menu span {
    font-size: 0.9rem;
    font-weight: 600;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ============================================================
   ABSOLUTE READABILITY GUARANTEE
   (dark text for special elements, white otherwise)
   ============================================================ */
*,
*::before,
*::after,
body,
div,
p,
span,
a,
li,
td,
th,
label,
h1, h2, h3, h4, h5, h6,
input,
textarea,
select,
button,
.card-title,
.page-header h1,
.page-subtitle,
.profile-name,
.stat-number,
.stat-label,
.item-name,
.item-subtext,
.hero-name,
.hero-pill,
.attempt-title,
.attempt-date,
.cert-info h3,
.quiz-card-enhanced h3,
.card-body p,
.filters .filter-btn,
.lang-pill,
.period-tab,
.badge-stat,
.badge-status,
.badge-pill,
.pill,
.flash-msg,
.flash-error,
.flash-success,
.nav-links a,
.dropdown a,
.home-btn,
.btn,
.btn-outline,
.btn-small,
.advanced-panel .detail-card h4,
.detail-item,
.detail-item i,
.copy-btn,
.char-counter,
.strength-text,
.loader-text,
#dirty-banner,
.field-error,
.pin-status {
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
}

/* Buttons and pills that need dark text */
.btn,
.badge-pill,
.pill,
.hero-pill,
.qbank-btn,
.period-tab.active,
.filter-btn.active,
.badge-stat.passed,
.badge-stat.failed,
.badge-pass,
.badge-fail,
.item-rank,
.hero-rank-badge {
    color: #0f0f1a !important;
    text-shadow: none !important;
}

/* Outline and review buttons */
.btn-outline,
.btn-review,
.review-btn {
    color: #ffffff !important;
}

/* ============================================================
   PREMIUM LEADERBOARD – Complete (podium, cards, animations)
   ============================================================ */

.podium-wrapper { margin-bottom: 30px; }

.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 22px;
}

.podium-card {
    position: relative;
    width: 190px;
    padding: 24px;
    border-radius: 30px;
    background: rgba(255,255,255,.05);
    backdrop-filter: blur(22px);
    border: 1px solid rgba(255,255,255,.12);
    text-align: center;
    transition: .35s;
    overflow: hidden;
}

.podium-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,.35);
}

/* Gold gradient only for rank‑1 (actual competition rank) */
.podium-card.first {
    background: linear-gradient(180deg, #ffcf54, #ff9f1a);
    color: #1b1b1b;
}

/* ── Rank‑tier heights (replaces old .second / .third heights) ── */
.podium-tier-1 { height: 330px; }
.podium-tier-2 { height: 280px; }
.podium-tier-3 { height: 250px; }
.podium-tier-other { height: 220px; }

.podium-crown {
    font-size: 42px;
    margin-bottom: 8px;
    color: #fff;
    animation: floatCrown 2s infinite ease-in-out;
}

@keyframes floatCrown {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

.podium-avatar {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255,255,255,.85);
    margin: auto;
    display: block;
}

.medal {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.gold   { background: #FFD54A; color: #222; }
.silver { background: #D5D5D5; color: #222; }
.bronze { background: #CD7F32; color: #fff; }

.podium h2 { margin-top: 18px; font-size: 24px; }
.podium h3 { margin-top: 18px; font-size: 18px; }
.podium-points { margin-top: 14px; font-size: 18px; font-weight: 700; }

@media (max-width: 768px) {
    .podium { flex-direction: column; align-items: center; }
    .podium-card { width: 100%; max-width: 330px; height: auto !important; }
}

.lb-left { display: flex; align-items: center; gap: 18px; }
.rank-badge {
    width: 58px; height: 58px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 16px;
    background: rgba(255,255,255,.08); color: white;
    box-shadow: 0 8px 18px rgba(0,0,0,.25);
}
.rank-1 { background: #FFD54A; color: #222; }
.rank-2 { background: #D9D9D9; color: #222; }
.rank-3 { background: #CD7F32; }

.lb-avatar {
    width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
    border: 3px solid rgba(255,255,255,.15);
}
.lb-user { display: flex; flex-direction: column; gap: 6px; }
.lb-name {
    font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px;
}
.lb-meta {
    display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; opacity: .75;
}
.you-pill {
    background: #f4a261; padding: 4px 10px; border-radius: 30px;
    font-size: 11px; font-weight: 700; color: #111;
}
.top10-pill {
    background: #16a34a; padding: 4px 10px; border-radius: 30px;
    font-size: 11px; font-weight: 700; color: #fff;
}
.trend { margin-left: 8px; font-size: 13px; }
.trend.up   { color: #16c784; }
.trend.down { color: #ff5b5b; }

.progress-wrap {
    width: 220px; height: 8px; background: rgba(255,255,255,.08);
    border-radius: 30px; overflow: hidden; margin-top: 10px;
}
.progress-fill {
    height: 100%; background: linear-gradient(90deg,#FFD54A,#FF9F1A);
    border-radius: 30px; transition: width 1s ease;
}

.lb-right { text-align: right; }
.lb-score {
    font-size: 28px; font-weight: 800; line-height: 1;
    background: linear-gradient(90deg,#FFD54A,#FF9F1A);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.lb-label {
    font-size: 12px; opacity: .65; margin-top: 4px;
    letter-spacing: 1px; text-transform: uppercase;
}

.animate-card {
    opacity: 0; transform: translateY(35px);
    animation: cardEntrance .6s forwards;
}
.animate-card:nth-child(2) { animation-delay: .08s; }
.animate-card:nth-child(3) { animation-delay: .12s; }
.animate-card:nth-child(4) { animation-delay: .16s; }
.animate-card:nth-child(5) { animation-delay: .20s; }
.animate-card:nth-child(6) { animation-delay: .24s; }
@keyframes cardEntrance {
    to { opacity: 1; transform: translateY(0); }
}

.lb-card::after {
    content: ""; position: absolute; left: -120%; top: 0; width: 120%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
    transition: 1s;
}
.lb-card:hover::after { left: 120%; }

.leaderboard-skeleton {
    display: flex; flex-direction: column; gap: 18px; margin-bottom: 30px;
}
.sk-card {
    height: 90px; border-radius: 28px;
    background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.12), rgba(255,255,255,.05));
    background-size: 300%; animation: loading 1.4s infinite;
}
@keyframes loading {
    0%   { background-position: 100%; }
    100% { background-position: -100%; }
}

@media (max-width: 700px) {
    .lb-card { padding: 16px; }
    .lb-left { gap: 12px; }
    .rank-badge { width: 46px; height: 46px; font-size: 13px; }
    .lb-avatar { width: 54px; height: 54px; }
    .lb-name { font-size: 16px; }
    .lb-score { font-size: 22px; }
    .lb-meta { font-size: 12px; }
}

/* ==========================================
   URGENT BUTTON FIX – light background, dark text
   ========================================== */
button,
input[type="button"],
input[type="submit"],
.btn,
.btn-sm,
.btn-danger,
.btn-success,
.btn-edit,
.btn-primary,
.btn-outline {
    background: #f4a261 !important;
    color: #0f0f1a !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    text-shadow: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}
.btn-outline {
    background: transparent !important;
    color: #ffffff !important;
    border: 2px solid #f4a261 !important;
}
button:disabled,
.btn:disabled {
    opacity: 0.6;
}

a[href="my_attempts.php"] i.fa-history {
    display: none;
}

/* ==========================================
   EMPTY STATE (No quizzes attempted yet)
   ========================================== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    max-width: 500px;
    margin: 2rem auto;
}
.empty-state i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    opacity: 0.8;
}
.empty-state h3 {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.empty-state p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* ====== GOLD HIGHLIGHTED NAME & CERTIFICATES – Final Override ====== */
.highlighted-name {
    display: inline-block !important;
    background: linear-gradient(135deg, #ffb347, #f4a261) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.3px !important;
    text-shadow: none !important;
    line-height: 1.2 !important;
}
.highlighted-certs {
    color: #f4a261 !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    background: rgba(244,162,97,0.15) !important;
    border-radius: 2rem !important;
    padding: 0.2rem 0.8rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
    text-shadow: none !important;
}
.highlighted-certs i {
    color: #f4a261 !important;
    text-shadow: none !important;
}

.site-title-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 248, 240, 0.09);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 215, 140, 0.25);
    border-radius: 3rem;
    padding: 0.35rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center !important;
    align-items: center;
    gap: 1rem;
}
.category-pill {
    display: flex;
    margin: 0;
}

.lang-links a,
.lang-links a:visited,
.lang-links a:hover,
.lang-links a:active {
    text-decoration: none;
}

/* Header right side spacing */
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Language select */
.lang-select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.8rem;
}

/* User menu – combined trigger */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    background: rgba(244,162,97,0.1);
    border: 1px solid rgba(255,215,140,0.35);
    border-radius: 3rem;
    padding: 0.3rem 1.2rem;
    backdrop-filter: blur(8px);
    white-space: nowrap;
}
.user-menu img.user-avatar-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.user-icon {
    font-size: 1.6rem;
    color: rgba(255,255,255,0.8);
}
.header-user-name {
    color: white;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chevron-icon {
    font-size: 0.7rem;
    opacity: 0.6;
}

/* Dropdown */
.dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background: rgba(20,20,30,0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 0.8rem;
    min-width: 200px;
    padding: 0.5rem 0;
    z-index: 1000;
}
.user-menu.active .dropdown {
    display: block;
}
.dropdown a,
.dropdown .dropdown-stats {
    display: block;
    padding: 0.5rem 1rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9rem;
}
.dropdown a:hover {
    background: rgba(255,255,255,0.1);
}
.dropdown-stats {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.badge-pill-sm {
    font-size: 0.75rem;
    background: rgba(244,162,97,0.2);
    padding: 0.15rem 0.6rem;
    border-radius: 1rem;
    color: #f4a261;
}
.cert-link {
    color: #f4a261 !important;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Site title ellipsis */
.site-title {
    display: inline-block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Active nav link underline animation */
.nav-links a.active {
    position: relative;
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

/* ---------- WELCOME BANNER – compact & centered ---------- */
.welcome-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 750px;                      /* limit width */
    margin: 0 auto 2rem;                   /* center horizontally */
    padding: 0.8rem 1.5rem;                /* reduced padding */
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
 margin: 2rem auto 2rem; 
    
}

.welcome-banner h1 {
    font-size: 1.4rem;                    /* smaller heading */
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.welcome-banner h1 i {
    color: var(--primary);
}

.welcome-banner p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.welcome-banner .qbank-btn {
    flex-shrink: 0;                       /* prevent button from shrinking */
    background: linear-gradient(105deg, #f4a261, #e76f51) !important;
    color: #0f0f1a !important;
    border: none !important;
    border-radius: 50px;
    padding: 0.4rem 1.2rem;
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(244, 162, 97, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.welcome-banner .qbank-btn:hover {
    background: linear-gradient(105deg, #ffb347, #ff8c42) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 162, 97, 0.6);
}

/* ---------- Welcome banner greeting ---------- */
.greeting-text {
    margin-top: 0.5rem;          /* space between heading and greeting */
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ---------- Highlighted name (redesigned pill) ---------- */
.highlighted-name {
    display: inline-block;
    background: linear-gradient(135deg, #f4a261, #e07c3e);
    color: #0f0f1a !important;
    font-weight: 700;
    padding: 0.1rem 0.8rem;
    border-radius: 40px;
    box-shadow: 0 2px 10px rgba(244, 162, 97, 0.4);
    text-shadow: 0 1px 0.5px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.highlighted-name:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 25px rgba(244, 162, 97, 0.6);
}

.highlighted-name {
    display: inline-block;
    vertical-align: middle;   /* or top/bottom */
    margin-top: 0.5rem;       /* fine-tune */
    margin-left:2rem;
    
}
/* ---------- Mobile adjustments ---------- */
@media (max-width: 600px) {
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        padding: 0.8rem 1rem;
        max-width: 100%;
        gap: 0.6rem;
    }
    .welcome-banner h1 {
        font-size: 1.2rem;
    }
    .welcome-banner p {
        font-size: 0.8rem;
    }
    .welcome-banner .qbank-btn {
        width: 100%;
        justify-content: center;
        padding: 0.4rem;
    }
}

/* ---------- unified topic-tags (merged) ---------- */
.topic-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}
.topic-tag {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.5rem;
    border-radius: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    text-decoration: none;
    transition: .25s;
}
.topic-tag:hover {
    background: var(--primary);
    color: #111;
}

/* ---------- BROWSER CATEGORY CARDS (logged‑in library) ---------- */
.browser-category-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;                /* reduced gap */
    padding: 1.5rem 1rem;        /* comfortable padding, not too tall */
    min-height: 130px;           /* reduced from 180px – now more compact */
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: white;
    transition: all 0.25s ease;
    text-align: center;
}

.browser-category-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.browser-category-card i {
    font-size: 2rem;
    color: var(--primary);
}

.browser-category-card h3 {
    font-size: 1rem;              /* slightly smaller heading */
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .browser-category-card {
        padding: 1rem 0.8rem;
        min-height: 110px;
        gap: 0.5rem;
        border-radius: var(--radius-md);
    }
    .browser-category-card i {
        font-size: 1.6rem;
    }
    .browser-category-card h3 {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .browser-category-card {
        padding: 0.8rem 0.6rem;
        min-height: 90px;
        gap: 0.3rem;
    }
    .browser-category-card i {
        font-size: 1.3rem;
    }
    .browser-category-card h3 {
        font-size: 0.8rem;
    }
}

/* ---------- landing-btn-group (only once) ---------- */
.landing-btn-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}
/* FIX: make login/register buttons equal width and centered */
.landing-btn-group .btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
    text-align: center;
}

/* ---------- card-thumb-link (only once) ---------- */
.card-thumb-link {
    display: block;
    text-decoration: none;
}

/* ---------- meta-icons (only once) ---------- */
.meta-icons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: .75rem 0;
    color: var(--text-muted);
    font-size: .85rem;
}

/* ---------- status-badge (only once) ---------- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .8rem;
    border-radius: 30px;
    background: rgba(76,175,80,.15);
    color: #4caf50;
}

.hero-tagline i {
    margin-right: 0.5rem;
    color: var(--primary);          /* matches your theme */
}


/* ===== FIXED GUEST HEADER ===== */
.guest-logo-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;               /* above video and content */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 2rem;
    background: rgba(10, 15, 25, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 215, 140, 0.25);
    box-sizing: border-box;
    margin: 0;
    height: 70px;                /* set a fixed height for consistent offset */
}

body.guest-landing .guest-container {
    padding-top: 90px;           /* header height + some gap */
}

/* LEFT – logo */
.guest-logo-link {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}
.guest-logo-img {
    height: 50px;
    width: auto;
    display: block;
}

/* CENTRE – title */
/* ===== SITE TITLE PILL – COMPACT ===== */
.site-title-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 248, 240, 0.09);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 215, 140, 0.25);
    border-radius: 2.5rem;            /* slightly smaller radius */
    padding: 0.25rem 1.2rem;          /* reduced padding */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    flex: 0 1 auto;
    max-width: 60%;
}

.logo-bar-title {
    font-size: 1.6rem;                /* was 1.6rem – smaller */
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

/* ---------- RESPONSIVE: even smaller on mobile ---------- */
@media (max-width: 768px) {
    .site-title-pill {
        padding: 0.2rem 0.8rem;
        max-width: 100%;
        border-radius: 2rem;
    }
    .logo-bar-title {
        font-size: 0.95rem;            /* smaller on mobile */
        white-space: normal;           /* allow wrapping if needed */
    }
}

/* RIGHT – language + sign in */
.guest-header-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 0 0 auto;
}
.lang-links {
    display: flex;
    gap: 0.3rem;
}
.lang-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    transition: 0.2s;
    background: rgba(255,255,255,0.05);
    border: 1px solid transparent;
}
.lang-link:hover {
    background: rgba(244, 162, 97, 0.2);
    border-color: var(--primary);
    color: var(--primary);
}
.guest-login-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #0f0f1a !important;
    padding: 0.35rem 1.2rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    transition: 0.2s;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.guest-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(244, 162, 97, 0.4);
}

/* ===== RESPONSIVE: stack on mobile ===== */
@media (max-width: 768px) {
    .guest-logo-bar {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.6rem 1rem;
        gap: 0.5rem;
    }
    .site-title-pill {
        max-width: 100%;
        order: 3;                  /* title goes below logo & right */
        flex-basis: 100%;
        margin-top: 0.5rem;
        padding: 0.25rem 1rem;
    }
    .logo-bar-title {
        font-size: 1.2rem;
        white-space: normal;
    }
    .guest-header-right {
        gap: 0.4rem;
    }
    .guest-login-btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.8rem;
    }
    .lang-link {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
}

/* Remove any leftover spacer */
.logo-bar-spacer {
    display: none !important;
}


/* ============================================================
   LOGIN PAGE – CENTERED LAYOUT WITH LEFT PANEL
   ============================================================ */

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.2rem 1rem;
    gap: 1.5rem;
}

/* ---------- Desktop: side-by-side, absolutely centered ---------- */
@media (min-width: 768px) {
    .login-container {
        flex-direction: row;
        gap: 2rem;
        padding: 0;
    }

    .desktop-side {
        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        max-width: 480px;
        padding: 2.5rem 2rem;
        text-align: center;
        background: linear-gradient(135deg, rgba(20,20,40,.8), rgba(40,20,20,.7));
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255,245,215,0.15);
        border-radius: 24px;
        box-shadow: 0 25px 50px rgba(0,0,0,.4);
        transition: border-color 0.35s ease, box-shadow 0.35s ease;
        align-self: center;
        height: auto;
        min-height: 400px;
    }

    .desktop-side:hover {
        border-color: rgba(244,162,97,0.8);
        box-shadow: 0 25px 50px rgba(0,0,0,.5), 0 0 25px rgba(244,162,97,0.3);
    }

    .desktop-side h2 {
        font-size: 1.9rem;
        color: #fff;
        margin: 0.4rem 0;
    }

    .desktop-side p {
        color: rgba(255,255,255,.8);
        font-style: italic;
        max-width: 260px;
        font-size: 0.9rem;
        margin: 0.5rem 0;
    }

    .floating-letters {
        margin-top: 1rem;
    }

    .floating-letters span {
        display: inline-block;
        font-size: 2.5rem;
        color: rgba(245,158,11,.6);
        animation: float 4s ease-in-out infinite;
        margin: 0 10px;
    }

    .floating-letters span:nth-child(2) {
        animation-delay: 1.5s;
    }

    @keyframes float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
    }

    .login-card {
        flex: 1;
        max-width: 420px;
        margin: 0;
        padding: 1.2rem 1.6rem 1rem;
        max-height: 90vh;
        overflow-y: auto;
        align-self: center;
    }

    .mobile-greeting {
        display: none !important;
    }
}

/* ---------- Mobile: stacked, card below greeting ---------- */
@media (max-width: 767px) {
    .login-container {
        flex-direction: column;
        padding: 1.2rem 1rem 2rem;
        gap: 0.8rem;
    }

    .desktop-side {
        display: none !important;
    }

    .mobile-greeting {
        text-align: center;
        margin: 0 0 0.2rem;
        padding-top: 0.3rem;
    }

    .mobile-greeting h1 {
        font-size: 1.15rem;
        margin-bottom: 0.1rem;
    }

    .mobile-greeting .fas.fa-key {
        font-size: 0.9rem;
    }

    .mobile-greeting p {
        font-size: 0.75rem;
        color: rgba(255,255,255,.7);
        margin: 0;
    }

    .login-card {
        margin-top: 0.6rem;
    }
}

/* ---------- Login card overrides ---------- */
.login-card {
    width: 100%;
    max-width: 460px;
    background: rgba(20,20,30,.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0,0,0,.6);
    padding: 1.2rem 1.5rem 1rem;
}

/* ---------- Existing login-card scoped rules ---------- */
.login-card .form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.login-card .form-col {
    margin-bottom: 0.7rem;
}

.login-card .form-col label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    display: block;
}

.login-card input[type="email"],
.login-card input[type="password"] {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    width: 100%;
}

.login-card .btn-full {
    width: 100%;
    justify-content: center;
}

/* ---------- Social login toggle ---------- */
.toggle-method {
    background: none;
    border: 1px solid rgba(255,255,255,.3);
    color: rgba(255,255,255,.8);
    border-radius: 8px;
    cursor: pointer;
    margin-top: 0.7rem;
    transition: .2s;
    width: 100%;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.toggle-method:hover {
    background: rgba(255,255,255,.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* ---------- Social buttons ---------- */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0.4rem;
}

.social-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ---------- Checkbox wrap ---------- */
.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ffefdb;
    cursor: pointer;
    font-size: 0.85rem;
}

.checkbox-wrap input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* ---------- Forgot link ---------- */
.forgot-link {
    color: #ffdcad;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}

.forgot-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ============================================================
   LOGIN PAGE – REDUCED TOP SPACE
   ============================================================ */

/* Mobile: stack with less top space */
.login-container {
    justify-content: flex-start;      /* content starts from top */
    padding-top: 0.8rem;              /* was 1.2rem – reduced */
    padding-bottom: 1.5rem;           /* less bottom padding as well */
    gap: 0.8rem;                      /* reduced gap */
    min-height: 100vh;
}

/* Mobile greeting: reduce its margin/padding */
.mobile-greeting {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Desktop: keep centered but with less top padding if needed */
@media (min-width: 768px) {
    .login-container {
        justify-content: center;       /* keep centered on desktop */
        padding-top: 0;
        padding-bottom: 0;
        gap: 1.5rem;                  /* restore gap for desktop */
    }

    .desktop-side {
        min-height: 350px;            /* reduce height if too tall */
        padding: 2rem 1.5rem;         /* reduced padding */
    }

    .login-card {
        max-height: 80vh;             /* slightly shorter */
        padding: 1rem 1.5rem 0.8rem;
    }

    .desktop-side h2 {
        font-size: 1.7rem;            /* slightly smaller */
        margin-top: 0;
    }

    .floating-letters span {
        font-size: 2rem;              /* smaller */
    }
}

/* ---------- Left panel enhancements ---------- */
.desktop-side .ek-onkar-top {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 30px rgba(244,162,97,0.3);
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.desktop-side .desktop-quote {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    max-width: 280px;
    margin: 0.5rem auto 0;
    font-style: italic;
    letter-spacing: 0.3px;
}

/* ---------- CATEGORY PILLS – improved responsive ---------- */
.category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;                /* reduced gap */
    max-width: 1200px;
    margin: 2rem auto 3rem;
    padding: 0 0.5rem;          /* less side padding */
}

.category-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;    /* centre text inside */
    gap: 0.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--glass-border);
    border-radius: 3rem;
    padding: 0.5rem 1.2rem;     /* reduced vertical padding, comfortable horizontal */
    color: var(--text-primary) !important;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.85rem;         /* slightly smaller */
    transition: all 0.2s;
    margin: 0.2rem;             /* reduced margin */
    white-space: nowrap;        /* prevent wrapping on desktop */
}

.category-pill:hover {
    background: var(--primary);
    color: #fff !important;
    border-color: var(--primary);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.category-pill i {
    font-size: 1rem;            /* icon size matching text */
    color: var(--primary) !important;
}

/* ---------- Responsive: allow wrap and bigger tap targets ---------- */
@media (max-width: 768px) {
    .category-grid {
        gap: 0.6rem;
        padding: 0 0.5rem;
    }
    .category-pill {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        white-space: normal;     /* allow text to wrap on small screens */
        flex: 0 1 auto;         /* let them shrink naturally */
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .category-pill {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        gap: 0.3rem;
        border-radius: 2rem;
    }
    .category-pill i {
        font-size: 0.85rem;
    }
}

@media (max-width: 600px) {
    .highlighted-name {
        padding: 0.05rem 0.6rem;
        font-size: 0.95rem;
    }
}


.latest-quiz-card .star-icon {
    fill: var(--primary) !important;
}

/* ============================================================
   FINAL QUIZ STYLES – Dark glass, light‑orange grid,
   upgraded sprint speed selector, no duplicates
   ============================================================ */

/* ----- Global link cleanup (no underlines) ----- */
a, a:link, a:visited { text-decoration: none; }
a:hover, a:focus { text-decoration: none; }

/* ----- Override global white text only inside quiz pages ----- */
body.quiz-body,
body.quiz-body div,
body.quiz-body p,
body.quiz-body span,
body.quiz-body h1,
body.quiz-body h2,
body.quiz-body h3,
body.quiz-body h4,
body.quiz-body button,
body.quiz-body label,
body.quiz-body .option,
body.quiz-body .question-text,
body.quiz-body .chat-option,
body.quiz-body .bubble,
body.quiz-body .review-btn,
body.quiz-body .submit-btn,
body.quiz-body .back-btn {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6) !important;
}

/* Selected option – dark text for contrast */
body.quiz-body .option.selected,
body.quiz-body .option.selected span {
    color: #0f0f1a !important;
    text-shadow: none !important;
}

/* Badges keep their own colours */
body.quiz-body .badge-stat,
body.quiz-body .badge-pill,
body.quiz-body .pill {
    color: inherit !important;
}

/* ------------------------------------------------------------
   PREMIUM STYLE SELECTOR (light‑orange glass grid)
   ------------------------------------------------------------ */
.style-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
    margin: 2rem auto;
    max-width: 950px;
    padding: 0 1rem;
}

.style-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    background: linear-gradient(145deg, rgba(244,162,97,0.28) 0%, rgba(255,140,66,0.18) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 215, 140, 0.45);
    border-radius: 24px;
    padding: 1.4rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    text-decoration: none !important;
    color: #fff;
    position: relative;
    overflow: hidden;
    animation: cardPop 0.6s ease forwards;
    opacity: 0;
}

.style-card:nth-child(1) { --i: 0; }
.style-card:nth-child(2) { --i: 1; }
.style-card:nth-child(3) { --i: 2; }
.style-card:nth-child(4) { --i: 3; }
.style-card:nth-child(5) { --i: 4; }

@keyframes cardPop {
    0%   { opacity: 0; transform: translateY(30px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.style-card:hover {
    background: rgba(244, 162, 97, 0.4);
    border-color: #ffb347;
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 18px 35px rgba(0,0,0,0.45), 0 0 30px rgba(244,162,97,0.6);
}

.style-card i {
    font-size: 1.4rem;
    color: #ffb347;
    filter: drop-shadow(0 0 6px rgba(255,179,71,0.7));
    margin-bottom: 0.3rem;
    transition: transform 0.2s;
}
.style-card:hover i { transform: scale(1.1); }

.style-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.style-card ul {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    width: 100%;
}
.style-card li {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    font-size: 0.8rem;
    color: #f0e6d2;
    line-height: 1.4;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.recommended-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffb347, #e07c3e);
    color: #0f0f1a;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.9rem;
    border-radius: 40px;
    margin-top: 0.6rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.3);
    white-space: nowrap;
}
/* ------------------------------------------------------------
   QUESTION CARD & CAROUSEL – single card, track centred, outer glow
   ------------------------------------------------------------ */
#dynamicUI { width: 100% !important; display: block !important; }

/* The scrolling track is now a centred, fixed‑width container */
.carousel-track {
    display: flex;
    overflow: hidden;                 /* no manual scroll – JS handles goTo() */
    gap: 0;
    scroll-snap-type: x mandatory;
    max-width: 700px;                 /* same as card’s max width */
    margin: 0 auto;                   /* centre the whole track */
    padding: 0;
}

/* Each card fills the track completely */
.question-card {
    flex: 0 0 100%;                   /* always exactly one card visible */
    scroll-snap-align: start;
    background: rgba(25, 30, 45, 0.7) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 215, 140, 0.35);
    border-radius: var(--radius-md);
    padding: 2rem 1.8rem;
    color: var(--text-primary);
    box-shadow:
        0 0 15px rgba(244, 162, 97, 0.25),
        0 0 35px rgba(244, 162, 97, 0.12),
        0 20px 40px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s, box-shadow 0.3s;
    position: relative;
    margin: 0;                        /* no extra margins */
}

/* No orange top line */
.question-card::before {
    display: none !important;
}

/* Intensify glow on hover */
.question-card:focus-within,
.question-card:hover {
    border-color: var(--primary);
    box-shadow:
        0 0 25px rgba(244, 162, 97, 0.5),
        0 0 55px rgba(244, 162, 97, 0.25),
        0 25px 50px rgba(0, 0, 0, 0.6);
}

/* On mobile, let the track use full width */
@media (max-width: 600px) {
    .carousel-track {
        max-width: 100%;
    }
    .question-card {
        padding: 1.5rem 1rem;
    }
}

/* Content inside the card – already centred, but keep consistency */
.question-card .question-text,
.question-card .options,
.question-card .review-btn {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 600px) {
    .question-card .question-text,
    .question-card .options,
    .question-card .review-btn {
        max-width: 100%;
    }
}

/* Question text */
.question-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
    line-height: 1.5;
}

/* Options – two‑column on desktop, single on mobile */
.options {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
@media (min-width: 768px) {
    .options {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.9rem;
    }
    .option { margin: 0; }
}

.question-card:focus-within,
.question-card:hover {
    border-color: var(--primary);
    box-shadow: 0 25px 50px rgba(0,0,0,0.6), 0 0 35px rgba(244,162,97,0.3);
}

.question-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
    line-height: 1.5;
}

/* Options – two‑column on desktop, single on mobile */
.options {
    max-width: 700px;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .options {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.9rem;
    }
    .option { margin: 0; }
}
@media (max-width: 767px) {
    .options {
        display: flex;
        flex-direction: column;
        gap: 0.9rem;
    }
}

.option {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
    font-weight: 500;
    color: #fff;
    text-align: left;
    transition: all 0.25s;
    backdrop-filter: blur(4px);
}
.option:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--primary);
    transform: translateX(6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3), 0 0 20px rgba(244,162,97,0.3);
}
.option.selected {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #0f0f1a !important;
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: 0 0 30px rgba(244,162,97,0.7);
}
.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}
.option.selected .option-letter {
    background: rgba(15,15,26,0.4);
    color: #0f0f1a;
}

/* Dots – hidden (we removed them from the template) */
#carouselDots { display: none !important; }

/* Review button */
.review-btn {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary) !important;
    font-size: 0.85rem;
    padding: 0.45rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: 0.2s;
    margin-top: 1rem;
    backdrop-filter: blur(4px);
    text-shadow: none !important;
}
.review-btn:hover { background: rgba(244,162,97,0.2); box-shadow: 0 0 15px rgba(244,162,97,0.5); }
.review-btn.marked { background: var(--primary); color: #0f0f1a !important; border-color: var(--primary); }

/* Nav buttons – hidden */
.nav-buttons { display: none !important; }

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    margin-bottom: 2rem;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #ff8c42);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--primary);
}

/* Submit area */
.submit-area { text-align: center; margin-top: 2rem; }
.submit-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #0f0f1a;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    padding: 0.9rem 2.5rem;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 0 20px rgba(244,162,97,0.5);
}
.submit-btn:hover { transform: translateY(-3px); box-shadow: 0 0 35px rgba(244,162,97,0.8); }

/* Overlays – dark glass */
#startOverlay {
    position: fixed; inset: 0;
    background: rgba(10,15,25,0.96);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #fff; text-align: center; transition: opacity 0.5s;
}
#startOverlay.hidden { opacity: 0; pointer-events: none; }
#startOverlay h2 { font-size: 2.8rem; color: var(--primary); margin-bottom: 1.5rem; }
#startOverlay button {
    font-family: var(--font-heading); font-weight: 700; font-size: 1.5rem;
    background: var(--primary); color: #0f0f1a; border: none;
    padding: 1rem 3rem; border-radius: 50px; cursor: pointer;
    box-shadow: 0 0 25px rgba(244,162,97,0.7); transition: 0.3s;
}
#startOverlay button:hover { background: var(--secondary); box-shadow: 0 0 40px rgba(244,162,97,0.9); transform: scale(1.05); }



/* ------------------------------------------------------------
   UPGRADED WARNING BUTTON – glowing, larger, clear call‑to‑action
   ------------------------------------------------------------ */
.warning-card button {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    color: #0f0f1a !important;
    border: none !important;
    border-radius: 50px;
    padding: 0.8rem 2.2rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(244,162,97,0.5);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    text-shadow: none !important;
}

.warning-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(244,162,97,0.8);
    background: linear-gradient(135deg, #ffb347, #ff8c42) !important;
}

.warning-card button i {
    color: #0f0f1a;
    font-size: 0.9rem;
}

.confirm-icon { font-size: 3rem; color: var(--primary); margin-bottom: 1rem; }
.confirm-buttons { display: flex; gap: 1rem; justify-content: center; margin-top: 1.5rem; }
.confirm-btn { padding: 0.6rem 1.5rem; border-radius: 40px; font-weight: 700; font-family: var(--font-heading); cursor: pointer; transition: 0.3s; }
.confirm-cancel { background: transparent; border: 2px solid var(--glass-border); color: #fff; }
.confirm-cancel:hover { background: rgba(255,255,255,0.1); }
.confirm-yes {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #0f0f1a; border: none;
    box-shadow: 0 0 20px rgba(244,162,97,0.5);
}
.confirm-yes:hover { box-shadow: 0 0 35px rgba(244,162,97,0.8); }

/* ============================================================
   SPRINT TIMER & SPEED SELECTOR (upgraded, clear active state)
   ============================================================ */
.timer-circle-wrap { text-align: center; margin: 1.5rem 0; }
.timer-circle {
    width: 90px; height: 90px; border-radius: 50%;
    background: conic-gradient(var(--primary) var(--progress, 100%), rgba(255,255,255,0.05) 0);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
    box-shadow: 0 0 25px rgba(244,162,97,0.5);
    transition: background 0.1s linear;
}
.timer-circle span {
    font-size: 2rem; font-weight: bold; color: #fff;
    font-family: var(--font-heading); text-shadow: 0 0 10px var(--primary);
}
.timer-label { display: block; margin-top: 0.5rem; color: #fff; font-weight: 600; }
.timer-circle.danger {
    background: conic-gradient(#e74c3c var(--progress, 100%), rgba(231,76,60,0.15) 0);
    box-shadow: 0 0 30px rgba(231,76,60,0.7);
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

/* Sprint speed selector – compact pills, clear active state with ✓ */
.speed-option {
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.35rem 0.9rem;          /* smaller padding */
    border-radius: 30px;              /* tighter radius */
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.8rem;                /* smaller text */
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    position: relative;
}

/* Active state – glowing primary background, bold, with a checkmark */
.speed-option.active {
    background: var(--primary);
    color: #0f0f1a !important;
    border-color: var(--primary);
    font-weight: 700;
    box-shadow: 0 0 15px rgba(244,162,97,0.7);
    padding-left: 2rem;               /* room for the checkmark */
}

/* The checkmark itself – using a pseudo‑element */
.speed-option.active::before {
    content: '✓';
    position: absolute;
    left: 0.7rem;
    font-weight: 700;
    font-size: 0.8rem;
    color: #0f0f1a;
}

/* Hover – subtle lift and glow */
.speed-option:hover {
    border-color: var(--primary);
    background: rgba(244,162,97,0.18);
    transform: translateY(-1px);
}

/* ============================================================
   FINAL UNIFIED FIXES – Parchment title, responsive widths,
   alerts, reset buttons, modal, back button, avatar fix
   ============================================================ */

/* ---------- Parchment title & meta (centred, dark text) ---------- */
.parchment h1,
.parchment .quiz-meta,
.parchment .quiz-meta div,
.parchment .quiz-meta span {
    color: #3e2c1b !important;
    text-shadow: none !important;
}
.parchment { text-align: center; }
.parchment h1 {
    display: block;
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 auto 0.8rem auto;
    width: 100%;
    background: none;
    box-shadow: none;
}
.quiz-meta {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center !important;
    gap: 1.8rem;
    width: fit-content !important;
    max-width: 100%;
    margin: 0 auto 1.5rem auto !important;
    padding: 0.7rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #3e2c1b !important;
    background: rgba(255, 252, 235, 0.85);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(139, 90, 43, 0.3);
    border-radius: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.quiz-meta i { color: #b8860b !important; }
.ornament { color: #b8860b !important; font-size: 2rem; margin-bottom: 0.8rem; }
.parchment > p:empty { display: none; }

/* ---------- Chatbot avatar fixes ---------- */
.avatar img.chat-avatar-img {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    background: #fff;
}
.avatar:has(img.chat-avatar-img) { background: transparent; }
img.chat-avatar-img { display: inline-block; vertical-align: middle; }

/* ---------- Responsive back button ---------- */
#categoryBrowser .btn-outline {
    width: auto !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem !important;
    font-size: 0.9rem;
    white-space: nowrap;
}
@media (max-width: 480px) {
    #categoryBrowser .btn-outline {
        padding: 0.3rem 0.8rem !important;
        font-size: 0.85rem;
    }
}

/* ---------- Global button sizing (auto width, max 300px) ---------- */
.btn,
.btn-outline,
.btn-success,
.btn-danger,
.btn-edit,
.btn-primary,
.btn-review,
.nav-btn,
.submit-btn,
.back-btn,
.btn-full,
.qbank-btn {
    width: auto !important;
    display: inline-flex !important;
    justify-content: center !important;
    text-align: center;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}
.btn-block {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ---------- Constrain quiz card / parchment ---------- */
.quiz-container,
.parchment {
    max-width: 700px;
    margin-left: auto !important;
    margin-right: auto !important;
}
@media (max-width: 600px) {
    .quiz-container,
    .parchment {
        max-width: 100%;
    }
}

/* ---------- Global content width for all major containers ---------- */
html body .container,
html body .profile-container,
html body .settings-container,
html body .lb-container,
.card,
.page-header,
.cert-item,
.attempt-card,
.profile-card,
.stat-card,
.faq-item,
.empty-state,
.glass-hero,
.detail-card {
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
@media (max-width: 600px) {
    html body .container,
    html body .profile-container,
    html body .settings-container,
    html body .lb-container,
    .card,
    .page-header,
    .cert-item,
    .attempt-card,
    .profile-card,
    .stat-card,
    .faq-item,
    .empty-state,
    .glass-hero,
    .detail-card {
        max-width: 100% !important;
    }
}

/* ---------- Alerts (success / error) ---------- */
.alert {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem !important;
    border-radius: 40px !important;
    margin: 1.5rem 0 !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid !important;
}
.alert.success {
    background: rgba(46,204,113,0.15) !important;
    border-color: rgba(46,204,113,0.4) !important;
    color: #a5d6a7 !important;
}
.alert.error {
    background: rgba(231,76,60,0.15) !important;
    border-color: rgba(231,76,60,0.4) !important;
    color: #ff8a7a !important;
}

/* ---------- Reset & Restore buttons ---------- */
.reset-zone {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}
.restore-btn,
.reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.5rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    white-space: nowrap;
}
.restore-btn {
    border-color: rgba(244,162,97,0.5);
    color: var(--primary);
}
.restore-btn:hover {
    background: rgba(244,162,97,0.15);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(244,162,97,0.3);
}
.reset-btn {
    border-color: rgba(231,76,60,0.5);
    color: #ff8a7a;
}
.reset-btn:hover {
    background: rgba(231,76,60,0.15);
    border-color: var(--danger);
    color: #ff5c4a;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(231,76,60,0.4);
}

/* ---------- Reset Confirmation Modal ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }

.modal-dialog {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    max-width: 420px;
    width: 90%;
    color: var(--text-primary);
    box-shadow: 0 25px 50px rgba(0,0,0,0.6), 0 0 35px rgba(244,162,97,0.2);
    text-align: left;
}
.modal-dialog h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.warning-text {
    font-size: 0.95rem;
    color: #ffcccb;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.modal-dialog label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    cursor: pointer;
}
.modal-dialog input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    margin: 0;
}
.nuclear-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.nuclear-section label {
    color: #e74c3c !important;
    font-weight: 600;
}
.nuclear-confirm-row {
    margin-top: 0.8rem;
    display: none;
}
.nuclear-confirm-row input {
    width: 100%;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(231,76,60,0.5);
    border-radius: 30px;
    color: #fff;
    font-size: 0.9rem;
}
.nuclear-confirm-row input:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 8px rgba(231,76,60,0.4);
    outline: none;
}
.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.btn-cancel,
.btn-confirm {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-primary);
}
.btn-cancel:hover { background: rgba(255,255,255,0.1); }
.btn-confirm {
    background: rgba(231,76,60,0.15);
    border-color: rgba(231,76,60,0.5);
    color: #ff8a7a;
}
.btn-confirm:hover {
    background: rgba(231,76,60,0.3);
    border-color: #e74c3c;
    color: #fff;
    box-shadow: 0 0 12px rgba(231,76,60,0.5);
}

/* Reset special styling on Quiz Library link – match other nav links */
.nav-links a[href="index.php"] {
    font-size: inherit;
    padding: inherit;
    font-family: inherit;
    white-space: inherit;
}

/* Site title – always full width on desktop/laptop, constrain only on tiny phones */
.site-title-pill,
.site-title {
    max-width: none !important;
    overflow: visible !important;
    white-space: nowrap;               /* keeps title on one line */
}

@media (max-width: 600px) {
    .site-title-pill {
        max-width: 60% !important;     /* shrink only on small phones */
        overflow: hidden !important;
    }
    .site-title {
        white-space: normal;           /* allow wrapping if needed */
    }
}

/* Ensure certificate items wrap nicely on small screens */
.cert-item {
    flex-wrap: wrap;
    gap: 0.5rem;
}
.cert-info h3 {
    font-size: 1.1rem;
    word-break: break-word;
}
.cert-info p {
    font-size: 0.85rem;
}
.cert-item .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.certificate-img, img[src*="certificate"] {
    max-width: 100%;
    height: auto;
}

/* Prevent certificate list overflow on all screens */
.cert-list {
    max-width: 100%;
    overflow-x: hidden;
}

.cert-item {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    word-break: break-word;
    padding: 1rem 0;
}

.cert-info {
    flex: 1 1 250px;          /* take available space, min 250px */
    min-width: 0;             /* allow text to shrink */
    max-width: 100%;
}

.cert-info h3 {
    font-size: 1.1rem;
    line-height: 1.3;
    margin-bottom: 0.3rem;
}

.cert-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.cert-item .btn {
    flex-shrink: 0;           /* button stays as wide as its text */
    white-space: nowrap;
}

.certificate-page img,
img[src*="certificate"] {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

/* ============================================================
   PREREQUISITE WARNING PAGE
   ============================================================ */

.prereq-card {
    max-width: 600px;
    margin: 2rem auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.prereq-card h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.prereq-card h3 {
    margin-top: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.prereq-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.quiz-list {
    text-align: left;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.quiz-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary);
    color: #000;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

.quiz-link:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(244,162,97,0.5);
}

.quiz-link i {
    color: #000;
    font-size: 0.9rem;
}

/* For the back to library button */
.prereq-card .btn-outline {
    margin-top: 2rem;
}

/* ============================================================
   WARNING MODAL (tab‑switch / blur)
   ============================================================ */
.warning-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.warning-modal.active {
    display: flex;
}

.warning-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.warning-card h3 {
    font-size: 1.5rem;
    color: var(--danger);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.warning-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.warning-card button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #0f0f1a;
    border: none;
    border-radius: 50px;
    padding: 0.7rem 2rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    transition: all 0.25s;
    box-shadow: 0 0 20px rgba(244,162,97,0.5);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.warning-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(244,162,97,0.8);
}

/* ============================================================
   CHATBOT INTERFACE
   ============================================================ */
.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    max-height: 60vh;
    overflow-y: auto;
    background: rgba(10,15,25,0.4);
    border-radius: 20px;
    margin-bottom: 1rem;
}

.message {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    max-width: 85%;
}

.bot-message {
    align-self: flex-start;
    flex-direction: row;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #0f0f1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.user-message .avatar {
    background: var(--secondary);
}

.bubble {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 0.7rem 1.2rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.bot-message .bubble {
    border-bottom-left-radius: 5px;
}

.user-message .bubble {
    border-bottom-right-radius: 5px;
    background: rgba(244,162,97,0.2);
    border-color: rgba(244,162,97,0.3);
}

.chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    margin-left: 3rem;   /* align with bot bubble */
}

.chat-option {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,215,140,0.3);
    border-radius: 30px;
    padding: 0.5rem 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.25s;
    white-space: nowrap;
}

.chat-option:hover {
    background: rgba(244,162,97,0.25);
    border-color: var(--primary);
}

.chat-option:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.back-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: 0.2s;
}

.back-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--primary);
}

/* ============================================================
   CUSTOM CONFIRMATION MODAL (submit answers)
   ============================================================ */
.custom-confirm-modal {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center; justify-content: center;
}
.custom-confirm-modal.active { display: flex; }

.confirm-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    max-width: 420px; width: 90%;
    color: var(--text-primary);
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
}
.confirm-icon { font-size: 3rem; color: var(--primary); margin-bottom: 1rem; }
.confirm-buttons { display: flex; gap: 1rem; justify-content: center; margin-top: 1.5rem; }
.confirm-btn {
    padding: 0.6rem 1.5rem; border-radius: 40px; font-weight: 700; cursor: pointer;
    transition: 0.25s; font-family: var(--font-heading);
}
.confirm-cancel { background: transparent; border: 2px solid var(--glass-border); color: #fff; }
.confirm-cancel:hover { background: rgba(255,255,255,0.1); }
.confirm-yes {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #0f0f1a; border: none;
    box-shadow: 0 0 20px rgba(244,162,97,0.5);
}
.confirm-yes:hover { box-shadow: 0 0 35px rgba(244,162,97,0.8); }

.site-header {
    position: fixed !important;
    top: 0 !important;
    z-index: 1000 !important;
}

/* ============================================================
   WHATSAPP COMBO – Compact country code, full-width number
   ============================================================ */
.whatsapp-combo {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.whatsapp-combo select {
    flex: 0 0 auto;
    min-width: 110px;        /* just wide enough for "+91 (India)" */
    max-width: 130px;
}

.whatsapp-combo input {
    flex: 1 1 auto;           /* takes all remaining space */
    min-width: 0;             /* allows it to shrink properly */
}

/* -----------------------------------------------------------
   FULL‑WIDTH THUMBNAIL FIX
   ----------------------------------------------------------- */
/* 1. Remove default card padding so thumbnail can stretch edge‑to‑edge */
.quiz-card-enhanced {
    padding: 0 !important;
    overflow: hidden;                /* clips rounded corners */
}

/* 2. Thumbnail link – now truly 100% of card width, no gaps */
.quiz-card-enhanced .card-thumb-link {
    display: block;
    width: 100%;
    line-height: 0;
    text-decoration: none;
    overflow: hidden;                /* ensures image respects corner rounding */
    border-radius: 32px 32px 0 0;   /* card’s top radius (32px) */
}

/* 3. The actual background div – full width, proper aspect ratio */
.quiz-card-enhanced .card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    border-radius: inherit;          /* same as link’s top corners */
}

/* 4. Restore comfortable padding for badges and card body */
.quiz-card-enhanced .card-badges {
    padding: 1rem 1.5rem 0;          /* horizontal padding + space above */
}

.quiz-card-enhanced .card-body {
    padding: 1rem 1.5rem 1.5rem;
}

/* 5. Keep footer spacing consistent */
.quiz-card-enhanced .card-footer {
    margin-top: 1rem;
}