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

body {
    background: radial-gradient(ellipse at 50% 30%, #0d2a4a 0%, #040e1f 100%);
    color: #e0f0ff;
    font-family: 'Segoe UI', system-ui, sans-serif;
    overflow: hidden;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

#game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.screen.active {
    display: flex;
}

.game-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #4fc3f7;
    text-shadow: 0 0 20px rgba(79, 195, 247, 0.5);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #80deea;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.menu-btn {
    background: linear-gradient(135deg, #1565c0, #0288d1);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 20px rgba(2, 136, 209, 0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}

.menu-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(2, 136, 209, 0.3);
}

/* $WATER brand token under the play button */
#menu-screen::after {
    content: '$WATER';
    position: absolute;
    bottom: 2.5rem;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: rgba(79, 195, 247, 0.35);
    text-transform: uppercase;
}

/* Animated wave bar at bottom of menu screen */
#menu-screen::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(0, 100, 180, 0.25), transparent);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0,30 C200,0 400,60 600,30 C800,0 1000,60 1200,30 L1200,60 L0,60 Z' fill='white'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0,30 C200,0 400,60 600,30 C800,0 1000,60 1200,30 L1200,60 L0,60 Z' fill='white'/%3E%3C/svg%3E");
    mask-size: 100% 100%;
    -webkit-mask-size: 100% 100%;
}

#game-screen {
    padding: 0;
}

#hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #80deea;
    background: rgba(10, 22, 40, 0.8);
    z-index: 10;
}

#gameCanvas {
    display: block;
}

#gameover-screen .game-title {
    color: #ef5350;
    text-shadow: 0 0 20px rgba(239, 83, 80, 0.5);
}

#levelclear-screen .game-title {
    color: #66bb6a;
    text-shadow: 0 0 20px rgba(102, 187, 106, 0.5);
}
