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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #fff;
}

#game-container {
    width: 800px;
    max-width: 95vw;
    background: #0f3460;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}

#header {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
}

#stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

#hp-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

#hp-bar {
    flex: 1;
    height: 25px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

#hp-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #ff0000, #ff6b6b);
    transition: width 0.3s ease;
}

#score {
    font-size: 20px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#combo {
    font-size: 20px;
    font-weight: bold;
    color: #00ff88;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    min-width: 120px;
}

#game-screen {
    position: relative;
    background: #000;
    height: 400px;
}

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

#controls {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    gap: 15px;
}

.attack-btn {
    flex: 1;
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(135deg, #e94560, #c72e49);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.4);
}

.attack-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(233, 69, 96, 0.6);
}

.attack-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(233, 69, 96, 0.4);
    background: linear-gradient(135deg, #c72e49, #e94560);
}

#rhythm-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    gap: 20px;
}

.beat {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.1s ease;
}

.beat.active {
    background: #00ff88;
    box-shadow: 0 0 20px #00ff88;
    transform: scale(1.5);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay.hidden {
    display: none;
}

.menu-content {
    text-align: center;
    padding: 40px;
    background: rgba(15, 52, 96, 0.95);
    border-radius: 20px;
    border: 2px solid rgba(233, 69, 96, 0.5);
}

.menu-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #e94560;
    text-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
}

.menu-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

.menu-content button {
    padding: 15px 50px;
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, #e94560, #c72e49);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.4);
}

.menu-content button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(233, 69, 96, 0.6);
}

.instructions {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    text-align: left;
}

.instructions h3 {
    margin-bottom: 15px;
    color: #00ff88;
}

.instructions p {
    font-size: 16px;
    margin-bottom: 10px;
}

#judgment-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    font-weight: bold;
    pointer-events: none;
    z-index: 100;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.judgment-perfect {
    color: #ffd700;
    animation: judgmentPop 0.5s ease;
}

.judgment-good {
    color: #00ff88;
    animation: judgmentPop 0.5s ease;
}

.judgment-miss {
    color: #ff4444;
    animation: judgmentPop 0.5s ease;
}

@keyframes judgmentPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}
