/* ------------------ CSS VARIABLES & RESET ------------------ */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent-primary: #00ffcc;
    --accent-secondary: #00d4aa;
    --accent-glow: rgba(0, 255, 204, 0.3);
    --success: #00ff88;
    --error: #ff3366;
    --warning: #ffaa00;
    --shadow: rgba(0, 0, 0, 0.5);
    --transition: 0.3s ease;
}

body.light-theme {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-primary: #00b894;
    --accent-secondary: #00a080;
    --accent-glow: rgba(0, 184, 148, 0.2);
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

/* ------------------ NAVBAR ------------------ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 40px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    box-shadow: 0 2px 20px var(--shadow);
    transition: var(--transition);
}

body.light-theme .navbar {
    background: rgba(255, 255, 255, 0.95);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-section img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
    transition: var(--transition);
}

.logo-section img:hover {
    transform: rotate(360deg) scale(1.1);
}

.logo-section h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
}

nav a:hover {
    color: var(--accent-primary);
    background: var(--bg-card);
}

/* Theme Toggle Button */
.theme-btn {
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    color: var(--text-primary);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 20px;
}

.theme-btn:hover {
    background: var(--accent-primary);
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ------------------ HERO ------------------ */
.hero {
    height: 100vh;
    background: url("college.jpg") center/cover no-repeat;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
}

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

/* Text reveal animation */
.reveal-text {
    font-size: 3rem;
    color: #00ffcc;
    clip-path: inset(0 100% 0 0);
    animation: reveal 1.5s ease forwards;
}

@keyframes reveal {
    to { clip-path: inset(0 0 0 0); }
}

/* Fade up stagger animation */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 1s ease forwards;
}

.delay-1 { animation-delay: 0.4s; }
.delay-2 { animation-delay: 0.8s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.start-btn {
    margin-top: 25px;
    padding: 12px 35px;
    border-radius: 30px;
    border: none;
    font-size: 16px;
    background: #00ffcc;
    cursor: pointer;
    transition: 0.3s;
}

.start-btn:hover {
    background: black;
    color: #00ffcc;
    border: 2px solid #00ffcc;
}

/* Glow pulse */
.glow {
    box-shadow: 0 0 15px #00ffcc;
    animation: glowPulse 2s infinite alternate;
}

@keyframes glowPulse {
    from { box-shadow: 0 0 10px #00ffcc; }
    to { box-shadow: 0 0 30px #00ffcc; }
}

/* Floating background elements */
.floating-circles span {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #00ffcc;
    border-radius: 50%;
    opacity: 0.2;
    animation: float 8s infinite ease-in-out;
}

.floating-circles span:nth-child(2) {
    left: 60%;
    animation-delay: 2s;
}

.floating-circles span:nth-child(3) {
    left: 80%;
    animation-delay: 4s;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-40px); }
    100% { transform: translateY(0); }
}

/* ------------------ STATS ------------------ */
.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 80px 20px;
    background: var(--bg-secondary);
    flex-wrap: wrap;
}

.stat-card {
    background: var(--bg-card);
    padding: 40px 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px var(--shadow);
    transition: var(--transition);
    border: 1px solid transparent;
}

.stat-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 40px var(--accent-glow);
    border-color: var(--accent-primary);
}

.stat-card h3 {
    color: var(--accent-primary);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ------------------ SECTION TITLE ------------------ */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--accent-primary);
    font-weight: 800;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    border-radius: 2px;
}

/* ------------------ FEATURES ------------------ */
.features {
    padding: 80px 20px;
    background: var(--bg-primary);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    padding: 35px;
    border-radius: 20px;
    transition: var(--transition);
    border: 1px solid transparent;
    box-shadow: 0 5px 20px var(--shadow);
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 40px var(--accent-glow);
    border-color: var(--accent-primary);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ------------------ CATEGORIES ------------------ */
.categories {
    padding: 80px 20px;
    background: var(--bg-secondary);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    padding: 40px 30px;
    border: 2px solid var(--accent-primary);
    text-align: center;
    transition: var(--transition);
    background: var(--bg-card);
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
}

.category-card:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: scale(1.08);
    box-shadow: 0 10px 30px var(--accent-glow);
}

/* ------------------ QUIZ SECTION ------------------ */
.quiz-section {
    padding: 100px 20px;
    background: var(--bg-primary);
    text-align: center;
    min-height: 100vh;
}

/* Difficulty Selector */
.difficulty-selector {
    max-width: 700px;
    margin: 0 auto 40px;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
}

.difficulty-selector h3 {
    margin-bottom: 30px;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.difficulty-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.difficulty-btn {
    flex: 1;
    min-width: 150px;
    padding: 25px 20px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.difficulty-btn:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 25px var(--accent-glow);
}

.difficulty-btn.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.diff-icon {
    font-size: 2rem;
}

.difficulty-btn span:nth-child(2) {
    font-weight: 700;
    font-size: 1.1rem;
}

.difficulty-btn small {
    opacity: 0.8;
    font-size: 0.85rem;
}

/* Quiz Box */
.quiz-box {
    max-width: 750px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 15px 50px var(--shadow);
    border: 1px solid var(--accent-primary);
    position: relative;
    overflow: hidden;
}

.quiz-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 25px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
    box-shadow: 0 0 10px var(--accent-glow);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Timer Ring */
.timer-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 20px auto;
}

.timer-ring {
    transform: rotate(-90deg);
}

.timer-ring-bg {
    fill: none;
    stroke: var(--bg-secondary);
    stroke-width: 6;
}

.timer-ring-progress {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 201;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.timer-ring-progress.warning {
    stroke: var(--warning);
    animation: pulse 0.5s infinite;
}

.timer-ring-progress.danger {
    stroke: var(--error);
}

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

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.timer-text.warning {
    color: var(--warning);
}

.timer-text.danger {
    color: var(--error);
}

/* Question */
.question-text {
    margin: 30px 0;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.8;
    color: var(--text-primary);
    min-height: 60px;
}

/* Options */
.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.option {
    width: 100%;
    padding: 18px 25px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--bg-secondary);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    text-align: left;
    font-weight: 500;
}

.option:hover:not(.correct):not(.wrong):not(:disabled) {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
    transform: translateX(10px);
    box-shadow: 0 5px 20px var(--accent-glow);
}

.option:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.option.correct {
    background: var(--success);
    color: white;
    border-color: var(--success);
    animation: correctPulse 0.5s ease;
}

.option.wrong {
    background: var(--error);
    color: white;
    border-color: var(--error);
    animation: shake 0.5s ease;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Quiz Controls */
.quiz-controls {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 30px;
}

.nav-btn {
    flex: 1;
    padding: 15px 30px;
    border-radius: 12px;
    border: 2px solid var(--accent-primary);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 1rem;
}

.nav-btn:hover:not(:disabled) {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px var(--accent-glow);
}

.nav-btn.primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.nav-btn.primary:hover:not(:disabled) {
    background: var(--accent-secondary);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ------------------ RESULT ------------------ */
.result-box {
    max-width: 600px;
    margin: 40px auto;
    text-align: center;
    background: var(--bg-card);
    padding: 50px;
    border-radius: 25px;
    box-shadow: 0 15px 50px var(--shadow);
    border: 2px solid var(--accent-primary);
}

.result-content {
    animation: fadeIn 0.5s ease;
}

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

.result-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.result-box h3 {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.result-details {
    margin: 25px 0;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 15px;
    font-size: 1.1rem;
    line-height: 2;
}

.result-details p {
    margin: 10px 0;
    color: var(--text-secondary);
}

.result-details strong {
    color: var(--accent-primary);
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.result-actions button {
    flex: 1;
    min-width: 150px;
}

/* Review Section */
.review-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background: var(--bg-card);
    border-radius: 25px;
    box-shadow: 0 15px 50px var(--shadow);
}

.review-item {
    background: var(--bg-secondary);
    padding: 25px;
    margin: 20px 0;
    border-radius: 15px;
    border-left: 4px solid var(--accent-primary);
    text-align: left;
}

.review-item.correct-answer {
    border-left-color: var(--success);
}

.review-item.wrong-answer {
    border-left-color: var(--error);
}

.review-question {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.review-options {
    margin: 15px 0;
}

.review-option {
    padding: 12px 20px;
    margin: 8px 0;
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-secondary);
}

.review-option.user-selected {
    background: var(--error);
    color: white;
    font-weight: 600;
}

.review-option.correct-option {
    background: var(--success);
    color: white;
    font-weight: 600;
}

.review-option.user-selected.correct-option {
    background: var(--success);
}

.review-explanation {
    margin-top: 15px;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 10px;
    font-style: italic;
    color: var(--text-secondary);
}

.hidden {
    display: none !important;
}

/* ------------------ FOOTER ------------------ */
footer {
    padding: 25px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-align: center;
    border-top: 1px solid var(--accent-primary);
}

/* ------------------ RESPONSIVE DESIGN ------------------ */

/* Tablet breakpoint (768px - 1024px) */
@media (max-width: 1024px) {
    .quiz-box {
        max-width: 90%;
    }

    .section-title {
        font-size: 2rem;
    }

    .feature-grid,
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Mobile Large (768px and below) */
@media (max-width: 768px) {
    /* Navbar - Mobile optimized */
    .navbar {
        padding: 10px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .navbar nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        gap: 5px;
        flex-wrap: wrap;
    }

    .navbar nav a {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: 70px;
        text-align: center;
    }

    .logo-section {
        gap: 8px;
    }

    .logo-section img {
        width: 40px;
        height: 40px;
    }

    .logo-section h1 {
        font-size: 14px;
    }

    .theme-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    /* Hero section - Mobile optimized */
    .hero {
        min-height: 100vh;
        padding: 80px 15px 40px;
    }

    .hero-content h2 {
        font-size: 1.8rem;
        line-height: 1.3;
        padding: 0 10px;
    }

    .hero-content p {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    .start-btn {
        padding: 14px 30px;
        font-size: 15px;
        min-width: 200px;
        /* Larger touch target for mobile */
    }

    /* Stats section - Mobile optimized */
    .stats {
        flex-direction: column;
        padding: 50px 15px;
        gap: 20px;
    }

    .stat-card {
        padding: 30px 40px;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    /* Difficulty selector - Mobile optimized */
    .difficulty-selector {
        padding: 25px 20px;
        margin: 0 15px;
    }

    .difficulty-selector h3 {
        font-size: 1.3rem;
    }

    .difficulty-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .difficulty-btn {
        width: 100%;
        min-width: auto;
        padding: 20px 15px;
        /* Better touch target */
    }

    /* Quiz box - Mobile optimized */
    .quiz-box {
        padding: 25px 15px;
        margin: 0 15px;
        max-width: calc(100% - 30px);
    }

    .quiz-header {
        font-size: 0.95rem;
        flex-wrap: wrap;
        gap: 10px;
    }

    .question-text {
        font-size: 1.05rem;
        line-height: 1.6;
        margin: 20px 0;
        min-height: auto;
    }

    /* Options - Mobile optimized */
    .options {
        gap: 12px;
        margin: 20px 0;
    }

    .option {
        padding: 16px 20px;
        font-size: 0.95rem;
        min-height: 50px;
        /* Better touch target */
        display: flex;
        align-items: center;
    }

    .option:hover:not(.correct):not(.wrong):not(:disabled) {
        transform: translateX(5px);
        /* Reduce transform for mobile */
    }

    /* Quiz controls - Mobile optimized */
    .quiz-controls {
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }

    .nav-btn {
        width: 100%;
        padding: 16px 25px;
        font-size: 0.95rem;
        min-height: 50px;
        /* Better touch target */
    }

    /* Result box - Mobile optimized */
    .result-box {
        padding: 30px 20px;
        margin: 20px 15px;
        max-width: calc(100% - 30px);
    }

    .result-icon {
        font-size: 4rem;
    }

    .result-box h3 {
        font-size: 1.5rem;
    }

    .result-details {
        font-size: 1rem;
        padding: 15px;
    }

    /* Result actions - Mobile optimized */
    .result-actions {
        flex-direction: column;
        gap: 12px;
    }

    .result-actions button {
        width: 100%;
        min-height: 50px;
        font-size: 0.95rem;
    }

    /* Review section - Mobile optimized */
    .review-section {
        padding: 20px 15px;
        margin: 0;
    }

    .review-item {
        padding: 20px 15px;
        margin: 15px 0;
    }

    .review-question {
        font-size: 1.05rem;
        line-height: 1.5;
    }

    .review-option {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .review-explanation {
        font-size: 0.9rem;
        padding: 12px;
    }

    /* Section titles - Mobile optimized */
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }

    .section-title::after {
        width: 80px;
        height: 3px;
    }

    /* Feature and category grids - Mobile optimized */
    .features,
    .categories {
        padding: 60px 15px;
    }

    .feature-grid,
    .category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-card,
    .category-card {
        padding: 25px 20px;
    }

    /* Timer - Mobile optimized */
    .timer-container {
        margin: 15px auto;
    }

    .progress-container {
        margin-bottom: 20px;
    }
}

/* Mobile Small (480px and below) */
@media (max-width: 480px) {
    /* Navbar - Extra small mobile */
    .navbar {
        padding: 8px 10px;
    }

    .logo-section h1 {
        font-size: 12px;
    }

    .logo-section img {
        width: 35px;
        height: 35px;
    }

    .navbar nav a {
        padding: 6px 8px;
        font-size: 0.75rem;
        min-width: 60px;
    }

    .theme-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    /* Hero - Extra small mobile */
    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 0.85rem;
    }

    .start-btn {
        padding: 12px 25px;
        font-size: 14px;
        min-width: 180px;
    }

    /* Stats - Extra small mobile */
    .stat-card {
        padding: 25px 30px;
    }

    .stat-card h3 {
        font-size: 2.2rem;
    }

    .stat-card p {
        font-size: 0.9rem;
    }

    /* Section titles - Extra small mobile */
    .section-title {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }

    /* Difficulty selector - Extra small mobile */
    .difficulty-selector {
        padding: 20px 15px;
    }

    .difficulty-selector h3 {
        font-size: 1.1rem;
    }

    .difficulty-btn {
        padding: 18px 12px;
    }

    .diff-icon {
        font-size: 1.5rem;
    }

    /* Quiz box - Extra small mobile */
    .quiz-box {
        padding: 20px 12px;
    }

    .quiz-header {
        font-size: 0.85rem;
    }

    .question-text {
        font-size: 1rem;
        line-height: 1.5;
    }

    /* Timer - Extra small mobile */
    .timer-container {
        width: 60px;
        height: 60px;
    }

    .timer-text {
        font-size: 1.1rem;
    }

    .timer-ring {
        width: 60px;
        height: 60px;
    }

    /* Options - Extra small mobile */
    .options {
        gap: 10px;
    }

    .option {
        padding: 14px 15px;
        font-size: 0.9rem;
        min-height: 48px;
    }

    /* Controls - Extra small mobile */
    .nav-btn {
        padding: 14px 20px;
        font-size: 0.9rem;
        min-height: 48px;
    }

    /* Results - Extra small mobile */
    .result-box {
        padding: 25px 15px;
    }

    .result-icon {
        font-size: 3rem;
    }

    .result-box h3 {
        font-size: 1.3rem;
    }

    .result-details {
        font-size: 0.9rem;
        padding: 12px;
    }

    .result-details p {
        font-size: 0.85rem;
    }

    /* Review - Extra small mobile */
    .review-item {
        padding: 15px 12px;
    }

    .review-question {
        font-size: 0.95rem;
    }

    .review-option {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .review-explanation {
        font-size: 0.85rem;
        padding: 10px;
    }

    /* Feature and category cards - Extra small mobile */
    .feature-card,
    .category-card {
        padding: 20px 15px;
    }

    .feature-card h3 {
        font-size: 1.2rem;
    }

    .feature-card p {
        font-size: 0.9rem;
    }
}

/* Mobile Extra Small (360px and below) */
@media (max-width: 360px) {
    .hero-content h2 {
        font-size: 1.3rem;
    }

    .navbar nav a {
        padding: 5px 6px;
        font-size: 0.7rem;
        min-width: 50px;
    }

    .quiz-box,
    .result-box,
    .difficulty-selector {
        margin: 0 10px;
        max-width: calc(100% - 20px);
    }

    .section-title {
        font-size: 1.2rem;
    }
}

/* ------------------ ANIMATIONS ------------------ */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: slideInUp 0.6s ease forwards;
}

/* ------------------ MOBILE TOUCH OPTIMIZATIONS ------------------ */
@media (hover: none) and (pointer: coarse) {
    /* Touch device optimizations */
    .option,
    .nav-btn,
    .start-btn,
    .difficulty-btn,
    .theme-btn {
        -webkit-tap-highlight-color: rgba(0, 255, 204, 0.2);
        /* Visual feedback on tap */
    }

    .option:active,
    .nav-btn:active,
    .start-btn:active {
        transform: scale(0.98);
        /* Touch feedback */
    }

    /* Disable hover effects on touch devices */
    .logo-section img:hover {
        transform: none;
    }

    .option:hover:not(.correct):not(.wrong):not(:disabled) {
        transform: none;
        background: var(--bg-secondary);
    }

    /* Increase touch targets */
    button,
    a {
        min-height: 44px;
        /* iOS accessibility guideline */
    }
}

/* Prevent zoom on input focus (iOS) */
@media screen and (max-width: 768px) {
    input,
    select,
    textarea {
        font-size: 16px !important;
        /* Prevents iOS zoom */
    }
}

/* ------------------ UTILITY CLASSES ------------------ */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Mobile specific utilities */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }

    .mobile-full-width {
        width: 100% !important;
    }

    .mobile-text-center {
        text-align: center !important;
    }
}
