* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* UI Layer */
#ui-layer {
    display: none;
}

#score-display {
    display: none; /* Score removed */
}

#timer-display {
    position: fixed;
    top: 80px;
    right: 30px;
    font-size: 192px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.5);
    z-index: 9999;
    display: none !important;
}

#timer-display.visible {
    display: block !important;
}

/* Timer animation */
.timer-animate {
    animation: timerPop 1s ease-out forwards;
}

@keyframes timerPop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    20% {
        opacity: 1;
        transform: scale(1.1);
    }
    40% {
        transform: scale(1);
    }
    80% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0.8;
        transform: scale(1);
    }
}

/* Feedback Message */
#feedback {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: center;
}

#feedback.correct {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.5);
}

#feedback.incorrect {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.5);
}

/* Close Button */
.close-button {
    position: fixed;
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #64748b;
    font-size: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    transition: all 0.3s ease;
    z-index: 200;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.close-button:hover {
    background: #fff;
    color: #ef4444;
    transform: scale(1.1);
}

/* Pause Button */
.pause-button {
    position: fixed;
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #64748b;
    font-size: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    transition: all 0.3s ease;
    z-index: 200;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.pause-button:hover {
    background: #fff;
    color: #3b82f6;
    transform: scale(1.1);
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    z-index: 20;
    backdrop-filter: blur(5px);
    padding: 20px;
    overflow-y: auto;
}

.screen.hidden {
    display: none;
}

.screen h1 {
    font-size: 36px;
    color: #00ffff;
    text-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff;
    margin-bottom: 20px;
    letter-spacing: 4px;
    text-align: center;
}

.game-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    margin: 10px 0 30px;
    text-align: center;
    letter-spacing: 2px;
}

.start-screen-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

/* Buttons */
.play-main-btn {
    background: linear-gradient(135deg, #00ffff, #0088ff);
    border: none;
    padding: 20px 60px;
    font-size: 28px;
    font-weight: bold;
    color: #000;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    animation: opacityPulse 1.5s ease-in-out infinite;
}

@keyframes opacityPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.play-main-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.6);
}

.secondary-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.info-btn, a.info-btn {
    background: transparent;
    border: 2px solid rgba(0, 255, 255, 0.4);
    padding: 12px 25px;
    font-size: 14px;
    font-weight: 600;
    color: #00ffff;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.info-btn:hover, a.info-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00ffff;
}

/* Game Over Screen */
#game-over-screen h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #00ffff;
    text-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff;
}

.score-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    margin-bottom: 20px;
}

.replay-btn {
    background: linear-gradient(135deg, #00ffff, #0088ff);
    border: none;
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    color: #000;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.replay-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.5);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    border: 2px solid rgba(0, 255, 255, 0.3);
}

.modal-content h2 {
    color: #00ffff;
    font-size: 24px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #00ffff;
}

.modal-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.modal-close-x {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.modal-close-x:hover {
    color: #00ffff;
}

.modal-ok {
    background: linear-gradient(135deg, #00ffff, #0088ff);
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    color: #000;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 20px;
}

.resume-btn {
    background: linear-gradient(135deg, #00ffff, #0088ff);
    border: none;
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    color: #000;
    border-radius: 35px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.resume-btn:hover {
    transform: scale(1.05);
}

/* Navbar styles for game pages - Dark theme */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    height: 60px;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 2px;
    line-height: 1;
}

.navbar-bit { color: #3b82f6; }
.navbar-bot { color: #8b5cf6; }
.navbar-boo { color: #ec4899; }

.navbar-solutions {
    color: #64748b;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 3px;
    margin-left: 8px;
    text-transform: uppercase;
    font-stretch: condensed;
    line-height: 1;
    margin-bottom: 2px;
}

.navbar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
}

.nav-link {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #1e293b;
    color: #3b82f6;
}

.theme-toggle {
    background: #1e293b;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: #334155;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke: #94a3b8;
    stroke-width: 2;
    fill: none;
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #timer-display {
        font-size: 144px !important;
        top: 70px !important;
        right: 10px !important;
        left: auto !important;
        transform: none !important;
        z-index: 9999 !important;
        color: #fff !important;
    }
    
    #timer-display.visible {
        display: block !important;
    }
    
    .screen h1 {
        font-size: 28px;
        margin: 15px 0 10px 0;
    }
    
    .game-tagline {
        font-size: 14px;
    }
    
    .play-main-btn {
        padding: 15px 40px;
        font-size: 20px;
    }
    
    .secondary-buttons {
        flex-direction: row;
        gap: 10px;
    }
    
    .info-btn, a.info-btn {
        padding: 10px 18px;
        font-size: 12px;
    }
    
    #game-over-screen h1 {
        font-size: 28px;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
    }
    
    .navbar {
        height: auto;
        min-height: 60px;
    }
    
    .navbar-container {
        flex-wrap: wrap;
        padding: 8px 15px;
        gap: 8px;
        justify-content: center;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
        width: 100%;
        justify-content: center;
    }
    
    .navbar-solutions {
        font-size: 0.55rem;
        letter-spacing: 2px;
        margin-left: 6px;
    }
    
}

@media (max-width: 480px) {
    #timer-display {
        font-size: 96px !important;
        top: 70px !important;
        right: 5px !important;
        z-index: 9999 !important;
    }
    
    #timer-display.visible {
        display: block !important;
    }
    
    .screen h1 {
        font-size: 2rem;
    }
    
    .play-main-btn {
        padding: 18px 40px;
        font-size: 1.8rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-solutions {
        font-size: 0.5rem;
        letter-spacing: 1.5px;
    }
    
    .nav-link {
        padding: 5px 10px;
        font-size: 0.8rem;
        color: #94a3b8;
    }
    
    .theme-toggle {
        width: 35px;
        height: 35px;
        background: #1e293b;
    }
}

