* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    padding: 40px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: bold;
    flex-wrap: wrap;
    gap: 10px;
}

.stat-item {
    color: #555;
}

.stat-item span {
    color: #667eea;
    font-size: 24px;
}

/* 连胜统计样式 */
.streak-item {
    color: #e74c3c;
}

.streak-item span {
    color: #e74c3c;
}

/* 难度选择样式 */
.difficulty-selector {
    margin: 20px 0;
}

.difficulty-selector h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 18px;
}

.difficulty-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.difficulty-btn {
    padding: 8px 20px;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #666;
    border-radius: 20px;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.difficulty-btn:hover {
    background: #666;
    color: white;
    transform: scale(1.05);
}

.difficulty-btn.active {
    background: #666;
    color: white;
}

/* 开始按钮样式 */
.main-start-btn, .restart-btn {
    padding: 12px 35px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 30px;
    background: #666;
    color: white;
    cursor: pointer;
    transition: transform 0.3s;
    margin-bottom: 20px;
}

.main-start-btn:hover, .restart-btn:hover {
    transform: scale(1.05);
}

.main-start-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.idiom-display {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    margin: 20px 0;
    letter-spacing: 10px;
}

.hint-char {
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

.selected-area {
    min-height: 60px;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.selected-char {
    width: 50px;
    height: 50px;
    border: 2px solid #667eea;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-top: 20px;
}

.option-btn {
    padding: 10px;
    font-size: 18px;
    font-weight: bold;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #667eea;
}

.option-btn:active:not(:disabled) {
    background: #e8e8e8;
}

.option-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 游戏核心区域初始隐藏，点击开始后显示 */
.game-core-area {
    display: none;
}

.result-screen {
    display: none;
}

.result-title {
    font-size: 32px;
    color: #333;
    margin-bottom: 20px;
}

.result-stats {
    font-size: 20px;
    color: #666;
    line-height: 2;
}

.result-stats span {
    font-weight: bold;
    color: #667eea;
}

/* 语音开关按钮样式 */
.voice-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    background: #666;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1000;
}

.voice-toggle:hover {
    transform: scale(1.05);
}
