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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    min-height: 100vh;
    padding: 20px;
    color: #495057;
    overflow-y: auto;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1),
                0 1px 3px rgba(0, 0, 0, 0.05),
                0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    backdrop-filter: blur(10px);
}

h1 {
    text-align: center;
    background: linear-gradient(135deg, #2d3561 0%, #5a4a7f 50%, #8b6aa3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-size: 2.5em;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
    position: relative;
}

/* 考试选择控制栏 */
/* 标题栏与考试管理按钮 */
.header-with-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
}

.header-left-buttons {
    display: flex;
    gap: 10px;
}

.header-with-actions h1 {
    margin: 0;
    flex: 1;
    text-align: center;
}

.create-exam-btn-header,
.open-exam-btn-header,
.manage-exam-btn-header {
    padding: 10px 20px;
    border: 2px solid #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.create-exam-btn-header {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border-color: #e74c3c;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.create-exam-btn-header:hover {
    background: linear-gradient(135deg, #d62c1a 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

.open-exam-btn-header {
    background: white;
    color: #667eea;
}

.open-exam-btn-header:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.manage-exam-btn-header {
    background: white;
    color: #667eea;
}

.manage-exam-btn-header:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.exam-selector-bar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 20px 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06),
                0 1px 3px rgba(0, 0, 0, 0.03);
}

.exam-selector-bottom {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tag-filter-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tag-filter-section label {
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}

.tag-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tag-filter-btn {
    padding: 6px 14px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.tag-filter-btn:hover {
    background: #e8f0fe;
}

.tag-filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.no-tags-hint {
    color: #999;
    font-size: 14px;
    font-style: italic;
}

.exam-select-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.exam-select-section label {
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}

#tagFilter {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    min-width: 150px;
    max-width: 200px;
    height: 60px;
    overflow-y: auto;
}

#tagFilter:focus {
    outline: none;
    border-color: #667eea;
}

#tagFilter option {
    padding: 5px;
}

#tagFilter option:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#currentExamSelect {
    flex: 1;
    max-width: 400px;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    background: white;
    cursor: pointer;
}

#currentExamSelect:focus {
    outline: none;
    border-color: #667eea;
}

.create-exam-btn-small {
    padding: 12px 24px;
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 119, 182, 0.3);
}

.create-exam-btn-small:hover {
    background: linear-gradient(135deg, #0096c7 0%, #005f82 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 119, 182, 0.4);
}

.manage-exam-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #7209b7 0%, #560bad 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(114, 9, 183, 0.3);
}

.manage-exam-btn:hover {
    background: linear-gradient(135deg, #5f37cd 0%, #480ca8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(114, 9, 183, 0.4);
}

/* 考试管理弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal[style*="display: flex"],
.modal[style*="display:flex"] {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px;
}

/* 当模态框打开时，禁止页面滚动 */
body.modal-open {
    overflow: hidden !important;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15),
                0 1px 3px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 35px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.modal-header h2 {
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 30px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 25px 35px 30px 35px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

h2 {
    color: #333;
    margin: 20px 0 15px 0;
    font-size: 1.5em;
}

h3 {
    color: #555;
    margin: 15px 0 10px 0;
    font-size: 1.2em;
}

/* 当前考试显示 */
.current-exam-display {
    background: linear-gradient(to right, #fff5f5 0%, #ffffff 100%);
    border-left: 4px solid #ff6b6b;
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.current-exam-label {
    font-weight: 600;
    font-size: 13px;
    color: #999;
}

.current-exam-name {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    flex: 1;
    min-width: 150px;
}

.current-exam-tags-display {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.current-exam-tags-display .exam-tag {
    background: #ffe5e5;
    color: #ff6b6b;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #ffcccc;
}

/* 标签导航 */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px 15px 0 0;
    padding: 12px 12px 0 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.tab-btn {
    flex: 1;
    padding: 18px 30px;
    background: white;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tab-btn:hover {
    background: #f8f9ff;
    color: #667eea;
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    border-color: #667eea;
    box-shadow: 0 -4px 20px rgba(102, 126, 234, 0.3),
                0 4px 15px rgba(102, 126, 234, 0.25);
    transform: translateY(-4px);
}

.tab-content {
    display: none;
}

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

/* 输入表单 */
.add-word-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

input[type="text"] {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 16px;
    resize: vertical;
    margin-bottom: 10px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

button:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: scale(0.98);
}

/* 单词列表 */
.word-list-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    gap: 15px;
    flex-wrap: wrap;
}

.word-list-header h3 {
    margin: 0;
}

.quick-practice-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    white-space: nowrap;
}

.quick-practice-btn:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.5);
}

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

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

/* 多选切换按钮栏 */
.multi-select-toggle-bar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 15px;
}

/* 隐藏翻译按钮 */
.hide-translation-btn {
    padding: 10px 20px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s;
}

.hide-translation-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.hide-translation-btn.active {
    background: #27ae60;
}

.hide-translation-btn.active:hover {
    background: #229954;
}

.multi-select-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s;
}

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

.multi-select-btn.active {
    background: #e74c3c;
}

.multi-select-btn.active:hover {
    background: #c0392b;
}

/* 批量操作工具栏 */
.bulk-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #e8f0fe;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid #667eea;
}

.bulk-select-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #555;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.selected-count {
    color: #667eea;
    font-weight: bold;
    font-size: 14px;
}

.bulk-delete-btn {
    padding: 10px 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s;
}

.bulk-delete-btn:hover:not(:disabled) {
    background: #c0392b;
    transform: translateY(-2px);
}

.bulk-delete-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.word-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    border-left: 5px solid #667eea;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08),
                0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.word-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.word-checkbox {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.word-info {
    flex: 1;
}

/* 单词信息行（单词、发音、翻译在同一行） */
.word-info-row {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.word-english {
    font-weight: 600;
    color: #495057;
    font-size: 18px;
    outline: none;
    border: 2px solid transparent;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: default;
    background: transparent;
}

.word-english.editing {
    cursor: text;
}

/* 单词发音按钮 - 简洁风格 */
.word-speak-btn {
    background: transparent;
    border: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    color: #999;
    padding: 0;
}

.word-speak-btn:hover {
    color: #667eea;
    transform: scale(1.15);
}

.word-speak-btn:active {
    color: #5a67d8;
    transform: scale(0.95);
}

/* 刷新翻译按钮 */
.word-refresh-btn {
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    color: #999;
    padding: 0;
    border-radius: 50%;
    margin-right: 8px;
}

.word-refresh-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.word-refresh-btn:active {
    color: #5a67d8;
    transform: scale(0.95);
}

.word-refresh-btn:disabled {
    cursor: not-allowed;
}

/* 旋转动画 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.word-chinese {
    color: #6c757d;
    outline: none;
    border: 2px solid transparent;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: default;
    background: transparent;
}

.word-chinese.editing {
    cursor: text;
}

/* 隐藏的翻译样式 */
.word-chinese-hidden {
    padding: 4px 10px;
    border-radius: 6px;
    background: #f5f5f5;
    border: 1px dashed #ccc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.word-chinese-hidden:hover {
    background: #eee;
    border-color: #999;
}

.word-chinese-hidden .tap-to-reveal {
    color: #999;
    font-size: 13px;
}

/* hover和focus效果只在编辑模式下显示 */
.word-english.editing:focus, .word-chinese.editing:focus {
    background: white;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

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

.edit-btn {
    padding: 8px 16px;
    background: #3498db;
    font-size: 14px;
}

.edit-btn:hover {
    background: #2980b9;
}

.delete-btn {
    padding: 6px 14px;
    background: #e74c3c;
    font-size: 13px;
    white-space: nowrap;
}

.delete-btn:hover {
    background: #c0392b;
}

/* 测验区域 */
#quizArea {
    text-align: center;
}

.quiz-container {
    padding: 15px 30px;
}

.quiz-word {
    font-size: 3em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 40px;
    text-transform: lowercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.speak-btn {
    font-size: 0.5em;
    padding: 10px 15px;
    background: #3498db;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.speak-btn:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.quiz-question {
    font-size: 1.3em;
    color: #555;
    margin-bottom: 30px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

.option-btn {
    padding: 18px;
    font-size: 18px;
    background: white;
    border: 2px solid #e0e0e0;
    color: #333;
    transition: background 0.3s, border-color 0.3s;
    outline: none;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    text-align: center;
    min-height: 60px;
    height: auto;
    line-height: 1.4;
    cursor: pointer;
    display: block;
    width: 100%;
    position: relative;
    z-index: 1;
    border-radius: 12px;
    box-sizing: border-box;
}

.option-btn:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.option-btn:focus {
    outline: none;
    box-shadow: none;
}

.option-btn.correct {
    background: #27ae60;
    border-color: #27ae60;
    color: white;
}

.option-btn.wrong {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

.option-btn:disabled {
    cursor: not-allowed;
}

.next-btn {
    margin-top: 25px;
    padding: 15px 40px;
    font-size: 18px;
    background: #27ae60;
}

.next-btn:hover {
    background: #229954;
}

/* "这题我不会"按钮 */
.skip-btn {
    margin-top: 20px;
    padding: 12px 100px;
    font-size: 14px;
    background: transparent;
    border: 2px dashed #bdc3c7;
    color: #95a5a6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skip-btn:hover {
    border-color: #e67e22;
    color: #e67e22;
    background: #fef5e7;
}

/* 隐藏/显示翻译按钮 */
.toggle-translation-btn,
.toggle-sentence-translation-btn {
    padding: 6px 14px;
    font-size: 13px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-translation-btn:hover,
.toggle-sentence-translation-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* 逐句翻译头部 */
.translation-header-sentence {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.info-text {
    color: #999;
    font-size: 18px;
    padding: 20px 20px;
}

/* 统计信息 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    color: white;
}

.stat-label {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
}

.reset-btn {
    background: #95a5a6;
    margin-top: 20px;
}

.reset-btn:hover {
    background: #7f8c8d;
}

/* 考试管理 */
.create-exam-btn {
    background: #27ae60;
    margin-bottom: 20px;
}

.create-exam-btn:hover {
    background: #229954;
}

.exam-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 5px;
}

.exam-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 5px solid #667eea;
    transition: all 0.3s;
    gap: 15px;
}

.exam-item.active {
    background: #e8f0fe;
    border-left-color: #27ae60;
}

.exam-info {
    flex: 1;
    min-width: 0;
}

.exam-name {
    font-size: 1.05em;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    word-break: break-word;
}

.exam-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 6px 0;
}

.exam-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 500;
}

.exam-stats {
    color: #666;
    font-size: 0.85em;
    margin-top: 4px;
}

.exam-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.select-btn {
    background: #667eea;
    padding: 6px 14px;
    font-size: 13px;
    white-space: nowrap;
}

.select-btn:hover {
    background: #5568d3;
}

.tag-btn {
    background: #9b59b6;
    padding: 6px 14px;
    font-size: 13px;
    white-space: nowrap;
}

.tag-btn:hover {
    background: #8e44ad;
}

.rename-btn {
    background: #f39c12;
    padding: 6px 14px;
    font-size: 13px;
    white-space: nowrap;
}

.rename-btn:hover {
    background: #e67e22;
}

.export-btn {
    background: #27ae60;
    padding: 6px 14px;
    font-size: 13px;
    white-space: nowrap;
}

.export-btn:hover {
    background: #229954;
}

/* 当前考试信息 */
.current-exam-info {
    background: #e8f0fe;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* 练习界面 */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.exam-title {
    font-size: 1.2em;
    color: #667eea;
    font-weight: bold;
}

.progress-info {
    font-size: 1.1em;
    color: #666;
}

.start-quiz-btn {
    padding: 15px 40px;
    font-size: 20px;
    background: #27ae60;
    margin-top: 10px;
}

.start-quiz-btn:hover {
    background: #229954;
}

/* 考试完成页面 */
.exam-complete {
    text-align: center;
}

.exam-complete h2 {
    color: #27ae60;
    margin-bottom: 10px;
}

.exam-name {
    font-size: 1.5em;
    color: #667eea;
    margin-bottom: 10px;
}

.group-info {
    font-size: 1em;
    color: #666;
    margin-bottom: 25px;
}

.result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.result-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.result-label {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.result-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
}

.correct-color {
    color: #27ae60;
}

.wrong-color {
    color: #e74c3c;
}

.wrong-words-section {
    margin: 30px 0;
    text-align: left;
}

.wrong-words-section h3 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.wrong-words-list {
    background: #fff5f5;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.wrong-word-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ffe0e0;
}

.wrong-word-item:last-child {
    border-bottom: none;
}

.word-en {
    font-weight: bold;
    color: #333;
}

.word-cn {
    color: #666;
}

.congrats {
    color: #27ae60;
    font-size: 1.5em;
    margin: 30px 0;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.action-buttons button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

/* 重新测试本组 - 蓝色 */
.action-buttons button:nth-child(1) {
    background: #3498db;
    color: white;
}

.action-buttons button:nth-child(1):hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* 下一组 - 绿色 */
.action-buttons button:nth-child(2) {
    background: #27ae60;
    color: white;
}

.action-buttons button:nth-child(2):hover {
    background: #219a52;
    transform: translateY(-2px);
}

/* 全部单词测试 - 橙色 */
.action-buttons button:nth-child(3) {
    background: #e67e22;
    color: white;
}

.action-buttons button:nth-child(3):hover {
    background: #d35400;
    transform: translateY(-2px);
}

/* 返回 - 灰色 */
.action-buttons button:nth-child(4) {
    background: #95a5a6;
    color: white;
}

.action-buttons button:nth-child(4):hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* 统计页面 */
.stats-header {
    margin-bottom: 20px;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    color: white;
}

.wrong-words-stats {
    margin: 30px 0;
}

.wrong-words-stats h3 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.wrong-words-table {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.wrong-word-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.wrong-word-row:last-child {
    border-bottom: none;
}

.error-count {
    background: #e74c3c;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
}

.exam-history {
    margin: 30px 0;
}

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

.record-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.record-date {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.record-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 10px 0;
    font-size: 0.95em;
}

.record-wrong-words {
    margin-top: 10px;
    padding: 10px;
    background: #fff5f5;
    border-radius: 5px;
    font-size: 0.9em;
    color: #e74c3c;
}

.record-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
}

.retry-wrong-btn-small {
    padding: 6px 12px;
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
    transition: all 0.3s ease;
}

.retry-wrong-btn-small:hover {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.retry-wrong-btn-small:active {
    transform: translateY(0);
}

.delete-record-btn {
    background: #95a5a6;
    padding: 6px 12px;
    font-size: 12px;
}

.delete-record-btn:hover {
    background: #7f8c8d;
}

/* 导入方式选择器 */
.import-method-selector {
    margin-bottom: 20px;
}

/* 分段控制器样式 (iOS风格) */
.segment-control {
    display: inline-flex;
    background: #e8e8e8;
    border-radius: 8px;
    padding: 3px;
}

.segment-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.segment-btn:hover:not(.active) {
    color: #333;
    background: rgba(255, 255, 255, 0.5);
}

/* 选中状态 - 蓝色 */
.segment-btn.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

/* 导入面板 */
.import-panel {
    display: none;
}

.import-panel.active {
    display: block;
}

/* 手动输入容器 */
.manual-input-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px;
}

.manual-input-section {
    margin-bottom: 16px;
}

.manual-input-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.section-hint {
    font-weight: 400;
    color: #999;
    font-size: 12px;
}

/* 单行添加表单 */
.inline-add-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-add-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

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

.inline-add-form .translate-btn-small {
    padding: 10px 16px;
    background: #f0f0f0;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.inline-add-form .translate-btn-small:hover {
    background: #e8e8e8;
    border-color: #ccc;
    color: #333;
}

.inline-add-form .add-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.inline-add-form .add-btn:hover {
    background: #5568d3;
}

/* 批量导入 */
.manual-input-section textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.manual-input-section textarea:focus {
    outline: none;
    border-color: #667eea;
}

.bulk-import-btn {
    margin-top: 10px;
    padding: 10px 20px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.bulk-import-btn:hover {
    background: #229954;
}

/* 文章导入功能 */
.article-import-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

/* 文章翻译显示区域 */
.article-translation {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    border: 2px solid #27ae60;
}

.translation-result {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

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

.translation-result h4 {
    color: #27ae60;
    margin: 0;
    font-size: 1.3em;
}

.save-article-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 119, 182, 0.2);
}

.save-article-btn:hover {
    background: linear-gradient(135deg, #0096c7 0%, #005f82 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}

.clear-article-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

.clear-article-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* 保存状态提示 */
.save-status {
    color: #27ae60;
    font-size: 13px;
    padding: 4px 10px;
    background: #e8f8f0;
    border-radius: 4px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.save-translation-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 119, 182, 0.2);
}

.save-translation-btn:hover {
    background: linear-gradient(135deg, #0096c7 0%, #005f82 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}

.clear-translation-btn {
    padding: 8px 16px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.clear-translation-btn:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(127, 140, 141, 0.3);
}

.original-text {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.original-text strong {
    color: #667eea;
    display: block;
    margin-bottom: 10px;
}

.translated-text {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
}

.translated-text strong {
    color: #27ae60;
    display: block;
    margin-bottom: 10px;
}

.saved-time {
    font-size: 0.9em;
    color: #999;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: rgba(0, 180, 216, 0.1);
    border-radius: 6px;
    border-left: 3px solid #00b4d8;
}

.translate-btn {
    background: #3498db;
    flex: 1;
}

.translate-btn:hover {
    background: #2980b9;
}

/* 难度选择区域 */
.difficulty-selector-section {
    background: #f0f4ff;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 2px solid #667eea;
}

.difficulty-buttons {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.difficulty-btn {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    background: white;
    color: #667eea;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.difficulty-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.difficulty-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.difficulty-btn.active:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6b46c1 100%);
}

.difficulty-label {
    font-size: 16px;
    font-weight: 600;
}

.difficulty-count {
    font-size: 14px;
    font-weight: 500;
    padding: 2px 8px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    color: #667eea;
}

/* 多选开关按钮 */
.multi-select-toggle {
    padding: 6px 12px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 6px;
    color: #667eea;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.multi-select-toggle:hover {
    background: #f8f9ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.multi-select-toggle.active {
    background: #667eea;
    color: white;
}

.multi-select-toggle .toggle-icon {
    font-size: 16px;
    font-weight: bold;
}

.difficulty-btn.active .difficulty-label,
.difficulty-btn.active .difficulty-count {
    color: white;
}

.difficulty-btn.active .difficulty-count {
    background: rgba(255, 255, 255, 0.25);
}

.export-pdf-btn,
.export-excel-btn,
.export-quiz-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.export-pdf-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-color: #e74c3c;
}

.export-pdf-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.3);
}

.export-excel-btn {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border-color: #27ae60;
}

.export-excel-btn:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.3);
}

.export-quiz-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border-color: #f39c12;
}

.export-quiz-btn:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.3);
}

.difficulty-selector {
    margin-bottom: 15px;
}

.difficulty-selector label {
    font-weight: bold;
    color: #555;
    margin-right: 10px;
}

.difficulty-selector select {
    padding: 8px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    background: white;
}

.difficulty-selector select option {
    background: #f5f5f5;
    color: #333;
    padding: 8px;
}

.difficulty-selector select option:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.difficulty-selector select:focus {
    outline: none;
    border-color: #667eea;
}

.article-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.preview-btn {
    background: #3498db;
    flex: 1;
}

.preview-btn:hover {
    background: #2980b9;
}

.import-btn {
    background: #27ae60;
    flex: 2;
}

.import-btn:hover {
    background: #229954;
}

.import-btn:active {
    background: #27ae60;
}

.import-btn:focus {
    background: #27ae60;
    outline: none;
}

.word-preview {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
    border: 2px solid #667eea;
}

.preview-header {
    margin-bottom: 15px;
}

.preview-header h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.preview-header p {
    color: #666;
    margin: 5px 0;
}

.preview-words {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    line-height: 1.8;
    color: #333;
}

/* 预览单词网格布局 */
.preview-words-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.preview-word-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    transition: all 0.3s;
}

.preview-word-item:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.preview-delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.preview-delete-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

/* 预览选择控制 */
.preview-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
}

.preview-select-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 15px 0;
    border: 2px solid #e0e0e0;
}

.select-control-btn {
    padding: 8px 20px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.select-control-btn:hover {
    background: #e8f0fe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.select-control-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.select-control-btn.selected:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
}

.mode-hint {
    color: #666;
    font-size: 14px;
    font-style: italic;
    margin-left: auto;
}

/* 点击选中模式样式 */
.preview-word-item.tap-select {
    cursor: pointer;
    user-select: none;
    padding: 6px 12px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.preview-word-item.tap-select:not(.selected):not(.imported) {
    background: #f0f0f0;
    color: #666;
    border-color: #ddd;
}

.preview-word-item.tap-select:not(.selected):not(.imported):hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.preview-word-item.tap-select.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.preview-word-item.tap-select.selected:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
}

.preview-word-item.tap-select .word-text {
    pointer-events: none;
}

/* 旧的选择模式样式(保留兼容) */
.preview-word-item.selectable {
    cursor: pointer;
    user-select: none;
    padding-right: 12px;
}

.preview-word-item.selectable input[type="checkbox"] {
    margin-right: 6px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.preview-word-item.selectable:has(input:checked) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.preview-word-item.selectable:has(input:not(:checked)) {
    background: #f0f0f0;
    color: #999;
    border-color: #ccc;
}

/* 可编辑单词样式 */
.word-text, .phrase-text {
    outline: none;
    border: 2px solid transparent;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 已导入单词样式 */
.preview-word-item.imported {
    opacity: 0.5;
    background: #e8e8e8 !important;
    border-color: #ccc !important;
    color: #999 !important;
    cursor: not-allowed;
}

.preview-word-item.imported input[type="checkbox"] {
    cursor: not-allowed;
}

.preview-word-item.imported:hover {
    background: #e8e8e8 !important;
    border-color: #ccc !important;
}

.imported-label {
    color: #999;
    font-size: 11px;
    margin-left: 5px;
    font-style: italic;
}

.preview-word-item.imported .word-text {
    cursor: not-allowed;
}

.word-text:focus, .phrase-text:focus {
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
    cursor: text;
    white-space: normal;
    overflow: visible;
}

#selectedWordCount {
    color: #667eea;
    font-weight: bold;
    font-size: 14px;
    margin-left: 10px;
}

.preview-note {
    color: #999;
    font-size: 0.9em;
    margin-top: 10px;
    text-align: center;
}

.import-progress {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

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

.progress-text {
    text-align: center;
    color: #666;
    font-weight: bold;
}

/* 创建考试表单样式 */
.create-exam-form {
    padding: 10px 0;
}

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

.form-group label {
    display: block;
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
    font-size: 15px;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.3s;
}

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

.form-hint {
    margin-top: 5px;
    font-size: 13px;
    color: #999;
}

.existing-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 40px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.tag-checkbox {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}

.tag-checkbox:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.tag-check-input {
    display: none;
}

.tag-check-input:checked + .tag-check-label {
    color: white;
}

.tag-checkbox:has(.tag-check-input:checked) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.tag-check-label {
    font-size: 14px;
    color: #667eea;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.btn-primary {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

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

.btn-secondary {
    padding: 12px 30px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Toast通知样式 */
.toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.toast-error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.toast-info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 移动端整体优化 */
    body {
        padding: 5px;
        font-size: 14px;
    }

    .container {
        padding: 8px;
        border-radius: 10px;
    }

    h1 {
        font-size: 1.4em;
        margin-bottom: 10px;
    }

    h2 {
        font-size: 1.15em;
        margin: 10px 0 8px 0;
    }

    h3 {
        font-size: 1em;
        margin: 8px 0 6px 0;
    }

    /* 标题栏响应式 - 标题单独一行，按钮在下一行 */
    .header-with-actions {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 10px;
    }

    .header-with-actions h1 {
        font-size: 1.3em;
        width: 100%;
        text-align: center;
        margin: 0;
    }

    .header-left-buttons {
        width: 100%;
        display: flex;
        flex-direction: row;
        gap: 6px;
    }

    .header-left-buttons button {
        flex: 1;
        min-width: 0;
        padding: 8px 6px;
        font-size: 12px;
        white-space: nowrap;
    }

    .manage-exam-btn-header {
        flex: 1;
        min-width: 0;
        padding: 8px 6px;
        font-size: 12px;
        white-space: nowrap;
    }

    .create-exam-btn-header,
    .open-exam-btn-header,
    .manage-exam-btn-header {
        width: 100%;
        padding: 10px 15px;
        font-size: 14px;
    }

    /* 考试选择栏响应式 */
    .exam-selector-bar {
        flex-direction: column;
        gap: 8px;
        padding: 8px 10px;
    }

    .exam-selector-bottom {
        width: 100%;
    }

    .tag-filter-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .tag-filter-section label {
        font-size: 13px;
    }

    .tag-filter-buttons {
        gap: 6px;
    }

    .tag-filter-btn {
        padding: 5px 12px;
        font-size: 12px;
    }

    .exam-select-section {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .exam-select-section label {
        font-size: 13px;
    }

    #currentExamSelect {
        max-width: 100%;
        width: 100%;
        padding: 8px 12px;
        font-size: 14px;
    }

    .create-exam-btn-small,
    .manage-exam-btn {
        flex: 1;
        padding: 10px 16px;
        font-size: 13px;
    }

    /* 当前考试显示 */
    .current-exam-display {
        padding: 8px 15px;
        margin-bottom: 12px;
        gap: 6px;
    }

    .current-exam-label {
        font-size: 12px;
    }

    .current-exam-name {
        font-size: 14px;
        min-width: auto;
    }

    .current-exam-tags-display .exam-tag {
        font-size: 11px;
        padding: 2px 8px;
    }

    /* 用户信息栏 - 保持同一行 */
    .user-bar {
        padding: 8px 12px;
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }

    .user-info {
        font-size: 12px;
        flex: 1;
        min-width: 0;
    }

    .user-actions {
        flex-shrink: 0;
    }

    .user-btn {
        padding: 5px 10px;
        font-size: 11px;
        white-space: nowrap;
    }

    /* 标签导航 */
    .tabs {
        padding: 5px 5px 0 5px;
        gap: 4px;
        margin-bottom: 12px;
    }

    .tab-btn {
        padding: 10px 12px;
        font-size: 14px;
        font-weight: 600;
    }

    /* 输入表单 - 保持水平布局 */
    .add-word-form {
        flex-direction: row;
        gap: 6px;
        flex-wrap: wrap;
    }

    .add-word-form input[type="text"] {
        flex: 1;
        min-width: 120px;
        padding: 10px 12px;
        font-size: 14px;
    }

    .add-word-form button {
        flex-shrink: 0;
        padding: 10px 16px;
        font-size: 13px;
        white-space: nowrap;
    }

    input[type="text"],
    textarea {
        padding: 10px 12px;
        font-size: 14px;
    }

    button {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* 单词列表 */
    .word-item {
        padding: 8px 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .word-info {
        width: 100%;
    }

    .word-english {
        font-size: 14px;
        padding: 4px 8px;
        min-width: 80px;
    }

    .word-chinese {
        font-size: 13px;
        padding: 4px 8px;
        margin-top: 4px;
    }

    .word-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .edit-btn,
    .refresh-btn,
    .delete-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    /* 测验区域 */
    .quiz-container {
        padding: 10px;
    }

    .quiz-word {
        font-size: 1.6em;
        margin-bottom: 15px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .speak-btn {
        width: 40px;
        height: 40px;
        font-size: 0.4em;
    }

    .quiz-question {
        font-size: 1.05em;
        margin-bottom: 12px;
    }

    .options {
        max-width: 100%;
        gap: 6px;
    }

    .option-btn {
        font-size: 13px;
        padding: 10px;
    }

    .next-btn {
        padding: 10px 24px;
        font-size: 14px;
    }

    .skip-btn {
        margin-top: 12px;
        padding: 8px 20px;
        font-size: 12px;
    }

    .info-text {
        font-size: 13px;
        padding: 20px 10px;
    }

    /* 统计信息 */
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin: 12px 0;
    }

    .stat-item {
        padding: 12px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-value {
        font-size: 1.3em;
    }

    /* 考试管理 */
    .modal {
        padding: 10px 5px;
    }

    .modal-content {
        width: 96%;
        max-height: 88vh;
    }

    .modal-header {
        padding: 10px 12px;
    }

    .modal-header h2 {
        font-size: 1.1em;
    }

    .modal-body {
        padding: 10px 12px;
    }

    .exam-list {
        max-height: 55vh;
    }

    .exam-item {
        padding: 8px;
        flex-direction: column;
        align-items: flex-start;
    }

    .exam-name {
        font-size: 0.9em;
    }

    .exam-stats {
        font-size: 0.75em;
    }

    .exam-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 6px;
    }

    .select-btn,
    .tag-btn,
    .rename-btn,
    .delete-btn {
        flex: 1;
        min-width: 60px;
        padding: 5px 8px;
        font-size: 11px;
    }

    /* 练习界面 */
    .quiz-header {
        flex-direction: column;
        gap: 6px;
        margin-bottom: 12px;
    }

    .exam-title {
        font-size: 0.95em;
    }

    .progress-info {
        font-size: 0.9em;
    }

    .start-quiz-btn {
        padding: 10px 24px;
        font-size: 14px;
    }

    /* 考试完成页面 */
    .exam-complete h2 {
        font-size: 1.2em;
    }

    .exam-name {
        font-size: 1.1em;
        margin-bottom: 12px;
    }

    .result-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin: 12px 0;
    }

    .result-item {
        padding: 10px;
    }

    .result-label {
        font-size: 0.75em;
    }

    .result-value {
        font-size: 1.5em;
    }

    .wrong-words-section {
        margin: 12px 0;
    }

    .wrong-words-list {
        padding: 10px;
    }

    .wrong-word-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 6px 0;
    }

    .action-buttons {
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }

    .action-buttons button {
        width: 100%;
        padding: 10px;
    }

    /* 统计页面 */
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .stat-card {
        padding: 12px;
    }

    .wrong-words-table {
        padding: 8px;
    }

    .wrong-word-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 8px;
    }

    .records-list {
        gap: 8px;
    }

    .record-item {
        padding: 10px;
    }

    .record-stats {
        flex-direction: column;
        gap: 4px;
        font-size: 0.8em;
    }

    .record-actions {
        flex-direction: row;
        gap: 6px;
        width: 100%;
    }

    .retry-wrong-btn-small,
    .delete-record-btn {
        flex: 1;
        padding: 6px 8px;
    }

    /* 分段控制器移动端 */
    .segment-control {
        display: flex;
        width: 100%;
    }

    .segment-btn {
        flex: 1;
        padding: 8px 12px;
        font-size: 13px;
    }

    /* 手动输入移动端 */
    .manual-input-container {
        padding: 12px;
    }

    .inline-add-form {
        flex-direction: column;
    }

    .inline-add-form input {
        width: 100%;
    }

    .inline-add-form .translate-btn-small,
    .inline-add-form .add-btn {
        width: 100%;
    }

    .section-title {
        font-size: 13px;
    }

    /* 文章导入功能 */
    .article-import-section {
        padding: 10px;
    }

    .article-actions {
        flex-direction: column;
        gap: 6px;
    }

    .translate-btn,
    .preview-btn,
    .import-btn {
        width: 100%;
        padding: 8px;
    }

    /* 难度选择区域 */
    .difficulty-selector-section {
        padding: 8px;
        margin: 8px 0;
    }

    .difficulty-buttons {
        flex-direction: row;
        gap: 4px;
    }

    .difficulty-btn {
        min-width: 0;
        flex: 1;
        padding: 6px 4px;
    }

    .difficulty-label {
        font-size: 11px;
    }

    .difficulty-count {
        font-size: 9px;
        padding: 2px 4px;
    }

    /* 预览单词 */
    .word-preview {
        padding: 6px;
        margin: 8px 0;
    }

    .preview-words-grid {
        gap: 4px;
        padding: 6px;
    }

    .preview-word-item {
        font-size: 11px;
        padding: 4px 6px;
    }

    .preview-header-row {
        padding: 6px 8px;
        gap: 8px;
        margin-bottom: 8px;
    }

    .preview-header-row p {
        font-size: 11px !important;
    }

    .preview-header-buttons {
        gap: 6px;
    }

    .add-word-btn-preview {
        padding: 6px 10px;
        font-size: 12px;
    }

    .preview-select-controls {
        padding: 8px;
        gap: 6px;
        flex-wrap: wrap;
    }

    .select-control-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .mode-hint {
        font-size: 11px;
        width: 100%;
        text-align: center;
        margin-left: 0;
    }

    /* 导出按钮 */
    #wordExportContainer {
        padding: 12px;
        margin-top: 15px;
    }

    #wordExportContainer h4 {
        font-size: 1em;
        margin-bottom: 8px;
    }

    #wordExportContainer > div {
        flex-direction: column;
    }

    .export-pdf-btn,
    .export-excel-btn,
    .export-quiz-btn {
        width: 100%;
        padding: 10px 18px;
        font-size: 14px;
    }

    /* 创建考试表单 */
    .form-group label {
        font-size: 13px;
    }

    .form-input {
        padding: 10px;
        font-size: 14px;
    }

    .form-hint {
        font-size: 12px;
    }

    .existing-tags {
        padding: 8px;
        gap: 8px;
    }

    .tag-checkbox {
        padding: 6px 12px;
        font-size: 13px;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Toast通知 */
    .toast-notification {
        width: 90%;
        max-width: 320px;
        padding: 12px 20px;
        font-size: 14px;
    }

    /* 文章翻译区域 */
    .article-translation {
        padding: 10px;
    }

    .translation-header {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }

    .translation-result h4 {
        font-size: 1em;
    }

    .translation-actions {
        width: 100%;
    }

    .save-article-btn,
    .clear-article-btn {
        width: auto;
        padding: 6px 10px;
        font-size: 11px;
        white-space: nowrap;
    }

    .save-translation-btn,
    .clear-translation-btn {
        width: 100%;
        padding: 8px;
        font-size: 12px;
    }

    .original-text,
    .translated-text {
        padding: 6px;
        font-size: 12px;
    }

    /* 进度条 */
    .import-progress {
        padding: 10px;
    }

    .progress-bar-container {
        height: 22px;
    }

    .progress-text {
        font-size: 12px;
    }

    /* 考试头部控制栏 - 移动端 */
    .quiz-header-controls {
        gap: 6px;
        width: 100%;
    }

    .hide-word-toggle-inline {
        padding: 5px 10px;
    }

    .toggle-text {
        font-size: 10px;
    }

    .toggle-switch {
        width: 40px;
        height: 22px;
    }

    .toggle-slider:before {
        height: 14px;
        width: 14px;
    }

    .toggle-switch input:checked + .toggle-slider:before {
        transform: translateX(18px);
    }
}

/* 练习设置样式 */
.quiz-settings {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 12px;
    margin: 10px 0;
    border: 2px solid #e3e8ef;
}

.quiz-settings h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.setting-item {
    margin-bottom: 10px;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
}

.setting-label select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.setting-label select:hover {
    border-color: #667eea;
}

.toggle-label {
    font-weight: 500;
}

/* 设置项同一行布局 */
.setting-row-inline {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.setting-row-inline .toggle-label {
    white-space: nowrap;
    min-width: 80px;
}

/* 倒计时设置组 */
.countdown-setting-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.countdown-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.countdown-input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s;
}

.countdown-input:hover:not(:disabled) {
    border-color: #667eea;
}

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

.countdown-input:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.input-unit {
    font-size: 14px;
    color: #666;
}

/* 跳题方式拨动开关 */
.jump-mode-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.jump-mode-label {
    font-size: 13px;
    color: #999;
    font-weight: 500;
    transition: color 0.3s;
}

.jump-mode-label.active {
    color: #667eea;
    font-weight: 600;
}

/* 每组单词数选择器 */
.words-per-group-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.words-per-group-btn {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
}

.words-per-group-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.words-per-group-btn:focus {
    outline: none;
}

.words-per-group-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

/* 分组选择器 */
.group-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
}

.group-btn {
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
    white-space: nowrap;
}

.group-btn:hover {
    border-color: #27ae60;
    color: #27ae60;
}

.group-btn:focus {
    outline: none;
}

.group-btn.active {
    background: #27ae60;
    border-color: #27ae60;
    color: white;
}

/* 拨动开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #667eea;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 1px #667eea;
}

/* 考试头部控制栏 */
.quiz-header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* 停止练习按钮 */
.stop-quiz-btn {
    background: #f8f9fa;
    color: #e74c3c;
    border: 2px solid #e74c3c;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
}

.stop-quiz-btn:hover {
    background: #e74c3c;
    color: white;
}

.stop-quiz-btn:focus {
    outline: none;
}

/* 内联隐藏单词切换 */
.hide-word-toggle-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 25px;
    border: 2px solid #e3e8ef;
}

.toggle-text {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

/* 倒计时显示 */
.countdown-display {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

/* 隐藏单词样式 */
.hidden-word {
    font-size: 2em;
    color: #999;
    letter-spacing: 8px;
}

/* 错词训练按钮 */
.retry-wrong-btn {
    margin-top: 20px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    transition: all 0.3s ease;
}

.retry-wrong-btn:hover {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.5);
}

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

/* 逐句翻译模式样式 */
.sentence-mode-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin: 15px 0;
    border: 2px solid #667eea;
}

.sentence-mode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8f0fe;
}

.sentence-progress {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 15px;
    color: #666;
}

.exit-sentence-btn {
    padding: 8px 18px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.exit-sentence-btn:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

.current-sentence-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.sentence-label {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 12px;
    font-size: 15px;
}

.sentence-text {
    font-size: 17px;
    color: #333;
    line-height: 1.6;
}

.sentence-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.translate-sentence-btn {
    flex: 2;
    padding: 12px 24px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.translate-sentence-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.nav-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-btn:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.current-translation {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 4px solid #27ae60;
}

.translation-result-sentence {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.translation-label {
    font-weight: bold;
    color: #27ae60;
    font-size: 15px;
}

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

.sentence-difficulty-selector {
    background: #f0f4ff;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    border: 2px solid #667eea;
}

.sentence-word-preview {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    border: 2px solid #667eea;
}

.sentence-mode-btn {
    flex: 1;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.sentence-mode-btn:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

/* 逐句模式响应式 */
@media (max-width: 768px) {
    .sentence-mode-container {
        padding: 8px;
    }

    .sentence-mode-header {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }

    .sentence-progress {
        width: 100%;
        justify-content: space-between;
    }

    .current-sentence-box {
        padding: 8px;
    }

    .sentence-text {
        font-size: 14px;
    }

    .sentence-actions {
        flex-direction: column;
        gap: 6px;
    }

    .translate-sentence-btn,
    .nav-btn {
        width: 100%;
        padding: 8px;
    }

    .sentence-difficulty-selector,
    .sentence-word-preview {
        padding: 8px;
        margin: 6px 0;
    }

    /* 移动端：单词选择标题和按钮换行显示 */
    .sentence-word-preview > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }

    .sentence-word-preview h5 {
        font-size: 13px;
    }

    .sentence-word-preview .select-control-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* ========== 管理考试按钮 ========== */
.toggle-manage-btn {
    padding: 6px 14px;
    background: #667eea;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s;
    margin-left: auto;
    margin-right: 15px;
}

.toggle-manage-btn:hover {
    background: #5568d3;
    color: white;
}

.toggle-manage-btn.active {
    background: #e74c3c;
    color: white;
}

.toggle-manage-btn.active:hover {
    background: #c0392b;
}

/* ========== 紧凑型考试列表项 ========== */
.exam-item-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.exam-item-compact:hover {
    background: #eef1f5;
}

.exam-item-compact.active {
    background: #e8f0fe;
    border-left-color: #27ae60;
}

.exam-info-compact {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    cursor: pointer;
    min-width: 0;
}

.exam-name-compact {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.shared-badge-small {
    background: #28a745;
    color: white;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.exam-tags-small {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.exam-tag-small {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 11px;
}

.exam-word-count {
    color: #888;
    font-size: 12px;
}

.select-btn-compact {
    padding: 4px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    transition: background 0.2s;
}

.select-btn-compact:hover {
    background: #5568d3;
}

/* ========== 管理模式按钮 ========== */
.exam-manage-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.exam-action-btn {
    padding: 3px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    color: white;
    transition: opacity 0.2s;
}

.exam-action-btn:hover {
    opacity: 0.85;
}

.exam-action-btn.export {
    background: #17a2b8;
}

.exam-action-btn.tag {
    background: #9b59b6;
}

.exam-action-btn.rename {
    background: #f39c12;
}

.exam-action-btn.delete {
    background: #e74c3c;
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
    .toggle-manage-btn {
        padding: 4px 10px;
        font-size: 12px;
        margin-right: 10px;
    }

    .exam-item-compact {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .exam-info-compact {
        flex-wrap: wrap;
    }

    .exam-manage-buttons {
        justify-content: flex-end;
    }

    .select-btn-compact,
    .current-btn-compact {
        width: 100%;
        text-align: center;
    }
}

/* "当前"按钮样式 - 红色 */
.current-btn-compact {
    padding: 4px 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: default;
    font-size: 12px;
    white-space: nowrap;
}

/* 无法修改提示 */
.no-edit-hint {
    color: #999;
    font-size: 11px;
    font-style: italic;
    white-space: nowrap;
}

/* "当前"按钮悬停时保持红色 */
.current-btn-compact:hover {
    background: #e74c3c !important;
    color: white !important;
}

/* ========== 简洁统计样式 ========== */
.stats-summary-simple {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.stat-item-simple {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.stat-value-simple {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.stat-value-simple.highlight {
    color: #667eea;
}

.stat-value-simple.red {
    color: #e74c3c;
}

.stat-value-simple.orange {
    color: #f39c12;
}

.stat-value-simple.green {
    color: #27ae60;
}

.stat-hint {
    font-size: 13px;
    margin-left: 5px;
}

.stat-hint.red {
    color: #e74c3c;
}

.stat-hint.orange {
    color: #f39c12;
}

.stat-hint.green {
    color: #27ae60;
}

@media (max-width: 768px) {
    .stats-summary-simple {
        gap: 8px;
    }

    .stat-label-simple {
        font-size: 13px;
    }

    .stat-value-simple {
        font-size: 14px;
    }

    .stat-hint {
        font-size: 12px;
    }
}

/* ========== 统计图表 ========== */
.stats-chart-container {
    width: 100%;
    margin: 10px 0 20px 0;
    background: #fafafa;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stats-chart-container canvas {
    display: block;
    width: 100%;
}

/* 图表切换按钮容器 */
.chart-toggle-container {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 15px 0 5px 0;
}

.chart-toggle-btn {
    padding: 8px 20px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.chart-toggle-btn:first-child {
    border-radius: 6px 0 0 6px;
    border-right: none;
}

.chart-toggle-btn:last-child {
    border-radius: 0 6px 6px 0;
}

.chart-toggle-btn:hover {
    background: #e8e8e8;
}

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

.chart-toggle-btn.active:hover {
    background: #5a6fd6;
}

/* 统计同行显示样式 */
.stat-row-inline {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    flex-wrap: wrap;
}

.stat-separator {
    color: #ccc;
    margin: 0 10px;
}

/* 自定义编辑弹窗样式 */
.edit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.edit-modal {
    background: white;
    border-radius: 12px;
    padding: 20px;
    width: 280px;
    max-width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: editModalFadeIn 0.2s ease;
}

@keyframes editModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.edit-modal-title {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.edit-modal-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.edit-modal-input:focus {
    border-color: #667eea;
}

.edit-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.edit-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.edit-modal-btn.cancel {
    background: #f0f0f0;
    color: #666;
}

.edit-modal-btn.cancel:hover {
    background: #e0e0e0;
}

.edit-modal-btn.confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.edit-modal-btn.confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 考试完成页面 - 正确率显示 */
.accuracy-display {
    font-size: 4em;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.2;
}

.accuracy-display.green {
    color: #27ae60;
}

.accuracy-display.orange {
    color: #e67e22;
}

.accuracy-display.red {
    color: #e74c3c;
}

.exam-name-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.exam-name {
    font-size: 1.8em;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.group-info {
    font-size: 1.1em;
    color: #666;
}

.accuracy-label {
    font-size: 1em;
    color: #888;
    margin-bottom: 5px;
}

.accuracy-detail {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 25px;
}

/* 修改按钮样式 */
.edit-btn {
    padding: 6px 14px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.edit-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

/* 修改单词弹窗 */
.edit-word-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.edit-word-modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.edit-word-modal-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
}

.edit-word-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.edit-word-form label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.edit-word-form input {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.edit-word-form input:focus {
    border-color: #667eea;
}

.edit-word-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.edit-word-cancel {
    padding: 10px 20px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.edit-word-cancel:hover {
    background: #e0e0e0;
}

.edit-word-confirm {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.edit-word-confirm:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

/* 单词编辑模式 */
.word-english.editing,
.word-chinese.editing {
    border: 2px solid #3498db !important;
    border-radius: 6px;
    padding: 4px 8px;
    background: #f8fbff;
    outline: none;
}

.save-edit-btn {
    padding: 6px 14px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.save-edit-btn:hover {
    background: #219a52;
    transform: translateY(-1px);
}

.cancel-edit-btn {
    padding: 6px 14px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-edit-btn:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

/* 预览区按钮组 */
.preview-header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.add-word-btn-preview {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.add-word-btn-preview:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

/* 添加单词弹窗 */
.add-word-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.add-word-modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.add-word-modal-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
}

.add-word-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.add-word-form label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.add-word-form input {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.add-word-form input:focus {
    border-color: #667eea;
}

.chinese-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chinese-input-row input {
    flex: 1;
}

.modal-translate-btn-inline {
    padding: 12px 16px;
    background: #bb8fce;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.modal-translate-btn-inline:hover {
    background: #a569bd;
}

.add-word-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-cancel-btn {
    padding: 10px 20px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-cancel-btn:hover {
    background: #e0e0e0;
}

.modal-translate-btn {
    padding: 10px 20px;
    background: #9b59b6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-translate-btn:hover {
    background: #8e44ad;
    transform: translateY(-1px);
}

.modal-confirm-btn {
    padding: 10px 20px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-confirm-btn:hover {
    background: #219a52;
    transform: translateY(-1px);
}
