:root {
    --neon-cyan: #00f3ff;
    --neon-magenta: #ff0055;
    --neon-gold: #ffaa00;
    --bg-dark: #050816;
}

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

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #020308;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 56.25vw; /* 16:9 Aspect Ratio */
    max-width: 1280px;
    max-height: 720px;
    background-color: var(--bg-dark);
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.15);
    overflow: hidden;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* CRT and Scanline overlays for premium pixel aesthetic */
.scanlines {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 4px, 6px 100%;
    pointer-events: none;
    z-index: 5;
}

.crt-vignette {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.7) 100%);
    pointer-events: none;
    z-index: 6;
}

/* UI Interfaces Overlay */
#ui-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10;
    color: #fff;
}

.hidden {
    display: none !important;
}

/* HUD elements */
#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.hud-box {
    background: rgba(11, 16, 38, 0.75);
    border: 1px solid var(--neon-cyan);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.hud-box .label {
    color: var(--neon-magenta);
}

/* Screens shared styles */
.screen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(5, 8, 22, 0.85);
    text-align: center;
    padding: 20px;
}

.glitch-title {
    font-size: 48px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 6px;
    text-shadow: 2px 2px var(--neon-magenta), -2px -2px var(--neon-cyan);
    margin-bottom: 5px;
    animation: pulse 2s infinite ease-in-out;
}

.alert-title {
    font-size: 36px;
    color: var(--neon-magenta);
    letter-spacing: 4px;
    text-shadow: 0 0 10px rgba(255, 0, 85, 0.5);
    margin-bottom: 5px;
}

.subtitle {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--neon-gold);
    margin-bottom: 40px;
}

.reason {
    font-size: 12px;
    color: #8892b0;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.instructions {
    font-size: 12px;
    color: #8892b0;
    margin-bottom: 30px;
    line-height: 1.6;
    letter-spacing: 1px;
}

.mobile-note {
    font-size: 10px;
    color: var(--neon-cyan);
    margin-top: 5px;
}

.stats-container {
    background: rgba(23, 16, 51, 0.6);
    border: 1px solid rgba(255, 0, 85, 0.3);
    padding: 15px 30px;
    margin-bottom: 35px;
    font-size: 14px;
    letter-spacing: 2px;
    line-height: 1.8;
}

.highlight {
    color: var(--neon-cyan);
    font-weight: bold;
}

/* Interactive Cyberpunk Buttons */
.cyber-btn {
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 12px 28px;
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 3px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 0 0 8px rgba(0, 243, 255, 0.2);
}

.cyber-btn:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--neon-cyan);
}

.cyber-btn:active {
    transform: scale(0.95);
}



/* 让 <a> 标签的样式和原先的按钮完全一致 */
a.cyber-btn {
    text-decoration: none; /* 去掉下划线 */
    display: inline-block; /* 允许设置宽高和对齐 */
    text-align: center;    /* 文字居中 */
    line-height: 1.2;      /* 调整文字行高 */
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

/* Responsive constraints adjustments */
@media (max-aspect-ratio: 16/9) {
    #game-container {
        width: 100vw;
        height: 56.25vw;
    }
}
@media (min-aspect-ratio: 16/9) {
    #game-container {
        height: 100vh;
        width: 177.78vh;
    }
}
