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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(180deg, #0a0a1a 0%, #1a0a2a 100%);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

#gameContainer {
    position: relative;
    width: 800px;
    height: 600px;
    border: 2px solid #00ffff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5), inset 0 0 30px rgba(0, 255, 255, 0.1);
}

#gameCanvas {
    display: block;
    background: #0a0a1a;
}

/* ゲームUI */
#gameUI {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.ui-top {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    gap: 10px;
}

.ui-middle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.ui-bottom {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 20px;
}

.ui-item {
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 15px;
    border: 2px solid #00ffff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    flex: 1;
}

.ui-item .label {
    display: block;
    font-size: 10px;
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
    margin-bottom: 3px;
}

.ui-item .value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px #00ffff;
}

.combo-display {
    background: rgba(255, 0, 255, 0.3);
    border: 3px solid #ff00ff;
    border-radius: 10px;
    padding: 20px 40px;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.8);
    animation: comboPulse 0.5s ease-in-out infinite alternate;
}

.combo-display.hidden {
    display: none;
}

.combo-text {
    display: block;
    font-size: 18px;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    text-align: center;
}

.combo-value {
    display: block;
    font-size: 48px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 20px #ff00ff;
    text-align: center;
}

@keyframes comboPulse {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

.item-status {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: itemPulse 1s ease-in-out infinite alternate;
}

.item-status.hidden {
    display: none;
}

.item-icon {
    font-size: 40px;
}

@keyframes itemPulse {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
    }
}

.ui-gauge {
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border: 2px solid #00ffff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    flex: 1;
}

.ui-gauge .label {
    display: block;
    font-size: 12px;
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
    margin-bottom: 5px;
}

.gauge-container {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ffff;
    border-radius: 3px;
    overflow: hidden;
}

.gauge-fill {
    height: 100%;
    transition: width 0.3s;
}

.life-gauge {
    background: linear-gradient(90deg, #ff0080, #ff00ff);
    box-shadow: 0 0 10px rgba(255, 0, 128, 0.8);
}

.boost-gauge {
    background: linear-gradient(90deg, #00ff00, #00ffff);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* 画面オーバーレイ */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: all;
}

.screen.hidden {
    display: none;
}

.neon-title {
    font-size: 72px;
    font-weight: bold;
    color: #00ffff;
    text-shadow:
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #00ffff,
        0 0 40px #ff00ff,
        0 0 70px #ff00ff,
        0 0 80px #ff00ff,
        0 0 100px #ff00ff;
    margin-bottom: 20px;
    animation: neonPulse 1.5s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    from {
        text-shadow:
            0 0 10px #00ffff,
            0 0 20px #00ffff,
            0 0 30px #00ffff,
            0 0 40px #ff00ff,
            0 0 70px #ff00ff,
            0 0 80px #ff00ff,
            0 0 100px #ff00ff;
    }
    to {
        text-shadow:
            0 0 5px #00ffff,
            0 0 10px #00ffff,
            0 0 15px #00ffff,
            0 0 20px #ff00ff,
            0 0 35px #ff00ff,
            0 0 40px #ff00ff,
            0 0 50px #ff00ff;
    }
}

.subtitle {
    font-size: 20px;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    margin-bottom: 30px;
}

.instructions {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    border-radius: 10px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    max-width: 500px;
}

.instructions h2 {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    margin-bottom: 15px;
    text-align: center;
    font-size: 20px;
}

.instructions h3 {
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    margin-top: 15px;
    margin-bottom: 10px;
    text-align: center;
    font-size: 16px;
}

.instructions p {
    font-size: 14px;
    margin: 8px 0;
    color: #fff;
}

.key {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #00ffff;
    border-radius: 5px;
    padding: 3px 8px;
    margin: 0 3px;
    color: #00ffff;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.high-score {
    background: rgba(255, 0, 255, 0.1);
    border: 2px solid #ff00ff;
    border-radius: 10px;
    padding: 15px 30px;
    margin-bottom: 30px;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
}

.high-score p {
    font-size: 18px;
    margin: 8px 0;
    color: #fff;
}

.high-score span {
    color: #ff00ff;
    font-weight: bold;
    text-shadow: 0 0 10px #ff00ff;
}

.result {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    border-radius: 10px;
    padding: 30px 60px;
    margin-bottom: 40px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.result p {
    font-size: 24px;
    margin: 15px 0;
    color: #fff;
}

.result span {
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 10px #00ffff;
}

.result .perfect {
    color: #ffff00;
    text-shadow: 0 0 20px #ffff00;
    font-size: 28px;
    font-weight: bold;
    margin-top: 20px;
}

.neon-button {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    color: #00ffff;
    background: transparent;
    border: 3px solid #00ffff;
    border-radius: 10px;
    padding: 15px 40px;
    margin: 10px;
    cursor: pointer;
    text-shadow: 0 0 10px #00ffff;
    box-shadow:
        0 0 10px rgba(0, 255, 255, 0.5),
        inset 0 0 10px rgba(0, 255, 255, 0.2);
    transition: all 0.3s;
}

.neon-button:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.8),
        inset 0 0 20px rgba(0, 255, 255, 0.4);
    transform: scale(1.05);
}

.neon-button:active {
    transform: scale(0.95);
}
