/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    min-height: 100vh;
    padding: 20px;
    color: #fff;
}

.game-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 20px;
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-header h1 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 28px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.info-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.info-item span:first-child {
    color: #4fc3f7;
    margin-right: 5px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.controls button {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: #4fc3f7;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}

.controls button:hover {
    background: #29b6f6;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

/* 游戏区域 */
.game-area {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#gameCanvas {
    background: #0d1b2a;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 游戏说明 */
.instructions {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.instructions h3 {
    color: #4fc3f7;
    margin-bottom: 10px;
}

.instructions ul {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* 游戏结束界面 */
.game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.game-over.show {
    opacity: 1;
    pointer-events: all;
}

.game-over-content {
    background: #0d1b2a;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 2px solid #4fc3f7;
}

.game-over-content h2 {
    color: #4fc3f7;
    margin-bottom: 20px;
}

.game-over-content p {
    margin-bottom: 20px;
    font-size: 18px;
}

.game-over-content button {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: #4fc3f7;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-over-content button:hover {
    background: #29b6f6;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        padding: 10px;
    }
    
    .game-info {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .controls {
        flex-wrap: wrap;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
    }
    
    .game-header h1 {
        font-size: 24px;
    }
    
    .info-item {
        padding: 6px 12px;
        font-size: 14px;
    }
}