* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Disable text selection and dragging for all elements */
*, *::before, *::after,
div, span, img, button, br, svg, a, p, h1, h2, h3, h4, h5, h6,
input, textarea, select, label, i, em, strong, b,
.game-logo, .word-image, .scrambled-word, .word-slot,
.start-btn, .level-btn, .quit-btn, .sound-btn, .mute-btn {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: auto;
}

/* Specifically target images and prevent dragging */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
    -webkit-touch-callout: none;
}

/* Allow pointer events for interactive elements */
button, .start-btn, .level-btn, .scrambled-word, .word-slot,
.quit-btn, .sound-btn, .mute-btn, .close-btn {
    pointer-events: auto;
    cursor: pointer;
}

body {
    font-family: 'Exo 2', sans-serif;
    background: 
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9)),
        url('assets/visuals/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    color: #f8fafc;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(52, 152, 219, 0.05) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(26, 188, 156, 0.05) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(46, 204, 113, 0.05) 0%, transparent 50%);
    animation: bgShift 12s ease-in-out infinite alternate;
    z-index: -2;
}

@keyframes bgShift {
    0% {
        transform: scale(1) rotate(0deg);
    }

    100% {
        transform: scale(1.1) rotate(2deg);
    }
}

/* Floating particles */
.particle {
    position: fixed;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s infinite ease-in-out;
    z-index: -1;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Main container */
.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.game-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9)),
        url('assets/visuals/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-blend-mode: overlay;
    z-index: -1;
}

/* Header */
.header {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(24px) saturate(120%);
    border-radius: 28px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 24px 32px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(139, 92, 246, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 0.1);
}

.game-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    letter-spacing: -0.025em;
}

.score-display {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    color: #fff;
    background: linear-gradient(135deg, #3498db, #9b59b6);
    padding: 10px 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(46, 204, 113, 0.4);
}

/* Game content */
.game-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 15px;
}

.stats-timer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

/* Word info section */
.word-info {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px) saturate(120%);
    border-radius: 24px;
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(34, 197, 94, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.top-info-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 20px;
}

.mobile-word-info {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    background: rgba(30, 41, 59, 0.7);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(71, 85, 105, 0.3);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mobile-word-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-timer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.timer-display {
    width: 80px;
    height: 80px;
}

.timer-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(#3498db, #1abc9c, #2ecc71, #3498db);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: timerPulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.timer-inner {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.word-image {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: imageFloat 4s ease-in-out infinite;
}

@keyframes imageFloat {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.center-word-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.target-word {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: #f8fafc;
    text-align: center;
    text-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
    letter-spacing: -0.025em;
}

.word-details {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

.part-of-speech {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fbbf24;
    margin-bottom: 12px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.definition {
    font-size: 1rem;
    line-height: 1.6;
    font-style: italic;
    margin-bottom: 16px;
    color: #cbd5e1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    opacity: 0.95;
}

.sound-btn {
    background: linear-gradient(135deg, #95a5a6, #bdc3c7);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    color: #2c3e50;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(149, 165, 166, 0.3);
    border: 2px solid rgba(212, 175, 55, 0.4);
}

    .sound-btn:hover {
        transform: translateY(-3px) scale(1.1);
        box-shadow: 0 15px 30px rgba(212, 175, 55, 0.5);
        border-color: rgba(212, 175, 55, 0.7);
    }

.mute-btn {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: #d4af37;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(52, 73, 94, 0.4);
    margin-top: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

    .mute-btn:hover {
        transform: translateY(-3px) scale(1.1);
        box-shadow: 0 12px 24px rgba(212, 175, 55, 0.4);
        border-color: rgba(212, 175, 55, 0.6);
    }

    .mute-btn.muted {
        background: linear-gradient(135deg, #6c757d, #495057);
    }

/* Main game area */
.game-area {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px) saturate(120%);
    border-radius: 24px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sentence-display {
    text-align: center;
    margin-bottom: 20px;
}

.sentence-instruction {
    color: #e2e8f0;
    font-size: 1.1rem;
    margin-bottom: 16px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    font-weight: 500;
    opacity: 0.9;
}

.sentence-template {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    min-height: 100px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

    .sentence-template.complete {
        border-color: #2ecc71;
        background: rgba(46, 204, 113, 0.1);
        box-shadow: 0 0 20px rgba(46, 204, 113, 0.4);
        animation: sentenceComplete 0.8s ease-out;
    }

@keyframes sentenceComplete {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.word-slot {
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(71, 85, 105, 0.5);
    border-radius: 12px;
    padding: 12px 20px;
    min-width: 90px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #e2e8f0;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

    .word-slot.filled {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(99, 102, 241, 0.7));
        color: #ffffff;
        font-weight: 700;
        border-color: rgba(59, 130, 246, 0.6);
        transform: scale(1.05);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
        box-shadow: 
            0 8px 24px rgba(59, 130, 246, 0.25),
            0 0 0 1px rgba(59, 130, 246, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    .word-slot.correct {
        background: linear-gradient(135deg, #2ecc71, #1abc9c);
        color: #fff;
        border-color: #2ecc71;
        animation: correctPulse 0.6s ease-out;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }

    .word-slot.wrong {
        background: linear-gradient(135deg, #e74c3c, #c0392b);
        color: #fff;
        animation: wrongShake 0.5s ease-out;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    }

@keyframes correctPulse {
    0% {
        transform: scale(1.05);
    }

    50% {
        transform: scale(1.2);
        box-shadow: 0 0 25px rgba(46, 204, 113, 0.8);
    }

    100% {
        transform: scale(1.05);
    }
}

@keyframes wrongShake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Scrambled words section */
.scrambled-words {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.scrambled-title {
    text-align: center;
    color: #e2e8f0;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
}

.words-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.scrambled-word {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.15));
    color: #f8fafc;
    border: 2px solid rgba(34, 197, 94, 0.4);
    border-radius: 14px;
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 6px 20px rgba(34, 197, 94, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

    .scrambled-word::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s;
    }

    .scrambled-word:hover {
        transform: translateY(-3px) scale(1.02);
        box-shadow: 
            0 12px 32px rgba(34, 197, 94, 0.25),
            0 0 0 1px rgba(34, 197, 94, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
        border-color: rgba(34, 197, 94, 0.6);
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(16, 185, 129, 0.2));
    }

        .scrambled-word:hover::before {
            left: 100%;
        }

    .scrambled-word.used {
        background: rgba(100, 100, 100, 0.5);
        cursor: not-allowed;
        transform: scale(0.9);
        opacity: 0.6;
    }

        .scrambled-word.used:hover {
            transform: scale(0.9);
        }

/* Stats section */
.stats-section {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px) saturate(120%);
    border-radius: 24px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(245, 158, 11, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.level-display {
    color: #f8fafc;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    letter-spacing: -0.025em;
}

.game-stats {
    color: #f1f5f9;
    text-align: center;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.stat-item {
    margin: 6px 0;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Feedback animations */
.feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 900;
    z-index: 1000;
    pointer-events: none;
}

    .feedback.correct {
        color: #2ecc71;
        text-shadow: 0 0 30px rgba(46, 204, 113, 0.8);
        animation: correctFeedback 2s ease-out forwards;
    }

    .feedback.wrong {
        color: #e74c3c;
        text-shadow: 0 0 30px rgba(231, 76, 60, 0.8);
        animation: wrongFeedback 1s ease-out forwards;
    }

@keyframes correctFeedback {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    20% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1) translateY(-50px);
        opacity: 0;
    }
}

@keyframes wrongFeedback {
    0%, 100% {
        transform: translate(-50%, -50%) translateX(0);
    }

    25% {
        transform: translate(-50%, -50%) translateX(-10px);
    }

    75% {
        transform: translate(-50%, -50%) translateX(10px);
    }
}

/* Start screen */
.start-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.25)),
        url('assets/visuals/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
    background-blend-mode: overlay;
}

/* Logo Styles */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}


.game-logo {
    max-width: 220px;
    width: 90%;
    height: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}



}

.start-title {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(45deg, #f1c40f, #e67e22, #e74c3c, #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 20px;
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.start-description {
    color: #2c3e50;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 40px;
    max-width: 85%;
    line-height: 1.7;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px) saturate(150%);
    padding: 25px 35px;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.15),
        inset 0 2px 0 rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
}

.start-btn {
    font-size: 1.2rem;
    padding: 18px 36px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(99, 102, 241, 0.8));
    backdrop-filter: blur(20px) saturate(120%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    cursor: pointer;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 
        0 12px 32px rgba(59, 130, 246, 0.25),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    margin: 10px;
    min-width: 280px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    min-width: 220px;
    max-width: 90%;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

    .start-btn:hover {
        transform: translateY(-4px) scale(1.02);
        box-shadow: 
            0 16px 40px rgba(59, 130, 246, 0.35),
            0 0 0 1px rgba(59, 130, 246, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.3);
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(59, 130, 246, 0.8));
        backdrop-filter: blur(24px) saturate(140%);
    }

    .start-btn:active {
        transform: translateY(-3px) scale(0.98);
        transition-duration: 0.1s;
    }

    .start-btn.secondary {
        background: linear-gradient(135deg, #6c757d, #495057);
    }

/* Level selection screen */
.level-selection-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.25)),
        url('assets/visuals/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    backdrop-filter: blur(20px) saturate(180%);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    background-blend-mode: overlay;
}

.level-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.8rem;
    font-weight: 900;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 0 3px 6px rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.3);
    padding: 20px 30px;
    border-radius: 20px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.levels-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 0 auto 30px auto; /* This centers the container */
    justify-items: center; /* This centers the buttons within their grid cells */
}

.level-btn {
    padding: 18px 22px;
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7)),
        rgba(52, 152, 219, 0.05);
    background-blend-mode: overlay;
    color: #2c3e50;
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: 15px;
    cursor: pointer;
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 20px rgba(52, 152, 219, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    text-align: center;
    min-width: 130px;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

    .level-btn:hover {
        transform: translateY(-6px) scale(1.03);
        box-shadow: 
            0 12px 35px rgba(46, 204, 113, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
        border-color: rgba(46, 204, 113, 0.5);
        background: 
            linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(26, 188, 156, 0.1)),
            rgba(255, 255, 255, 0.9);
        background-blend-mode: overlay;
        color: #2c3e50;
    }

    .level-btn.elementary {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.8), rgba(16, 185, 129, 0.7));
        color: #ffffff;
        box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
        border: 2px solid rgba(34, 197, 94, 0.6);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    }

        .level-btn.elementary:hover {
            box-shadow: 0 15px 35px rgba(34, 197, 94, 0.5);
            border-color: rgba(34, 197, 94, 0.8);
            background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(16, 185, 129, 0.8));
            color: #ffffff;
            transform: translateY(-6px) scale(1.03);
        }

    .level-btn.middle {
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.8), rgba(251, 191, 36, 0.7));
        color: #ffffff;
        box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
        border: 2px solid rgba(245, 158, 11, 0.6);
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    }

        .level-btn.middle:hover {
            box-shadow: 0 15px 35px rgba(245, 158, 11, 0.5);
            border-color: rgba(245, 158, 11, 0.8);
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(251, 191, 36, 0.8));
            color: #ffffff;
            transform: translateY(-6px) scale(1.03);
        }

.level-category {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center; /* This ensures everything in the category is centered */
}

.category-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .levels-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        max-width: 100%;
    }

    .level-title {
        font-size: 2rem;
    }

    .level-btn {
        padding: 12px 8px;
        font-size: 0.95rem;
        min-width: 80px;
    }
}

/* Game over screen */
.game-over-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.25)),
        url('assets/visuals/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    backdrop-filter: blur(20px) saturate(180%);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    background-blend-mode: overlay;
}

.final-stats {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 35px;
    margin: 25px 0;
    backdrop-filter: blur(20px) saturate(150%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
}

/* Audio element */
#countdownAudio {
    display: none;
}

/* Visibility controls */
.desktop-timer {
    display: block;
}

.mobile-timer {
    display: none;
}

.mobile-word-info {
    display: none;
}

.desktop-word-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

/* Mobile responsive */
@media (max-width: 1200px) {
    .game-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .game-title {
        font-size: 2rem;
    }

    .target-word {
        font-size: 1.5rem;
    }

    .top-info-row {
        justify-content: center;
    }

    .sentence-template {
        min-height: 80px;
        padding: 20px;
    }

    .stats-timer-row {
        flex-direction: column;
        gap: 15px;
    }
}

/* iPad specific - show mobile timer layout */
@media (min-width: 769px) and (max-width: 1024px) {
    .desktop-timer {
        display: none;
    }

    .mobile-timer {
        display: block;
    }

    .mobile-word-info {
        display: flex;
    }

    .desktop-word-content {
        display: none;
    }

    .mobile-timer-section .timer-display {
        width: 80px;
        height: 80px;
    }

    .mobile-timer-section .timer-circle {
        width: 80px;
        height: 80px;
    }

    .mobile-timer-section .timer-inner {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .header {
        display: none;
    }

    .desktop-timer {
        display: none;
    }

    .mobile-timer {
        display: block;
    }

    .game-container {
        padding: 10px;
    }

    .start-title {
        font-size: 2.5rem;
    }

    .stats-section {
        order: -1;
        margin-bottom: 15px;
        padding: 20px;
    }

    .stats-header {
        margin-bottom: 0;
    }

    .level-display {
        display: none;
    }

    .game-stats {
        display: flex;
        justify-content: space-around;
        align-items: center;
        width: 100%;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 12px;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .stat-item {
        margin: 0;
        font-size: 0.95rem;
        flex-direction: column;
        gap: 4px;
        text-align: center;
        flex: 1;
    }

    .stat-label {
        font-size: 0.8rem;
        opacity: 0.8;
        font-weight: 600;
    }

    .game-content {
        gap: 15px;
    }

    .word-info {
        padding: 20px;
        order: 1;
    }

    .top-info-row {
        display: none;
    }

    .center-word-info {
        width: 100%;
    }

    .mobile-word-info {
        display: flex;
    }

    .desktop-word-content {
        display: none;
    }

    .word-image {
        width: 90px;
        height: 90px;
        flex-shrink: 0;
        border-radius: 15px;
    }

    .target-word {
        font-size: 1.4rem;
        margin-bottom: 4px;
        line-height: 1.2;
    }

    .part-of-speech {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .definition {
        font-size: 0.9rem;
        margin-bottom: 8px;
        line-height: 1.4;
    }

    .sound-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .mobile-controls {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .mobile-timer-section .timer-display {
        width: 85px;
        height: 85px;
    }

    .mobile-timer-section .timer-circle {
        width: 85px;
        height: 85px;
    }

    .mobile-timer-section .timer-inner {
        width: 68px;
        height: 68px;
        font-size: 1.3rem;
        font-weight: 800;
    }

    .game-area {
        padding: 20px;
        order: 2;
    }

    .mute-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .sentence-template {
        padding: 15px;
        min-height: 60px;
        gap: 3px;
    }

    .word-slot {
        min-width: 60px;
        padding: 8px 12px;
        font-size: 1rem;
        min-height: 40px;
    }

    .scrambled-word {
        padding: 10px 16px;
        font-size: 1rem;
    }

    .game-stats {
        padding: 10px;
    }

    .stat-item {
        font-size: 0.9rem;
        gap: 3px;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .mobile-word-info {
        padding: 12px;
        gap: 12px;
    }

    .word-image {
        width: 80px;
        height: 80px;
    }

    .target-word {
        font-size: 1.3rem;
    }

    .mobile-timer-section .timer-display {
        width: 75px;
        height: 75px;
    }

    .mobile-timer-section .timer-circle {
        width: 75px;
        height: 75px;
    }

    .mobile-timer-section .timer-inner {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }

    .level-display {
        font-size: 1.2rem;
    }

    .stats-section {
        padding: 15px;
    }
}

/* Quit Button */
.quit-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.quit-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.6);
}

/* Instructions Modal */
.instructions-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)),
        url('assets/visuals/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    backdrop-filter: blur(25px) saturate(120%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
    background-blend-mode: overlay;
}

.modal-content {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(24px) saturate(120%);
    border-radius: 20px;
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    border: 1px solid rgba(71, 85, 105, 0.3);
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 0.1);
    overflow: auto;
}

.modal-header {
    background: rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(16px);
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(71, 85, 105, 0.2);
}

.modal-header h2 {
    color: #f8fafc;
    font-family: 'Orbitron', monospace;
    font-size: 1.6rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.025em;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 28px;
    color: #e2e8f0;
    background: transparent;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 16px;
    padding: 16px;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(71, 85, 105, 0.2);
    transition: all 0.3s ease;
}

.instruction-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.instruction-item i {
    color: #2ecc71;
    font-size: 1.5rem;
    min-width: 30px;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.instruction-item p {
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 0;
}

/* Home Developer Credit */
.home-developer-credit {
    margin-top: 40px;
    padding: 18px 25px;
    background: 
        linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(46, 204, 113, 0.1)),
        rgba(255, 255, 255, 0.3);
    background-blend-mode: overlay;
    color: #2c3e50;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    border-radius: 15px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    max-width: 85%;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.home-developer-credit:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* Button Variants */
.start-btn.danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 15px 30px rgba(231, 76, 60, 0.3);
    border: 2px solid rgba(231, 76, 60, 0.4);
}

.start-btn.danger:hover {
    box-shadow: 0 20px 40px rgba(231, 76, 60, 0.5);
    border-color: rgba(231, 76, 60, 0.6);
}

/* Exit Modal */
.exit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    animation: fadeIn 0.3s ease-out;
}

.exit-modal-content {
    background: linear-gradient(135deg, rgb(161 252 232), rgb(29 42 59));
    max-width: 400px;
    width: 90%;
    border: 2px solid rgba(231, 76, 60, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: scaleIn 0.3s ease-out;
}

.exit-modal-header {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.exit-modal-header i {
    color: #fff;
    font-size: 1.5rem;
}

.exit-modal-header h3 {
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.exit-modal-body {
    padding: 25px;
    text-align: center;
}

.exit-modal-body p {
    color: #fff;
    font-size: 1.2rem;
    margin: 0;
    line-height: 1.4;
}

.exit-modal-footer {
    padding: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.exit-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.exit-btn.confirm {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.exit-btn.confirm:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.exit-btn.cancel {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.exit-btn.cancel:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.4);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile First Responsive Design */
@media (max-width: 480px) {
    .start-screen {
        padding: 15px;
        justify-content: flex-start;
        padding-top: 10vh;
    }
    
    .logo-container {
        margin-bottom: 15px;
    }
    
    .game-logo {
        max-width: 260px;
        width: 90%;
    }
    
    .start-description {
        font-size: 1rem;
        margin-bottom: 25px;
        max-width: 95%;
    }
    
    .start-btn {
        font-size: 1rem;
        padding: 12px 20px;
        margin: 5px;
        min-width: 150px;
        max-width: 95%;
        letter-spacing: 0.5px;
    }
    
    .home-developer-credit {
        margin-top: 20px;
        padding: 12px 15px;
        font-size: 0.8rem;
        max-width: 95%;
    }
    
    /* Level Selection Mobile */
    .level-selection-screen {
        padding: 15px;
        justify-content: flex-start;
        padding-top: 5vh;
    }
    
    .level-title {
        font-size: 2rem;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .levels-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 100%;
    }
    
    .level-btn {
        padding: 12px;
        font-size: 0.9rem;
        min-width: auto;
        width: 100%;
    }
    
    /* Game Container Mobile */
    .game-container {
        padding: 10px;
    }
    
    .game-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .header {
        padding: 15px 20px;
        margin-bottom: 15px;
        border-radius: 15px;
    }
    
    .game-title {
        font-size: 1.8rem;
    }
    
    .score-display {
        font-size: 1.4rem;
        padding: 8px 15px;
    }
    
    /* Instructions Modal Mobile */
    .instructions-modal {
        padding: 15px;
    }
    
    .modal-content {
        max-width: 100%;
        width: 95%;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.4rem;
    }
    
    .modal-body {
        padding: 20px 15px;
    }
    
    .instruction-item {
        padding: 12px;
        margin-bottom: 15px;
        gap: 15px;
    }
    
    .instruction-item i {
        font-size: 1.2rem;
        min-width: 25px;
    }
    
    .instruction-item p {
        font-size: 1rem;
    }
    
    /* Exit Modal Mobile */
    .exit-modal-content {
        width: 95%;
        max-width: 350px;
    }
    
    .exit-modal-header {
        padding: 15px;
    }
    
    .exit-modal-header h3 {
        font-size: 1.3rem;
    }
    
    .exit-modal-body {
        padding: 20px 15px;
    }
    
    .exit-modal-body p {
        font-size: 1.1rem;
    }
    
    .exit-modal-footer {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .exit-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .start-screen {
        padding: 20px;
    }
    
    .game-logo {
        max-width: 160px;
    }
    
    .start-btn {
        font-size: 1.05rem;
        min-width: 180px;
    }
    
    .level-title {
        font-size: 2.5rem;
    }
    
    .levels-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .level-btn {
        padding: 15px;
        font-size: 1rem;
    }
}

@media (min-width: 769px) {
    .start-btn {
        min-width: 200px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}

/* Large screen instructions modal fix */
@media (min-width: 1400px) {
    .modal-content {
        max-width: 650px;
    }

    .instructions-modal {
        padding: 40px;
    }
}

/* Button text centering fix for all screen sizes */
.start-btn, .level-btn, .exit-btn, .quit-btn, .sound-btn, .mute-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Teacher Control Button */
.teacherControl {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 2500;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px) saturate(120%);
    padding: 12px 16px;
    border-radius: 15px;
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.teacherControl #teacherStatus {
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.teacherControl button {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    padding: 8px 16px;
    color: #d4af37;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.teacherControl button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
    border-color: rgba(212, 175, 55, 0.6);
}

/* Teacher Selection Modal */
.teacher-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3500;
    padding: 20px;
}

.teacher-modal-content {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(24px) saturate(120%);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    padding: 30px;
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
}

.teacher-modal-content h2 {
    color: #f8fafc;
    font-family: 'Orbitron', monospace;
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 25px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.teacher-selection h3 {
    color: #e2e8f0;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.section-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

.sectionBtn {
    flex: 1;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.15));
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 12px;
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sectionBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.6);
}

.sectionBtn.selected {
    background: linear-gradient(135deg, #2ecc71, #1abc9c);
    border-color: #2ecc71;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.4);
}

.grade-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.grade-row {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.gradeBtn {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.15));
    border: 2px solid rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    color: #f8fafc;
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gradeBtn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.25);
    border-color: rgba(245, 158, 11, 0.6);
}

.gradeBtn.selected {
    background: linear-gradient(135deg, #2ecc71, #1abc9c);
    border-color: #2ecc71;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.4);
}

.confirmTeacher {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #2ecc71, #1abc9c);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.3);
    text-align: center;
}

.confirmTeacher:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(46, 204, 113, 0.4);
}

.teacher_back {
    width: 100%;
    padding: 12px 30px;
    background: linear-gradient(135deg, #6c757d, #495057);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.teacher_back:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
}

/* Mobile responsive for teacher controls */
@media (max-width: 768px) {
    .teacherControl {
        bottom: 15px;
        left: 15px;
        padding: 10px 14px;
    }

    .teacher-modal-content {
        padding: 25px;
        max-width: 90%;
    }

    .gradeBtn {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .grade-row {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .teacherControl {
        bottom: 10px;
        left: 10px;
        padding: 8px 12px;
    }

    .teacherControl #teacherStatus {
        font-size: 0.8rem;
    }

    .teacherControl button {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .teacher-modal-content {
        padding: 20px;
    }

    .teacher-modal-content h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .teacher-selection h3 {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .gradeBtn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .grade-row {
        gap: 8px;
    }

    .section-buttons {
        flex-direction: column;
        gap: 10px;
    }
}
