* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    color: #fff;
}

.game-container {
    text-align: center;
    padding: 20px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
    letter-spacing: 4px;
}

#score-board {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #4ecdc4;
    font-weight: bold;
}

#pauseBtn {
    margin-bottom: 15px;
    padding: 8px 24px;
    font-size: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

#game-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 0 0 4px #4ecdc4,
        0 0 30px rgba(78, 205, 196, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.4);
}

canvas {
    display: block;
    background: linear-gradient(180deg, #1e3a5f 0%, #1a2f4a 100%);
}

#overlay {
    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.85);
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

#overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

#start-screen p,
#game-over-screen p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #ccc;
}

#game-over-screen p:first-child {
    font-size: 2rem;
    color: #ff6b6b;
    font-weight: bold;
    margin-bottom: 10px;
}

#final-score {
    color: #4ecdc4;
    font-size: 1.5rem;
    font-weight: bold;
}

button {
    font-size: 1.2rem;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: #1a1a2e;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
    padding: 12px 40px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(78, 205, 196, 0.6);
}

button:active {
    transform: translateY(0);
}

/* 移动端控制按钮 */
#mobile-controls {
    display: none;
    margin-top: 20px;
    user-select: none;
}

.control-row {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 5px 0;
}

.mobile-btn {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
    padding: 0;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(78, 205, 196, 0.5);
}

.mobile-btn:active {
    background: rgba(78, 205, 196, 0.3);
}

/* 响应式：移动端显示虚拟按键 */
@media (max-width: 500px) {
    #mobile-controls {
        display: block;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    canvas {
        width: 320px;
        height: 320px;
    }
}

/* 网站备案号 */
#beian {
    margin-top: 30px;
    padding-top: 15px;
    font-size: 0.85rem;
    color: #cccccc;
}

#beian a {
    color: #cccccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

#beian a:hover {
    color: #4ecdc4;
}
