* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #2c3e50;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-rows: auto 1fr;
    gap: 20px;
    min-height: 100vh;
}

/* 顶部导航 */
.header {
    grid-column: 1 / -1;
    background: white;
    border-radius: 15px;
    padding: 20px 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #667eea;
    font-size: 28px;
    font-weight: 700;
}

.level-selector {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.level-selector label {
    font-weight: 600;
    color: #4a5568;
}

.level-selector select {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #2d3748;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.level-selector select:hover {
    border-color: #667eea;
}

.level-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.audio-controls label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    cursor: pointer;
    font-weight: normal;
}

.audio-controls input[type="checkbox"] {
    cursor: pointer;
}

.speak-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.speak-button:hover {
    background: #764ba2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.speak-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.user-stats {
    display: flex;
    gap: 15px;
}

.level-badge, .streak {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* 主内容区域 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 词汇卡片 */
.word-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.word-card:hover {
    transform: translateY(-5px);
}

.word-text {
    font-size: 48px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.phonetic {
    color: #7f8c8d;
    font-size: 20px;
    margin-bottom: 15px;
}

.meaning {
    font-size: 24px;
    color: #34495e;
    margin-bottom: 20px;
}

.word-sentence,
.word-sentence-cn {
    margin: 12px 0;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-size: 15px;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.word-sentence:hover,
.word-sentence-cn:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.word-sentence strong,
.word-sentence-cn strong {
    color: #667eea;
    margin-right: 8px;
}

.word-sentence-cn {
    border-left-color: #2ecc71;
    font-size: 14px;
}

.word-sentence-cn strong {
    color: #2ecc71;
}

.word-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tag {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.tag.core {
    background: #ff6b6b;
    color: white;
}

.tag.level {
    background: #4ecdc4;
    color: white;
}

.word-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-know {
    background: #2ecc71;
    color: white;
}

.btn-review {
    background: #f39c12;
    color: white;
}

.btn-dont-know {
    background: #e74c3c;
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* 进度条 */
.progress-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

/* 智能提示 */
.ai-tips {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

.tip-icon {
    font-size: 20px;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar > div {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sidebar h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
}

.error-words {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.error-word {
    background: #ffebee;
    color: #c62828;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
}

.test-btn {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.test-btn:hover {
    background: #764ba2;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.test-word {
    font-size: 36px;
    text-align: center;
    margin: 20px 0;
    color: #2c3e50;
}

.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.option {
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.option.correct {
    border-color: #2ecc71;
    background: #d5ffe8;
}

.option.wrong {
    border-color: #e74c3c;
    background: #ffeaea;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    .word-text {
        font-size: 36px;
    }
    
    .word-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
    }
    
    .options {
        grid-template-columns: 1fr;
    }
}