/* 游戏整体样式 */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    background: var(--theme-color);
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: #fff;
}

/* 游戏容器 */
.game-container {
    position: relative;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* 游戏控制区域 */
.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.button-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-button {
    width: 48px;
    height: 48px;
    padding: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.icon-button svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.icon-button:hover svg {
    transform: scale(1.1);
}

.icon-button:active {
    transform: translateY(1px);
}

#startButton {
    color: #4CAF50;
}

#pauseButton {
    color: #FF9800;
}

#resetButton {
    color: #9C27B0;
}

#settingsButton {
    color: #2196F3;
}

/* 画布样式 */
#gameCanvas {
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 分数显示 */
#score {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    color: #fff;
}

/* 游戏结束弹窗 */
#gameOver {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    padding: 30px 40px;
    border-radius: 20px;
    text-align: center;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

#gameOver h2 {
    margin: 0 0 20px;
    font-size: 32px;
    color: #fff;
}

#gameOver p {
    font-size: 20px;
    margin: 10px 0;
    color: #fff;
}

.stats-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.stats-info p {
    font-size: 16px;
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.9);
}

/* 按钮样式 */
button {
    padding: 12px 24px;
    font-size: 18px;
    cursor: pointer;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

button:active {
    transform: translateY(1px);
}

/* 设置面板 */
.settings-panel {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 模态弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 300px;
    max-width: 90%;
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.settings-panel h3 {
    margin: 0 0 15px;
    font-size: 20px;
    color: #fff;
}

.settings-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.settings-group label {
    font-size: 16px;
    color: #fff;
}

.settings-group input {
    padding: 8px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    width: 80px;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .game-container {
        padding: 10px;
    }

    #gameCanvas {
        width: 90vw;
        height: 90vw;
        max-width: 400px;
        max-height: 400px;
    }

    #score {
        font-size: 24px;
    }

    .settings-panel {
        width: 90%;
    }
}