/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* 通用隐藏类 */
.hidden {
    display: none !important;
}

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

.nav-logo i {
    margin-right: 10px;
    font-size: 24px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.nav-toggle {
    display: none;
    font-size: 20px;
    cursor: pointer;
    color: #667eea;
}

/* 主要内容 */
.main-content {
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    padding: 20px;
}

.page {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
}

.page.active {
    display: block;
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.login-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.login-tabs {
    display: flex;
    margin-bottom: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-form {
    display: block;
}

.auth-form.hidden {
    display: none;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.form-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

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

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 100%;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 首页样式 */
.home-container {
    padding: 20px 0;
}

.welcome-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.welcome-header i {
    font-size: 48px;
    color: #ffc107;
    margin-bottom: 15px;
}

.welcome-header h2 {
    margin-bottom: 10px;
    color: #333;
}

.welcome-header p {
    color: #666;
    margin-bottom: 30px;
}

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

.stat-item {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-item i {
    font-size: 24px;
    opacity: 0.8;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.today-status {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

/* 练习页面样式 */
.practice-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.practice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.practice-header h2 {
    color: #333;
}

.practice-progress {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-weight: 500;
    color: #667eea;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.section-header {
    margin-bottom: 25px;
}

.section-header h3 {
    color: #333;
    margin-bottom: 8px;
}

.section-header p {
    color: #666;
}

.questions-container {
    margin-bottom: 30px;
}

.question-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.question-number {
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.audio-controls {
    display: flex;
    gap: 10px;
}

.audio-btn {
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: white;
    transition: all 0.3s ease;
    margin-right: 5px;
}

.audio-btn.play-btn {
    background: #28a745;
}

.audio-btn.play-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.audio-btn.repeat-btn {
    background: #007bff;
}

.audio-btn.repeat-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.audio-btn.stop-btn {
    background: #dc3545;
}

.audio-btn.stop-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.audio-duration {
    background: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
}

.question-text {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-item:hover {
    background: #e3f2fd;
}

.option-item input[type="radio"] {
    margin: 0;
}

/* 阅读理解样式 */
.reading-passage {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    line-height: 1.8;
    font-size: 16px;
}

.reading-questions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
}

/* 作文样式 */
.writing-topic {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.writing-topic h4 {
    color: #333;
    margin-bottom: 10px;
}

.writing-requirements {
    color: #666;
    margin-bottom: 15px;
}

.writing-hints {
    margin-top: 15px;
}

.writing-hints h5 {
    color: #333;
    margin-bottom: 10px;
}

.hints-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hint-tag {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 14px;
}

.writing-textarea {
    width: 100%;
    min-height: 200px;
    padding: 20px;
    border: 2px solid #eee;
    border-radius: 15px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
}

.writing-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.word-count {
    text-align: right;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* 拍照上传功能样式 */
.photo-upload-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 2px dashed #ddd;
}

.upload-header h4 {
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-header p {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.upload-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-1px);
}

.photo-preview {
    margin-top: 15px;
    text-align: center;
}

.photo-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.photo-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.ocr-result {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 15px;
    border: 1px solid #e0e0e0;
}

.ocr-result h5 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recognized-text {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
}

.ocr-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.section-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
    gap: 15px;
}

.section-actions .btn {
    flex: 1;
    min-width: 120px;
    max-width: 200px;
}

/* 历史记录样式 */
.history-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.page-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
}

.history-list {
    display: grid;
    gap: 20px;
}

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

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.history-info h4 {
    color: #333;
    margin-bottom: 5px;
}

.history-info p {
    color: #666;
    font-size: 14px;
}

.history-score {
    text-align: right;
}

.score-number {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
}

.score-label {
    font-size: 14px;
    color: #666;
}

/* 统计页面样式 */
.stats-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

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

.stats-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
}

.stats-card h3 {
    color: #333;
    margin-bottom: 20px;
}

.stats-value {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.stats-description {
    color: #666;
    font-size: 14px;
}

/* 加载和消息提示 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.loading-spinner i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 15px;
}

.message-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.message-toast.show {
    transform: translateX(0);
}

.message-toast.hidden {
    display: none;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon {
    font-size: 18px;
}

.toast-success .toast-icon {
    color: #28a745;
}

.toast-error .toast-icon {
    color: #dc3545;
}

.toast-warning .toast-icon {
    color: #ffc107;
}

/* 响应式设计 */
@media (max-width: 985px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .main-content {
        padding: 10px;
    }

    .login-card {
        padding: 30px 20px;
    }

    .practice-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .section-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .section-actions .btn {
        width: 100%;
        max-width: none;
    }
    
    /* 移动端提交成功和下一部分按钮右对齐 */
    .section-actions .btn-success,
    .section-actions .btn-primary {
        align-self: flex-end;
        text-align: right;
        justify-content: flex-end;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .quick-stats {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* 移动端拍照上传样式优化 */
    .upload-controls {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        justify-content: center;
    }
    
    .photo-actions,
    .ocr-actions {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        justify-content: center;
    }
    
    /* 移动端拍照上传按钮居中 */
    .upload-controls .btn {
        width: 100%;
        max-width: 200px;
        text-align: center;
        justify-content: center;
    }
    
    .photo-preview img {
        max-height: 250px;
    }
    
    .recognized-text {
        max-height: 150px;
        font-size: 14px;
    }
    
    /* 移动端拍照上传区域标题居中 */
    .photo-upload-section {
        text-align: center;
    }
    
    .upload-header {
        text-align: center;
    }
    
    .upload-header h4 {
        justify-content: center;
    }
}

/* 试题回顾页面样式 */
.review-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.review-title {
    flex: 1;
}

.review-title h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.review-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.score-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.review-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.review-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.section-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h3 {
    margin: 0;
    font-size: 18px;
}

.section-score {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
}

.review-questions {
    padding: 20px;
}

.review-question-item {
    margin-bottom: 25px;
    padding: 20px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.review-question-item.correct {
    border-color: #4CAF50;
    background: #f8fff8;
}

.review-question-item.incorrect {
    border-color: #f44336;
    background: #fff8f8;
}

.question-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.question-number-review {
    background: #3498db;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.answer-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}

.answer-status.correct {
    color: #4CAF50;
}

.answer-status.incorrect {
    color: #f44336;
}

.answer-status.pending {
    color: #ff9800;
}

.review-question-item.pending {
    border-color: #ff9800;
    background: #fff8f0;
}

.error-message {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error-message i {
    font-size: 48px;
    color: #f44336;
    margin-bottom: 15px;
    display: block;
}

.review-audio-controls {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.review-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.review-option {
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.review-option.user-answer {
    background: #fff3cd;
    border-color: #ffc107;
}

.review-option.correct-answer {
    background: #d4edda;
    border-color: #28a745;
    font-weight: bold;
}

.review-option.user-wrong {
    background: #f8d7da;
    border-color: #dc3545;
}

.review-writing {
    padding: 20px;
}

.writing-review-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.user-essay {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #3498db;
}

.essay-feedback {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.feedback-section {
    margin-bottom: 20px;
}

.feedback-section h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feedback-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.feedback-score .score {
    font-size: 24px;
    font-weight: bold;
    display: block;
}

.corrections-list {
    list-style: none;
    padding: 0;
}

.corrections-list li {
    background: #fff3cd;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

/* 美观弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.modal-overlay:not(.hidden) {
    display: flex !important;
}

.modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.modal-icon.success {
    color: #4CAF50;
}

.modal-icon.error {
    color: #f44336;
}

.modal-icon.warning {
    color: #ff9800;
}

.modal-icon.info {
    color: #2196F3;
}

.modal-text {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

.modal-footer {
    padding: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    border-top: 1px solid #e0e0e0;
}

.modal-footer .btn {
    min-width: 120px;
    height: 44px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 150px;
    border: none;
    cursor: pointer;
    outline: none;
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.modal-footer .btn-secondary {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.modal-footer .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
    background: #5a6268;
}

/* 弹窗内容样式 */
.test-evaluation {
    text-align: left;
}

.eval-item {
    margin: 10px 0;
    padding: 8px 0;
}

.eval-item strong {
    color: #2c3e50;
}

.eval-item hr {
    margin: 15px 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

.answer-explanation {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    border-left: 4px solid #ffc107;
    font-size: 14px;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.reading-passage {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    line-height: 1.6;
    border-left: 4px solid #3498db;
}

.question-item {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.essay-topic, .essay-requirements {
    margin-bottom: 15px;
    padding: 10px;
    background: #f0f8ff;
    border-radius: 6px;
}

.essay-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    min-height: 200px;
    line-height: 1.6;
    margin-top: 15px;
}

.feedback-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    line-height: 1.6;
    border-left: 4px solid #17a2b8;
}

/* 历史记录项样式优化 */
.history-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.history-info {
    flex: 1;
}

.history-info h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 18px;
}

.history-info p {
    margin: 4px 0;
    color: #666;
    font-size: 14px;
}

.history-score {
    text-align: center;
    min-width: 80px;
}

.score-number {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
}

.score-label {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.history-actions {
    min-width: 100px;
}

/* 回顾页面响应式设计 */
@media (max-width: 985px) {
    .writing-review-content {
        grid-template-columns: 1fr;
    }
    
    .review-options {
        grid-template-columns: 1fr;
    }
    
    .modal-container {
        width: 95%;
        margin: 20px;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .review-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* 音频控制增强样式 */
.audio-controls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.speed-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.speed-label {
    font-size: 14px;
    font-weight: 500;
    color: #667eea;
    white-space: nowrap;
}

.speed-selector {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.speed-selector:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.speed-selector:hover {
    border-color: #667eea;
}

/* 音频文本显示样式 */
.audio-text-display {
    margin: 15px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
    overflow: hidden;
}

.audio-text-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 500;
}

.audio-text-header i {
    margin-right: 8px;
}

.toggle-text-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.toggle-text-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.audio-text-content {
    padding: 16px;
    line-height: 1.6;
    color: #333;
    background: white;
    border-top: 1px solid #e0e0e0;
    font-size: 16px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 回顾页面音频控制样式 */
.review-audio-controls {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.review-audio-controls .audio-controls-row {
    margin-bottom: 10px;
}

.review-audio-controls .speed-controls {
    margin-top: 10px;
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

/* 响应式设计 */
@media (max-width: 985px) {
    /* 音频控制区域移动端优化 */
    .audio-controls {
        padding: 12px;
        background: #f8f9fa;
        border-radius: 8px;
        margin: 8px 0;
        border: 1px solid #e9ecef;
    }
    
    .audio-controls-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 8px;
        align-items: center;
        justify-content: flex-start;
    }
    
    .audio-btn {
        flex: 0 0 auto;
        min-width: 80px;
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 36px;
        font-weight: 500;
    }
    
    .audio-duration {
        font-size: 11px;
        color: #666;
        background: rgba(0, 0, 0, 0.05);
        padding: 2px 6px;
        border-radius: 3px;
        margin-left: 4px;
        white-space: nowrap;
    }
    
    .speed-controls {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 10px;
        background: rgba(102, 126, 234, 0.05);
        border-radius: 5px;
        border: 1px solid rgba(102, 126, 234, 0.1);
        margin-top: 6px;
        width: 100%;
    }
    
    .speed-label {
        font-size: 12px;
        font-weight: 500;
        color: #667eea;
        white-space: nowrap;
        min-width: 35px;
    }
    
    .speed-selector {
        flex: 1;
        padding: 6px 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: white;
        font-size: 12px;
        min-height: 30px;
        max-width: 80px;
    }
    
    /* 音频文本显示移动端优化 */
    .audio-text-display {
        margin: 12px 0;
        border-radius: 8px;
        overflow: hidden;
        background: #f8f9fa;
        border: 1px solid #e0e0e0;
    }
    
    .audio-text-header {
        padding: 12px 16px;
        background: linear-gradient(135deg, #667eea, #764ba2);
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .audio-text-header i {
        font-size: 16px;
        margin-right: 6px;
    }
    
    .audio-text-header span {
        font-size: 14px;
        font-weight: 500;
        flex: 1;
        min-width: 0;
    }
    
    .toggle-text-btn {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        gap: 4px;
        min-width: 80px;
        justify-content: center;
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: white;
    }
    
    .audio-text-content {
        padding: 16px;
        font-size: 16px;
        line-height: 1.6;
        background: white;
        color: #333;
        border-top: 1px solid #e0e0e0;
        text-align: left;
        white-space: pre-wrap;
        word-wrap: break-word;
    }
    
    /* 回顾页面音频控制样式 */
    .review-audio-controls {
        margin: 12px 0;
        padding: 12px;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e0e0e0;
    }
    
    .review-audio-controls .audio-controls-row {
        margin-bottom: 8px;
    }
    
    .review-audio-controls .speed-controls {
        margin-top: 8px;
        background: rgba(102, 126, 234, 0.05);
        border: 1px solid rgba(102, 126, 234, 0.1);
    }
}

/* 超小屏幕优化 (手机竖屏) */
@media (max-width: 480px) {
    .audio-controls {
        padding: 10px;
        margin: 6px 0;
    }
    
    .audio-controls-row {
        gap: 6px;
        margin-bottom: 6px;
        justify-content: flex-start;
    }
    
    .audio-btn {
        min-width: 75px;
        padding: 6px 10px;
        font-size: 11px;
        min-height: 32px;
    }
    
    .speed-controls {
        padding: 5px 8px;
        margin-top: 5px;
    }
    
    .speed-label {
        font-size: 13px;
        min-width: 30px;
    }
    
    .speed-selector {
        font-size: 11px;
        min-height: 28px;
        max-width: 70px;
        padding: 4px 6px;
    }
    
    .audio-text-header {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .audio-text-header span {
        font-size: 13px;
    }
    
    .toggle-text-btn {
        padding: 5px 8px;
        font-size: 11px;
        min-width: 70px;
        align-self: flex-end;
    }
    
    .audio-text-content {
        padding: 12px;
        font-size: 16px;
        line-height: 1.5;
    }
}

/* 音频按钮增强样式 */
.audio-btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.audio-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.audio-btn:active {
    transform: translateY(0);
}

.audio-duration {
    font-size: 12px;
    color: #666;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

/* 播放状态指示 */
.audio-btn.playing {
    background: #28a745;
    color: white;
}

.audio-btn.playing:hover {
    background: #218838;
}

/* 加载状态 */
.audio-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.audio-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错题本样式 */
.wrong-questions-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 错题本中的选项样式（与试题回顾保持一致） */
.wrong-question-section .review-options {
    margin: 15px 0;
}

.wrong-question-section .review-option {
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.wrong-question-section .review-option.correct-answer {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.wrong-question-section .review-option.user-wrong {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.wrong-question-section .review-option.user-answer.correct-answer {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.wrong-question-section .text-success {
    color: #28a745;
}

.wrong-question-section .text-danger {
    color: #dc3545;
}

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

.wrong-questions-stats .stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease;
}

.wrong-questions-stats .stat-card:hover {
    transform: translateY(-2px);
}

.wrong-questions-stats .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.wrong-questions-stats .stat-icon.listening {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.wrong-questions-stats .stat-icon.reading {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.wrong-questions-stats .stat-icon.writing {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.wrong-questions-stats .stat-content {
    flex: 1;
}

.wrong-questions-stats .stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.wrong-questions-stats .stat-label {
    color: #666;
    font-size: 14px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.wrong-questions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wrong-question-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.wrong-question-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.wrong-question-item.mastered {
    opacity: 0.7;
    background: #f8f9fa;
}

.wrong-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.wrong-question-type {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: white;
}

.wrong-question-type.listening {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.wrong-question-type.reading {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.wrong-question-type.writing {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.wrong-question-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wrong-question-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 15px;
}

.wrong-question-section {
    margin-bottom: 20px;
}

.wrong-question-section .section-header h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.question-content {
    margin-bottom: 15px;
}

.question-text {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.audio-section {
    margin: 15px 0;
}

.audio-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.audio-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.audio-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.options-section {
    margin: 15px 0;
}

.options-section h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-item {
    padding: 10px 15px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.option-item.user-answer {
    background: #fff3cd;
    border-color: #ffc107;
}

.option-item.correct-answer {
    background: #d4edda;
    border-color: #28a745;
}

.answer-comparison {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.answer-item {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
}

.answer-item.user-answer {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.answer-item.correct-answer {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.explanation-section {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.explanation-section h4 {
    margin: 0 0 10px 0;
    color: #1976d2;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wrong-question-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #666;
}

.wrong-question-practice-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

.empty-wrong-questions {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-wrong-questions i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-wrong-questions h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.empty-wrong-questions p {
    margin: 0;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 985px) {
    .wrong-questions-stats {
        grid-template-columns: 1fr;
    }
    
    .wrong-question-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wrong-question-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .filter-buttons {
        justify-content: center;
    }
}
