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

body {
    font-family: system-ui, sans-serif;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 50%, #0a1a2e 100%);
    color: white;
    user-select: none;
    -webkit-user-select: none;
}

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

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* UI Overlay */
#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* HUD */
.hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
}

.score-display,
.high-score-display,
.baby-display {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #00ffff;
    border-radius: 12px;
    padding: 12px 20px;
    min-width: 120px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.score-display .label,
.high-score-display .label,
.baby-display .label {
    display: block;
    font-size: 11px;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.score-display span,
.high-score-display span,
.baby-display span {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 10px #00ffff;
}

.baby-display span {
    color: #ff6b6b;
    text-shadow: 0 0 10px #ff6b6b;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    pointer-events: auto;
    backdrop-filter: blur(10px);
    z-index: 100;
}

.screen.hidden {
    display: none;
}

/* Title */
.title {
    font-size: 48px;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.8),
                 0 0 60px rgba(0, 255, 255, 0.4);
    margin-bottom: 10px;
    letter-spacing: 4px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 30px rgba(0, 255, 255, 0.8),
                     0 0 60px rgba(0, 255, 255, 0.4);
    }
    to {
        text-shadow: 0 0 40px rgba(0, 255, 255, 1),
                     0 0 80px rgba(0, 255, 255, 0.6);
    }
}

.subtitle {
    font-size: 18px;
    color: #ff6b6b;
    margin-bottom: 40px;
    letter-spacing: 3px;
}

/* Instructions */
.instructions {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #ff6b6b;
    border-radius: 12px;
    padding: 25px 40px;
    margin-bottom: 40px;
    max-width: 400px;
}

.instructions p {
    font-size: 14px;
    color: #ffffff;
    margin: 8px 0;
    text-align: left;
    line-height: 1.6;
}

.instructions p:first-child {
    color: #00ffff;
}

/* Final Score */
.final-score,
.victory-stats {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #00ffff;
    border-radius: 12px;
    padding: 20px 40px;
    margin-bottom: 40px;
    display: flex;
    gap: 40px;
}

.score-item {
    text-align: center;
}

.score-item .label {
    display: block;
    font-size: 12px;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.score-item .value {
    display: block;
    font-size: 36px;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 10px #00ffff;
}

/* Start Button */
.start-btn,
.restart-btn {
    padding: 18px 60px;
    font-size: 22px;
    font-weight: bold;
    color: #0a0a1a;
    background: linear-gradient(135deg, #00ffff 0%, #00cccc 100%);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.start-btn:hover,
.restart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.8);
    background: linear-gradient(135deg, #00ffff 0%, #33ffff 100%);
}

.start-btn:active,
.restart-btn:active {
    transform: scale(0.95);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .title {
        font-size: 32px;
    }

    .subtitle {
        font-size: 14px;
    }

    .instructions {
        padding: 20px 30px;
    }

    .instructions p {
        font-size: 13px;
    }

    .final-score,
    .victory-stats {
        flex-direction: column;
        gap: 20px;
        padding: 20px 30px;
    }

    .score-item .value {
        font-size: 28px;
    }
}

/* Desktop Controls Hint */
.desktop-hint {
    display: none;
}

@media (min-width: 1024px) {
    .desktop-hint {
        display: block;
    }
}
