/* ========================================
   XEVION - レトロシューティングゲーム
   CSS Styles
   ======================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0f;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Press Start 2P', cursive;
    overflow: hidden;
}

/* Game Container */
#game-container {
    position: relative;
    width: 480px;
    height: 640px;
    border: 4px solid #00ffff;
    border-radius: 8px;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.5),
        0 0 40px rgba(0, 255, 255, 0.3),
        0 0 60px rgba(0, 255, 255, 0.2),
        inset 0 0 20px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    background: #000;
}

/* CRT Scanline Effect */
.crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 100;
}

.crt-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
}

/* Game Canvas */
#gameCanvas {
    display: block;
    background: #000;
}

/* UI Overlay */
#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    z-index: 50;
    pointer-events: none;
}

#score-display,
#hiscore-display,
#lives-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.label {
    font-size: 8px;
    color: #888;
    margin-bottom: 4px;
}

#score,
#hiscore {
    font-size: 14px;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

#hiscore {
    color: #ff00ff;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.8);
}

#lives {
    font-size: 12px;
    color: #ffff00;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.8);
    letter-spacing: 4px;
}

/* 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.9);
    z-index: 80;
    text-align: center;
    padding: 20px;
}

.screen.hidden {
    display: none;
}

/* Title Screen */
.game-title {
    font-size: 48px;
    color: #00ffff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 40px #0088ff,
        4px 4px 0 #003366;
    margin-bottom: 10px;
    animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px #00ffff,
            0 0 20px #00ffff,
            0 0 40px #0088ff,
            4px 4px 0 #003366;
    }
    50% {
        text-shadow: 
            0 0 20px #00ffff,
            0 0 40px #00ffff,
            0 0 60px #0088ff,
            4px 4px 0 #003366;
    }
}

.subtitle {
    font-size: 10px;
    color: #888;
    margin-bottom: 30px;
}

.menu-options {
    margin-bottom: 40px;
}

.blink {
    font-size: 10px;
    color: #ffff00;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.controls-info {
    border: 2px solid #333;
    padding: 15px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    max-width: 400px;
}

.controls-info h3 {
    font-size: 12px;
    color: #00ffff;
    margin-bottom: 15px;
}

.control-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.control-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.key {
    font-size: 8px;
    color: #ffff00;
    background: #222;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #444;
}

.action {
    font-size: 7px;
    color: #888;
}

.gamepad-note {
    font-size: 8px;
    color: #00ff00;
    margin-top: 15px;
}

/* Pause Screen */
#pause-screen h2 {
    font-size: 32px;
    color: #ffff00;
    text-shadow: 0 0 20px rgba(255, 255, 0, 0.8);
    margin-bottom: 30px;
}

/* Game Over Screen */
.gameover-title {
    font-size: 32px;
    color: #ff0000;
    text-shadow: 
        0 0 10px #ff0000,
        0 0 20px #ff0000,
        0 0 40px #880000;
    margin-bottom: 20px;
    animation: gameoverPulse 0.5s ease-in-out infinite;
}

@keyframes gameoverPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

#final-score {
    font-size: 14px;
    color: #00ffff;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 520px) {
    #game-container {
        width: 100vw;
        height: calc(100vw * 4 / 3);
        max-height: 100vh;
        border-radius: 0;
        border-width: 2px;
    }
    
    #gameCanvas {
        width: 100%;
        height: 100%;
    }
    
    .game-title {
        font-size: 32px;
    }
    
    .control-grid {
        grid-template-columns: 1fr;
    }
}
