* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --accent-green: #00ff88;
    --accent-glow: rgba(0, 255, 136, 0.4);
    --accent-orange: #ff6b35;
    --text-primary: #e6edf3;
    --text-muted: #8b949e;
    --border-color: #30363d;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-dark);
    font-family: 'Noto Sans SC', 'Orbitron', sans-serif;
    color: var(--text-primary);
    overflow: hidden;
}

/* 背景网格效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.game-container {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 
        0 0 60px rgba(0, 255, 136, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.game-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--accent-green);
    text-shadow: 0 0 20px var(--accent-glow);
}

.score-board {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: 'Orbitron', sans-serif;
}

.score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-green);
}

.score-divider {
    color: var(--border-color);
    margin: 0 4px;
}

.game-wrapper {
    position: relative;
    display: inline-block;
}

#gameCanvas {
    display: block;
    background: #0a0e12;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(13, 17, 23, 0.95);
    border-radius: 8px;
    gap: 16px;
    backdrop-filter: blur(4px);
}

.overlay.hidden {
    display: none;
}

.overlay h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--accent-green);
    margin-bottom: 8px;
}

.overlay p {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    max-width: 280px;
}

.overlay .hint {
    font-size: 0.8rem;
    opacity: 0.8;
}

.final-score {
    color: var(--text-primary) !important;
    font-size: 1.1rem !important;
}

.final-score span {
    color: var(--accent-green);
    font-weight: 700;
}

.game-btn {
    margin-top: 16px;
    padding: 12px 32px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--bg-dark);
    background: var(--accent-green);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 20px var(--accent-glow);
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--accent-glow);
    background: #00ff99;
}

.game-btn:active {
    transform: translateY(0);
}

.game-footer {
    margin-top: 16px;
    text-align: center;
}

.game-footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 响应式设计 */
@media (max-width: 480px) {
    .game-container {
        padding: 16px;
    }

    #gameCanvas {
        width: 100%;
        max-width: 320px;
        height: auto;
    }

    .game-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}
