/* Cyber Theme Variables */
:root {
    --cyber-primary: #00bfff;
    --cyber-secondary: #0a192f;
    --cyber-accent: #00ccff;
    --cyber-text: #e6e6e6; /* Slightly softened white for better eye comfort */
    --cyber-text-dim: #a4b0e6;
    --cyber-text-bright: #ffffff; /* Full white for emphasis */
    --cyber-dark: #020c1b;
    --cyber-dark-alt: #0d1f3a;
    --cyber-dark-text: #111111; /* Dark text for light backgrounds */
    --cyber-mid-text: #90a4ae; /* Middle gray for subtle text */
    --cyber-glow: 0 0 10px var(--cyber-primary);
    --cyber-border: 2px solid var(--cyber-primary);
    --cyber-highlight: rgba(0, 191, 255, 0.15);
    --cyber-warning: #ffb400;
    --cyber-danger: #ff5470;
    --cyber-success: #2ecc71;
    --font-mono: 'Share Tech Mono', 'Courier New', monospace;
    --font-display: 'VT323', monospace;
    --neon-text-shadow: 0 0 5px var(--cyber-primary), 
                        0 0 10px var(--cyber-primary),
                        0 0 20px var(--cyber-primary);
    --cyber-gradient: linear-gradient(90deg, 
                        var(--cyber-dark-alt),
                        var(--cyber-dark) 100%);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font color balance enhancements */
.text-bright {
    color: var(--cyber-text-bright);
}

.text-dim {
    color: var(--cyber-text-dim);
}

.text-balanced {
    color: var(--cyber-text);
}

body {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    line-height: 1.6;
    color: var(--cyber-text);
    background-color: var(--cyber-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Student Dashboard Styles */
/* =========================== */

/* Dashboard Container */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--cyber-dark);
    min-height: 100vh;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--cyber-dark-alt), var(--cyber-secondary));
    border: var(--cyber-border);
    border-radius: 10px;
    box-shadow: var(--cyber-glow);
}

.dashboard-header h1 {
    color: var(--cyber-text-bright);
    font-size: 2.5rem;
    text-shadow: var(--neon-text-shadow);
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--cyber-text-dim);
    font-size: 1.2rem;
}

/* Dashboard Content */
.dashboard-content {
    display: grid;
    gap: 2rem;
}

.dashboard-section {
    background: var(--cyber-dark-alt);
    border: 1px solid var(--cyber-primary);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.1);
}

.dashboard-section h2 {
    color: var(--cyber-primary);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 5px var(--cyber-primary);
    border-bottom: 2px solid var(--cyber-primary);
    padding-bottom: 0.5rem;
}

/* Exam Cards */
.exam-card, .active-exam {
    background: linear-gradient(135deg, var(--cyber-dark-alt), var(--cyber-secondary));
    border: 2px solid var(--cyber-primary);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.2);
    transition: all 0.3s ease;
}

.exam-card:hover, .active-exam:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 191, 255, 0.3);
    border-color: var(--cyber-accent);
}

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

.exam-header h3, .exam-header h4 {
    color: var(--cyber-text-bright);
    font-size: 1.5rem;
    text-shadow: 0 0 3px var(--cyber-primary);
}

.exam-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
}

.exam-status.active {
    background: linear-gradient(90deg, #0099ff 0%, #00e6ff 100%) !important;
    color: #fff !important;
    text-shadow: 0 0 16px #00e6ff, 0 2px 8px rgba(0,0,0,0.18) !important;
    box-shadow: 0 0 18px 6px #00c6ff, 0 0 0 0 transparent !important;
    border: 2.5px solid #00e6ff !important;
    font-weight: 900;
    border-radius: 10px;
    padding: 0.5rem 1.3rem;
    font-size: 1.13rem;
    letter-spacing: 0.15em;
    z-index: 1;
    text-transform: uppercase;
    transition: box-shadow 0.2s, background 0.2s, transform 0.15s;
    filter: brightness(1.15) saturate(1.2);
}

.exam-status.passed {
    background: linear-gradient(45deg, #00ff00, #00cc00);
    color: var(--cyber-dark);
}

.exam-status.failed {
    background: linear-gradient(45deg, #ff4444, #cc0000);
    color: white;
}

/* Exam Details */
.exam-details, .exam-info {
    margin: 1.5rem 0;
}

.exam-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.info-item {
    background: rgba(0, 191, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 191, 255, 0.3);
}

.info-label {
    display: block;
    color: var(--cyber-text-dim);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.info-value {
    color: var(--cyber-text-bright);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Buttons */
.exam-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border: 2px solid var(--cyber-primary);
    background: linear-gradient(45deg, var(--cyber-dark-alt), var(--cyber-secondary));
    color: var(--cyber-text-bright);
    text-decoration: none;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.2);
}

.btn:hover {
    background: linear-gradient(45deg, var(--cyber-primary), var(--cyber-accent));
    color: var(--cyber-dark);
    box-shadow: 0 0 20px var(--cyber-primary);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyber-primary) 0%, var(--cyber-accent) 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(0, 191, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 191, 255, 0.6);
}

.btn-secondary {
    border-color: var(--cyber-text-dim);
    color: var(--cyber-text-dim);
    background: linear-gradient(135deg, var(--cyber-dark-alt) 0%, var(--cyber-dark) 100%);
    box-shadow: 0 4px 16px rgba(113, 128, 150, 0.3);
}

.btn-secondary:hover {
    border-color: var(--cyber-accent);
    color: var(--cyber-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 191, 255, 0.4);
}

/* History Cards */
.exam-history {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.history-card {
    background: linear-gradient(135deg, var(--cyber-dark-alt), var(--cyber-secondary));
    border: 1px solid var(--cyber-primary);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.history-card:hover {
    border-color: var(--cyber-accent);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.2);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.history-details {
    display: grid;
    gap: 2rem;
}

/* Score Display */
.score-display {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: 3px solid;
    position: relative;
}

.score-circle.pass {
    border-color: #00ff00;
    background: radial-gradient(circle, rgba(0, 255, 0, 0.1), transparent);
    color: #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.score-circle.fail {
    border-color: #ff4444;
    background: radial-gradient(circle, rgba(255, 68, 68, 0.1), transparent);
    color: #ff4444;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
}

.score-info {
    flex: 1;
}

.score-label {
    color: var(--cyber-text-dim);
    font-size: 0.9rem;
}

.passing-score {
    color: var(--cyber-text);
    font-size: 1rem;
    margin-top: 0.5rem;
}



.timeline-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 191, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--cyber-primary);
}

.timeline-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.timeline-content {
    flex: 1;
}

.timeline-label {
    color: var(--cyber-text-dim);
    font-size: 0.9rem;
}

.timeline-value {
    color: var(--cyber-text-bright);
    font-weight: bold;
    margin-top: 0.3rem;
}

/* No Content Cards */
.no-exam-card, .no-history-card {
    text-align: center;
    padding: 3rem;
    background: var(--cyber-dark-alt);
    border: 2px dashed var(--cyber-primary);
    border-radius: 12px;
    color: var(--cyber-text-dim);
}

.no-exam-icon, .no-history-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.no-exam-card h3, .no-history-card h3 {
    color: var(--cyber-text);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Review Button */
.review-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(45deg, var(--cyber-accent), var(--cyber-primary));
    color: var(--cyber-dark);
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.3);
}

.review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-text {
    font-family: var(--font-mono);
}

/* Countdown Timer */
.circular-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Strong override: ensure active/passed status badges remain readable across theme CSS files */
.active-exam .exam-status.active,
.exam-card .exam-status.active,
.active-exam .status-badge.active,
.status-badge.passed,
.exam-status.passed {
    background: linear-gradient(45deg, #00ff00, #00cc00) !important;
    color: var(--cyber-text-bright) !important; /* force white text */
    text-shadow: 0 0 6px rgba(0, 255, 0, 0.25) !important;
    box-shadow: 0 0 14px rgba(0, 255, 0, 0.9) !important;
}

/* Ensure failed/inactive badges remain readable too */
.exam-status.failed,
.status-badge.failed,
.status-badge.inactive {
    color: white !important;
    box-shadow: 0 0 12px rgba(255, 0, 64, 0.45) !important;
}

/* Rankings & Performance: high-contrast improvements */
.rankings-section,
.rankings-performance-grid,
.ranking-section-card,
.personal-rankings-grid,
.leaderboard-item,
.leaderboard-name,
.leaderboard-score,
.stat-value,
.rank-badge,
.metric-card .metric-value {
    color: var(--cyber-text-bright) !important; /* primary readable text */
}

.rankings-section h2,
.ranking-section-card h3 {
    color: var(--cyber-primary) !important;
    text-shadow: var(--neon-text-shadow) !important;
}

.leaderboard-item {
    background: rgba(0, 19, 38, 0.6) !important; /* slightly darker to separate from page bg */
    border-left: 3px solid var(--cyber-primary) !important;
    box-shadow: 0 4px 18px rgba(0, 191, 255, 0.06) !important;
}

.leaderboard-name {
    color: var(--cyber-text-bright) !important;
    font-weight: 700 !important;
}

.leaderboard-score {
    color: var(--cyber-text-dim) !important;
    font-weight: 700 !important;
}

.personal-rankings-grid .info-item,
.rankings-performance-grid .info-item {
    background: rgba(0, 191, 255, 0.06) !important;
    color: var(--cyber-text-bright) !important;
}

/* Mobile: slightly larger text for readability */
@media (max-width: 768px) {
    .leaderboard-name { font-size: 1.05rem !important; }
    .leaderboard-score { font-size: 1rem !important; }
    .stat-value { font-size: 1.05rem !important; }
}

/* Explicit overrides for Rankings headings (student dashboard) */
.dashboard-section.rankings-section .section-header h2,
.dashboard-section.rankings-section .section-header .section-subtitle,
.ranking-section-card .card-header h3,
.leaderboard-section-card .card-header h3,
.ranking-section-card .card-header .leaderboard-subtitle,
.leaderboard-section-card .card-header .leaderboard-subtitle {
    color: var(--cyber-text-bright) !important; /* bright white for maximum contrast */
    text-shadow: 0 0 8px var(--cyber-primary) !important;
}

/* Make subtitle slightly dimmer but still readable */
.dashboard-section.rankings-section .section-header .section-subtitle,
.ranking-section-card .card-header .leaderboard-subtitle {
    color: var(--cyber-text-dim) !important;
    font-weight: 600 !important;
}

/* Increase heading size modestly on mobile for readability */
@media (max-width: 768px) {
    .dashboard-section.rankings-section .section-header h2 { font-size: 1.4rem !important; }
    .ranking-section-card .card-header h3, .leaderboard-section-card .card-header h3 { font-size: 1.05rem !important; }
}

/* Extra mobile visibility tweaks for rankings headings/subtitles */
@media (max-width: 480px) {
    .dashboard-section.rankings-section .section-header h2,
    .ranking-section-card .card-header h3,
    .leaderboard-section-card .card-header h3 {
        display: block !important;
        font-size: 1.25rem !important;
        line-height: 1.2 !important;
        color: var(--cyber-text-bright) !important;
        text-shadow: 0 0 6px var(--cyber-primary) !important;
        margin-bottom: 0.25rem !important;
        padding-right: 0.5rem !important;
        white-space: normal !important;
        overflow: visible !important;
    }

    .dashboard-section.rankings-section .section-header .section-subtitle,
    .ranking-section-card .card-header .leaderboard-subtitle {
        display: block !important;
        color: var(--cyber-text-dim) !important;
        font-size: 0.95rem !important;
        margin-bottom: 0.5rem !important;
    }
}

.countdown-svg {
    width: 120px;
    height: 120px;
}

.countdown-svg .bg {
    fill: none;
    stroke: rgba(0, 191, 255, 0.2);
    stroke-width: 3;
}

.countdown-svg .progress {
    fill: none;
    stroke: var(--cyber-primary);
    stroke-width: 3;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.time-text {
    fill: var(--cyber-text-bright);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: bold;
}

.countdown-caption {
    color: var(--cyber-text-dim);
    font-size: 0.9rem;
    text-align: center;
}


/* Global responsive helpers */
img, video, svg, canvas {
    max-width: 100%;
    height: auto;
}

.container, .admin-content, .admin-dashboard, .exam-container, .flash-messages {
    width: 100%;
}

/* Navigation Bar */
.navbar {
    background: var(--cyber-secondary);
    color: var(--cyber-text);
    padding: 0;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: var(--cyber-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
}

.nav-brand h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cyber-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: var(--cyber-glow);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--cyber-text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--cyber-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-link:hover {
    color: var(--cyber-primary);
    text-shadow: var(--cyber-glow);
}

.nav-link.logout {
    color: #ff3366;
    border: 1px solid #ff3366;
    border-radius: 4px;
}

.nav-user {
    color: var(--cyber-accent);
    padding: 0.5rem 1rem;
    border: 1px solid var(--cyber-accent);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Hero Section */
.hero-section {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(to bottom, var(--cyber-secondary), var(--cyber-dark));
    position: relative;
    overflow: hidden;
    perspective: 1000px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 48%, var(--cyber-primary) 49%, var(--cyber-primary) 51%, transparent 52%);
    background-size: 6px 6px;
    opacity: 0.1;
    z-index: 1;
}

.matrix-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(0, 255, 0, 0.05) 1px,
        transparent 1px
    ) 0 0 / 30px 30px,
    linear-gradient(90deg, rgba(0, 255, 0, 0.05) 1px, transparent 1px) 0 0 / 30px 30px;
    animation: matrix 20s linear infinite;
}

@keyframes matrix {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(1000px);
    }
}

.hero-content {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.glitch-container {
    position: relative;
    display: inline-block;
}

.glitch {
    position: relative;
    animation: glitch-skew 1s infinite linear alternate-reverse;
    color: var(--cyber-primary);
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: var(--cyber-glow);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff0000;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00ff00, 2px 2px #ff0000;
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--cyber-text);
    max-width: 600px;
    margin: 0 auto;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Feature Cards */
.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin-top: 3rem;
    position: relative;
    z-index: 2;
}

.feature {
    background: rgba(10, 25, 47, 0.7);
    border: var(--cyber-border);
    padding: 2rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--cyber-glow);
}

.feature-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--cyber-primary);
    padding-bottom: 0.5rem;
}

.feature-header .feature-icon {
    font-size: 2rem;
    margin-right: 1rem;
    color: var(--cyber-primary);
    animation: pulse 2s infinite;
}

.feature-header h3 {
    margin: 0;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 2px;
    color: var(--cyber-primary);
}

.cyber-list {
    list-style: none;
    padding: 0;
}

.cyber-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: start;
    line-height: 1.4;
    color: var(--cyber-text);
}

.cyber-bullet {
    color: var(--cyber-primary);
    margin-right: 0.5rem;
    font-family: monospace;
    display: inline-block;
    transform: scale(0.8);
}

/* Buttons */
.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

.btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: var(--cyber-border);
    background: transparent;
    color: var(--cyber-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Share Tech Mono', monospace;
}

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

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

.btn:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: var(--cyber-glow);
}

/* (duplicate .btn-primary removed - see the canonical declaration near the top) */

.btn-admin {
    border-color: var(--cyber-accent);
    color: var(--cyber-accent);
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes glitch-anim {
    0% {
        clip: rect(62px, 9999px, 52px, 0);
    }
    5% {
        clip: rect(48px, 9999px, 24px, 0);
    }
    10% {
        clip: rect(68px, 9999px, 71px, 0);
    }
    15% {
        clip: rect(24px, 9999px, 53px, 0);
    }
    20% {
        clip: rect(63px, 9999px, 40px, 0);
    }
    25% {
        clip: rect(48px, 9999px, 64px, 0);
    }
    30% {
        clip: rect(24px, 9999px, 47px, 0);
    }
    35% {
        clip: rect(15px, 9999px, 54px, 0);
    }
    40% {
        clip: rect(36px, 9999px, 48px, 0);
    }
    45% {
        clip: rect(85px, 9999px, 32px, 0);
    }
    50% {
        clip: rect(12px, 9999px, 79px, 0);
    }
    55% {
        clip: rect(36px, 9999px, 85px, 0);
    }
    60% {
        clip: rect(24px, 9999px, 42px, 0);
    }
    65% {
        clip: rect(82px, 9999px, 36px, 0);
    }
    70% {
        clip: rect(62px, 9999px, 18px, 0);
    }
    75% {
        clip: rect(42px, 9999px, 54px, 0);
    }
    80% {
        clip: rect(15px, 9999px, 74px, 0);
    }
    85% {
        clip: rect(52px, 9999px, 33px, 0);
    }
    90% {
        clip: rect(84px, 9999px, 96px, 0);
    }
    95% {
        clip: rect(77px, 9999px, 62px, 0);
    }
    100% {
        clip: rect(39px, 9999px, 84px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(62px, 9999px, 52px, 0);
    }
    15% {
        clip: rect(24px, 9999px, 53px, 0);
    }
    30% {
        clip: rect(24px, 9999px, 47px, 0);
    }
    45% {
        clip: rect(85px, 9999px, 32px, 0);
    }
    60% {
        clip: rect(24px, 9999px, 42px, 0);
    }
    75% {
        clip: rect(42px, 9999px, 54px, 0);
    }
    90% {
        clip: rect(84px, 9999px, 96px, 0);
    }
    100% {
        clip: rect(39px, 9999px, 84px, 0);
    }
}

@keyframes glitch-skew {
    0% {
        transform: skew(0deg);
    }
    20% {
        transform: skew(-1deg);
    }
    40% {
        transform: skew(1deg);
    }
    60% {
        transform: skew(-1deg);
    }
    80% {
        transform: skew(1deg);
    }
    100% {
        transform: skew(0deg);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cyber-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--cyber-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cyber-accent);
}


.nav-user {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
    animation: fadeIn 0.5s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Flash Messages */
.flash-messages {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.flash-message {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.flash-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.flash-close:hover {
    opacity: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}

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

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

/* (duplicate .btn-primary removed - it painted an off-theme warm gradient and only
   lost because cyber-colors.css re-declares the background with !important) */

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(79, 172, 254, 0.4);
}

.btn-success:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(79, 172, 254, 0.6);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    transform: translateY(-1px);
}

.btn-admin {
    background: linear-gradient(135deg, #ff9a7d 0%, #ff6f61 100%);
    color: white;
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 154, 125, 0.4);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Hero Section */
/* Second .hero-section declaration - the warm gradient and colour it used to set here
   fought the cyber theme defined above and only lost because cyber-colors.css re-declares
   the background with !important. Layout-only properties kept. */
.hero-section {
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotateBackground 15s linear infinite;
    z-index: 0;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
    z-index: 1;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    z-index: 1;
}

.feature {
    background: rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    animation: fadeInUp 0.8s ease 0.4s both;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ff9a7d;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feature h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
    z-index: 1;
}

/* Form Styles */
.form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem;
    background: linear-gradient(135deg, #fff5f5 0%, #ffebee 100%);
}

.form-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    animation: slideIn 0.5s ease;
    border: 1px solid #dee2e6;
}

.form-card.large {
    max-width: 800px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

.form-card.admin-card {
    border-top: 4px solid #ff6f61;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.form-header p {
    color: #5a6c7d;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #34495e;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-help {
    font-size: 0.875rem;
    color: #7f8c8d;
    margin-top: 0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.form-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.form-footer a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: #ff6f61;
    text-decoration: underline;
}

/* Password Strength and Match Indicators */
.password-strength,
.password-match {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
    color: #666;
}

/* Dashboard Styles - Cyber Theme Enhanced */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--cyber-dark);
    min-height: 100vh;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, 
        var(--cyber-dark-alt) 0%,
        rgba(0, 191, 255, 0.1) 50%,
        var(--cyber-dark-alt) 100%);
    border: 2px solid var(--cyber-primary);
    border-radius: 15px;
    box-shadow: 
        0 10px 30px rgba(0, 191, 255, 0.3),
        0 0 50px rgba(0, 191, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--cyber-primary), 
        var(--cyber-accent), 
        #00ff7f,
        var(--cyber-accent),
        var(--cyber-primary));
    background-size: 300% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    color: var(--cyber-text-bright);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(0, 223, 255, 0.6);
    background: linear-gradient(90deg, 
        var(--cyber-primary), 
        var(--cyber-accent),
        #00ff7f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-header p {
    color: var(--cyber-text);
    font-size: 1.2rem;
    text-shadow: 0 0 5px rgba(0, 191, 255, 0.3);
}

.dashboard-content {
    display: grid;
    gap: 2rem;
}

.dashboard-section {
    background: linear-gradient(145deg, 
        var(--cyber-dark-alt) 0%,
        rgba(0, 191, 255, 0.08) 50%,
        var(--cyber-dark-alt) 100%);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 
        0 4px 15px rgba(0, 191, 255, 0.2),
        0 0 30px rgba(0, 191, 255, 0.1);
    transition: all 0.3s ease;
    border: 2px solid var(--cyber-primary);
    position: relative;
    overflow: hidden;
}

.dashboard-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, 
        var(--cyber-primary), 
        var(--cyber-accent),
        #00ff7f);
    animation: shimmer 2s ease-in-out infinite;
}

.dashboard-section:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 10px 30px rgba(0, 223, 255, 0.4),
        0 0 50px rgba(0, 223, 255, 0.2);
    border-color: var(--cyber-accent);
}

.dashboard-section h2 {
    margin-bottom: 1.5rem;
    color: var(--cyber-accent);
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(0, 223, 255, 0.5);
    border-bottom: 2px solid var(--cyber-primary);
    padding-bottom: 0.5rem;
}

/* Exam Cards */
.exam-card {
    background: linear-gradient(135deg, 
        var(--cyber-dark-alt) 0%,
        rgba(0, 191, 255, 0.1) 50%,
        var(--cyber-dark-alt) 100%);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 
        0 4px 15px rgba(0, 191, 255, 0.2),
        0 0 30px rgba(0, 191, 255, 0.1);
    transition: all 0.3s ease;
    border: 2px solid var(--cyber-primary);
    position: relative;
    overflow: hidden;
}

.exam-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, 
        var(--cyber-primary), 
        var(--cyber-accent),
        #00ff7f);
    animation: shimmer 2s ease-in-out infinite;
}

.exam-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 10px 30px rgba(0, 223, 255, 0.4),
        0 0 50px rgba(0, 223, 255, 0.2);
    border-color: var(--cyber-accent);
}

.active-exam {
    border: 2px solid #00ff7f;
    background: linear-gradient(135deg, 
        var(--cyber-dark-alt) 0%, 
        rgba(0, 255, 127, 0.15) 50%,
        var(--cyber-dark-alt) 100%);
    box-shadow: 
        0 4px 15px rgba(0, 255, 127, 0.3),
        0 0 40px rgba(0, 255, 127, 0.2);
}

.active-exam::before {
    background: linear-gradient(180deg, 
        #00ff7f, 
        #00d966,
        var(--cyber-accent));
}

.active-exam:hover {
    box-shadow: 
        0 10px 30px rgba(0, 255, 127, 0.5),
        0 0 60px rgba(0, 255, 127, 0.3);
}

/* Exam End Time Styling */
.exam-end-time {
    color: #dc3545 !important;
    font-weight: 600;
    position: relative;
}

.exam-end-time::before {
    content: "⚠️ ";
    margin-right: 0.5rem;
}

.exam-end-time:hover {
    color: #c82333 !important;
    text-decoration: underline;
}

.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, 
        rgba(0, 191, 255, 0.2) 0%,
        rgba(0, 223, 255, 0.15) 100%);
    color: var(--cyber-text-bright);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--cyber-primary);
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.15);
}

.exam-header * {
    color: var(--cyber-text-bright) !important;
}

.exam-header h3,
.exam-header h2,
.exam-header h1 {
    color: var(--cyber-accent) !important;
    margin: 0;
    text-shadow: 0 0 8px rgba(0, 223, 255, 0.4);
}

.exam-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.exam-status.active {
    color: var(--cyber-dark);
    background: linear-gradient(45deg, #00ff7f, #00d966);
    box-shadow: 0 0 15px rgba(0, 255, 127, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.exam-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem;
    background: linear-gradient(135deg, 
        rgba(0, 191, 255, 0.15), 
        rgba(10, 14, 39, 0.6));
    border-radius: 10px;
    border: 1px solid var(--cyber-primary);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 191, 255, 0.1);
}

.info-item:hover {
    border-color: var(--cyber-accent);
    box-shadow: 0 4px 15px rgba(0, 223, 255, 0.3);
    transform: translateY(-2px);
}

.info-label {
    font-size: 0.85rem;
    color: var(--cyber-text);
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    font-size: 1.1rem;
    color: var(--cyber-accent);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(0, 223, 255, 0.4);
}

.exam-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

/* No Content States */
.no-exam-card,
.no-history-card,
.no-users,
.no-questions,
.no-exams,
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(145deg, 
        var(--cyber-dark-alt) 0%,
        rgba(0, 191, 255, 0.05) 50%,
        var(--cyber-dark-alt) 100%);
    color: var(--cyber-text);
    border: 2px dashed var(--cyber-primary);
    border-radius: 15px;
    box-shadow: 
        0 4px 15px rgba(0, 191, 255, 0.15),
        inset 0 0 30px rgba(0, 191, 255, 0.05);
    animation: fadeIn 0.5s ease;
}

.no-exam-icon,
.no-history-icon,
.no-users-icon,
.no-questions-icon,
.no-exams-icon,
.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
    color: var(--cyber-accent);
    filter: drop-shadow(0 0 10px rgba(0, 223, 255, 0.3));
}

/* Exam History */
.exam-history {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.history-card {
    background: linear-gradient(135deg, 
        var(--cyber-dark-alt) 0%,
        rgba(0, 191, 255, 0.08) 50%,
        var(--cyber-dark-alt) 100%);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--cyber-primary);
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(0, 191, 255, 0.2),
        0 0 30px rgba(0, 191, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.history-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, 
        var(--cyber-primary), 
        var(--cyber-accent),
        #00ff7f);
    animation: shimmer 2s ease-in-out infinite;
}

.history-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 10px 30px rgba(0, 223, 255, 0.4),
        0 0 50px rgba(0, 223, 255, 0.2);
    border-color: var(--cyber-accent);
}

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

.score-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    color: white;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 3px solid transparent;
}

.score-circle.pass {
    background: linear-gradient(135deg, #00ff7f, #00d966);
    border-color: #00ff7f;
    box-shadow: 
        0 4px 15px rgba(0, 255, 127, 0.5),
        0 0 30px rgba(0, 255, 127, 0.3);
}

.score-circle.fail {
    background: linear-gradient(135deg, #ff6b6b, #ff4444);
    border-color: #ff6b6b;
    box-shadow: 
        0 4px 15px rgba(255, 107, 107, 0.5),
        0 0 30px rgba(255, 107, 107, 0.3);
}

/* Instructions */
.instructions-card {
    display: grid;
    gap: 1.5rem;
}

.instruction-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem;
    background: linear-gradient(135deg, 
        rgba(0, 191, 255, 0.12), 
        rgba(10, 14, 39, 0.6));
    color: var(--cyber-text);
    border: 1px solid var(--cyber-primary);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 191, 255, 0.1);
}

.instruction-item:hover {
    background: linear-gradient(135deg, 
        rgba(0, 223, 255, 0.18), 
        rgba(10, 14, 39, 0.7));
    border-color: var(--cyber-accent);
    box-shadow: 0 4px 15px rgba(0, 223, 255, 0.3);
    transform: translateX(5px);
}

.instruction-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    color: var(--cyber-accent);
    filter: drop-shadow(0 0 8px rgba(0, 223, 255, 0.5));
}

.instruction-content h4 {
    margin-bottom: 0.5rem;
    color: var(--cyber-accent);
    text-shadow: 0 0 5px rgba(0, 223, 255, 0.3);
}

.instruction-content p {
    color: var(--cyber-text);
}

/* Admin Dashboard */
.admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
    color: #ff9a7d;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: #666;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.action-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    text-align: center;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.action-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
    color: #4a90e2;
}

.action-card h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.action-card p {
    color: #666;
    font-size: 0.875rem;
}

/* Tables */
.users-table,
.results-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.results-table,
.users-table table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td,
.users-table th,
.users-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.3s ease;
}

.results-table th:hover,
.users-table th:hover {
    background-color: #f8f9fa;
}

.results-table th,
.users-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.sort-indicator {
    margin-left: 0.5rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.results-table th:hover .sort-indicator,
.users-table th:hover .sort-indicator {
    opacity: 1;
}

/* Exam Interface */
.exam-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #001f4d 0%, #003366 50%, #001950 100%);
    color: #ff0000;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 191, 255, 0.4);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(0, 223, 255, 0.3);
    animation: headerGlow 3s ease-in-out infinite;
}


@keyframes headerGlow {
    0%, 100% { box-shadow: 0 8px 32px rgba(0, 191, 255, 0.4); }
    50% { box-shadow: 0 8px 40px rgba(0, 223, 255, 0.6); }
}



.exam-title {
    flex: 1;
    position: relative;
    z-index: 1;
}

.exam-title h1 {
    color: #ffffff !important;
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.exam-title p {
    color: rgba(255, 255, 255, 0.95) !important;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    line-height: 1.5;
}

.exam-header h3,
.exam-header h2,
.exam-header h1 {
    color: #ffffff !important;
    margin: 0;
}

.progress-info {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    color: white !important;
    font-weight: 700;
    font-size: 0.85rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    margin-top: 0;
}

.exam-timer {
    text-align: center;
}

.exam-timer p {
    color: var(--cyber-accent) !important;
    margin: 0.5rem 0 0 0;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 0 10px rgba(0, 223, 255, 0.5);
}

.timer-display {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white !important;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 223, 255, 0.3);
}

.timer-display *,
.timer-display span,
.timer-display #timeRemaining {
    color: white !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.timer-warning {
    background: linear-gradient(135deg, #ff6f61 0%, #e65f50 100%) !important;
    animation: pulse 1s infinite;
}

.exam-progress {
    background: var(--cyber-dark-alt);
    padding: 1.2rem 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(0, 191, 255, 0.15);
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 191, 255, 0.2);
    backdrop-filter: blur(8px);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--cyber-dark);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.8rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyber-primary) 0%, var(--cyber-accent) 100%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.6);
    position: relative;
}

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

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

.progress-text {
    text-align: center;
    font-weight: 600;
    color: var(--cyber-text-bright);
    font-size: 1rem;
}

.progress-text #currentQuestion {
    color: var(--cyber-accent);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Question Cards */
.question-card {
    background: var(--cyber-dark-alt);
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.15);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid var(--cyber-primary);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f3ff 100%);
    border-bottom: 1px solid #d0e7ff;
}

.question-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.question-header h3::before {
    content: '📝';
    font-size: 1.4rem;
}

.question-difficulty {
    padding: 0.6rem 1.3rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0, 191, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.question-difficulty::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: difficultyPulse 2s ease-out infinite;
}

@keyframes difficultyPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.difficulty-easy,
.question-difficulty.easy {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.4);
}

.difficulty-medium,
.question-difficulty.medium {
    background: linear-gradient(135deg, #fad961 0%, #f76b1c 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(250, 217, 97, 0.4);
}

.difficulty-hard,
.question-difficulty.hard {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(238, 9, 121, 0.4);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .exam-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .exam-title h1 {
        font-size: 1.5rem;
    }

    .exam-title p {
        font-size: 0.9rem;
    }

    .exam-timer {
        width: 100%;
        text-align: center;
    }

    .timer-display {
        padding: 0.8rem 1.5rem;
        font-size: 1.5rem;
    }

    .question-header {
        padding: 0.8rem 1rem;
    }

    .question-header h3 {
        font-size: 1.1rem;
    }

    .question-difficulty {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
}

.question-text {
    background: linear-gradient(135deg, #fdfdff 0%, #f8fcff 100%);
    padding: 2rem 1.5rem;
    border-bottom: 1px solid #e8f2ff;
}

.question-text p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 1rem;
}

.options-container {
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    border-radius: 12px;
    border: 1px solid #e3f2fd;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .question-card {
        margin: 1rem;
        border-radius: 12px;
    }

    .question-header {
        padding: 1rem;
    }

    .question-header h3 {
        font-size: 1.1rem;
    }

    .question-text {
        padding: 1.2rem;
    }

    .question-text p {
        font-size: 1.1rem;
    }

    .options-container {
        padding: 1.2rem;
        gap: 1rem;
    }

    .option-label {
        padding: 1rem;
        border-radius: 10px;
    }

    .option-content {
        font-size: 1rem;
    }

    .option-letter {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

.option-label {
    display: flex;
    align-items: center;
    padding: 1.2rem;
    border: 2px solid var(--cyber-primary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    background: var(--cyber-dark);
    box-shadow: 0 2px 8px rgba(0, 191, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.option-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.02) 0%, rgba(74, 144, 226, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.option-label:hover {
    border-color: var(--cyber-accent);
    background: var(--cyber-dark-alt);
    box-shadow: 0 4px 16px rgba(0, 191, 255, 0.3);
    transform: translateY(-1px);
}

.option-label:hover::before {
    opacity: 1;
}

.option-input {
    display: none;
}

.option-input:checked + .option-content {
    color: #0f1419 !important;
    font-weight: 700;
}

.option-label:has(.option-input:checked) {
    border-color: var(--cyber-accent);
    background: linear-gradient(135deg, var(--cyber-primary) 0%, var(--cyber-accent) 100%);
    box-shadow: 0 6px 24px rgba(0, 191, 255, 0.5);
    transform: translateY(-2px) scale(1.02);
}

.option-label:has(.option-input:checked) .option-content {
    color: white !important;
}

.option-label:has(.option-input:checked) .option-content > span:not(.option-letter) {
    color: white !important;
}

.option-label:has(.option-input:checked)::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08) 0%, rgba(74, 144, 226, 0.12) 100%);
}

.option-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    color: #1a202c !important;
    font-size: 1.05rem;
    line-height: 1.5;
    font-weight: 600;
}

.option-letter {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f3ff 0%, #d0e7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.3s ease;
    color: #2d3748 !important;
    font-size: 0.95rem;
    border: 2px solid #b8d4f0;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.1);
}

.option-input:checked + .option-content .option-letter {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Additional option text styling for better readability */
.option-content > span:not(.option-letter) {
    color: #1a202c !important;
    font-weight: 600;
    line-height: 1.6;
}

.option-input:checked + .option-content > span:not(.option-letter) {
    color: #0f1419 !important;
    font-weight: 700;
}

/* Smooth selection animation */
.option-label {
    position: relative;
}

.option-label::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 20px;
    height: 20px;
    background: #4a90e2;
    border-radius: 50%;
    transition: transform 0.3s ease;
    opacity: 0;
}

.option-label:has(.option-input:checked)::after {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

.option-label::after::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Focus styles for accessibility */
.option-label:focus-within {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* Ensure all text in option labels is highly visible */
.option-label,
.option-label *,
.option-content,
.option-content * {
    color: #1a202c !important;
    text-shadow: none !important;
}

.option-letter {
    color: #2d3748 !important;
}

.option-input:checked + .option-content,
.option-input:checked + .option-content *:not(.option-letter) {
    color: #0f1419 !important;
    font-weight: 700 !important;
}

.option-input:checked + .option-content .option-letter {
    color: white !important;
}

/* Better text contrast in dark mode */
@media (prefers-color-scheme: dark) {
    .option-content {
        color: #e2e8f0;
    }
    
    .option-input:checked + .option-content {
        color: #cbd5e0;
    }
}

.question-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* Review Screen */
.review-screen {
    background: var(--cyber-dark-alt);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 191, 255, 0.2);
    border: 1px solid var(--cyber-primary);
}

.review-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(0, 191, 255, 0.2);
}

.review-header h2 {
    background: linear-gradient(135deg, var(--cyber-primary) 0%, var(--cyber-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    font-weight: 700;
}

.review-summary {
    margin-bottom: 2rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: linear-gradient(135deg, var(--cyber-primary) 0%, var(--cyber-accent) 100%);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 191, 255, 0.3);
    transition: transform 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.review-questions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.review-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.review-item.answered {
    background-color: #d4edda;
    border: 2px solid #28a745;
}

.review-item.unanswered {
    background-color: #f8d7da;
    border: 2px solid #dc3545;
}

.review-item:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.review-number {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.review-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--cyber-dark-alt);
    color: var(--cyber-text);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    border: 1px solid var(--cyber-primary);
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(0, 191, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 2rem;
}

/* Bootstrap-style form controls are used outside .form-group too (filter bars, modal
   fields). Without this they inherited --cyber-text on a white UA background. */
.form-control {
    background: var(--cyber-dark-alt);
    color: var(--cyber-text);
    border: 1px solid var(--cyber-primary);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
}

.form-control::placeholder {
    color: var(--cyber-text-dim);
}

/* Bootstrap-style muted helper text defaulted to a mid grey that fails on the dark panels */
.form-text,
.text-muted,
small.text-muted {
    color: var(--cyber-text-dim);
}

.form-control option,
select option {
    background: var(--cyber-dark-alt);
    color: var(--cyber-text);
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--cyber-text-dim);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: rgba(0, 191, 255, 0.12);
    color: var(--cyber-primary);
    transform: rotate(90deg);
}

/* Admin Content */
.admin-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 1rem;
}

.content-header h1 {
    color: #ffffff;
    font-size: 2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.content-body {
    display: grid;
    gap: 2rem;
}

/* Question Management */
.questions-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    animation: fadeIn 0.5s ease;
}

.questions-container {
    display: grid;
    gap: 1.5rem;
}

/* (duplicate .question-card - the themed declaration above is the canonical one; this
   copy only kept its hover transition, its white background overrode the dark theme) */
.question-card {
    transition: transform 0.3s ease;
}

.question-card:hover {
    transform: translateY(-5px);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.question-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.question-id {
    font-weight: 600;
    color: #666;
}

.difficulty-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.subject-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #e9ecef;
    color: #495057;
}

.question-actions {
    display: flex;
    gap: 0.5rem;
}

.question-content {
    padding: 1.5rem;
}

.question-text {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #333;
}

.question-options {
    display: grid;
    gap: 0.75rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.option-item:hover {
    background: #e9ecef;
}

.option-item.correct-option {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.correct-indicator {
    margin-left: auto;
    color: #28a745;
}

.question-footer {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    font-size: 0.875rem;
    color: #666;
}

/* Add Question Form */
.options-section {
    margin: 2rem 0;
}

.options-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}
.option-container {
    border: 1px solid rgba(0, 191, 255, 0.25);
    padding: 1rem;
    border-radius: 4px;
    background: var(--cyber-dark-alt);
}
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.category-input {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.category-input:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.category-input label {
    display: block;
    margin-bottom: 0.75rem;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
}

.category-input input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.category-input input[type="number"]:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    outline: none;
}

.available-count {
    display: block;
    font-size: 0.9rem;
    color: #666;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

/* Category-specific styles */
.category-input:nth-child(1) { border-left: 4px solid #28a745; }  /* Easy */
.category-input:nth-child(2) { border-left: 4px solid #ffc107; }  /* Medium */
.category-input:nth-child(3) { border-left: 4px solid #dc3545; }  /* Hard */
.category-input:nth-child(4) { border-left: 4px solid #6f42c1; }  /* Unseen */
.category-input:nth-child(5) { border-left: 4px solid #17a2b8; }  /* Image */
.category-input:nth-child(6) { border-left: 4px solid #fd7e14; }  /* Video */

.filter-section {
    margin-bottom: 2rem;
    background: var(--cyber-dark-alt);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 191, 255, 0.25);
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.filter-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.preview-section {
    margin: 2rem 0;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    animation: slideUp 0.5s ease;
}

.preview-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.question-preview {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.preview-question {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #333;
}

.preview-options {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.preview-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.preview-option:hover {
    background: #e9ecef;
}

.preview-option.correct-preview {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.preview-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
}

.preview-difficulty,
.preview-subject {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.preview-difficulty {
    background-color: #fff3cd;
    color: #856404;
}

.preview-subject {
    background-color: #e9ecef;
    color: #495057;
}

/* Character Counter */
.character-counter {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
    text-align: right;
}

/* Exam Management */
.exams-container {
    display: grid;
    gap: 1.5rem;
}

.exam-card {
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.3s ease;
}

.exam-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.exam-card.active-exam {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

.exam-title {
    flex: 1;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.detail-item:hover {
    background: #e9ecef;
}

.detail-icon {
    font-size: 1.25rem;
    opacity: 0.7;
    color: #4a90e2;
}

.detail-content {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
}

.active-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #28a745;
    font-size: 0.875rem;
    font-weight: 500;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Results Management */
.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease;
}

.results-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #444;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: #4a90e2;
    outline: none;
}

.score-display .score-value {
    font-weight: 700;
}

.pass-score {
    color: #28a745;
}

.fail-score {
    color: #dc3545;
}

.status-badge.passed {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #b8dacc;
    box-shadow: 0 2px 4px rgba(21, 87, 36, 0.1);
}

.status-badge.failed {
    background: linear-gradient(135deg, #f8d7da, #f1b0b7);
    color: #721c24;
    border: 1px solid #f1b0b7;
    box-shadow: 0 2px 4px rgba(114, 28, 36, 0.1);
}

/* System Information */
.system-info {
    display: grid;
    gap: 1.5rem;
    animation: slideIn 0.5s ease;
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

.url-display {
    display: flex;
    gap: 0.5rem;
}

.url-display input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #f8f9fa;
    font-family: monospace;
    font-size: 0.875rem;
    transition: border-color 0.3s ease;
}

.url-display input:focus {
    border-color: #4a90e2;
    outline: none;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.status-dot.active {
    background-color: #28a745;
    animation: pulse 2s infinite;
}

/* Info Section */
.info-section {
    padding: 4rem 2rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    animation: slideUp 0.5s ease;
}

.info-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: #333;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90e2 0%, #ff6f61 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: pulse 3s infinite;
}

.step h3 {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 1.2rem;
}

/* Requirements Section */
.requirements-section {
    padding: 4rem 2rem;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    animation: slideUp 0.5s ease;
}

.requirements-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: #333;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.requirements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.requirement {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.requirement:hover {
    transform: translateY(-5px);
}

.requirement h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.25rem;
}

.requirement .example {
    background-color: #fff3cd;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #856404;
}

.requirement ul {
    padding-left: 1.5rem;
}

.requirement li {
    margin-bottom: 0.5rem;
    color: #666;
}

/* Admin Info */
.admin-info {
    background-color: #fff3cd;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
    margin-bottom: 1rem;
    animation: slideLeft 0.5s ease;
}

.admin-info h4 {
    margin-bottom: 0.5rem;
    color: #856404;
}

.admin-info p {
    margin-bottom: 0.25rem;
    color: #856404;
}

/* Footer */
.footer {
    background-color: var(--cyber-dark-alt);
    color: var(--cyber-text);
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
    border-top: 2px solid var(--cyber-primary);
    animation: fadeIn 0.5s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 -5px 15px rgba(0, 255, 0, 0.1);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(30, 255, 0, 0.03) 1px, transparent 1px) 0 0,
                linear-gradient(rgba(30, 255, 0, 0.03) 1px, transparent 1px) 0 0;
    background-size: 20px 20px;
    pointer-events: none;
}

.footer-content {
    position: relative;
    z-index: 1;
}

.footer-content p {
    margin: 0;
    font-family: var(--font-mono);
    color: var(--cyber-text);
    text-shadow: 0 0 5px rgba(30, 255, 0, 0.3);
    letter-spacing: 1px;
}

/* Footer mobile adjustments */
@media (max-width: 768px) {
    .footer { padding: 0.75rem 1rem; }
    .footer-content p { font-size: 0.9rem; }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes rotateBackground {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .nav-toggle { display: inline-block; align-self: center; }
    /* Mobile menu styles moved to mobile-responsive.css */
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    
    .question-actions {
        flex-direction: column;
    }
    
    .review-actions {
        flex-direction: column;
    }
    
    .content-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .results-filters {
        flex-direction: column;
    }
    
    .summary-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }

    /* Collapse nav menu neatly on mobile */
    .nav-menu {
        width: 100%;
        gap: 0.5rem;
    }
    .nav-link { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .container,
    .dashboard-container,
    .admin-dashboard,
    .admin-content,
    .exam-container {
        padding: 0 1rem;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .form-container {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .review-questions {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .flash-messages {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .main-content {
        padding: 0 !important;
    }
    
    .form-card,
    .dashboard-section,
    .question-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* ===== RESPONSIVE YOUTUBE VIDEO STYLING ===== */
/* Mobile-first approach with 16:9 aspect ratio */

.youtube-preview {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    margin: 15px 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.youtube-preview iframe,
.youtube-preview iframe.youtube-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* Desktop enhancements */
@media (min-width: 769px) {
    .youtube-preview {
        max-width: 720px;
        margin: 20px auto;
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .youtube-preview:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
    }
}

.youtube-fallback {
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 1rem 0;
}

.youtube-fallback p {
    margin: 0;
    color: #666;
}

.youtube-fallback a {
    display: inline-block;
    margin-top: 10px;
    color: #ff0000;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border: 2px solid #ff0000;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.youtube-fallback a:hover {
    background: #ff0000;
    color: white;
}

/* Question Image Styles */
.question-text .image-preview {
    max-width: 900px;
    margin: 2rem auto;
    display: none;
    border: 3px solid #e8e8e8;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.question-text .image-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #4a90e2;
}

.question-text .image-preview img {
    width: 100%;
    min-height: 300px;
    max-height: 600px;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Option Image Styles - Smaller and distinct from question images */
.option-label .image-preview {
    width: 100%;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.option-label .image-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.option-label .image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: all 0.3s ease;
    margin: auto;
    padding: 0.5rem;
}

.option-label:hover .image-preview img {
    transform: scale(1.05);
}

.option-label input[type="radio"]:checked + .option-content .image-preview {
    background: #f8fbff;
}

.option-label input[type="radio"]:checked + .option-content .image-preview img {
    transform: scale(1.05);
}

/* Mobile responsive adjustments for images */
@media (max-width: 768px) {
    .option-label:has(.image-preview) {
        max-width: 90%;
    }
    
    .option-label .image-preview {
        height: 280px;
    }
    
    .option-label .image-preview img {
        max-width: 90%;
        max-height: 90%;
    }
}

/* Mobile responsive adjustments for images */
@media (max-width: 768px) {
    .option-label .image-preview {
        max-width: 160px;
        margin: 0.3rem auto;
    }

    .option-label .image-preview img {
        height: 120px;
    }
    
    .option-label:has(.image-preview) {
        text-align: center;
    }
}

/* Enhance option label layout for images */
/* Base option styles */
.option-label {
    display: block;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Text-only options */
.option-label:not(:has(.image-preview)) {
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.8rem 1.2rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    min-height: 50px;
}

.option-label:not(:has(.image-preview)):hover {
    background: #f0f7ff;
    border-color: #4a90e2;
}

/* Image options */
.option-label:has(.image-preview) {
    width: 100%;
    max-width: 500px;
    margin: 1.5rem auto;
    padding: 0;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.option-label:has(.image-preview):hover {
    border-color: #4a90e2;
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.15);
    transform: translateY(-2px);
}

.option-label:has(.image-preview) .option-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Option text for image options */
.option-label:has(.image-preview) .option-text {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    min-height: 50px;
    font-size: 1rem;
    line-height: 1.4;
}

.option-label:has(.image-preview):hover .option-text {
    background: #f0f7ff;
}

.option-label input[type="radio"]:checked + .option-content .option-text {
    background: #e7f1ff;
    font-weight: 500;
}

/* Special styling for selected image option */
.option-label:has(.image-preview) input[type="radio"]:checked + .option-content {
    background: #fff;
}

/* Option letter style */
.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: #e9ecef;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.95rem;
    color: #495057;
    flex-shrink: 0;
}

/* Selected state styles */
.option-label input[type="radio"]:checked + .option-content {
    color: #2c3e50;
    font-weight: 500;
}

.option-label input[type="radio"]:checked + .option-content .option-letter {
    background: #4a90e2;
    color: white;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .option-label:not(:has(.image-preview)) {
        max-width: 100%;
        margin: 0.5rem 0.5rem;
        padding: 0.7rem 1rem;
    }

    .option-label:has(.image-preview) {
        max-width: 300px;
        padding: 0.8rem;
    }
}

.option-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-text {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
}

.option-letter {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 50%;
    font-weight: 500;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Selected state for options with images */
.option-label input[type="radio"]:checked + .option-content .option-letter {
    background: #4a90e2;
    color: white;
}

/* Mobile Responsive Styles */
@media (max-width: 480px) {
    .option-grid {
        grid-template-columns: 1fr;
    }
    
    .option-label {
        margin: 0.5rem 0;
        padding: 0.7rem;
        width: 100%;
    }

    .option-label:has(.image-preview) {
        max-width: 100%;
        padding: 0.8rem;
    }

    /* YouTube preview already responsive - no override needed */

    .preview-media {
        padding: 0;
        width: 100%;
    }

    .question-text {
        font-size: 0.95rem;
        padding: 0.5rem;
    }

    .question-card {
        padding: 0.8rem;
        margin: 0.5rem 0;
        border-radius: 8px;
    }

    .image-preview img {
        max-width: 100%;
        height: auto;
    }

    .option-text {
        font-size: 0.9rem;
        gap: 8px;
    }

    .option-letter {
        min-width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
}

/* Duplicate removed - using main .youtube-preview definition above */

@media (max-width: 768px) {
    .container, .form-card {
        padding: 0.8rem;
        margin: 0.5rem;
    }

    /* YouTube preview already responsive - no override needed */
    
    .preview-media {
        width: 100% !important;
        padding: 0;
    }

    .question-text {
        font-size: 0.95rem;
        padding: 0.5rem;
    }

    .question-card {
        padding: 0.8rem;
        margin: 0.5rem 0;
    }

    .option-label {
        margin: 0.5rem 0;
        padding: 0.7rem;
        width: 100%;
    }

    .option-text {
        font-size: 0.9rem;
        gap: 8px;
    }

    .option-letter {
        min-width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .image-preview img {
        max-width: 100%;
        height: auto;
    }

    /* Mobile Navigation */
    .nav-container {
        flex-direction: column;
        padding: 0.5rem;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 0.5rem;
    }

    .nav-brand {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .nav-brand h2 {
        font-size: 1.2rem;
    }

    /* Form Elements */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="number"],
    input[type="url"],
    textarea,
    select {
        font-size: 16px;
        padding: 0.5rem;
        width: 100%;
    }

    .btn {
        width: 100%;
        margin: 0.3rem 0;
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    /* Preview Sections */
    .preview-section {
        margin: 1rem 0;
        padding: 0.8rem;
    }

    .preview-options {
        grid-template-columns: 1fr;
    }

    /* Flash Messages */
    .flash-message {
        margin: 0.5rem;
        padding: 0.8rem;
        font-size: 0.9rem;
    }
/* Mobile Responsive Styles (cleanup) */
@media screen and (max-width: 768px) {
    /* YouTube preview already responsive from main definition */
    .preview-media { width: 100%; }
    .preview-section { padding: 1rem; margin: 1rem 0; }
    .question-card { padding: 1rem; }
}

.preview-media {
    position: relative;
    width: fit-content;
    background: #f9f9f9;
    padding: 3px;
    border-radius: 4px;
}

.preview-close {
    position: absolute;
    top: -5px;
    right: -5px;
    cursor: pointer;
    color: white;
    font-weight: bold;
    font-size: 12px;
    background: #ff4444;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 0 3px rgba(0,0,0,0.2);
}

.preview-section {
    margin: 2rem 0;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.question-preview {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.preview-question {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #333;
}

.preview-options {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.preview-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.preview-option.correct-preview {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.preview-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
}

.preview-difficulty,
.preview-subject {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.preview-difficulty {
    background-color: #fff3cd;
    color: #856404;
}

.preview-subject {
    background-color: #e9ecef;
    color: #495057;
}




/* last add */

/* Rankings and Leaderboard Styles - Cyber Theme Enhanced */
/* Base desktop layout - responsive overrides in dashboard-ranking-responsive.css */
.rankings-performance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.rankings-column,
.leaderboard-column {
    display: flex;
    flex-direction: column;
}

.ranking-section-card,
.leaderboard-section-card {
    background: linear-gradient(145deg, 
        var(--cyber-dark) 0%, 
        rgba(0, 191, 255, 0.08) 50%,
        var(--cyber-dark-alt) 100%);
    border: 2px solid var(--cyber-primary);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 
        0 10px 30px rgba(0, 191, 255, 0.3),
        0 0 50px rgba(0, 191, 255, 0.15),
        inset 0 1px 0 rgba(0, 191, 255, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.ranking-section-card:hover,
.leaderboard-section-card:hover {
    border-color: var(--cyber-accent);
    box-shadow: 
        0 15px 40px rgba(0, 223, 255, 0.4),
        0 0 60px rgba(0, 223, 255, 0.2);
    transform: translateY(-2px);
}

.ranking-section-card::before,
.leaderboard-section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--cyber-primary), 
        var(--cyber-accent), 
        #00ff7f, 
        var(--cyber-accent),
        var(--cyber-primary));
    background-size: 400% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.card-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.card-header h3 {
    color: var(--cyber-text);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(0, 223, 255, 0.5);
    letter-spacing: 1px;
    background: linear-gradient(90deg, 
        var(--cyber-primary), 
        var(--cyber-accent),
        #00ff7f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: headerGlow 3s ease-in-out infinite;
}

.leaderboard-subtitle {
    color: var(--cyber-accent);
    font-size: 0.95rem;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
    font-weight: 500;
    text-shadow: 0 0 8px rgba(0, 223, 255, 0.3);
}

/* Personal Rankings Grid */
.personal-rankings-grid {
    display: grid;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}



.ranking-badge-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.rank-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    font-weight: bold;
    text-align: center;
    min-width: 80px;
    position: relative;
    overflow: hidden;
}

.rank-badge.rank-gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e, #fff176);
    color: #1a1a1a;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    animation: goldGlow 2s ease-in-out infinite alternate;
}

.rank-badge.rank-silver {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8, #f5f5f5);
    color: #1a1a1a;
    box-shadow: 0 0 25px rgba(192, 192, 192, 0.5);
}

.rank-badge.rank-bronze {
    background: linear-gradient(135deg, #cd7f32, #e6a85c, #daa520);
    color: #fff;
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.5);
}

@keyframes goldGlow {
    0% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.6); }
    100% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.8); }
}

.rank-number {
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 0.2rem;
}

.rank-medal {
    font-size: 1.1rem;
}

.ranking-content {
    text-align: center;
    color: var(--cyber-text);
}

.exam-title {
    color: var(--cyber-accent);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 223, 255, 0.5);
}


.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg,
        rgba(0, 191, 255, 0.08),
        rgba(10, 14, 39, 0.7));
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--cyber-primary);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 191, 255, 0.1);
    color: var(--cyber-text);
}

.stat-item:hover {
    border-color: var(--cyber-accent);
    box-shadow: 0 4px 15px rgba(0, 223, 255, 0.3);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 1.2rem;
    opacity: 0.9;
    color: var(--cyber-accent);
    filter: drop-shadow(0 0 5px rgba(0, 223, 255, 0.5));
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: var(--cyber-text) !important;
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
    opacity: 0.8;
}

.stat-value {
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--cyber-text) !important;
}

.stat-value.score-excellent { 
    color: #00ff7f; 
    text-shadow: 0 0 8px rgba(0, 255, 127, 0.5);
}
.stat-value.score-good { 
    color: var(--cyber-accent); 
    text-shadow: 0 0 8px rgba(0, 223, 255, 0.5);
}
.stat-value.score-average { 
    color: #ffff00; 
    text-shadow: 0 0 8px rgba(255, 255, 0, 0.5);
}
.stat-value.score-poor { 
    color: #ff6b6b; 
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.5);
}

.stat-value.duration-fast { 
    color: #00ff7f; 
    text-shadow: 0 0 8px rgba(0, 255, 127, 0.5);
}
.stat-value.duration-normal { 
    color: var(--cyber-accent); 
    text-shadow: 0 0 8px rgba(0, 223, 255, 0.5);
}
.stat-value.duration-slow { 
    color: #ff9800; 
    text-shadow: 0 0 8px rgba(255, 152, 0, 0.5);
}

/* Podium Container - Cyber Theme Design */
.podium-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
}

.podium-item {
    background: linear-gradient(145deg, 
        var(--cyber-dark) 0%,
        rgba(0, 191, 255, 0.1) 50%,
        var(--cyber-dark-alt) 100%);
    border: 2px solid var(--cyber-primary);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    position: relative;
    transition: all 0.4s ease;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(0, 191, 255, 0.3),
        0 0 20px rgba(0, 191, 255, 0.15);
}

.podium-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--cyber-primary), 
        var(--cyber-accent), 
        #00ff7f,
        var(--cyber-accent),
        var(--cyber-primary));
    background-size: 300% 100%;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.podium-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(0, 223, 255, 0.4),
        0 0 40px rgba(0, 223, 255, 0.25);
    border-color: var(--cyber-accent);
}

.podium-item.podium-1 {
    border-color: #ffd700;
    background: linear-gradient(145deg, 
        var(--cyber-dark) 0%,
        rgba(255, 215, 0, 0.15) 50%,
        var(--cyber-dark-alt) 100%);
    box-shadow: 
        0 4px 15px rgba(255, 215, 0, 0.3),
        0 0 25px rgba(255, 215, 0, 0.2);
}

.podium-item.podium-1::before {
    background: linear-gradient(90deg, #ffd700, #ffed4e, #fff176, #ffd700);
}

.podium-item.podium-1:hover {
    box-shadow: 
        0 10px 30px rgba(255, 215, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.3);
}

.podium-item.podium-2 {
    border-color: #c0c0c0;
    background: linear-gradient(145deg, 
        var(--cyber-dark) 0%,
        rgba(192, 192, 192, 0.15) 50%,
        var(--cyber-dark-alt) 100%);
    box-shadow: 
        0 4px 15px rgba(192, 192, 192, 0.3),
        0 0 25px rgba(192, 192, 192, 0.2);
}

.podium-item.podium-2::before {
    background: linear-gradient(90deg, #c0c0c0, #e8e8e8, #f5f5f5, #c0c0c0);
}

.podium-item.podium-2:hover {
    box-shadow: 
        0 10px 30px rgba(192, 192, 192, 0.5),
        0 0 40px rgba(192, 192, 192, 0.3);
}

.podium-item.podium-3 {
    border-color: #cd7f32;
    background: linear-gradient(145deg, 
        var(--cyber-dark) 0%,
        rgba(205, 127, 50, 0.15) 50%,
        var(--cyber-dark-alt) 100%);
    box-shadow: 
        0 4px 15px rgba(205, 127, 50, 0.3),
        0 0 25px rgba(205, 127, 50, 0.2);
}

.podium-item.podium-3::before {
    background: linear-gradient(90deg, #cd7f32, #e6a85c, #daa520, #cd7f32);
}

.podium-item.podium-3:hover {
    box-shadow: 
        0 10px 30px rgba(205, 127, 50, 0.5),
        0 0 40px rgba(205, 127, 50, 0.3);
}

.podium-rank {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.2rem;
}

.podium-number {
    background: linear-gradient(135deg, var(--cyber-primary), var(--cyber-accent));
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 223, 255, 0.5);
    border: 2px solid rgba(0, 223, 255, 0.3);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.podium-medal {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.podium-info {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.performer-name {
    color: #e2e8f0;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.performer-name.current-user {
    color: #fbbf24;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
    animation: currentUserGlow 2s ease-in-out infinite alternate;
}

@keyframes currentUserGlow {
    0% { text-shadow: 0 0 15px rgba(251, 191, 36, 0.6); }
    100% { text-shadow: 0 0 25px rgba(251, 191, 36, 0.8); }
}

.performer-wing {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
    background: rgba(148, 163, 184, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.performer-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(129, 140, 248, 0.2);
    transition: all 0.3s ease;
}

.stat-row:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(129, 140, 248, 0.4);
}

.stat-icon {
    font-size: 1rem;
    opacity: 0.8;
}

.performer-score {
    color: #10b981;
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.performer-duration {
    color: #f59e0b;
    font-size: 0.95rem;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.performer-exams {
    color: #8b5cf6;
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

/* Remaining Performers - Enhanced Design */
.remaining-performers {
    background: linear-gradient(145deg, #1e293b, #334155);
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid rgba(129, 140, 248, 0.2);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(129, 140, 248, 0.1);
}

.remaining-performers h4 {
    color: #e2e8f0;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.performers-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.performer-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(51, 65, 85, 0.6));
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.performer-item:hover {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(51, 65, 85, 0.8));
    border-color: rgba(129, 140, 248, 0.4);
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.performer-item.current-user {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}

.performer-rank {
    color: #e2e8f0;
    font-weight: bold;
    text-align: center;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.performer-details {
    padding: 0 1rem;
    overflow: hidden;
}

.performer-details .performer-name {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #e2e8f0;
}

.performer-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 0.3rem;
}

.info-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.info-label {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.info-value {
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.performer-details .performer-score {
    color: #10b981;
    font-weight: bold;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
    margin-left: auto;
}

/* Placeholder Styles */
.no-rankings-placeholder,
.no-leaderboard-placeholder {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border: 2px dashed rgba(30, 255, 0, 0.3);
    border-radius: 12px;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.no-rankings-placeholder h4,
.no-leaderboard-placeholder h4 {
    color: #1eff00;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.no-rankings-placeholder p,
.no-leaderboard-placeholder p {
    color: #cccccc;
    opacity: 0.8;
}

/* Mobile Responsive for Rankings - Enhanced */
/* NOTE: All ranking responsive styles are now handled by dashboard-ranking-responsive.css */
/*
@media (max-width: 768px) {
    .rankings-performance-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .podium-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .podium-item {
        padding: 1.2rem 0.8rem;
    }
    
    .performer-stats {
        gap: 0.4rem;
    }
    
    .stat-row {
        padding: 0.3rem 0.6rem;
        font-size: 0.9rem;
    }
    
    .performer-item {
        grid-template-columns: 50px 1fr auto;
        padding: 0.8rem;
        gap: 0.5rem;
    }
    
    .performer-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.3rem;
    }
    
    .info-cell {
        align-items: center;
    }
    
    .info-label {
        font-size: 0.7rem;
    }
    
    .info-value {
        font-size: 0.8rem;
    }
    
    .card-header h3 {
        font-size: 1.3rem;
    }
    
    .performer-rank {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .podium-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .podium-medal {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .podium-container {
        gap: 0.8rem;
    }
    
    .podium-item {
        padding: 1rem 0.6rem;
    }
    
    .performer-name {
        font-size: 0.95rem;
    }
    
    .performer-wing {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
    
    .stat-row {
        padding: 0.25rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .performer-item {
        grid-template-columns: 45px 1fr auto;
        padding: 0.6rem;
    }
    
    .performer-info-grid {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
    
    .info-cell {
        flex-direction: row;
        justify-content: space-between;
        gap: 0.5rem;
    }
    
    .remaining-performers {
        padding: 1rem;
    }
    
    .ranking-section-card,
    .leaderboard-section-card {
        padding: 1.5rem;
    }
}
*/

/* Mobile Responsive for Rankings */
/* NOTE: All ranking responsive styles are now handled by dashboard-ranking-responsive.css */
/*
@media (max-width: 768px) {
    .ranking-details {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .ranking-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .leaderboard-item {
        grid-template-columns: 50px 1fr auto;
        padding: 0.75rem;
    }
    
    .performer-rank {
        font-size: 1rem;
    }
    
    .performer-name {
        font-size: 0.9rem;
    }
    
    .performer-details {
        font-size: 0.8rem;
    }
}
*/

/* ===== ADDITIONAL MOBILE ENHANCEMENTS ===== */

/* Ensure viewport meta works correctly */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Smooth scrolling for mobile */
html {
    scroll-behavior: smooth;
}

/* Better tap targets */
@media (max-width: 768px) {
    /* Larger tap targets for mobile */
    .btn,
    .auth-button,
    .option-label,
    .nav-link,
    button,
    input[type="submit"],
    input[type="button"] {
        min-height: 48px;
        min-width: 48px;
        touch-action: manipulation;
    }
    
    /* Prevent zoom on input focus */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Better form styling */
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .auth-input,
    .form-control {
        padding: 12px 16px;
        border-radius: 8px;
        border: 2px solid #e0e0e0;
        transition: border-color 0.3s ease;
    }
    
    .auth-input:focus,
    .form-control:focus {
        border-color: #4a90e2;
        outline: none;
        box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    }
    
    /* Better dashboard cards on mobile */
    .stat-card,
    .exam-card,
    .active-exam-card {
        margin-bottom: 1rem;
        padding: 1.25rem;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    /* Mobile-friendly exam timer */
    .exam-timer {
        position: sticky;
        top: 70px;
        z-index: 100;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 8px;
        margin-bottom: 1rem;
    }
    
    .timer-display {
        background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
        color: white;
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        font-weight: bold;
        text-align: center;
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    }
    
    /* Better modal styles for mobile */
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        width: calc(100% - 2rem);
        max-width: none;
        margin: 2rem auto;
        border-radius: 12px;
    }
    
    /* Improved table responsiveness */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    /* Better error messages */
    .alert {
        padding: 1rem;
        border-radius: 8px;
        margin-bottom: 1rem;
        font-size: 0.95rem;
    }
    
    /* Improved navigation for mobile */
    .nav-menu {
        background: rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(10px);
        border-radius: 8px;
        padding: 0.5rem;
    }
    
    /* Better spacing for content sections */
    .dashboard-content > section,
    .auth-container > .auth-card,
    .exam-container > .question-card {
        margin-bottom: 1.5rem;
    }
    
    /* Ensure images are responsive */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Better YouTube embed responsiveness */
    .youtube-iframe {
        width: 100%;
        max-width: 100%;
        height: 200px;
        border-radius: 8px;
    }
    
    /* Improved progress bars */
    .progress-bar {
        height: 8px;
        border-radius: 4px;
        background: #e0e0e0;
        overflow: hidden;
    }
    
    .progress-fill {
        height: 100%;
        background: linear-gradient(90deg, #4a90e2, #357abd);
        border-radius: 4px;
        transition: width 0.3s ease;
    }
    
    /* Better loading states */
    .loading {
        opacity: 0.6;
        pointer-events: none;
    }
    
    /* Improved hover states for touch devices */
    @media (hover: none) {
        .option-label:hover,
        .btn:hover,
        .nav-link:hover {
            transform: none;
        }
        
        .option-label:active,
        .btn:active,
        .nav-link:active {
            transform: scale(0.98);
        }
    }
}

/* ===== VERY SMALL SCREENS (iPhone SE, etc.) ===== */
@media (max-width: 375px) {
    .hero-content h1 {
        font-size: 1.4rem;
    }
    
    .auth-card {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .question-card {
        margin: 0.5rem 0;
    }
    
    .option-content {
        font-size: 0.9rem;
    }
    
    .btn-large {
        font-size: 0.95rem;
        padding: 0.8rem;
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Crisp icons and images on retina displays */
    .cyber-icon,
    .feature-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== PAGINATION CONTROLS ===== */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2.5rem 0 1.5rem;
}

.pagination {
    display: inline-flex;
    gap: 0.65rem;
    padding: 0.65rem 0.9rem;
    margin: 0;
    border-radius: 18px;
    background: rgba(2, 12, 27, 0.85);
    border: 1px solid rgba(0, 191, 255, 0.25);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.18);
    backdrop-filter: blur(6px);
}

.page-item {
    list-style: none;
}

.page-link,
.page-link:visited {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0.6rem 1.1rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cyber-primary);
    background: linear-gradient(135deg, rgba(8, 24, 48, 0.95), rgba(6, 18, 32, 0.75));
    border: 1px solid rgba(0, 191, 255, 0.45);
    border-radius: 12px;
    text-decoration: none;
    box-shadow: inset 0 0 12px rgba(0, 191, 255, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.page-link::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(0, 191, 255, 0.45), transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.page-link:hover,
.page-link:focus-visible {
    color: var(--cyber-dark);
    background: var(--cyber-primary);
    box-shadow: 0 0 22px rgba(0, 191, 255, 0.4);
    outline: none;
    transform: translateY(-2px);
}

.page-link:hover::before,
.page-link:focus-visible::before {
    opacity: 1;
}

.page-item.active .page-link {
    color: var(--cyber-dark);
    font-weight: 700;
    background: linear-gradient(130deg, var(--cyber-primary), rgba(0, 191, 255, 0.75));
    border-color: var(--cyber-primary);
    box-shadow: 0 0 26px rgba(0, 191, 255, 0.45);
    transform: translateY(-2px);
}

.page-item.disabled .page-link {
    color: rgba(230, 230, 230, 0.35);
    border-color: rgba(0, 191, 255, 0.2);
    background: rgba(6, 18, 32, 0.6);
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.page-link-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(230, 230, 230, 0.45);
    padding: 0.6rem 0.35rem;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .pagination {
        gap: 0.4rem;
        padding: 0.55rem 0.7rem;
    }

    .page-link,
    .page-link:visited {
        min-width: 2.4rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.82rem;
    }

    .page-link-ellipsis {
        display: none;
    }
}

@media (max-width: 480px) {
    .pagination-container {
        margin: 2rem 0 1rem;
    }

    .pagination {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .page-link,
    .page-link:visited {
        flex: 1 1 32%;
        min-width: auto;
    }
}

/* ===== DESKTOP RESPONSIVE STYLES (769px+) ===== */
@media (min-width: 769px) {
    /* Exam History Desktop Layout */
    .exam-history {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .history-card {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 2rem !important;
        margin-bottom: 1.5rem !important;
    }

    .history-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        margin-bottom: 1.5rem !important;
    }

    .history-details {
        display: grid !important;
        grid-template-columns: 300px 1fr !important;
        gap: 2rem !important;
        align-items: start !important;
    }

    .score-display {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 2rem !important;
    }

    .score-circle {
        width: 100px !important;
        height: 100px !important;
        font-size: 1.5rem !important;
    }
}

    .timeline-item {
        display: flex !important;
        align-items: center !important;
        gap: 1rem !important;
    }

    /* Rankings & Performance Desktop Layout is now in dashboard-ranking-responsive.css */
}

/* Large Desktop (1025px+) */
@media (min-width: 1025px) {
    .exam-history {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .history-card {
        padding: 2.5rem !important;
    }

    .history-details {
        grid-template-columns: 350px 1fr !important;
        gap: 2.5rem !important;
    }

    /* Rankings & Performance Large Desktop is now in dashboard-ranking-responsive.css */

    /* Student Dashboard Large Desktop */
    .dashboard-container {
        padding: 2.5rem !important;
    }

    .dashboard-header {
        padding: 2.5rem !important;
    }

    .dashboard-section {
        padding: 2.5rem !important;
    }

    .exam-card,
    .active-exam {
        padding: 2.5rem !important;
    }

    .exam-info {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    }

    .info-item {
        padding: 1.2rem !important;
    }

    .score-circle {
        width: 90px !important;
        height: 90px !important;
        font-size: 1.4rem !important;
    }
}

