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

body {
    font-family: 'Courier New', monospace;
    background: #000;
    overflow: hidden;
    height: 100vh;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(45deg, #0a0a0a, #1a0a1a);
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}

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

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Ensure buttons are touchable on mobile */
button {
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Neon Logo */
.game-logo {
    text-align: center;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.logo-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #00ffdd;
    box-shadow: 
        0 0 20px rgba(0, 255, 221, 0.6),
        inset 0 0 20px rgba(0, 255, 221, 0.2);
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

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

@keyframes pulse-glow {
    0% { 
        box-shadow: 
            0 0 20px rgba(0, 255, 221, 0.6),
            inset 0 0 20px rgba(0, 255, 221, 0.2);
    }
    100% { 
        box-shadow: 
            0 0 40px rgba(0, 255, 221, 0.9),
            inset 0 0 30px rgba(0, 255, 221, 0.4);
    }
}

.logo-container {
    text-align: center;
    margin-bottom: 3rem;
}

.neon-logo {
    font-size: 3.5rem;
    font-weight: 900;
    color: rgba(0, 255, 221, 0.3);
    -webkit-text-stroke: 2px #00ffdd;
    text-stroke: 2px #00ffdd;
    text-shadow: 
        0 0 10px rgba(0, 255, 221, 0.8),
        0 0 20px rgba(0, 255, 221, 0.6),
        0 0 30px rgba(0, 255, 221, 0.4);
    animation: title-flicker 8s linear infinite;
    margin: 0.5rem 0;
    letter-spacing: 3px;
}

.neon-subtitle {
    font-size: 1.2rem;
    font-weight: normal;
    color: #00ccaa;
    text-shadow: 
        0 0 5px rgba(0, 204, 170, 0.8),
        0 0 10px rgba(0, 204, 170, 0.6);
    animation: text-glow 3s ease-in-out infinite alternate-reverse;
    letter-spacing: 2px;
    margin-top: 0.5rem;
}

@keyframes game-over-glow {
    0% {
        text-shadow: 
            0 0 20px #ff3333,
            0 0 30px #ff3333,
            0 0 40px #ff3333;
    }
    100% {
        text-shadow: 
            0 0 30px #ff3333,
            0 0 50px #ff3333,
            0 0 70px #ff3333;
    }
}

@keyframes title-flicker {
    0%, 92%, 100% {
        text-shadow: 
            0 0 10px rgba(0, 255, 221, 0.8),
            0 0 20px rgba(0, 255, 221, 0.6),
            0 0 30px rgba(0, 255, 221, 0.4);
        opacity: 1;
    }
    93%, 94%, 96%, 97% {
        text-shadow: 
            0 0 20px rgba(0, 255, 221, 1),
            0 0 30px rgba(0, 255, 221, 0.8),
            0 0 40px rgba(0, 255, 221, 0.6);
        opacity: 1;
    }
    95%, 98% {
        text-shadow: none;
        opacity: 0.4;
    }
}

@keyframes text-glow {
    0% { 
        text-shadow: 
            0 0 10px rgba(0, 255, 221, 0.8),
            0 0 20px rgba(0, 255, 221, 0.6),
            0 0 30px rgba(0, 255, 221, 0.4);
    }
    100% { 
        text-shadow: 
            0 0 20px rgba(0, 255, 221, 1),
            0 0 30px rgba(0, 255, 221, 0.8),
            0 0 40px rgba(0, 255, 221, 0.6);
    }
}

/* Floating Shapes Animation */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.shape {
    position: absolute;
    background: linear-gradient(45deg, #00ffdd, #00ccaa);
    opacity: 0.1;
    animation: float-shapes 8s ease-in-out infinite;
}

.shape1 {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 10%;
    border-radius: 50%;
    animation-delay: 0s;
}

.shape2 {
    width: 40px;
    height: 40px;
    top: 60%;
    right: 15%;
    transform: rotate(45deg);
    animation-delay: 2s;
}

.shape3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    border-radius: 20px;
    animation-delay: 4s;
}

.shape4 {
    width: 50px;
    height: 50px;
    top: 30%;
    right: 30%;
    border-radius: 50%;
    animation-delay: 6s;
}

@keyframes float-shapes {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    25% { 
        transform: translateY(-20px) rotate(90deg);
        opacity: 0.2;
    }
    50% { 
        transform: translateY(-10px) rotate(180deg);
        opacity: 0.15;
    }
    75% { 
        transform: translateY(-30px) rotate(270deg);
        opacity: 0.25;
    }
}

/* Buttons */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.neon-btn {
    background: transparent;
    border: 2px solid #00ffdd;
    color: #00ffdd;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-family: inherit;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 15px rgba(0, 255, 221, 0.4),
        inset 0 0 15px rgba(0, 255, 221, 0.1);
    animation: button-pulse 2s ease-in-out infinite;
}

.neon-btn:hover {
    background: rgba(0, 255, 221, 0.1);
    box-shadow: 
        0 0 25px rgba(0, 255, 221, 0.7),
        inset 0 0 25px rgba(0, 255, 221, 0.2);
    transform: scale(1.05);
}

@keyframes button-pulse {
    0%, 100% { 
        box-shadow: 
            0 0 15px rgba(0, 255, 221, 0.4),
            inset 0 0 15px rgba(0, 255, 221, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 20px rgba(0, 255, 221, 0.6),
            inset 0 0 20px rgba(0, 255, 221, 0.15);
    }
}

.neon-btn.secondary {
    border-color: #00ccaa;
    color: #00ccaa;
    box-shadow: 
        0 0 15px rgba(0, 204, 170, 0.4),
        inset 0 0 15px rgba(0, 204, 170, 0.1);
}

.neon-btn.secondary:hover {
    background: rgba(0, 204, 170, 0.1);
    box-shadow: 
        0 0 25px rgba(0, 204, 170, 0.7),
        inset 0 0 25px rgba(0, 204, 170, 0.2);
}

/* Game HUD */
#game-hud {
    justify-content: flex-start;
    padding: 2rem;
    pointer-events: none;
}

#game-hud * {
    pointer-events: auto;
}

.score-container {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.score-item {
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 15px;
    border-radius: 20px;
    border: 2px solid #00ffdd;
    box-shadow: 0 0 15px rgba(0, 255, 221, 0.5);
    color: #ffffff;
    font-weight: bold;
    font-size: 16px;
}

.score-label {
    color: #00ffdd;
    font-weight: bold;
    margin-right: 10px;
}

.high-scores {
    margin-top: 20px;
    text-align: center;
}

.high-scores p {
    color: #00ffdd;
    font-size: 16px;
    text-shadow: 0 0 10px rgba(0, 255, 221, 0.8);
    margin: 5px 0;
    animation: score-glow 2s ease-in-out infinite alternate;
}

@keyframes score-glow {
    0% { 
        text-shadow: 0 0 10px rgba(0, 255, 221, 0.8);
    }
    100% { 
        text-shadow: 0 0 15px rgba(0, 255, 221, 1);
    }
}

.hud-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: 1px solid #00ffdd;
    color: #00ffdd;
    padding: 0.5rem;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.hud-btn:hover {
    background: rgba(0, 255, 221, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 221, 0.5);
}

/* Game Over & Complete Screens */
.game-over-title {
    color: #ff3333;
    font-size: 3rem;
    text-shadow: 0 0 20px #ff3333;
    margin-bottom: 2rem;
    animation: game-over-glow 0.5s infinite alternate;
    transition: transform 0.8s ease-in;
}

.game-over-title.fall {
    transform: rotate(20deg);
    animation-delay: 2s;
}

.success-title {
    color: #33ff33;
    font-size: 3rem;
    text-shadow: 0 0 20px #33ff33;
    margin-bottom: 2rem;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.stats {
    color: #fff;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.stats p {
    margin: 0.5rem 0;
    text-shadow: 0 0 5px #fff;
}

.controls {
    margin-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.controls p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* Screen Shake Animation */
@keyframes shake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-2px, -1px); }
    20% { transform: translate(2px, 1px); }
    30% { transform: translate(-1px, 2px); }
    40% { transform: translate(1px, -2px); }
    50% { transform: translate(-2px, 1px); }
    60% { transform: translate(2px, -1px); }
    70% { transform: translate(-1px, -2px); }
    80% { transform: translate(1px, 2px); }
    90% { transform: translate(-2px, -1px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Responsive */
@media (max-width: 768px) {
    .neon-logo {
        font-size: 2.5rem;
    }
    
    .progress-bar {
        width: 200px;
    }
    
    .neon-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}
