/* 动作游戏类扁平化设计统一标准 */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 字体系统 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* 容器设计 */
.game-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

/* 标题设计 */
.game-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #4a5568;
    text-align: center;
    margin-bottom: 30px;
}

/* 游戏信息区域 */
.game-info {
    background: #f7fafc;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.game-info p {
    margin-bottom: 10px;
    color: #4a5568;
}

.game-info strong {
    color: #2d3748;
}

/* 游戏画布区域 */
.game-canvas {
    background: #2d3748;
    border-radius: 15px;
    margin: 30px 0;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#gameCanvas {
    border-radius: 15px;
    max-width: 100%;
    height: auto;
}

/* 控制按钮区域 */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* 按钮设计 */
button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 返回按钮 */
.back-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    margin-bottom: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 游戏状态显示 */
.game-status {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.status-item {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 120px;
}

.status-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.status-label {
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .game-container {
        padding: 20px;
        margin: 0;
    }
    
    .game-container h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 100%;
        max-width: 200px;
    }
    
    .game-status {
        flex-direction: column;
    }
    
    .status-item {
        width: 100%;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 游戏提示信息 */
.game-tips {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #f6ad55;
}

.game-tips h3 {
    color: #744210;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.game-tips ul {
    list-style: none;
    padding-left: 0;
}

.game-tips li {
    color: #744210;
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
}

.game-tips li::before {
    content: '•';
    color: #f6ad55;
    position: absolute;
    left: 0;
    font-weight: bold;
}