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

:root {
    --primary-color: #4CAF50;
    --secondary-color: #2E7D32;
    --accent-color: #FF9800;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #fff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Noto Sans SC', 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

h1 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 2.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.game-container {
    margin: 20px auto;
    position: relative;
}

canvas {
    background-color: var(--card-bg);
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.score-container {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    font-size: 18px;
    font-weight: bold;
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-value {
    font-size: 24px;
    color: var(--primary-color);
}

.controls {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

button {
    padding: 12px 24px;
    font-size: 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    font-weight: bold;
}

button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

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

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

.instructions {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 10px;
    text-align: left;
    box-shadow: var(--shadow);
}

.instructions h2 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

.instructions p {
    margin-bottom: 10px;
}

.game-settings {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.settings-title {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.difficulty-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.difficulty-btn {
    padding: 8px 16px;
    background-color: #eee;
    color: var(--text-color);
    border: none;
    border-radius: 20px;
}

.difficulty-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* 响应式设计 */
@media (max-width: 600px) {
    canvas {
        width: 100%;
        height: auto;
    }
    
    .controls {
        flex-wrap: wrap;
    }
    
    button {
        margin: 5px;
        flex: 1 0 40%;
    }
    
    h1 {
        font-size: 2rem;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 1s infinite;
} 