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

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.game-container {
    position: relative;
    max-width: 900px;
    width: 100%;
    margin: 20px;
}

/* 游戏头部 */
.game-header {
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #00ffff;
    border-radius: 15px 15px 0 0;
    padding: 20px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.title {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-item .label {
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-item .value {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.hearts {
    display: flex;
    gap: 5px;
    font-size: 1.5rem;
}

.heart {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 游戏画布 */
#gameCanvas {
    display: block;
    width: 100%;
    height: 600px;
    background: #000;
    border: 3px solid #00ffff;
    border-top: none;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.5),
        inset 0 0 50px rgba(0, 255, 255, 0.1);
}

/* 游戏覆盖层 */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.game-overlay.hidden {
    display: none;
}

.overlay-content {
    text-align: center;
    padding: 40px;
    background: rgba(20, 20, 40, 0.9);
    border: 3px solid #00ffff;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
    max-width: 500px;
}

.game-title {
    font-size: 3rem;
    color: #00ffff;
    text-shadow: 0 0 20px #00ffff;
    margin-bottom: 10px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.game-subtitle {
    font-size: 1.5rem;
    color: #ff00de;
    letter-spacing: 5px;
    margin-bottom: 30px;
    text-shadow: 0 0 10px #ff00de;
}

.instructions {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.instructions h3 {
    color: #00ffff;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.instructions p {
    color: #fff;
    margin: 10px 0;
    font-size: 1.1rem;
}

.game-over-title {
    font-size: 2.5rem;
    color: #ff0066;
    text-shadow: 0 0 20px #ff0066;
    margin-bottom: 20px;
}

.final-stats {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.final-stats p {
    color: #fff;
    font-size: 1.3rem;
    margin: 10px 0;
}

.final-stats span {
    color: #00ffff;
    font-weight: bold;
    font-size: 1.5rem;
}

/* 按钮样式 */
.game-button {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
    background: linear-gradient(135deg, #00ffff, #00cccc);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.game-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 255, 255, 0.8);
    background: linear-gradient(135deg, #00ffff, #00eeee);
}

.game-button:active {
    transform: translateY(0);
}

.game-button.secondary {
    background: linear-gradient(135deg, #666, #888);
    box-shadow: 0 5px 20px rgba(100, 100, 100, 0.5);
}

.game-button.secondary:hover {
    background: linear-gradient(135deg, #777, #999);
    box-shadow: 0 8px 30px rgba(100, 100, 100, 0.8);
}

/* 控制按钮 */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.control-btn {
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ffff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 1.5rem;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .game-subtitle {
        font-size: 1rem;
        letter-spacing: 3px;
    }
    
    #gameCanvas {
        height: 400px;
    }
    
    .game-button {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .stats {
        gap: 10px;
    }
    
    .stat-item .value {
        font-size: 1.2rem;
    }
    
    .overlay-content {
        padding: 30px;
        margin: 20px;
    }
}

/* 特效动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.game-overlay {
    animation: fadeIn 0.3s ease-in-out;
}

/* 加载动画 */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading {
    animation: rotate 1s linear infinite;
}

