/* ============================================================================
   DEVANTRA INNOVATIONS — QUIZ CHALLENGE PLATFORM STYLESHEET
   ============================================================================
   AAA Gamified Experience — Vibrant, Animated, Zero-Gap Production CSS
   
   Sections:
    1.  Keyframe Animations
    2.  CSS Custom Properties (Root Variables)
    3.  Global Reset & Base Styles
    4.  Top Navigation Bar
    5.  Hero / Landing Section
    6.  Competition Cards Grid
    7.  Buttons (Primary, Secondary)
    8.  Quiz Engine Screen (Header, Timer, Progress)
    9.  Question Card
   10.  Wayground 4-Color Answer Options Grid
   11.  Quiz Navigation Row
   12.  Modal Overlays (Anti-Cheat, Confirmations)
   13.  Form Styles (Inputs, Labels)
   14.  Results / Score Section
   15.  Leaderboard Table
   16.  Certificate Verification
   17.  Admin Dashboard
   18.  Instructions Page
   19.  Registration Form & OTP
   20.  Scroll Animation Utility
   21.  Responsive Breakpoints (1024 / 768 / 480 / 375)
   22.  Touch & Performance Enhancements
   ============================================================================ */


/* ============================================================================
   1. KEYFRAME ANIMATIONS
   All animations used across the platform. Rich, smooth, premium feel.
   ============================================================================ */

/* --- fadeInUp: Universal entrance — elements glide upward with opacity --- */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(32px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- gradientShift: Perpetual background gradient motion --- */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* --- floatBounce: Gentle levitation for hero elements --- */
@keyframes floatBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* --- pulseGlow: Neon breathing glow on cards and interactive elements --- */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 45, 123, 0.3), 0 0 30px rgba(123, 47, 247, 0.15);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 45, 123, 0.5), 0 0 50px rgba(123, 47, 247, 0.3), 0 0 80px rgba(0, 245, 255, 0.1);
    }
}

/* --- shimmer: Glossy sweep across buttons and badges --- */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* --- slideInLeft: Stagger entrance from the left --- */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-40px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- slideInRight: Stagger entrance from the right --- */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(40px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- scaleIn: Elastic pop-in for modals and overlays --- */
@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(20px);
    }
    60% {
        transform: scale(1.03) translateY(-2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* --- rainbowBorder: Cycles border color through the full spectrum --- */
@keyframes rainbowBorder {
    0%   { border-color: #FF2D7B; }
    15%  { border-color: #FF6B35; }
    30%  { border-color: #FFD700; }
    45%  { border-color: #39FF14; }
    60%  { border-color: #00F5FF; }
    75%  { border-color: #7B2FF7; }
    90%  { border-color: #C084FC; }
    100% { border-color: #FF2D7B; }
}

/* --- pulseTimer: Urgent countdown throb --- */
@keyframes pulseTimer {
    0% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
    }
    100% {
        transform: scale(1.08);
        box-shadow: 0 0 22px rgba(239, 68, 68, 0.8), 0 0 40px rgba(239, 68, 68, 0.3);
    }
}

/* --- shakeIcon: Anti-cheat alarm icon rattle --- */
@keyframes shakeIcon {
    0%   { transform: rotate(-10deg) scale(1); }
    25%  { transform: rotate(10deg) scale(1.05); }
    50%  { transform: rotate(-10deg) scale(1); }
    75%  { transform: rotate(10deg) scale(1.05); }
    100% { transform: rotate(-10deg) scale(1); }
}

/* --- confettiBurst: Celebratory scale-and-burst for results --- */
@keyframes confettiBurst {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- typewriter: Typing cursor blink for dramatic text reveals --- */
@keyframes typewriter {
    0%, 100% {
        border-right-color: transparent;
    }
    50% {
        border-right-color: var(--dev-gold);
    }
}

/* --- spinGlow: Spinning glow ring for loading states --- */
@keyframes spinGlow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* --- borderGlow: Pulsing border glow for focused elements --- */
@keyframes borderGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 245, 255, 0.3), inset 0 0 5px rgba(0, 245, 255, 0.05);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 245, 255, 0.6), inset 0 0 10px rgba(0, 245, 255, 0.1);
    }
}

/* --- neonFlicker: Neon sign flicker for badges --- */
@keyframes neonFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 0 0 7px rgba(0, 245, 255, 0.8), 0 0 15px rgba(0, 245, 255, 0.5);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}


/* ============================================================================
   2. CSS CUSTOM PROPERTIES — Design Tokens / Theme Variables
   All colors, sizes, and transition tokens for the quiz platform
   ============================================================================ */
:root {
    /* --- Core brand palette --- */
    --dev-navy: #0B1B3D;
    --dev-navy-dark: #070B1A;
    --dev-navy-light: #132A5C;
    --dev-gold: #FFD700;
    --dev-gold-dark: #F59E0B;
    --dev-cyan: #00F5FF;
    --dev-emerald: #10B981;
    --dev-rose: #FF2D7B;
    --dev-purple: #7B2FF7;

    /* --- Wayground 4-color option palette (3D button aesthetic) --- */
    --opt-red: #EF4444;
    --opt-red-shadow: #B91C1C;
    --opt-blue: #3B82F6;
    --opt-blue-shadow: #1D4ED8;
    --opt-yellow: #F59E0B;
    --opt-yellow-shadow: #B45309;
    --opt-green: #10B981;
    --opt-green-shadow: #047857;

    /* --- Surface & background colors --- */
    --bg-dark: #070B1A;
    --card-bg: rgba(13, 19, 49, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;

    /* --- Radius tokens --- */
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* --- Transition token --- */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* --- Vivid accent palette (used for gradients, glows, highlights) --- */
    --vivid-pink: #FF2D7B;
    --vivid-pink-light: #FF6B9D;
    --vivid-cyan: #00F5FF;
    --vivid-teal: #06D6A0;
    --vivid-purple: #7B2FF7;
    --vivid-purple-mid: #A855F7;
    --vivid-purple-light: #C084FC;
    --vivid-lime: #39FF14;
    --vivid-orange: #FF6B35;
    --vivid-blue: #3B82F6;
    --vivid-blue-light: #60A5FA;
    --vivid-ruby: #EF4444;
    --vivid-coral: #FF6F91;
    --vivid-gold: #FFD700;
    --vivid-gold-warm: #FBBF24;
}


/* ============================================================================
   3. GLOBAL RESET & BASE STYLES
   Universal box-sizing, margin/padding reset, font stack, and body background
   ============================================================================ */

/* --- Hard reset: zero gaps everywhere --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

/* --- Body: deep space gradient + floating nebula orbs --- */
body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse at 10% 15%, rgba(123, 47, 247, 0.15) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 80%, rgba(255, 45, 123, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 245, 255, 0.06) 0%, transparent 55%),
        radial-gradient(ellipse at 30% 70%, rgba(57, 255, 20, 0.05) 0%, transparent 40%),
        radial-gradient(ellipse at 75% 20%, rgba(255, 215, 0, 0.08) 0%, transparent 40%),
        linear-gradient(180deg, #070B1A 0%, #0D1331 50%, #070B1A 100%);
    background-attachment: fixed;
    background-size: 200% 200%;
    animation: gradientShift 20s ease infinite;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Primary container: centered, zero-gap, tight padding --- */
.quiz-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 16px 24px;
    width: 100%;
    animation: fadeInUp 0.6s ease both;
}


/* ============================================================================
   4. TOP NAVIGATION BAR
   Sticky glassmorphism nav with brand logo, title, and action buttons
   ============================================================================ */

/* --- Nav wrapper: glass background with rainbow bottom accent --- */
.quiz-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(11, 27, 61, 0.85) 0%, rgba(13, 19, 49, 0.9) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, #FF2D7B, #FFD700, #00F5FF, #7B2FF7, #39FF14) 1;
    position: sticky;
    top: 0;
    z-index: 100;
    animation: fadeInUp 0.4s ease both;
}

/* --- Brand link wrapper --- */
.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    transition: var(--transition-smooth);
}

.brand-wrapper:hover {
    transform: scale(1.02);
}

/* --- Brand logo image --- */
.brand-wrapper img {
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.3));
    transition: var(--transition-smooth);
}

.brand-wrapper:hover img {
    filter: drop-shadow(0 0 14px rgba(0, 245, 255, 0.6));
}

/* --- Brand title: rainbow gradient text --- */
.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #FFF 20%, #FFD700 50%, #00F5FF 80%, #FF2D7B 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Nav action button group --- */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* --- Sound toggle: pill button with gold accent --- */
.btn-sound-toggle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 215, 0, 0.25);
    color: var(--dev-gold);
    padding: 8px 14px;
    border-radius: 9999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

/* --- Shimmer pseudo-element on sound toggle --- */
.btn-sound-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.15), transparent);
    transition: left 0.5s ease;
}

.btn-sound-toggle:hover {
    background: rgba(255, 215, 0, 0.12);
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.btn-sound-toggle:hover::before {
    left: 100%;
}


/* ============================================================================
   5. HERO / LANDING SECTION
   Dramatic full-width hero card with gradient overlays, floating effects,
   pill badges, animated title, and stat boxes
   ============================================================================ */

/* --- Hero card: layered gradient with animated glow border --- */
.hero-card {
    background: linear-gradient(135deg, rgba(123, 47, 247, 0.15) 0%, rgba(13, 19, 49, 0.9) 40%, rgba(255, 45, 123, 0.08) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-xl);
    padding: 48px 36px;
    text-align: center;
    margin-top: 16px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 30px rgba(123, 47, 247, 0.15),
        0 0 60px rgba(255, 45, 123, 0.08),
        0 20px 60px -15px rgba(0, 0, 0, 0.6);
    animation: fadeInUp 0.7s ease both, pulseGlow 4s ease-in-out infinite;
}

/* --- Hero ambient glow: large soft radial gradient overlay --- */
.hero-card::before {
    content: '';
    position: absolute;
    top: -60%;
    left: -30%;
    width: 160%;
    height: 160%;
    background:
        radial-gradient(circle at 30% 40%, rgba(0, 245, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(255, 45, 123, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(255, 215, 0, 0.06) 0%, transparent 40%);
    pointer-events: none;
    animation: floatBounce 8s ease-in-out infinite;
}

/* --- Hero pill badge: glowing category/status indicator --- */
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 45, 123, 0.2), rgba(123, 47, 247, 0.2));
    border: 1px solid rgba(255, 45, 123, 0.4);
    color: var(--vivid-pink-light);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.5s ease both;
    text-shadow: 0 0 10px rgba(255, 45, 123, 0.5);
}

/* --- Hero title: large bold heading --- */
.hero-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 14px;
    letter-spacing: -1.5px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease both 0.1s;
}

/* --- Hero title accent span: vivid rainbow gradient text --- */
.hero-title span {
    background: linear-gradient(135deg, #FFD700 0%, #FF2D7B 30%, #00F5FF 60%, #39FF14 100%);
    background-size: 300% 300%;
    animation: gradientShift 5s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Hero description paragraph --- */
.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 28px auto;
    line-height: 1.65;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.7s ease both 0.2s;
}

/* --- Hero stats grid: metrics row below description --- */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 1;
}

/* --- Stat box heading: large colored number --- */
.stat-box {
    animation: fadeInUp 0.6s ease both;
    transition: var(--transition-smooth);
    padding: 12px 8px;
    border-radius: var(--radius-lg);
}

.stat-box:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-3px);
}

.stat-box:nth-child(1) { animation-delay: 0.3s; }
.stat-box:nth-child(2) { animation-delay: 0.4s; }
.stat-box:nth-child(3) { animation-delay: 0.5s; }
.stat-box:nth-child(4) { animation-delay: 0.6s; }

.stat-box h4 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 2px;
    background: linear-gradient(135deg, #FFD700, #FF6B35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

/* --- Stat box label: uppercase descriptor --- */
.stat-box p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}


/* ============================================================================
   6. COMPETITION CARDS GRID
   Responsive card layout for listing available competitions/quizzes
   ============================================================================ */

/* --- Competition grid: auto-fill responsive layout --- */
.comp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-top: 28px;
}

/* --- Individual competition card: glass card with hover lift --- */
.comp-card {
    background: linear-gradient(160deg, rgba(13, 19, 49, 0.8) 0%, rgba(19, 42, 92, 0.4) 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease both;
}

/* --- Card hover: lift + colorful border + glow --- */
.comp-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(0, 245, 255, 0.4);
    box-shadow:
        0 0 20px rgba(0, 245, 255, 0.15),
        0 0 40px rgba(123, 47, 247, 0.1),
        0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

/* --- Stagger animation delays for card grid --- */
.comp-card:nth-child(1) { animation-delay: 0.1s; }
.comp-card:nth-child(2) { animation-delay: 0.2s; }
.comp-card:nth-child(3) { animation-delay: 0.3s; }
.comp-card:nth-child(4) { animation-delay: 0.4s; }
.comp-card:nth-child(5) { animation-delay: 0.5s; }
.comp-card:nth-child(6) { animation-delay: 0.6s; }

/* --- Competition status badge: positioned top-right corner --- */
.comp-status-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 14px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* --- LIVE badge: pulsing green neon --- */
.badge-live {
    background: rgba(57, 255, 20, 0.15);
    color: #39FF14;
    border: 1px solid rgba(57, 255, 20, 0.4);
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.2);
    animation: pulseGlow 2s ease-in-out infinite;
}

/* --- UPCOMING badge: cyan accent --- */
.badge-upcoming {
    background: rgba(0, 245, 255, 0.12);
    color: #00F5FF;
    border: 1px solid rgba(0, 245, 255, 0.35);
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.15);
}

/* --- CLOSED badge: muted rose --- */
.badge-closed {
    background: rgba(239, 68, 68, 0.12);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* --- Competition metadata row: icons + text pairs --- */
.comp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- Individual meta item --- */
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.83rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- Meta item icon: colorful accent --- */
.meta-item i {
    color: var(--dev-cyan);
    font-size: 0.9rem;
    filter: drop-shadow(0 0 4px rgba(0, 245, 255, 0.3));
}


/* ============================================================================
   7. BUTTONS — Primary & Secondary
   Vivid gradient buttons with shimmer effects, 3D depth, and active states
   ============================================================================ */

/* --- Primary CTA button: bold gradient with shimmer sweep --- */
.btn-primary {
    background: linear-gradient(135deg, #FFD700 0%, #FF6B35 50%, #FF2D7B 100%);
    background-size: 200% 200%;
    color: #070B1A;
    font-weight: 800;
    font-size: 1rem;
    padding: 14px 28px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    box-shadow:
        0 4px 0 #B45309,
        0 6px 20px rgba(255, 107, 53, 0.35);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    animation: gradientShift 4s ease infinite;
    letter-spacing: 0.3px;
}

/* --- Shimmer sweep overlay on primary button --- */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s ease infinite;
}

/* --- Primary hover: lift + stronger glow --- */
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow:
        0 6px 0 #B45309,
        0 12px 30px rgba(255, 107, 53, 0.5),
        0 0 25px rgba(255, 215, 0, 0.2);
}

/* --- Primary active: pressed 3D effect --- */
.btn-primary:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 #B45309,
        0 4px 12px rgba(255, 107, 53, 0.3);
}

/* --- Secondary button: glass with border --- */
.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #FFF;
    font-weight: 600;
    padding: 14px 24px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

/* --- Secondary hover: glass brightens + cyan accent --- */
.btn-secondary:hover {
    background: rgba(0, 245, 255, 0.08);
    border-color: rgba(0, 245, 255, 0.3);
    color: #00F5FF;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 245, 255, 0.1);
}


/* ============================================================================
   8. QUIZ ENGINE SCREEN — Header Bar, Timer Pill, Progress Track
   The active quiz-taking interface wrapper
   ============================================================================ */

/* --- Quiz screen wrapper: centered narrower width for focus --- */
.quiz-screen-wrapper {
    max-width: 940px;
    margin: 12px auto;
    padding: 0 12px;
    width: 100%;
    animation: fadeInUp 0.5s ease both;
}

/* --- Quiz header bar: top info strip with timer and controls --- */
.quiz-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(11, 27, 61, 0.8) 0%, rgba(13, 19, 49, 0.9) 100%);
    padding: 12px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideInLeft 0.5s ease both;
}

/* --- Timer pill: countdown display with red accent --- */
.quiz-timer-pill {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(255, 45, 123, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #F87171;
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
    transition: var(--transition-smooth);
}

/* --- Timer urgent state: pulsing red alarm --- */
.timer-urgent {
    animation: pulseTimer 0.7s infinite alternate ease-in-out;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(255, 45, 123, 0.25));
    color: #FFF;
    border-color: rgba(239, 68, 68, 0.6);
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.8);
}

/* --- Progress track: slim bar background --- */
.quiz-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* --- Progress fill: animated rainbow gradient bar --- */
.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF2D7B, #FFD700, #00F5FF, #39FF14, #7B2FF7);
    background-size: 300% 100%;
    animation: gradientShift 4s ease infinite;
    border-radius: 9999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.4);
}


/* ============================================================================
   9. QUESTION CARD
   The main question display area with meta badges and question text
   ============================================================================ */

/* --- Question card: frosted glass with colorful border glow --- */
.question-card {
    background: linear-gradient(160deg, rgba(19, 42, 92, 0.5) 0%, rgba(13, 19, 49, 0.85) 100%);
    border: 1px solid rgba(123, 47, 247, 0.2);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    margin-bottom: 16px;
    box-shadow:
        0 0 20px rgba(123, 47, 247, 0.08),
        0 12px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: fadeInUp 0.5s ease both;
    position: relative;
    overflow: hidden;
}

/* --- Subtle animated border effect on question card --- */
.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #FF2D7B, #FFD700, #00F5FF, #7B2FF7, #39FF14);
    background-size: 300% 100%;
    animation: gradientShift 5s ease infinite;
}

/* --- Question meta row: badges and indicators --- */
.question-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

/* --- Question badge: small pill with accent color --- */
.q-badge {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 107, 53, 0.1));
    color: var(--dev-gold);
    border: 1px solid rgba(255, 215, 0, 0.25);
    padding: 4px 14px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

/* --- Question text: prominent, readable --- */
.question-text {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.45;
    color: #FFF;
    position: relative;
    z-index: 1;
}


/* ============================================================================
   10. WAYGROUND 4-COLOR ANSWER OPTIONS GRID
   Kahoot/Quizizz-inspired 2×2 color-coded answer buttons with 3D depth
   ============================================================================ */

/* --- Options 2×2 grid --- */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 16px;
}

/* --- Base option button: shared 3D pressed-button aesthetic --- */
.option-btn {
    border: none;
    border-radius: 16px;
    padding: 20px 18px;
    color: #FFF;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
    position: relative;
    user-select: none;
    overflow: hidden;
    line-height: 1.35;
}

/* --- Subtle inner shine on all option buttons --- */
.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
    border-radius: 16px 16px 0 0;
    pointer-events: none;
}

/* --- RED option (index 0) --- */
.option-btn-0 {
    background: linear-gradient(145deg, #EF4444, #DC2626);
    box-shadow: 0 6px 0 var(--opt-red-shadow), 0 8px 20px rgba(239, 68, 68, 0.25);
}
.option-btn-0:hover {
    filter: brightness(1.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 0 var(--opt-red-shadow), 0 14px 30px rgba(239, 68, 68, 0.4);
}
.option-btn-0:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--opt-red-shadow), 0 4px 10px rgba(239, 68, 68, 0.2);
}

/* --- BLUE option (index 1) --- */
.option-btn-1 {
    background: linear-gradient(145deg, #3B82F6, #2563EB);
    box-shadow: 0 6px 0 var(--opt-blue-shadow), 0 8px 20px rgba(59, 130, 246, 0.25);
}
.option-btn-1:hover {
    filter: brightness(1.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 0 var(--opt-blue-shadow), 0 14px 30px rgba(59, 130, 246, 0.4);
}
.option-btn-1:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--opt-blue-shadow), 0 4px 10px rgba(59, 130, 246, 0.2);
}

/* --- YELLOW/ORANGE option (index 2) --- */
.option-btn-2 {
    background: linear-gradient(145deg, #F59E0B, #D97706);
    box-shadow: 0 6px 0 var(--opt-yellow-shadow), 0 8px 20px rgba(245, 158, 11, 0.25);
    color: #071228;
}
.option-btn-2:hover {
    filter: brightness(1.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 0 var(--opt-yellow-shadow), 0 14px 30px rgba(245, 158, 11, 0.4);
}
.option-btn-2:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--opt-yellow-shadow), 0 4px 10px rgba(245, 158, 11, 0.2);
}

/* --- GREEN option (index 3) --- */
.option-btn-3 {
    background: linear-gradient(145deg, #10B981, #059669);
    box-shadow: 0 6px 0 var(--opt-green-shadow), 0 8px 20px rgba(16, 185, 129, 0.25);
}
.option-btn-3:hover {
    filter: brightness(1.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 0 var(--opt-green-shadow), 0 14px 30px rgba(16, 185, 129, 0.4);
}
.option-btn-3:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--opt-green-shadow), 0 4px 10px rgba(16, 185, 129, 0.2);
}

/* --- Option key badge: letter/number identifier circle --- */
.option-key-badge {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* --- Selected option state: bright outline + slight scale --- */
.option-btn.selected {
    outline: 4px solid #FFF;
    outline-offset: 2px;
    transform: scale(0.98);
    filter: brightness(1.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* --- Stagger entrance animation for option buttons --- */
.option-btn:nth-child(1) { animation: fadeInUp 0.35s ease both 0.1s; }
.option-btn:nth-child(2) { animation: fadeInUp 0.35s ease both 0.2s; }
.option-btn:nth-child(3) { animation: fadeInUp 0.35s ease both 0.3s; }
.option-btn:nth-child(4) { animation: fadeInUp 0.35s ease both 0.4s; }


/* ============================================================================
   11. QUIZ NAVIGATION ROW
   Bottom action bar with prev/next/submit buttons
   ============================================================================ */
.quiz-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    gap: 12px;
    animation: fadeInUp 0.5s ease both 0.3s;
}


/* ============================================================================
   12. MODAL OVERLAYS — Anti-Cheat Warnings, Submission Confirmations
   Full-screen backdrop with centered glass modal card
   ============================================================================ */

/* --- Modal overlay: full viewport dark glass backdrop --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 11, 26, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
    animation: fadeInUp 0.2s ease both;
}

/* --- Modal box: centered content card with rainbow border --- */
.modal-box {
    background: linear-gradient(160deg, #0D1331 0%, #0B1B3D 100%);
    border: 2px solid;
    border-image: linear-gradient(135deg, #FF2D7B, #FFD700, #00F5FF, #7B2FF7) 1;
    border-radius: var(--radius-xl);
    padding: 36px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow:
        0 0 40px rgba(123, 47, 247, 0.2),
        0 0 80px rgba(255, 45, 123, 0.1),
        0 30px 60px -15px rgba(0, 0, 0, 0.7);
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    /* border-image doesn't work with border-radius, so we clip */
    border-image: none;
    border-color: var(--vivid-purple);
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both, rainbowBorder 4s linear infinite;
}

/* --- Modal alarm icon: shaking red circle for anti-cheat --- */
.modal-icon-alarm {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(255, 45, 123, 0.15));
    border: 2px solid #EF4444;
    color: #EF4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 16px auto;
    animation: shakeIcon 0.6s ease-in-out infinite;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.3);
}


/* ============================================================================
   13. FORM STYLES — Inputs, Labels, Groups
   Registration, login, and settings forms
   ============================================================================ */

/* --- Form group: vertical stack with tight spacing --- */
.form-group {
    margin-bottom: 16px;
    text-align: left;
}

/* --- Form label: uppercase micro-label --- */
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Form input: dark glass with border glow on focus --- */
.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #FFF;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition-smooth);
    font-family: inherit;
}

/* --- Input focus: cyan glow ring --- */
.form-input:focus {
    outline: none;
    border-color: var(--dev-cyan);
    background: rgba(0, 245, 255, 0.04);
    box-shadow:
        0 0 0 3px rgba(0, 245, 255, 0.15),
        0 0 15px rgba(0, 245, 255, 0.1);
    animation: borderGlow 2s ease-in-out infinite;
}


/* ============================================================================
   14. RESULTS / SCORE SECTION
   Post-quiz results display with animated score circle and details
   ============================================================================ */

/* --- Result card: full-width glass card with celebration glow --- */
.result-card {
    background: linear-gradient(160deg, rgba(13, 19, 49, 0.9) 0%, rgba(19, 42, 92, 0.5) 100%);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    text-align: center;
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.08),
        0 20px 60px -15px rgba(0, 0, 0, 0.5);
    animation: confettiBurst 0.8s ease both;
    position: relative;
    overflow: hidden;
}

/* --- Decorative gradient sweep behind result card --- */
.result-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 30%, rgba(57, 255, 20, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(255, 45, 123, 0.06) 0%, transparent 40%);
    pointer-events: none;
    animation: floatBounce 10s ease-in-out infinite;
}

/* --- Score circle: large radial display for percentage --- */
.score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    font-size: 2.8rem;
    font-weight: 900;
    position: relative;
    z-index: 1;
    animation: confettiBurst 0.8s ease both 0.2s;
}

/* --- Pass score: green-to-cyan gradient circle --- */
.score-pass {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 214, 160, 0.15));
    border: 3px solid #10B981;
    color: #39FF14;
    box-shadow:
        0 0 30px rgba(57, 255, 20, 0.2),
        0 0 60px rgba(16, 185, 129, 0.1),
        inset 0 0 20px rgba(57, 255, 20, 0.05);
    text-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
}

/* --- Fail score: red-to-rose gradient circle --- */
.score-fail {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(255, 45, 123, 0.15));
    border: 3px solid #EF4444;
    color: #F87171;
    box-shadow:
        0 0 30px rgba(239, 68, 68, 0.2),
        0 0 60px rgba(255, 45, 123, 0.1),
        inset 0 0 20px rgba(239, 68, 68, 0.05);
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

/* --- Result details: stat breakdown below score --- */
.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
}

/* --- Certificate preview: mini cert display --- */
.cert-preview {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 107, 53, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
    transition: var(--transition-smooth);
}

.cert-preview:hover {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}


/* ============================================================================
   15. LEADERBOARD TABLE
   Ranked participant list with podium highlights and rank badges
   ============================================================================ */

/* --- Leaderboard table: full-width glass container --- */
.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    margin-top: 20px;
    animation: fadeInUp 0.5s ease both;
}

/* --- Leaderboard row: individual participant entry --- */
.leaderboard-row {
    background: rgba(13, 19, 49, 0.6);
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.leaderboard-row td {
    padding: 14px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
}

.leaderboard-row td:first-child {
    border-radius: 12px 0 0 12px;
}

.leaderboard-row td:last-child {
    border-radius: 0 12px 12px 0;
}

.leaderboard-row:hover {
    background: rgba(19, 42, 92, 0.7);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* --- Leaderboard header row --- */
.leaderboard-table thead tr {
    background: transparent;
}

.leaderboard-table thead th {
    padding: 12px 16px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border: none;
    text-align: left;
}

/* --- Rank badge: circular rank number indicator --- */
.rank-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* --- 1st place: gold crown --- */
.rank-1 {
    background: linear-gradient(135deg, #FFD700, #F59E0B);
    color: #070B1A;
    border: none;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4), 0 4px 12px rgba(255, 215, 0, 0.2);
    font-size: 0.95rem;
    animation: pulseGlow 3s ease-in-out infinite;
}

/* --- 2nd place: silver shimmer --- */
.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #9CA3AF);
    color: #070B1A;
    border: none;
    box-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
}

/* --- 3rd place: bronze glow --- */
.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #B8860B);
    color: #070B1A;
    border: none;
    box-shadow: 0 0 10px rgba(205, 127, 50, 0.3);
}


/* ============================================================================
   16. CERTIFICATE VERIFICATION
   Card for verifying certificate authenticity with status indicators
   ============================================================================ */

/* --- Verify card: glass container with centered content --- */
.verify-card {
    background: linear-gradient(160deg, rgba(13, 19, 49, 0.9) 0%, rgba(19, 42, 92, 0.5) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    max-width: 600px;
    margin: 20px auto;
    text-align: center;
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.6s ease both;
}

/* --- Verification status: result indicator block --- */
.verify-status {
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-top: 20px;
    font-weight: 700;
    font-size: 1.1rem;
}

/* --- Valid certificate: green success glow --- */
.verify-valid {
    background: linear-gradient(135deg, rgba(57, 255, 20, 0.1), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(57, 255, 20, 0.3);
    color: #39FF14;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.1);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

/* --- Invalid certificate: red warning --- */
.verify-invalid {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(255, 45, 123, 0.08));
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #F87171;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}


/* ============================================================================
   17. ADMIN DASHBOARD
   Sidebar + content layout with stat cards and data tables
   ============================================================================ */

/* --- Admin sidebar: fixed left navigation panel --- */
.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, #0D1331 0%, #070B1A 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 16px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    overflow-y: auto;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
    animation: slideInLeft 0.5s ease both;
}

.admin-sidebar a,
.admin-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    margin-bottom: 4px;
}

.admin-sidebar a:hover,
.admin-sidebar .nav-item:hover {
    background: rgba(0, 245, 255, 0.08);
    color: var(--dev-cyan);
    transform: translateX(4px);
}

.admin-sidebar a.active,
.admin-sidebar .nav-item.active {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.12), rgba(123, 47, 247, 0.08));
    color: #00F5FF;
    border: 1px solid rgba(0, 245, 255, 0.2);
}

/* --- Admin content: main area offset by sidebar --- */
.admin-content {
    margin-left: 260px;
    padding: 24px;
    min-height: 100vh;
    animation: fadeInUp 0.5s ease both;
}

/* --- Admin stat card: KPI display with colored accent --- */
.admin-stat-card {
    background: linear-gradient(160deg, rgba(13, 19, 49, 0.8) 0%, rgba(19, 42, 92, 0.4) 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.admin-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #FF2D7B, #7B2FF7, #00F5FF);
    border-radius: 4px 0 0 4px;
}

.admin-stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 245, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* --- Admin data table: styled rows and cells --- */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 16px;
    background: rgba(13, 19, 49, 0.5);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table thead {
    background: linear-gradient(135deg, rgba(123, 47, 247, 0.1), rgba(0, 245, 255, 0.05));
}

.admin-table th {
    padding: 14px 16px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.admin-table tbody tr {
    transition: var(--transition-smooth);
}

.admin-table tbody tr:hover {
    background: rgba(0, 245, 255, 0.04);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}


/* ============================================================================
   18. INSTRUCTIONS PAGE
   Pre-quiz instructions card with step items and agreement checkbox
   ============================================================================ */

/* --- Instructions card: glass container with top accent bar --- */
.instructions-card {
    background: linear-gradient(160deg, rgba(13, 19, 49, 0.9) 0%, rgba(19, 42, 92, 0.5) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    max-width: 800px;
    margin: 16px auto;
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.6s ease both;
    position: relative;
    overflow: hidden;
}

/* --- Top rainbow accent bar --- */
.instructions-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FF2D7B, #FFD700, #00F5FF, #39FF14, #7B2FF7);
    background-size: 300% 100%;
    animation: gradientShift 5s ease infinite;
}

/* --- Instruction item: individual step/rule row --- */
.instruction-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition-smooth);
    animation: fadeInUp 0.4s ease both;
}

.instruction-item:last-child {
    border-bottom: none;
}

.instruction-item:hover {
    padding-left: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

/* --- Stagger entrance for instruction items --- */
.instruction-item:nth-child(1) { animation-delay: 0.1s; }
.instruction-item:nth-child(2) { animation-delay: 0.15s; }
.instruction-item:nth-child(3) { animation-delay: 0.2s; }
.instruction-item:nth-child(4) { animation-delay: 0.25s; }
.instruction-item:nth-child(5) { animation-delay: 0.3s; }
.instruction-item:nth-child(6) { animation-delay: 0.35s; }
.instruction-item:nth-child(7) { animation-delay: 0.4s; }
.instruction-item:nth-child(8) { animation-delay: 0.45s; }

/* --- Instruction icon: colored circle with icon --- */
.instruction-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.12), rgba(123, 47, 247, 0.08));
    border: 1px solid rgba(0, 245, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dev-cyan);
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* --- Checkbox agreement: terms acceptance row --- */
.checkbox-agreement {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin-top: 20px;
    background: rgba(255, 215, 0, 0.04);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.checkbox-agreement:hover {
    border-color: rgba(255, 215, 0, 0.35);
    background: rgba(255, 215, 0, 0.07);
    color: var(--text-primary);
}

.checkbox-agreement input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--dev-gold);
    cursor: pointer;
}


/* ============================================================================
   19. REGISTRATION FORM & OTP
   Multi-step registration with OTP input fields and progress indicators
   ============================================================================ */

/* --- Registration card: form container --- */
.registration-card {
    background: linear-gradient(160deg, rgba(13, 19, 49, 0.9) 0%, rgba(19, 42, 92, 0.5) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    max-width: 560px;
    margin: 16px auto;
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.6s ease both;
    position: relative;
    overflow: hidden;
}

/* --- Top gradient accent --- */
.registration-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7B2FF7, #FF2D7B, #FFD700);
    background-size: 300% 100%;
    animation: gradientShift 4s ease infinite;
}

/* --- OTP input group: horizontal row of individual digit fields --- */
.otp-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

/* --- Individual OTP digit field: large, centered, square --- */
.otp-field {
    width: 52px;
    height: 58px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #FFF;
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    transition: var(--transition-smooth);
    font-family: inherit;
    caret-color: var(--dev-cyan);
}

.otp-field:focus {
    outline: none;
    border-color: var(--dev-cyan);
    background: rgba(0, 245, 255, 0.06);
    box-shadow:
        0 0 0 3px rgba(0, 245, 255, 0.15),
        0 0 20px rgba(0, 245, 255, 0.15);
    transform: scale(1.05);
}

/* --- OTP sent badge: confirmation indicator --- */
.otp-sent-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid rgba(57, 255, 20, 0.3);
    color: #39FF14;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 16px;
    animation: fadeInUp 0.4s ease both;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
}

/* --- Progress steps: multi-step form indicator --- */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
    padding: 0 20px;
}

/* --- Individual step item: circle + connector line --- */
.step-item {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
    flex: 1;
    justify-content: center;
}

.step-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -50%;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 0;
}

.step-item:first-child::before {
    display: none;
}

/* --- Step circle (created via nested span or pseudo) --- */
.step-item span,
.step-item .step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    transition: var(--transition-smooth);
}

/* --- Active step: cyan highlight --- */
.step-active span,
.step-active .step-circle,
.step-item.step-active span {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(123, 47, 247, 0.15));
    border-color: var(--dev-cyan);
    color: #00F5FF;
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
    text-shadow: 0 0 8px rgba(0, 245, 255, 0.5);
}

/* --- Completed step: green checkmark style --- */
.step-completed span,
.step-completed .step-circle,
.step-item.step-completed span {
    background: linear-gradient(135deg, #10B981, #06D6A0);
    border-color: #10B981;
    color: #FFF;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.step-completed::before,
.step-item.step-completed::before {
    background: linear-gradient(90deg, #10B981, #06D6A0);
}


/* ============================================================================
   20. SCROLL ANIMATION UTILITY
   General-purpose class for triggering CSS animations when elements
   scroll into the viewport (typically toggled via JS IntersectionObserver)
   ============================================================================ */

/* --- Animate on scroll: starts hidden, plays animation once visible --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease both;
    animation-play-state: paused;
    animation-fill-mode: both;
}

/* --- When the element is observed / has the .visible class, play --- */
.animate-on-scroll.visible,
.animate-on-scroll[data-visible="true"] {
    animation-play-state: running;
}


/* ============================================================================
   21. RESPONSIVE BREAKPOINTS
   Adaptive layout adjustments for all device sizes
   ============================================================================ */

/* ---- Tablets and small desktops: ≤ 1024px ---- */
@media (max-width: 1024px) {
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .comp-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }

    /* Admin: collapse sidebar for tablets */
    .admin-sidebar {
        width: 220px;
    }

    .admin-content {
        margin-left: 220px;
    }
}

/* ---- Phones landscape / small tablets: ≤ 768px ---- */
@media (max-width: 768px) {
    /* Tighten container padding */
    .quiz-container {
        padding: 10px 10px 16px;
    }

    /* Scale down hero */
    .hero-title {
        font-size: 2rem;
        letter-spacing: -0.5px;
    }

    .hero-card {
        padding: 32px 16px;
        margin-top: 10px;
        border-radius: 18px;
    }

    .hero-desc {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 20px;
        padding-top: 20px;
    }

    .stat-box h4 {
        font-size: 1.6rem;
    }

    /* Single column options on mobile */
    .options-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Single column competition cards */
    .comp-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* Compact question card */
    .question-card {
        padding: 22px 16px;
        border-radius: 16px;
        margin-bottom: 12px;
    }

    .question-text {
        font-size: 1.15rem;
    }

    /* Smaller option buttons */
    .option-btn {
        font-size: 0.95rem;
        padding: 16px 14px;
        border-radius: 14px;
    }

    /* Compact nav */
    .quiz-nav {
        padding: 10px 12px;
    }

    .quiz-nav .nav-actions {
        gap: 8px;
    }

    /* Stack quiz nav row vertically */
    .quiz-nav-row {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .quiz-nav-row button {
        width: 100%;
        justify-content: center;
    }

    .quiz-nav-row > div {
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    /* Compact modals */
    .modal-box {
        padding: 24px 16px;
    }

    /* Admin: stack sidebar and content */
    .admin-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 16px;
    }

    .admin-content {
        margin-left: 0;
        padding: 16px;
    }

    /* Compact forms */
    .instructions-card,
    .registration-card,
    .verify-card {
        padding: 24px 16px;
        margin: 10px auto;
    }

    /* Result section mobile */
    .result-card {
        padding: 28px 16px;
    }

    .score-circle {
        width: 130px;
        height: 130px;
        font-size: 2.2rem;
    }

    .result-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---- Phones portrait: ≤ 480px ---- */
@media (max-width: 480px) {
    .brand-title {
        font-size: 0.92rem;
    }

    .brand-wrapper img {
        height: 28px;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .hero-pill {
        font-size: 0.72rem;
        padding: 4px 12px;
    }

    /* Hide sound toggle label text */
    .btn-sound-toggle span {
        display: none;
    }

    .btn-sound-toggle {
        padding: 8px 10px;
    }

    .quiz-timer-pill {
        font-size: 0.92rem;
        padding: 6px 12px;
    }

    .stat-box h4 {
        font-size: 1.4rem;
    }

    .stat-box p {
        font-size: 0.72rem;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 0.92rem;
    }

    .option-key-badge {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 0.85rem;
    }

    .quiz-header-bar {
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* OTP fields smaller on tiny screens */
    .otp-field {
        width: 44px;
        height: 50px;
        font-size: 1.2rem;
    }

    .otp-input-group {
        gap: 6px;
    }

    /* Leaderboard compact */
    .leaderboard-row td {
        padding: 10px 10px;
        font-size: 0.85rem;
    }

    .rank-badge {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .result-details {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

/* ---- Small phones: ≤ 375px ---- */
@media (max-width: 375px) {
    .quiz-container {
        padding: 6px 6px 12px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-card {
        padding: 24px 12px;
    }

    .hero-desc {
        font-size: 0.88rem;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .comp-card {
        padding: 18px;
    }

    .question-card {
        padding: 18px 12px;
    }

    .question-text {
        font-size: 1.05rem;
    }

    .option-btn {
        padding: 14px 12px;
        font-size: 0.9rem;
        gap: 10px;
    }

    .modal-box {
        padding: 20px 12px;
    }

    .instructions-card,
    .registration-card {
        padding: 20px 12px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 18px;
        font-size: 0.9rem;
    }

    .admin-stat-card {
        padding: 16px;
    }

    .otp-field {
        width: 38px;
        height: 44px;
        font-size: 1.1rem;
        border-radius: 8px;
    }

    .score-circle {
        width: 110px;
        height: 110px;
        font-size: 1.8rem;
    }
}


/* ============================================================================
   22. TOUCH & PERFORMANCE ENHANCEMENTS
   Disable unnecessary touch highlights, optimize paint performance
   ============================================================================ */

/* --- Remove tap highlight and optimize touch targets --- */
button,
.option-btn,
.nav-item,
.comp-card,
.btn-primary,
.btn-secondary,
.btn-sound-toggle,
a {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* --- GPU acceleration hints for animated elements --- */
.hero-card,
.comp-card,
.option-btn,
.modal-box,
.question-card,
.result-card,
.quiz-progress-fill,
.score-circle {
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* --- Smooth scrolling for the entire page --- */
html {
    scroll-behavior: smooth;
}

/* --- Selection color matching brand --- */
::selection {
    background: rgba(255, 45, 123, 0.3);
    color: #FFF;
}

::-moz-selection {
    background: rgba(255, 45, 123, 0.3);
    color: #FFF;
}

/* --- Custom scrollbar styling (Webkit browsers) --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #070B1A;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7B2FF7, #FF2D7B);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #A855F7, #FF6B9D);
}

/* --- Placeholder text styling --- */
::placeholder {
    color: rgba(148, 163, 184, 0.5);
    font-style: italic;
}

/* --- Reduced motion: respect user preference --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    body {
        animation: none;
    }
}

/* ============================================================================
   END OF DEVANTRA QUIZ GAMIFIED EXPERIENCE STYLESHEET
   ============================================================================ */
