* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background: #08050d;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    touch-action: none;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 100%;
    background: linear-gradient(135deg, #181229, #2b183d, #181229);
    background-size: 400% 400%;
    animation: iridescent 15s ease infinite;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

@keyframes iridescent {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    z-index: 5;
}

#score-board {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.score-label {
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#current-score {
    color: #00ff88;
}

#high-score {
    color: #ffaa00;
}

#meter-container {
    width: 80%;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

#meter-label {
    text-align: center;
    font-size: 0.8rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    color: #ddd;
}

#meter-bar-bg {
    width: 100%;
    height: 14px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

#meter-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00ccff);
    transition: width 0.1s ease-out, background 0.2s ease-out;
    box-shadow: 0 0 10px #00ff88;
}

#game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 5, 15, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    pointer-events: auto;
    z-index: 10;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

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

#game-over-screen h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    color: #ff0055;
    text-shadow: 0 0 25px rgba(255, 0, 85, 0.6);
    letter-spacing: 2px;
}

#game-over-screen p {
    font-size: 1.1rem;
    margin: 8px 0;
    color: #ccc;
}

.final-score-text {
    font-size: 1.4rem !important;
    margin-top: 20px !important;
    color: #fff !important;
}

#final-score {
    font-weight: bold;
    font-size: 1.8rem;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
}

.restart-hint {
    margin-top: 30px !important;
    font-size: 0.9rem !important;
    color: #888 !important;
    animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}
