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

body {
    background-color: #111;
    color: #fff;
    font-family: 'Inter', sans-serif;
    overflow: hidden; /* Prevent scrolling during gameplay */
    user-select: none;
    touch-action: none;
}

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

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Behind the UI */
}

/* UI Layer */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none; /* Let clicks pass through unless on specific interactive elements */
}

#score-display {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    font-weight: 900;
    text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.5), -1px -1px 0 rgba(255,255,255,0.2);
    z-index: 15;
}

.mute-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 15px;
    font-size: 1.5rem;
    z-index: 25;
    pointer-events: auto;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
    z-index: 20;
    pointer-events: auto; /* Catch clicks for buttons */
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Glassmorphism Panels */
.glass-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px 60px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: float 4s ease-in-out infinite;
}

.glass-panel h1, .glass-panel h2 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 5px 15px rgba(255, 140, 0, 0.3);
}

.glass-panel p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #ddd;
}

kbd {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: inherit;
    font-weight: 700;
}

/* Glassmorphism Buttons */
.glass-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.glass-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.glass-btn:active {
    transform: translateY(1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

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