@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0a0a1a;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Press Start 2P', monospace;
    background:
        radial-gradient(ellipse at 50% 50%, #0d0d2b 0%, #050510 100%);
}

.game-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.game-title-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #FFD700;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.game-title-bar .dot {
    width: 6px;
    height: 6px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 8px #FFD700;
}

.game-container {
    position: relative;
    border: 3px solid #333;
    border-radius: 4px;
    box-shadow:
        0 0 30px rgba(0, 80, 200, 0.15),
        0 0 60px rgba(0, 40, 120, 0.08),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    background: #000;
}

canvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.controls-hint {
    display: flex;
    gap: 32px;
    color: #555;
    font-size: 8px;
    letter-spacing: 1px;
}

.controls-hint span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.controls-hint .key {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid #444;
    border-radius: 3px;
    color: #777;
    font-size: 7px;
    background: rgba(255,255,255,0.05);
}

/* 闪烁效果 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.blink {
    animation: pulse 1s infinite;
}

/* 扫描线覆盖效果 (CRT感) */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
    border-radius: 4px;
    z-index: 10;
}
