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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 2rem;
    margin: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.streak {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 导航标签 */
.nav-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.nav-tab {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s;
}

.nav-tab:hover {
    background: #e9ecef;
}

.nav-tab.active {
    color: #667eea;
    background: white;
    border-bottom: 3px solid #667eea;
}

/* 标签内容 */
.tab-content {
    display: none;
    padding: 30px;
    min-height: 500px;
}

.tab-content.active {
    display: block;
}

/* 难度选择器 */
.difficulty-selector {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.difficulty-selector label {
    font-weight: 600;
    color: #495057;
}

.difficulty-selector select {
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

/* 单词卡片 */
.word-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.word-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.word-text {
    font-size: 3rem;
    color: #667eea;
    margin: 0;
}

.btn-audio {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-audio:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.word-phonetic {
    font-size: 1.3rem;
    color: #6c757d;
    margin-bottom: 15px;
}

.word-chinese {
    font-size: 1.8rem;
    color: #495057;
    font-weight: 600;
    margin-bottom: 10px;
}

.word-pos {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.word-example {
    font-size: 1.1rem;
    color: #495057;
    font-style: italic;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 30px;
}

.word-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* 按钮样式 */
.btn-primary, .btn-success, .btn-danger, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* 进度条 */
.progress-bar {
    margin-top: 30px;
    background: #e9ecef;
    border-radius: 10px;
    height: 30px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s;
    border-radius: 10px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: #495057;
}

/* 听写模式 */
.dictation-container {
    text-align: center;
}

.dictation-container h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.hint {
    color: #6c757d;
    margin-bottom: 30px;
}

.btn-audio-large {
    padding: 20px 40px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    margin-bottom: 30px;
    transition: all 0.3s;
}

.btn-audio-large:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.dictation-input-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.dictation-input-group input {
    padding: 15px 20px;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    font-size: 1.2rem;
    width: 300px;
    text-align: center;
}

.dictation-input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.dictation-result {
    min-height: 100px;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    font-size: 1.2rem;
}

.dictation-result.correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.dictation-result.wrong {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.dictation-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: #667eea;
}

/* 复习模式 */
.review-container {
    display: grid;
    gap: 30px;
}

.review-section h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.word-list {
    display: grid;
    gap: 15px;
}

.word-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.word-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.word-item-info {
    flex: 1;
}

.word-item-word {
    font-size: 1.3rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.word-item-chinese {
    color: #6c757d;
}

.word-item-meta {
    color: #6c757d;
    font-size: 0.9rem;
}

.word-item-actions {
    display: flex;
    gap: 10px;
}

/* 统计模式 */
.stats-container h3 {
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 1rem;
}

.achievement-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
}

.achievement-section h4 {
    color: #667eea;
    margin-bottom: 20px;
}

.achievements {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.achievement {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.achievement-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.achievement-desc {
    font-size: 0.85rem;
    color: #6c757d;
}

.achievement.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        border-radius: 0;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .word-text {
        font-size: 2rem;
    }
    
    .word-actions {
        flex-direction: column;
    }
    
    .dictation-input-group {
        flex-direction: column;
        align-items: center;
    }
    
    .dictation-input-group input {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
