/* H5交互式课件 - 响应式样式 */

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

:root {
    --primary-color: #4a90e2;
    --success-color: #52c41a;
    --error-color: #ff4d4f;
    --warning-color: #faad14;
    --bg-color: #f5f7fa;
    --text-color: #333;
    --text-secondary: #666;
    --border-color: #e8e8e8;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* 导航栏 */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), #6c5ce7);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-modules {
    display: flex;
    gap: 0.5rem;
}

.module-nav-item {
    padding: 0.6rem 1.2rem;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.module-nav-item:hover {
    background: rgba(255, 255, 255, 0.25);
}

.module-nav-item.active {
    background: white;
    color: var(--primary-color);
}

/* 主内容区 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 模块一：知识学习 */
.module-intro {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.module-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.module-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.intro-section {
    margin-bottom: 2rem;
}

.intro-section h2 {
    color: var(--text-color);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.intro-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 知识卡片网格 */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.knowledge-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.knowledge-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.knowledge-card .card-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

.knowledge-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.knowledge-card ul {
    list-style: none;
    color: var(--text-secondary);
}

.knowledge-card li {
    padding: 0.3rem 0;
    padding-left: 1.2rem;
    position: relative;
}

.knowledge-card li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* 练习按钮 */
.exercise-preview {
    margin-top: 2.5rem;
}

.exercise-preview h2 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.exercise-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.exercise-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.exercise-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.2);
}

.exercise-btn .btn-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.exercise-btn .btn-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.4rem;
}

.exercise-btn .btn-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 拖拽练习 */
.drag-exercise {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
}

.task-description {
    background: #f0f7ff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.task-label {
    font-weight: 600;
    color: var(--primary-color);
}

.drag-words {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    min-height: 80px;
}

.word-card {
    padding: 0.6rem 1rem;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    cursor: grab;
    user-select: none;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    color: var(--primary-color);
    transition: all 0.2s ease;
}

.word-card:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.word-card.dragging {
    opacity: 0.5;
}

.word-card.used {
    opacity: 0.3;
    cursor: not-allowed;
}

.drop-zone {
    min-height: 100px;
    border: 3px dashed var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    transition: all 0.3s ease;
    background: #fafafa;
}

.drop-zone.drag-over {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.drop-zone .placeholder {
    color: #aaa;
    font-size: 0.95rem;
}

.dropped-word {
    padding: 0.5rem 0.8rem;
    background: linear-gradient(135deg, var(--primary-color), #6c5ce7);
    color: white;
    border-radius: 6px;
    cursor: grab;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
}

.dropped-word:hover {
    transform: scale(1.05);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.btn-reset, .btn-check {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset {
    background: #f0f0f0;
    color: var(--text-secondary);
}

.btn-reset:hover {
    background: #e0e0e0;
}

.btn-check {
    background: linear-gradient(135deg, var(--primary-color), #6c5ce7);
    color: white;
}

.btn-check:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.feedback.correct {
    background: #f6ffed;
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.feedback.wrong {
    background: #fff2f0;
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

.feedback .icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.correct-sql {
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: #e6f7ff;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
}

.hint {
    margin-top: 1rem;
    text-align: left;
}

.hint-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hint-sequence {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.hint-word {
    padding: 0.3rem 0.6rem;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* 闯关训练 */
.level-selection {
    background: white;
    border-radius: 16px;
    padding: 2rem;
}

.level-info {
    margin-bottom: 2rem;
}

.data-preview {
    margin-top: 1rem;
}

.table-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.table-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.table-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.table-data-preview {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th, .data-table td {
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.data-table th {
    background: #f5f7fa;
    font-weight: 600;
}

.table-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.level-card {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.level-card.unlocked:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.level-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
    border-left-color: #ccc;
}

.level-number {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.level-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.level-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.completed-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--success-color);
    font-weight: 600;
}

.locked-icon {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

/* 工作区 */
.level-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.task-panel, .editor-panel, .result-panel, .ai-feedback {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.task-panel {
    grid-column: 1 / 2;
}

.editor-panel {
    grid-column: 2 / 3;
}

.result-panel {
    grid-column: 1 / 2;
    min-height: 220px;
}

.ai-feedback {
    grid-column: 2 / 3;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.task-title, .editor-title, .result-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.task-hint {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fffbe6 0%, #fff3cd 100%);
    border-radius: 8px;
    font-size: 0.95rem;
    border-left: 4px solid var(--warning-color);
}

.used-tables {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.table-name {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: linear-gradient(135deg, var(--primary-color), #6c5ce7);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-left: 0.3rem;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.run-btn {
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, var(--success-color), #4cae4c);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
}

.run-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.4);
}

/* 统一SQL编辑器样式 */
.sql-editor, .sql-input {
    width: 100%;
    height: 200px;
    padding: 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    background: #fdfdfd;
    color: var(--text-color);
    transition: all 0.25s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sql-editor:focus, .sql-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.05);
    background: white;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.row-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.result-table {
    overflow-x: auto;
}

.sql-error {
    color: var(--error-color);
    padding: 0.8rem;
    background: #fff2f0;
    border-radius: 6px;
    margin-top: 1rem;
    display: none;
}

.feedback-header {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feedback-section {
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: 6px;
}

.feedback-section.success {
    background: #f6ffed;
    color: var(--success-color);
}

.feedback-section.error {
    background: #fff2f0;
    color: var(--error-color);
}

.section-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.knowledge-tag {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    background: #e6f7ff;
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.level-actions {
    margin-top: 1.5rem;
    text-align: center;
}

.btn-submit {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, var(--primary-color), #6c5ce7);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
}

/* 找茬练习 */
.find-error-intro {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

.error-exercises {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.error-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
}

.error-number {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.sql-display {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.2rem;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    overflow-x: auto;
}

.sql-line {
    white-space: pre-wrap;
    word-break: break-all;
}

.error-feedback {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.error-feedback.hint {
    display: block;
    background: #f0f7ff;
    color: var(--primary-color);
}

.error-feedback.correct {
    display: block;
    background: #f6ffed;
    border: 1px solid var(--success-color);
}

.error-feedback.wrong {
    display: block;
    background: #fff2f0;
    border: 1px solid var(--error-color);
}

.correct-answer, .wrong-answer {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.correct-answer {
    color: var(--success-color);
}

.wrong-answer {
    color: var(--error-color);
}

.error-explanation, .knowledge-point {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.btn-check-error {
    margin-top: 1rem;
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-check-error:hover {
    background: #3a7bc8;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-modules {
        flex-wrap: wrap;
        justify-content: center;
    }

    .module-nav-item {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .main-container {
        padding: 1rem;
    }

    .knowledge-grid, .exercise-buttons, .levels-grid {
        grid-template-columns: 1fr;
    }

    .level-workspace {
        grid-template-columns: 1fr;
    }

    .task-panel, .editor-panel, .result-panel, .ai-feedback {
        grid-column: 1;
    }

    .editor-panel, .ai-feedback {
        grid-row: auto;
    }
}

/* 知识卡片点击提示 */
.card-click-hint {
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.knowledge-card:hover .card-click-hint {
    opacity: 1;
}

/* 知识点详情页面 */
.knowledge-detail-modal {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    min-height: 80vh;
}

.detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.detail-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-left: 1rem;
}

.detail-content {
    margin-bottom: 2rem;
}

.detail-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-section:last-child {
    border-bottom: none;
}

.section-subtitle {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section-content, .section-explanation {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.code-block {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.code-label {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.code-syntax {
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    margin: 0;
    white-space: pre-wrap;
}

.example-block, .result-block {
    padding: 0.8rem;
    background: #f0f7ff;
    border-radius: 6px;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.example-label, .result-label {
    font-weight: 600;
    color: var(--primary-color);
}

/* 运算符表格 */
.operator-table, .comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.operator-table th, .operator-table td,
.comparison-table th, .comparison-table td {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.operator-table th, .comparison-table th {
    background: #f5f7fa;
    font-weight: 600;
}

.operator-table code, .comparison-table code {
    background: #f0f0f0;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
}

/* 错误提示区域 */
.error-section {
    background: #fff2f0;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.error-title {
    color: var(--error-color);
    margin-bottom: 0.8rem;
}

.error-list {
    list-style: none;
    color: var(--text-secondary);
}

.error-list li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.error-list li::before {
    content: '•';
    color: var(--error-color);
    position: absolute;
    left: 0;
}

/* 详情页底部按钮 */
.detail-footer {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-practice {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), #6c5ce7);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-practice:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
}

/* 找茬练习改进样式 */
.clickable-word {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-block;
}

.clickable-word:hover {
    background: rgba(255, 193, 7, 0.3);
}

.clickable-word.selected {
    background: var(--warning-color);
    color: white;
}

.clickable-word.error-word {
    /* 不给错误单词特殊样式，让用户自己找 */
}

/* 拖拽答案对比 */
.answer-comparison {
    margin-top: 1rem;
    padding: 1rem;
    background: #fafafa;
    border-radius: 8px;
}

.your-answer, .correct-answer {
    padding: 0.5rem;
    font-family: 'Consolas', 'Monaco', monospace;
}

.your-answer {
    color: var(--error-color);
}

.correct-answer {
    color: var(--success-color);
}

/* 练习导航按钮 */
.exercise-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.progress {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.nav-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

/* 通用工具类 */
.back-btn {
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 1rem;
}

.back-btn:hover {
    background: #e0e0e0;
}

.exercise-container {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    min-height: 80vh;
}

.exercise-header {
    margin-bottom: 1.5rem;
}

.exercise-header h2 {
    display: inline;
    color: var(--text-color);
}

.no-data {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

/* ========== 模块导航按钮 ========== */
.module-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-primary {
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), #6c5ce7);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    padding: 0.8rem 2rem;
    background: #f0f0f0;
    color: var(--text-secondary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* 通用按钮悬停效果 */
button {
    font-family: inherit;
}

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

/* ========== 维恩图可视化 ========== */
.venn-container {
    max-width: 800px;
    margin: 0 auto;
}

.venn-diagram {
    background: #fafafa;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.venn-svg {
    width: 100%;
    max-width: 400px;
    display: block;
    margin: 0 auto;
}

.venn-label {
    font-size: 14px;
    font-weight: bold;
    fill: #333;
}

.venn-table {
    font-size: 12px;
    fill: #666;
}

.join-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.join-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.join-btn:hover, .join-btn.active {
    background: var(--primary-color);
    color: white;
}

.join-result {
    background: #f5f5f5;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.join-result h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.join-sql pre {
    background: #2d3748;
    color: #68d391;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

.join-note {
    color: #888;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.null-row {
    background: #fff3cd;
    color: #856404;
}

.result-table {
    overflow-x: auto;
}

.result-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.result-table th, .result-table td {
    padding: 0.5rem;
    border: 1px solid #ddd;
    text-align: left;
}

.result-table th {
    background: #f0f0f0;
    font-weight: 600;
}

/* ========== 场景选型练习 ========== */
.scenario-container {
    max-width: 700px;
    margin: 0 auto;
}

.scenario-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.scenario-number {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.scenario-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.scenario-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.scenario-btn {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scenario-btn:hover {
    background: var(--primary-color);
    color: white;
}

.scenario-feedback {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.feedback-correct {
    color: var(--success-color);
    font-weight: 500;
}

.feedback-wrong {
    color: var(--error-color);
    font-weight: 500;
}

.scenario-sql pre {
    background: #2d3748;
    color: #68d391;
    padding: 1rem;
    border-radius: 8px;
}

.scenario-nav {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ========== 事务模拟 ========== */
.transaction-sim {
    max-width: 800px;
    margin: 0 auto;
}

.accounts-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.account-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    min-width: 150px;
}

.account-name {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.account-balance {
    font-size: 1.5rem;
    font-weight: bold;
}

.transfer-arrow {
    font-size: 2rem;
    color: var(--primary-color);
}

.transaction-controls {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.control-group input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 120px;
}

.control-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.trans-btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #e0e0e0;
    color: #333;
}

.trans-btn:hover {
    background: #d0d0d0;
}

.trans-btn.danger {
    background: #ffebee;
    color: #c62828;
}

.trans-btn.danger:hover {
    background: #ffcdd2;
}

.trans-btn.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.trans-btn.success:hover {
    background: #c8e6c9;
}

.transaction-log {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.transaction-log h4 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.log-entry {
    font-family: monospace;
    font-size: 0.85rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #333;
}

.transaction-explanation {
    background: #fff8e1;
    padding: 1rem;
    border-radius: 8px;
}

.transaction-explanation h4 {
    color: #f57c00;
    margin-bottom: 0.5rem;
}

.transaction-explanation ul {
    margin: 0;
    padding-left: 1.5rem;
}

.transaction-explanation li {
    margin-bottom: 0.25rem;
}

/* ========== 隔离级别演示 ========== */
.isolation-demo {
    max-width: 900px;
    margin: 0 auto;
}

.isolation-selector {
    margin-bottom: 1.5rem;
}

.level-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.level-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.level-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.isolation-content {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.level-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.issues-display {
    margin: 1rem 0;
}

.issue-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.issue-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.issue-tag.danger {
    background: #ffebee;
    color: #c62828;
}

.issue-tag.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.demo-visual {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.transaction-box {
    flex: 1;
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
}

.transaction-box h5 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.tx-steps .step {
    font-size: 0.9rem;
    padding: 0.25rem 0;
    border-bottom: 1px dashed #ddd;
}

.tx-steps .result {
    font-weight: bold;
    color: var(--primary-color);
}

/* ========== DML操作 ========== */
.dml-practice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .dml-practice {
        grid-template-columns: 1fr;
    }
}

.inventory-display {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
}

.dml-editor h3 {
    margin-bottom: 1rem;
}

.dml-type-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dml-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dml-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.danger-alert {
    background: #ffebee;
    border: 2px solid #ef5350;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.danger-alert strong {
    color: #c62828;
}

.danger-alert p {
    margin: 0.5rem 0;
}

.btn-danger {
    padding: 0.5rem 1rem;
    background: #ef5350;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 0.5rem;
}

.success-msg, .warning-msg, .info-msg {
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.success-msg {
    background: #e8f5e9;
    color: #2e7d32;
}

.warning-msg {
    background: #fff3e0;
    color: #e65100;
}

.info-msg {
    background: #e3f2fd;
    color: #1565c0;
}

/* ========== 需求拆解练习 ========== */
.demand-analysis {
    max-width: 700px;
    margin: 0 auto;
}

.demand-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.demand-text {
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.analysis-steps {
    margin-bottom: 1.5rem;
}

.step-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.step-item h4 {
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.step-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.option-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.option-btn:hover {
    background: var(--primary-color);
    color: white;
}

.step-feedback {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    display: none;
}

.step-feedback .correct {
    color: var(--success-color);
}

.step-feedback .wrong {
    color: var(--error-color);
}

/* ========== 综合项目 ========== */
.project-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.project-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.project-card.locked {
    opacity: 0.6;
    pointer-events: none;
}

.project-number {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.project-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.btn-start {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-start:hover {
    background: #357abd;
}

.btn-start:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.project-challenge {
    max-width: 800px;
    margin: 0 auto;
}

.challenge-desc, .challenge-hint {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.challenge-hint {
    background: #fff8e1;
}

.challenge-hint h4 {
    color: #f57c00;
}

/* ========== AI错题复盘 ========== */
.error-review {
    max-width: 600px;
    margin: 0 auto;
}

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

.summary-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
}

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

.weak-areas {
    background: #fff8e1;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.weak-areas h3 {
    color: #f57c00;
    margin-bottom: 1rem;
}

.weak-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.weak-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
}

.weak-icon {
    font-size: 1.2rem;
}

.review-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ========== 三表联查练习 ========== */
.challenge-tables {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.challenge-areas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .challenge-areas {
        grid-template-columns: 1fr;
    }
}

.challenge-tips {
    background: #e3f2fd;
    padding: 1rem;
    border-radius: 8px;
}

.challenge-tips h3 {
    color: #1565c0;
    margin-bottom: 0.75rem;
}

.challenge-tips li {
    margin-bottom: 0.5rem;
}

.sql-editor-area h3 {
    margin-bottom: 0.75rem;
}

.editor-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* ========== 知识表格 ========== */
.knowledge-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.knowledge-table th, .knowledge-table td {
    padding: 0.5rem;
    border: 1px solid #ddd;
    text-align: center;
}

.knowledge-table th {
    background: #f0f0f0;
}

/* ========== hint-box ========== */
.hint-box {
    background: #e8f5e9;
    border-left: 4px solid var(--success-color);
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 0 8px 8px 0;
}

.hint-box h4 {
    color: #2e7d32;
    margin-bottom: 0.5rem;
}

/* ========== 知识详情模态框样式 ========== */
.knowledge-detail-modal {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-title {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 0;
}

.detail-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 详情章节 */
.detail-section {
    margin-bottom: 2rem;
}

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

.section-subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-left: 0.75rem;
    border-left: 4px solid var(--primary-color);
}

.section-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.section-explanation {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
    font-style: italic;
}

/* 代码块样式 */
.code-block {
    background: #f8f9fa;
    border-radius: 12px;
    margin: 1rem 0;
    overflow: hidden;
}

.code-label {
    background: linear-gradient(135deg, var(--primary-color), #6c5ce7);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.code-syntax {
    padding: 1rem;
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
    background: #fdfdfd;
    overflow-x: auto;
}

/* 示例块 */
.example-block {
    background: #fff3cd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.example-label {
    font-weight: bold;
    color: #856404;
}

/* 对比表格 */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comparison-table th {
    background: linear-gradient(135deg, var(--primary-color), #6c5ce7);
    color: white;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
}

.comparison-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    color: var(--text-secondary);
}

.comparison-table tr:hover {
    background: #f8f9fa;
}

/* ACID特性卡片 */
.acid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.acid-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #eee;
}

.acid-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.acid-card h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.acid-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 并发问题卡片 */
.problem-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.problem-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #ff9800;
}

.problem-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.problem-card h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.problem-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 错误区域 */
.error-section {
    background: #ffebee;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.error-title {
    color: #c62828;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

/* 分析卡片 */
.analysis-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

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

.analysis-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.analysis-card h4 {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.analysis-card p {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.5;
}

/* 知识标签 */
.knowledge-tags {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.knowledge-tag {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tag-icon {
    font-size: 1.25rem;
}

.tag-text {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.tag-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 优化建议卡片 */
.optimization-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.optimization-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.optimization-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.optimization-card h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.optimization-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========== 登录界面样式 ========== */
.login-container {
    max-width: 450px;
    margin: 2rem auto;
    padding: 1rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
}

.login-tabs {
    display: flex;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: white;
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.login-form {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: none;
}

.login-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-input::placeholder {
    color: #aaa;
}

.code-input-group {
    display: flex;
    gap: 0.75rem;
}

.code-input {
    flex: 1;
}

.send-code-btn {
    padding: 0.875rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.send-code-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.send-code-btn:disabled {
    background: #f0f0f0;
    border-color: #ccc;
    color: #999;
    cursor: not-allowed;
}

.login-submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), #6c5ce7);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.register-btn {
    display: block;
    width: 100%;
    padding: 0.875rem;
    margin-top: 1rem;
    background: transparent;
    border: 2px solid #e0e0e0;
    color: var(--text-secondary);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.register-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 微信扫码登录 */
.qr-code-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.qr-code {
    display: inline-block;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    margin-bottom: 1rem;
}

.qr-code img {
    width: 180px;
    height: 180px;
    border-radius: 8px;
}

.qr-code p {
    margin-top: 0.5rem;
    color: var(--text-color);
    font-weight: 600;
}

.qr-hint p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

/* 导航栏用户信息 */
.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    font-size: 1.5rem;
}

.user-name {
    font-weight: 600;
    color: var(--text-color);
}

.logout-btn, .login-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.login-btn {
    background: var(--primary-color);
    color: white;
}

.login-btn:hover {
    background: #3a8bd8;
}

.logout-btn {
    background: #f5f5f5;
    color: var(--text-secondary);
}

.logout-btn:hover {
    background: #e0e0e0;
}

/* ========== 封面页样式 ========== */
.cover-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
    overflow: hidden;
}

.cover-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.cover-header {
    text-align: center;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cover-logo {
    font-size: 6rem;
    margin-bottom: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(255, 255, 255, 0.3));
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.cover-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    letter-spacing: 2px;
}

.cover-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    letter-spacing: 4px;
}

.cover-info {
    display: flex;
    gap: 2rem;
    margin: 3rem 0;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.info-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1.25rem 2rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.info-icon {
    font-size: 1.5rem;
}

.info-text {
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
}

.cover-tips {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.tip-icon {
    font-size: 1.25rem;
}

.cover-actions {
    display: flex;
    gap: 1.5rem;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.cover-actions .btn-primary {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    background: white;
    color: #4a90e2;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.cover-actions .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.cover-actions .btn-secondary {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.cover-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
}

.cover-footer {
    position: absolute;
    bottom: 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    z-index: 1;
}

/* ========== 学习指南页样式 ========== */
.guide-page {
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(180deg, #f5f7fa 0%, #e4e8f0 100%);
}

.guide-page .page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #4a90e2 0%, #6c5ce7 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 8px 30px rgba(74, 144, 226, 0.3);
}

.guide-page .page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.guide-page .page-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.guide-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.guide-section:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.section-title {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #4a90e2;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

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

.goal-list li {
    padding: 0.875rem 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.goal-list li:hover {
    background: #e8f5e9;
    transform: translateX(8px);
}

.duration-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.duration-card {
    background: linear-gradient(135deg, #4a90e2 0%, #6c5ce7 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.duration-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.4);
}

.duration-num {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.duration-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.tab-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: #f5f5f5;
    padding: 0.25rem;
    border-radius: 12px;
    max-width: 300px;
}

.tab-container .tab-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.tab-container .tab-btn.active {
    background: white;
    color: #4a90e2;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-content {
    display: none;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

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

.operation-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
    color: #666;
    font-size: 1rem;
}

.operation-list li:last-child {
    border-bottom: none;
}

.operation-list strong {
    color: #333;
}

.rule-card {
    background: #fff3e0;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid #ff9800;
}

.rule-card h4 {
    color: #e65100;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.rule-card ul {
    list-style: none;
    padding: 0;
}

.rule-card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #666;
    font-size: 0.95rem;
}

.rule-card li::before {
    content: '📌';
    position: absolute;
    left: 0;
}

.guide-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 3rem;
}

/* ========== 学习地图页样式 ========== */
.map-page {
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(180deg, #f0f4f8 0%, #e8ecf1 100%);
}

.map-page .page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.map-page .page-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.map-page .page-header p {
    color: #666;
    font-size: 1.1rem;
}

.ai-recommend-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.ai-recommend-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

.ai-icon {
    font-size: 3rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.ai-content h4 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.ai-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.ai-btn {
    margin-left: auto;
    padding: 0.875rem 1.75rem;
    background: white;
    color: #4a90e2;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.ai-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.learning-path {
    margin-bottom: 2.5rem;
}

.path-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
}

.path-node {
    flex: 0 0 auto;
    width: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.path-node:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: #4a90e2;
}

.path-node.completed {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #52c41a;
}

.node-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.node-info h4 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.node-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.node-meta {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.meta-item {
    font-size: 0.85rem;
    color: #666;
}

.meta-item.difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.meta-item.difficulty.easy {
    background: #e8f5e9;
    color: #2e7d32;
}

.meta-item.difficulty.medium {
    background: #fff3e0;
    color: #e65100;
}

.meta-item.difficulty.hard {
    background: #ffebee;
    color: #c62828;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #6c5ce7);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.path-arrow {
    font-size: 2rem;
    color: #4a90e2;
    opacity: 0.6;
    flex-shrink: 0;
    margin: 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modules-overview {
    margin-bottom: 2.5rem;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.module-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 4px solid #4a90e2;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.module-card.completed {
    border-left-color: #52c41a;
    background: #fafafa;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.card-icon {
    font-size: 1.75rem;
}

.card-badge {
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.card-badge.completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.card-badge:not(.completed) {
    background: #fff3e0;
    color: #e65100;
}

.module-card h3 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.card-progress {
    margin-top: 0.5rem;
}

.mini-progress {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.mini-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #6c5ce7);
    border-radius: 3px;
}

.stats-section {
    margin-bottom: 2.5rem;
}

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

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #4a90e2;
    margin-bottom: 0.25rem;
}

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

.map-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .cover-title {
        font-size: 2rem;
    }
    
    .cover-logo {
        font-size: 4rem;
    }
    
    .cover-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cover-tips {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cover-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .cover-actions .btn-primary,
    .cover-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    .guide-page .page-header h1 {
        font-size: 1.8rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .path-container {
        flex-direction: column;
        padding: 1rem;
        overflow-x: visible;
    }
    
    .path-node {
        width: 100%;
        max-width: 100%;
    }
    
    .path-arrow {
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .ai-recommend-card {
        flex-direction: column;
        text-align: center;
    }
    
    .ai-btn {
        margin-left: 0;
        margin-top: 1rem;
    }
}

/* ========== AI学习推荐页面样式 ========== */
.ai-recommendation-page {
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(180deg, #f0f4f8 0%, #e8ecf1 100%);
}

.ai-recommendation-page .page-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.ai-recommendation-page .page-header h1 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.back-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.75rem 1.25rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    color: #666;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.back-btn:hover {
    background: #f5f5f5;
    color: var(--primary-color);
    transform: translateY(-50%) translateX(-4px);
}

.recommendation-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    max-width: 800px;
    margin: 0 auto;
}

.recommendation-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.recommendation-icon {
    font-size: 2rem;
}

.recommendation-header h3 {
    font-size: 1.4rem;
    color: #333;
    font-weight: 600;
}

.recommendation-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.current-status {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 16px;
    padding: 1.75rem;
    border-left: 4px solid var(--primary-color);
}

.current-status h4 {
    color: #1565c0;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-status p {
    color: #666;
    margin-bottom: 1rem;
}

.current-status ul {
    list-style: none;
    padding: 0;
}

.current-status li {
    padding: 0.6rem 0;
    color: #444;
    font-size: 1rem;
    border-bottom: 1px dashed #90caf9;
}

.current-status li:last-child {
    border-bottom: none;
}

.current-status strong {
    color: var(--primary-color);
    font-weight: 600;
}

.recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.recommendation-list h4 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fafafa;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.recommendation-item:hover {
    background: #f0f4f8;
    border-color: var(--primary-color);
    transform: translateX(6px);
}

.rec-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #6c5ce7 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.rec-content {
    flex: 1;
}

.rec-content h5 {
    color: #333;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.rec-content p {
    color: #666;
    font-size: 0.95rem;
}

.rec-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #6c5ce7 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    flex-shrink: 0;
}

.rec-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(74, 144, 226, 0.4);
}

/* AI智能复盘页面样式 */
.ai-replay-page {
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(180deg, #f0f4f8 0%, #e8ecf1 100%);
}

.ai-replay-page .page-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.ai-replay-page .page-header h1 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.replay-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    max-width: 900px;
    margin: 0 auto;
}

.replay-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.replay-icon {
    font-size: 2rem;
}

.replay-header h3 {
    font-size: 1.4rem;
    color: #333;
    font-weight: 600;
}

.replay-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.analysis-section {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: 16px;
    padding: 1.75rem;
    border-left: 4px solid #ff9800;
}

.analysis-section h4 {
    color: #e65100;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.analysis-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
}

.analysis-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.analysis-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #e65100;
}

.weak-areas-section {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-radius: 16px;
    padding: 1.75rem;
    border-left: 4px solid #e53935;
}

.weak-areas-section h4 {
    color: #c62828;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.weak-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.weak-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
}

.weak-icon {
    font-size: 1.5rem;
}

.weak-content {
    flex: 1;
}

.weak-title {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.weak-desc {
    display: block;
    color: #666;
    font-size: 0.9rem;
}

.weak-btn {
    padding: 0.5rem 1rem;
    background: #e53935;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.weak-btn:hover {
    background: #c62828;
}

.suggestion-section {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 16px;
    padding: 1.75rem;
    border-left: 4px solid #43a047;
}

.suggestion-section h4 {
    color: #2e7d32;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
}

.suggestion-num {
    width: 28px;
    height: 28px;
    background: #43a047;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.suggestion-text {
    color: #333;
    font-size: 0.95rem;
}

.replay-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

/* AI助教页面样式 */
.ai-assistant-page {
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(180deg, #f0f4f8 0%, #e8ecf1 100%);
}

.ai-assistant-page .page-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.ai-assistant-page .page-header h1 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.assistant-container {
    max-width: 700px;
    margin: 0 auto;
}

.assistant-welcome {
    text-align: center;
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.assistant-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

.assistant-welcome h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.assistant-welcome p {
    color: #666;
    font-size: 1rem;
}

.faq-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.faq-section h4 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.faq-item {
    padding: 0.875rem 1.25rem;
    background: #f5f5f5;
    border: none;
    border-radius: 10px;
    color: #333;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.faq-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.ai-chat-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.chat-history {
    padding: 1.5rem;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-message, .ai-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6c5ce7 100%);
    color: white;
    padding: 0.875rem 1.25rem;
    border-radius: 16px;
    border-bottom-right-radius: 4px;
    max-width: 70%;
}

.ai-message .message-content {
    background: #f5f5f5;
    color: #333;
    padding: 0.875rem 1.25rem;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    max-width: 80%;
}

.message-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.chat-input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 0.75rem;
}

.chat-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.send-btn {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #6c5ce7 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .ai-recommendation-page .page-header h1,
    .ai-replay-page .page-header h1,
    .ai-assistant-page .page-header h1 {
        font-size: 1.8rem;
    }
    
    .back-btn {
        position: static;
        transform: none;
        margin-bottom: 1rem;
    }
    
    .ai-recommendation-page .page-header,
    .ai-replay-page .page-header,
    .ai-assistant-page .page-header {
        text-align: left;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .recommendation-card,
    .replay-card {
        padding: 1.25rem;
    }
    
    .recommendation-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rec-btn {
        align-self: flex-end;
    }
    
    .faq-list {
        grid-template-columns: 1fr;
    }
    
    .user-message .message-content,
    .ai-message .message-content {
        max-width: 90%;
    }
}

/* ========== 错题本页面样式 ========== */
.wrong-book-page {
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(180deg, #fdf2f2 0%, #fce7e7 100%);
}

.wrong-book-page .page-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.wrong-book-page .page-header h1 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.wrong-book-page .back-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.75rem 1.25rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    color: #666;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.wrong-book-page .back-btn:hover {
    background: #f5f5f5;
    color: var(--primary-color);
    transform: translateY(-50%) translateX(-4px);
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6c5ce7 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.wrong-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 2rem;
}

.wrong-item {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border-left: 4px solid #e53935;
}

.wrong-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.wrong-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.wrong-module, .wrong-type {
    padding: 0.4rem 0.875rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.wrong-module {
    background: #ffebee;
    color: #c62828;
}

.wrong-type {
    background: #fff3e0;
    color: #e65100;
}

.wrong-content {
    margin-bottom: 1.25rem;
}

.wrong-sql {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 10px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    overflow-x: auto;
}

.wrong-desc {
    color: #c62828;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.wrong-knowledge {
    color: #666;
    font-size: 0.9rem;
    padding: 0.5rem 0.875rem;
    background: #f5f5f5;
    border-radius: 8px;
    display: inline-block;
}

.wrong-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.action-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:first-child {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6c5ce7 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.action-btn:first-child:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(74, 144, 226, 0.4);
}

.action-btn:last-child {
    background: #f0f0f0;
    color: #666;
}

.action-btn:last-child:hover {
    background: #e0e0e0;
    color: #333;
}

.wrong-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.wrong-stats .stat-item {
    text-align: center;
}

.wrong-stats .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e53935;
    margin-bottom: 0.25rem;
}

.wrong-stats .stat-label {
    color: #666;
    font-size: 0.95rem;
}

/* ========== AI助教聊天界面完善 ========== */
.ai-assistant-page {
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(180deg, #f0f4f8 0%, #e8ecf1 100%);
    display: flex;
    flex-direction: column;
}

.ai-assistant-page .page-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    flex-shrink: 0;
}

.ai-assistant-page .page-header h1 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.ai-assistant-page .back-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.75rem 1.25rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    color: #666;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ai-assistant-page .back-btn:hover {
    background: #f5f5f5;
    color: var(--primary-color);
    transform: translateY(-50%) translateX(-4px);
}

.assistant-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

.assistant-welcome {
    text-align: center;
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.assistant-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

.assistant-welcome h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.assistant-welcome p {
    color: #666;
    font-size: 1rem;
}

.faq-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.faq-section h4 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.625rem;
}

.faq-item {
    padding: 0.75rem 1rem;
    background: #f5f5f5;
    border: none;
    border-radius: 10px;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.faq-item:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6c5ce7 100%);
    color: white;
    transform: translateY(-2px);
}

.ai-chat-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.chat-history {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-message, .ai-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-icon {
    order: 2;
}

.user-message .message-content {
    order: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, #6c5ce7 100%);
    color: white;
    padding: 0.875rem 1.25rem;
    border-radius: 16px;
    border-bottom-right-radius: 4px;
    max-width: 70%;
    font-size: 0.95rem;
    line-height: 1.6;
}

.ai-message .message-content {
    background: #f5f5f5;
    color: #333;
    padding: 0.875rem 1.25rem;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    max-width: 80%;
    font-size: 0.95rem;
    line-height: 1.6;
}

.message-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.chat-input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.send-btn {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #6c5ce7 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(74, 144, 226, 0.4);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .wrong-book-page .page-header h1,
    .ai-assistant-page .page-header h1 {
        font-size: 1.8rem;
    }
    
    .wrong-book-page .back-btn,
    .ai-assistant-page .back-btn {
        position: static;
        transform: none;
        margin-bottom: 1rem;
    }
    
    .wrong-book-page .page-header,
    .ai-assistant-page .page-header {
        text-align: left;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wrong-item {
        padding: 1.25rem;
    }
    
    .wrong-actions {
        flex-direction: column;
    }
    
    .wrong-stats {
        gap: 2rem;
        padding: 1.5rem;
    }
    
    .faq-list {
        grid-template-columns: 1fr;
    }
    
    .user-message .message-content,
    .ai-message .message-content {
        max-width: 90%;
    }
    
    .assistant-welcome {
        padding: 2rem 1.5rem;
    }
}