:root {
    --primary-color: #5B5FDE;
    --primary-dark: #4347C7;
    --secondary-color: #FF6B6B;
    --accent-color: #FFE66D;
    --success-color: #4ECDC4;
    --warning-color: #FFA726;
    --info-color: #29B6F6;
    --dark-color: #1A1A2E;
    --light-bg: #F7F9FB;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --shadow-colored: 0 8px 32px rgba(91, 95, 222, 0.25);
    --header-height: 70px;
    --control-bar-height: 60px;
    --footer-height: 40px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Noto Sans SC', sans-serif;
    background: linear-gradient(to bottom, #F7F9FB 0%, #E8EBF5 100%);
    color: var(--dark-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Decorative Background Elements */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(91, 95, 222, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: -40%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(91, 95, 222, 0.1);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
}

/* 显示Logo文字 */
.logo span {
    display: inline-block;
}

.logo i {
    font-size: 28px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.exam-title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
    cursor: default; /* 不可点击 */
    padding: 8px 24px;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.exam-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    transition: left 0.3s;
}

.exam-title:hover::before { left: -100%; }
.exam-title:hover { transform: none; }

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 15px;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 18px;
    box-shadow: var(--shadow-colored);
    transition: all 0.3s;
    text-decoration: none;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(91, 95, 222, 0.35);
    color: white;
    text-decoration: none;
}

/* Control Bar Styles */
.control-bar {
    background: white;
    height: var(--control-bar-height);
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.control-button {
    background: var(--light-bg);
    border: 2px solid transparent;
    color: var(--dark-color);
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.control-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    transition: left 0.3s;
}

.control-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.control-button:hover::before {
    left: 0;
}

.control-button.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-colored);
}

.control-button.favorite-active {
    background: var(--gradient-warm);
    color: white;
    border-color: transparent;
}

.control-button i {
    font-size: 18px;
}

/* 隐藏顶部控制栏中所有按钮的文字（除了选题器） */
.control-bar .control-button:not(.question-selector-btn) {
    font-size: 0;  /* 隐藏文本节点 */
}

/* 恢复按钮内图标的大小 */
.control-bar .control-button:not(.question-selector-btn) i,
.control-bar .control-button:not(.question-selector-btn) svg {
    font-size: 18px;  /* 恢复图标大小 */
}

/* 确保选题器按钮的文字正常显示 */
.control-bar .question-selector-btn {
    font-size: 14px;  /* 恢复文字大小 */
}

/* 确保选题器按钮的图标大小 */
.control-bar .question-selector-btn i {
    font-size: 18px;
}

/* 确保badge徽章正常显示 */
.control-bar .control-button .badge {
    font-size: 11px;
}

.question-number-input {
    width: 80px;
    text-align: center;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 8px;
    font-size: 16px;
    font-weight: 600;
    background: white;
    color: var(--primary-color);
    transition: all 0.3s;
}

.question-number-input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(91, 95, 222, 0.2);
}

/* Main Content Area */
.main-content {
    margin-top: calc(var(--header-height) + var(--control-bar-height));
    margin-bottom: 0;
    min-height: calc(100vh - var(--header-height) - var(--control-bar-height));
    padding: 10px;
}

.content-container {
    max-width: none;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    height: calc(100vh - var(--header-height) - var(--control-bar-height) - 20px);
    position: relative;
}

/* Color Block Decorations */
.question-panel, .answer-panel {
    background: white;
    border-radius: 20px;
    padding: 15px;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    height: 100%;
    position: relative;
}

.question-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gradient-secondary);
    border-radius: 20px 20px 0 0;
}

.answer-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gradient-primary);
    border-radius: 20px 20px 0 0;
}

.question-panel {
    flex: 0 0 40%;
    display: none;
}

.answer-panel {
    flex: 1;
}

.show-question .question-panel {
    display: block;
}

.show-question .answer-panel {
    flex: 0 0 58%;
}

/* 减小问题面板头部的margin */
.question-panel-header {
    margin-bottom: 10px !important;
}

/* Question and Answer Styles */
.question-content h3, .answer-content h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.question-content h3::before {
    content: '';
    width: 50px;
    height: 50px;
    background: var(--gradient-secondary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--dark-color);
    margin-bottom: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    border-left: 5px solid var(--primary-color);
}

.options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.option-item {
    padding: 12px 16px;
    margin-bottom: 12px;
}

.option-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-accent);
    opacity: 0.1;
    transition: left 0.3s;
}

.option-item:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.option-item:hover::before {
    left: 0;
}

.option-item.correct {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(78, 205, 196, 0.35);
}

.option-label {
    font-weight: 800;
    min-width: 35px;
    height: 35px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.option-item.correct .option-label {
    background: white;
    color: #44A08D;
}

/* Answer and Explanation Styles */
.answer-content {
    font-size: 16px;
    line-height: 1.8;
}

.answer-section {
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.answer-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.answer-section h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.answer-section h4::before {
    content: '';
    width: 6px;
    height: 30px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.correct-answer {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 30px;
    font-weight: 700;
    font-size: 18px;
    box-shadow: var(--shadow-colored);
    margin-bottom: 15px;
}

.correct-answer i {
    font-size: 20px;
}

/* Bottom Control Bar - 隐藏以专注学习 */
.bottom-control-bar {
    display: none;
}

/* Footer - 隐藏以专注学习 */
.footer {
    display: none;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: white;
}

/* Mobile Styles */
@media (max-width: 576px) {
    .header {
        padding: 0 20px;
    }
    
    .logo span {
        display: none;
    }
    
    .exam-title {
        font-size: 16px;
        padding: 6px 16px;
    }
    
    .control-bar {
        display: none;
    }
    
    .main-content {
        margin-top: var(--header-height);
        margin-bottom: var(--control-bar-height);
        padding: 0;
    }
    
    .content-container {
        flex-direction: column;
        height: auto;
        gap: 0;
    }
    
    .question-panel, .answer-panel {
        flex: 1 1 auto;
        border-radius: 0;
        padding: 25px 20px;
        box-shadow: none;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    .question-panel::before, .answer-panel::before {
        border-radius: 0;
    }
    
    .show-question .answer-panel {
        flex: 1 1 auto;
    }
    
    .bottom-control-bar {
        bottom: 0;
        gap: 0;
        justify-content: space-around;
        padding: 0 10px;
        background: var(--gradient-primary);
    }
    
    .bottom-control-bar .control-button {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        flex: 1;
        padding: 8px 4px;
        font-size: 12px;
        flex-direction: column;
        gap: 4px;
        border-radius: 8px;
    }
    
    .bottom-control-bar .control-button:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: none;
        box-shadow: none;
    }
    
    .control-button i {
        font-size: 20px;
    }
    
    .control-button .button-text {
        display: block;
        font-weight: 500;
    }
    
    .question-number-input {
        display: none;
    }
    
    .footer {
        display: none;
    }
    
    .mobile-question-selector {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 16px 20px;
        font-size: 16px;
        font-weight: 600;
        color: white;
        cursor: pointer;
        background: var(--gradient-primary);
        margin: 15px;
        border-radius: 12px;
        box-shadow: var(--shadow-colored);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }
    
    .mobile-question-selector::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
        transition: left 0.3s;
    }
    
    .mobile-question-selector:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(91, 95, 222, 0.5);
    }
    
    .mobile-question-selector:hover::before {
        left: 0;
    }
    
    .mobile-question-selector:active {
        transform: translateY(0);
        box-shadow: 0 4px 15px rgba(91, 95, 222, 0.4);
    }
    
    /* 搜索框移动端适配 */
    .modal-content {
        padding: 20px;
        border-radius: 16px;
        max-height: 90vh;
    }
    
    .modal-title {
        font-size: 24px;
    }
    
    .search-input {
        font-size: 16px; /* 防止iOS缩放 */
        padding: 14px 45px 14px 45px;
    }
    
    .search-section {
        margin-bottom: 16px;
    }
    
    .no-search-results {
        padding: 30px 15px;
    }
    
    .no-search-results i {
        font-size: 36px !important;
    }
}

/* Hide mobile elements on desktop */
@media (min-width: 577px) {
    .mobile-question-selector {
        display: none;
    }
    
    .control-button .button-text {
        display: none;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(26, 26, 46, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

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

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

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

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

.modal-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
    transform: rotate(90deg);
}

/* 搜索框样式 */
.search-section {
    margin-bottom: 20px;
}

.search-input-container {
    position: relative;
    margin-bottom: 12px;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 16px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

.search-input::placeholder {
    color: #6c757d;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 16px;
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.search-clear:hover {
    background: #e9ecef;
    color: #495057;
}

.search-results-info {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 12px;
}

.no-search-results {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-search-results p {
    margin: 8px 0;
}

.no-search-results p:first-of-type {
    font-size: 16px;
    font-weight: 500;
    color: #495057;
}

.exam-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Exam List Styles */
.exam-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exam-item {
    padding: 20px;
    border: 2px solid transparent;
    border-radius: 16px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--light-bg);
    position: relative;
    overflow: hidden;
}

.exam-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    transition: left 0.3s;
}

.exam-item:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.exam-item:hover::before {
    left: 0;
}

.exam-item.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-colored);
    transform: scale(1.02);
}

/* 试卷项内容布局 */
.exam-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.exam-item-main {
    display: flex;
    align-items: center;
    flex: 1;
}

.exam-item-icon {
    margin-right: 10px;
    font-size: 16px;
}

.exam-item-title {
    font-weight: 600;
    font-size: 16px;
}

/* 解锁状态标识 */
.exam-item-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s;
}

.exam-item-status i {
    font-size: 12px;
}

/* 已解锁状态 */
.exam-item-status.status-unlocked {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.exam-item.active .exam-item-status.status-unlocked {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 可解锁状态 */
.exam-item-status.status-available {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.exam-item.active .exam-item-status.status-available {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 额度不足状态 */
.exam-item-status.status-quota-exhausted {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.exam-item.active .exam-item-status.status-quota-exhausted {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 未知状态 */
.exam-item-status.status-unknown {
    background: rgba(158, 158, 158, 0.1);
    color: #9E9E9E;
    border: 1px solid rgba(158, 158, 158, 0.2);
}

.exam-item.active .exam-item-status.status-unknown {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 响应式设计 */
@media (max-width: 576px) {
    .exam-item-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .exam-item-main {
        width: 100%;
    }
    
    .exam-item-status {
        align-self: flex-end;
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .exam-item-status i {
        font-size: 11px;
    }
}

/* Question Jump */
.jump-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-colored);
}

.jump-section h4 {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.question-jump-input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark-color);
    transition: all 0.3s;
}

.question-jump-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.jump-button {
    width: 100%;
    padding: 15px;
    background: white;
    color: var(--primary-dark);
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.jump-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-warm);
    transition: left 0.3s;
}

.jump-button:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.jump-button:hover::before {
    left: 0;
}

/* Markdown Content Styles */
.markdown-content {
    font-size: 17px;
    line-height: 1.9;
    color: #374151;
}

.markdown-content h1, .markdown-content h2, .markdown-content h3,
.markdown-content h4, .markdown-content h5, .markdown-content h6 {
    margin-top: 32px;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--dark-color);
}

.markdown-content h1 {
    font-size: 32px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 12px;
}

.markdown-content h2 {
    font-size: 26px;
    color: var(--primary-dark);
}

.markdown-content h3 {
    font-size: 22px;
}

.markdown-content p {
    margin-bottom: 20px;
}

.markdown-content ul, .markdown-content ol {
    padding-left: 30px;
    margin-bottom: 20px;
}

.markdown-content li {
    margin-bottom: 12px;
    position: relative;
}

.markdown-content ul li::before {
    content: '▸';
    position: absolute;
    left: -20px;
    color: var(--primary-color);
    font-weight: bold;
}

.markdown-content code {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 15px;
    color: var(--primary-dark);
}

.markdown-content pre {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 24px;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}

.markdown-content pre code {
    background: none;
    padding: 0;
    color: #e0e0e0;
}

.markdown-content blockquote {
    border-left: 5px solid var(--gradient-primary);
    padding: 20px 20px 20px 30px;
    margin: 24px 0;
    background: linear-gradient(to right, rgba(91, 95, 222, 0.05) 0%, transparent 100%);
    border-radius: 0 12px 12px 0;
    font-style: italic;
}

.markdown-content strong {
    font-weight: 700;
    color: var(--primary-dark);
}

.markdown-content em {
    font-style: italic;
    color: var(--primary-color);
}

/* Loading and Toast Styles */
.loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3000;
}

.loading.show {
    display: block;
}

.spinner {
    width: 60px;
    height: 60px;
    position: relative;
}

.spinner::before,
.spinner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner::after {
    border-top-color: var(--secondary-color);
    animation-delay: 0.4s;
}

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

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gradient-primary);
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3000;
    box-shadow: var(--shadow-colored);
}

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

/* Special Effects */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(91, 95, 222, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(91, 95, 222, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(91, 95, 222, 0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* 题目展示样式 */
.section-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color, #007bff);
}

.section-title {
    color: var(--primary-color, #007bff);
    font-size: 1.5em;
    font-weight: 600;
    margin: 0;
}

.subsection-header {
    margin-bottom: 16px;
}

.subsection-title {
    color: #333;
    font-size: 1.2em;
    font-weight: 500;
    margin-bottom: 8px;
}

.subsection-description {
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color, #007bff);
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #666;
    line-height: 1.5;
}

.word-box-container,
.sentence-box-container {
    margin: 16px 0;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.word-box-title,
.sentence-box-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 1em;
}

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

.word-item {
    background-color: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #495057;
}

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

.sentence-item {
    padding: 6px 10px;
    background-color: #e9ecef;
    border-radius: 4px;
    font-size: 0.9em;
    color: #495057;
}

.passage-container {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.passage-title {
    color: #007bff;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 12px;
}

.passage-content {
    line-height: 1.7;
    color: #333;
    font-size: 1em;
}

.question-container {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.question-header {
    margin-bottom: 16px;
}

.question-number {
    color: var(--primary-color, #007bff);
    font-size: 1.1em;
    font-weight: 600;
    margin: 0;
}

.question-text {
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 16px;
    color: #333;
}

.chinese-text {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    font-size: 1em;
    line-height: 1.6;
}

.word-given {
    margin: 12px 0;
    padding: 8px 12px;
    background-color: #d1ecf1;
    border-radius: 6px;
}

.given-word {
    color: #0c5460;
    font-weight: 600;
}

.writing-instructions {
    margin: 16px 0;
}

.instructions-chinese,
.instructions-english {
    margin: 12px 0;
    padding: 12px;
    border-radius: 6px;
}

.instructions-chinese {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.instructions-english {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
}

.question-options {
    margin: 16px 0;
}

.option-item {
    display: flex;
    align-items: flex-start;
    margin: 8px 0;
    padding: 10px 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #dee2e6;
    transition: all 0.2s ease;
}

.option-item:hover {
    background-color: #e9ecef;
    border-left-color: var(--primary-color, #007bff);
}

.option-label {
    font-weight: 600;
    color: var(--primary-color, #007bff);
    margin-right: 8px;
    min-width: 20px;
}

.option-text {
    flex: 1;
    line-height: 1.5;
}

.question-images {
    margin: 16px 0;
    text-align: center;
}

.question-image {
    max-width: 100%;
    height: auto;
    margin: 8px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 讲解内容样式 */
.explanation-container {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.answer-section,
.explanation-section {
    border-bottom: 1px solid #e9ecef;
}

.answer-section:last-child,
.explanation-section:last-child {
    border-bottom: none;
}

.answer-header,
.explanation-header {
    background: linear-gradient(135deg, var(--primary-color, #007bff), #0056b3);
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.answer-header i,
.explanation-header i {
    font-size: 1.1em;
}

.answer-content {
    padding: 16px 20px;
    background-color: #d4edda;
}

.correct-answer {
    font-size: 1.1em;
    font-weight: 600;
    color: white;
}

/* 讲解面板 - 正确答案支持数据库换行符显示（不影响其它区域/题型） */
.explanation-container .answer-section .correct-answer {
    /* 布局：从“深色胶囊”改为适合长文阅读的内容块 */
    display: block;
    width: 100%;
    margin-bottom: 15px;

    /* 配色：淡背景 + 深前景（柔和但醒目） */
    background: rgba(91, 95, 222, 0.08); /* 极淡品牌紫，护眼 */
    color: #2c3e50; /* 深蓝灰，长文更易读 */

    /* 醒目标识：左侧竖线强调“正确答案” */
    border-left: 5px solid var(--primary-color);
    border-radius: 4px 12px 12px 4px;

    /* 排版：为作文/长答案优化 */
    padding: 18px 24px;
    font-size: 16px;
    line-height: 1.8;
    font-weight: 500;
    text-align: left;
    box-shadow: none;

    /* 换行：保留数据库里的 \n */
    white-space: pre-line; /* 保留 \n 换行；多余空格仍按常规折叠 */
    word-break: break-word;
}

.explanation-content {
    padding: 24px;
    background-color: white;
    font-family: 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.8;
    color: #1f2937;
}

.explanation-content p {
    margin: 0 0 16px 0;
    text-align: justify;
}

.explanation-content p:last-child {
    margin-bottom: 0;
}

.explanation-heading {
    margin: 24px 0 16px 0;
    font-weight: 600;
    color: #1f2937;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 8px;
}

.explanation-content h1.explanation-heading {
    font-size: 24px;
}

.explanation-content h2.explanation-heading {
    font-size: 22px;
}

.explanation-content h3.explanation-heading {
    font-size: 20px;
}

.explanation-content h4.explanation-heading {
    font-size: 18px;
}

.explanation-content h5.explanation-heading {
    font-size: 16px;
}

.explanation-content h6.explanation-heading {
    font-size: 14px;
}

.explanation-content strong {
    font-weight: 600;
    color: #1f2937;
}

.explanation-content em {
    font-style: italic;
    color: #4b5563;
}

.explanation-code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #dc2626;
    border: 1px solid #e5e7eb;
}

.explanation-content ul,
.explanation-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.explanation-content li {
    margin: 8px 0;
    line-height: 1.6;
}

.explanation-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.explanation-table th,
.explanation-table td {
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    text-align: left;
}

.explanation-table th {
    background-color: #f9fafb;
    font-weight: 600;
}

.explanation-content blockquote {
    border-left: 4px solid var(--primary-color, #007bff);
    margin: 16px 0;
    padding: 12px 16px;
    background-color: #f8f9fa;
    font-style: italic;
}

.no-explanation {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 576px) {
    .section-title {
        font-size: 1.3em;
    }
    
    .subsection-title {
        font-size: 1.1em;
    }
    
    .passage-container,
    .question-container {
        padding: 16px;
        margin: 16px 0;
    }
    
    .explanation-content {
        padding: 16px;
        font-size: 14px;
        line-height: 1.6;
    }
    
    .explanation-heading {
        margin: 16px 0 12px 0;
    }
    
    .option-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .option-label {
        margin-bottom: 4px;
    }
    
    .word-box {
        gap: 6px;
    }
    
    .word-item {
        font-size: 0.8em;
    }
}

/* 图片显示样式 */
.image-container {
    margin: 10px 0;
    text-align: center;
}

.content-image-container {
    margin: 12px 0;
    text-align: center;
}

.content-image, .section-image, .subsection-image, 
.passage-image, .question-image, .option-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 5px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.content-image:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.section-image {
    max-width: 100%;
    margin: 15px 0;
}

.subsection-image {
    max-width: 100%;
    margin: 12px 0;
}

.passage-image {
    max-width: 100%;
    margin: 15px 0;
}

.question-image {
    max-width: 100%;
    margin: 10px 0;
}

.option-image {
    max-width: 200px;
    margin: 5px 0 5px 10px;
    display: inline-block;
    vertical-align: top;
}

/* 选项容器调整，支持图片显示 */
.option-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 6px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.option-label {
    font-weight: 600;
    color: var(--primary-color, #007bff);
    margin-right: 8px;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
    line-height: 1.5;
}

/* 响应式图片 */
@media (max-width: 576px) {
    .option-image {
        max-width: 150px;
    }
    
    .section-image, .subsection-image, .passage-image, .question-image {
        max-width: 100%;
    }
}

/* 写作指令样式 */
.writing-instructions {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.instructions-chinese,
.instructions-english {
    margin-bottom: 12px;
}

.instructions-chinese:last-child,
.instructions-english:last-child {
    margin-bottom: 0;
}

.instruction-content {
    margin-top: 8px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    line-height: 1.6;
}

/* 中文原文样式 */
.chinese-text {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.chinese-content {
    margin-top: 8px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
    line-height: 1.6;
    font-size: 16px;
}

/* 给定词汇样式 */
.word-given {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
}

.given-word {
    font-weight: bold;
    color: #0066cc;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

/* 写作要求样式 */
.writing-requirements {
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.word-count-requirement,
.format-requirement {
    margin-bottom: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #cce7ff;
}

.word-count-requirement:last-child,
.format-requirement:last-child {
    margin-bottom: 0;
}

/* 字数限制样式 */
.word-limit {
    background: #fff0f5;
    border: 1px solid #ffb3d1;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    font-weight: 500;
    color: #cc0066;
}

/* 选词表和句子选项样式优化 */
.word-box-container,
.sentence-box-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.word-box-title,
.sentence-box-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    font-size: 16px;
}

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

.word-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease;
}

.word-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.sentence-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sentence-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.sentence-item:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

/* 段落容器样式优化 */
.passage-container {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.passage-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.passage-content {
    line-height: 1.7;
    font-size: 16px;
    color: #212529;
}

/* 题目容器样式优化 */
.question-container {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.question-header {
    margin-bottom: 16px;
}

.question-number {
    color: #0066cc;
    font-weight: 600;
    margin: 0;
}

.question-text {
    margin: 16px 0;
    line-height: 1.6;
    font-size: 16px;
}

/* 选项样式优化 */
.question-options {
    margin-top: 16px;
}

.option-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.option-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.option-item:last-child {
    margin-bottom: 0;
}

.option-label {
    font-weight: 600;
    color: #495057;
    margin-right: 12px;
    min-width: 24px;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 576px) {
    .writing-instructions,
    .chinese-text,
    .writing-requirements,
    .word-box-container,
    .sentence-box-container,
    .passage-container,
    .question-container {
        margin: 12px 0;
        padding: 12px;
    }
    
    .instruction-content,
    .chinese-content {
        padding: 8px;
    }
    
    .word-box {
        gap: 6px;
    }
    
    .word-item {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .sentence-item {
        padding: 10px;
    }
    
    .option-item {
        padding: 10px;
    }
}

/* 解锁遮罩层样式 */
.unlock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.unlock-content {
    text-align: center;
    max-width: 500px;
    padding: 40px 30px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(91, 95, 222, 0.1);
    position: relative;
    overflow: hidden;
}

.unlock-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.05;
    transition: left 0.6s;
}

.unlock-icon {
    font-size: 64px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.unlock-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.unlock-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.quota-info {
    background: var(--light-bg);
    padding: 18px 24px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 16px;
    color: var(--dark-color);
    border: 1px solid rgba(91, 95, 222, 0.1);
}

.quota-number {
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 18px;
}

.unlock-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.unlock-actions .btn {
    padding: 14px 28px;
    font-weight: 600;
    border-radius: 12px;
    min-width: 160px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.unlock-actions .btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: var(--shadow-colored);
}

.unlock-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(91, 95, 222, 0.35);
}

.unlock-actions .btn-secondary {
    background: var(--light-bg);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.unlock-actions .btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.unlock-notice {
    font-size: 14px;
    color: #999;
    line-height: 1.5;
    margin: 0;
}

/* 确认对话框样式 */
.confirm-info p {
    font-size: 16px;
    color: var(--dark-color);
    margin-bottom: 20px;
    line-height: 1.6;
}

.quota-display {
    background: var(--light-bg);
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 15px;
    color: var(--dark-color);
    border: 1px solid rgba(91, 95, 222, 0.1);
}

.quota-display .quota-number {
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 响应式设计 */
@media (max-width: 576px) {
    .unlock-content {
        margin: 20px;
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    .unlock-icon {
        font-size: 48px;
    }
    
    .unlock-content h3 {
        font-size: 20px;
    }
    
    .unlock-actions {
        flex-direction: column;
    }
    
    .unlock-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .quota-info {
        padding: 15px 18px;
        font-size: 15px;
    }
}

/* 解锁确认模态框优化 - 方案3：确保滚动功能正常和按钮区域始终可见 */
/* 确保模态框内容可以滚动 */
.modal-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
}

/* 确保按钮区域始终可见 */
#unlockConfirmModal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* 确保在移动端有足够空间 */
}

#unlockConfirmModal .modal-content > div:last-child {
    margin-top: auto;
    flex-shrink: 0;
    background: white;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.1);
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* 移动端特殊优化 */
@media (max-width: 576px) {
    #unlockConfirmModal .modal-content {
        max-height: 95vh; /* 移动端使用更大的高度 */
        padding: 20px 15px;
    }
    
    #unlockConfirmModal .modal-content > div:last-child {
        margin-left: -15px;
        margin-right: -15px;
        margin-bottom: -15px;
        padding: 15px;
        border-radius: 0 0 20px 20px;
    }
}

/* 针对较小屏幕的额外优化 */
@media (max-width: 576px) and (max-height: 750px) {
    #unlockConfirmModal .modal-content {
        max-height: 98vh; /* 小屏幕使用几乎全屏高度 */
        padding: 15px 12px;
    }
    
    #unlockConfirmModal .modal-header {
        margin-bottom: 15px;
    }
    
    #unlockConfirmModal .modal-title {
        font-size: 20px;
    }
    
    #unlockConfirmModal .confirm-info p {
        font-size: 15px;
        line-height: 1.4;
    }
    
    #unlockConfirmModal .quota-display {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* 收藏夹样式 */
.favorites-list {
    max-height: 400px;
    overflow-y: auto;
}

.favorites-loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.favorites-loading i {
    font-size: 24px;
    margin-bottom: 10px;
}

.favorites-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.favorites-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.favorite-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.favorite-item:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

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

.favorite-item-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 4px;
    word-wrap: break-word;
    line-height: 1.4;
}

.favorite-item-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorite-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

.favorite-item-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.favorite-item-btn.delete-btn:hover {
    background: #dc3545;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .favorite-item {
        padding: 12px;
    }
    
    .favorite-item-title {
        font-size: 14px;
    }
    
    .favorite-item-meta {
        font-size: 11px;
    }
    
    .favorite-item-btn {
        width: 28px;
        height: 28px;
    }
}

/* 分组收藏夹样式 */
.favorites-groups {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.favorite-group {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.favorite-group:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
}

.favorite-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: var(--light-bg);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.favorite-group-header:hover {
    background: #f8f9fa;
}

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

.favorite-group-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0 0 4px 0;
    word-wrap: break-word;
    line-height: 1.4;
}

.favorite-group-count {
    font-size: 12px;
    color: var(--primary-color);
    background: #e8f4fd;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    display: inline-block;
}

.favorite-group-toggle {
    margin-left: 10px;
    color: #666;
    transition: transform 0.2s ease;
}

.favorite-group-content {
    border-top: 1px solid #f0f0f0;
    background: white;
    overflow: hidden;
    transition: all 0.3s ease;
}

.favorite-questions-list {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.favorite-question-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #fafafa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.favorite-question-item:hover {
    background: var(--primary-color);
    color: white;
}

.favorite-question-item:hover .question-date {
    color: rgba(255, 255, 255, 0.8);
}

.favorite-question-item:hover .question-number {
    color: rgba(255, 255, 255, 0.9);
}

.favorite-question-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.question-number {
    font-size: 13px;
    font-weight: 500;
}

.question-date {
    font-size: 11px;
    color: #999;
    transition: color 0.2s ease;
}

.favorite-question-delete {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
}

.favorite-question-item:hover .favorite-question-delete {
    opacity: 1;
    color: rgba(255, 255, 255, 0.8);
}

.favorite-question-delete:hover {
    background: rgba(220, 53, 69, 0.9) !important;
    color: white !important;
    transform: scale(1.1);
}

/* 响应式设计 - 分组收藏夹 */
@media (max-width: 576px) {
    .favorite-group-header {
        padding: 12px;
    }
    
    .favorite-group-title {
        font-size: 13px;
    }
    
    .favorite-group-count {
        font-size: 11px;
        padding: 1px 6px;
    }
    
    .favorite-question-item {
        padding: 6px 10px;
    }
    
    .question-number {
        font-size: 12px;
    }
    
    .question-date {
        font-size: 10px;
    }
    
    .favorite-question-delete {
        width: 22px;
        height: 22px;
    }
}

/* 内容保护样式已全部移除，允许用户自由选择、复制和使用内容 */

/* 水印保护已移除 */

/* 移动端内容保护已移除 */

/* 考神一题一课全屏功能样式 */
.explanation-fullscreen-btn {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 8px;
    margin-left: auto;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.explanation-fullscreen-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6fd8 0%, #6b4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 95, 222, 0.3);
}

.explanation-fullscreen-btn:disabled {
    cursor: not-allowed;
    opacity: 0.3;
    background: #ccc;
}

.explanation-fullscreen-btn i {
    font-size: 13px;
}

/* 全屏遮罩层 */
.explanation-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.explanation-fullscreen-overlay.active {
    display: block;
    opacity: 1;
}

/* 全屏内容容器 */
.explanation-fullscreen-content {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: white;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
}

/* 全屏标题栏 */
.explanation-fullscreen-header {
    background: var(--gradient-primary);
    color: white;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.explanation-fullscreen-title {
    font-size: 18px;
    font-weight: 600;
}

.explanation-fullscreen-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.explanation-fullscreen-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 全屏内容区域 */
.explanation-fullscreen-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.explanation-fullscreen-body .explanation-content {
    padding: 32px;
    font-size: 18px;
    line-height: 1.8;
    width: 100%;
}

/* 真正全屏时的优化 */
:fullscreen .explanation-fullscreen-content,
:-webkit-full-screen .explanation-fullscreen-content,
:-moz-full-screen .explanation-fullscreen-content,
:-ms-fullscreen .explanation-fullscreen-content {
    margin: 0;
    border-radius: 0;
    width: 100vw;
    height: 100vh;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .explanation-fullscreen-content {
        margin: 0;
        border-radius: 0;
    }
    
    .explanation-fullscreen-header {
        padding: 12px 16px;
    }
    
    .explanation-fullscreen-title {
        font-size: 16px;
    }
    
    .explanation-fullscreen-body .explanation-content {
        padding: 24px 20px;
        font-size: 16px;
        width: 100%;
    }
}

/* User Dropdown Styles */
.user-dropdown {
    position: relative;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(91, 95, 222, 0.1);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-weight: 500;
}

.dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.dropdown-item:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
}

/* 试卷原题面板标题栏 */
.question-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

/* 试卷原题全屏按钮样式 */
.question-fullscreen-btn {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.question-fullscreen-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6fd8 0%, #6b4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 95, 222, 0.3);
}

.question-fullscreen-btn:disabled {
    cursor: not-allowed;
    opacity: 0.3;
    background: #ccc;
}

.question-fullscreen-btn i {
    font-size: 13px;
}

/* 音频图标样式（SVG麦克风） */
.audio-icon-placeholder {
    margin-right: 6px;
    width: 14px;
    height: 14px;
    stroke: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
    vertical-align: middle;
}

.question-fullscreen-btn .audio-icon-placeholder {
    margin-right: 6px;
}

.explanation-fullscreen-btn .audio-icon-placeholder {
    margin-right: 6px;
}

/* 悬停时的强调效果 */
.question-fullscreen-btn:hover .audio-icon-placeholder,
.top-fullscreen-btn:hover .audio-icon-placeholder,
.explanation-fullscreen-btn:hover .audio-icon-placeholder {
    stroke: rgba(255, 255, 255, 1);
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

/* 试卷原题全屏遮罩层 */
.question-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9998; /* 比考神一题一课全屏稍低一点 */
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.question-fullscreen-overlay.active {
    display: block;
    opacity: 1;
}

/* 试卷原题全屏内容容器 */
.question-fullscreen-content {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: white;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
}

/* 试卷原题全屏标题栏 */
.question-fullscreen-header {
    background: var(--gradient-primary);
    color: white;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.question-fullscreen-title {
    font-size: 18px;
    font-weight: 600;
}

.question-fullscreen-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.question-fullscreen-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 试卷原题全屏内容区域 */
.question-fullscreen-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: #f8f9fa;
}

.question-fullscreen-body .question-content {
    padding: 32px;
    font-size: 16px;
    line-height: 1.6;
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 12px;
    margin-top: 24px;
    margin-bottom: 24px;
}

/* 真正全屏时的优化 */
::fullscreen .question-fullscreen-content,
::-webkit-full-screen .question-fullscreen-content,
::-moz-full-screen .question-fullscreen-content,
::-ms-fullscreen .question-fullscreen-content {
    margin: 0;
    border-radius: 0;
    width: 100vw;
    height: 100vh;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .question-panel-header {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .question-fullscreen-btn {
        padding: 8px 12px;
        font-size: 13px;
        justify-content: center;
    }
    
    .explanation-fullscreen-btn {
        padding: 8px 12px;
        font-size: 13px;
        justify-content: center;
    }
    
    .question-fullscreen-content {
        margin: 0;
        border-radius: 0;
    }
    
    .question-fullscreen-header {
        padding: 12px 16px;
    }
    
    .question-fullscreen-title {
        font-size: 16px;
    }
    
    .question-fullscreen-body .question-content {
        padding: 20px 16px;
        font-size: 15px;
        margin: 16px;
        border-radius: 8px;
    }
}

/* ========== Unified Fullscreen Styles ========== */

/* 统一全屏界面样式 */
.unified-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* 独立顶栏样式 */
.unified-fullscreen-top-bar {
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    min-height: 48px;
    position: relative;
    z-index: 100;
}

.top-bar-left,
.top-bar-right {
    flex: 0 0 auto;
    width: 120px; /* 预留固定宽度保证居中 */
}

.top-bar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-bar-right {
    display: flex;
    justify-content: flex-end;
}

/* 顶栏中的关闭按钮 */
.unified-fullscreen-top-bar .unified-fullscreen-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unified-fullscreen-top-bar .unified-fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* 顶栏中的音频播放器 */
.unified-fullscreen-top-bar .audio-player-container {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.unified-fullscreen-top-bar .teacher-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.unified-fullscreen-overlay.active {
    display: block;
    opacity: 1;
}

.unified-fullscreen-content {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: transparent;
}

/* 简化后的导航栏 */
.unified-fullscreen-nav {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

/* 移除原来的unified-nav-right，因为按钮已移到顶栏 */
.unified-nav-right {
    display: none !important;
}

.paper-title {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.question-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* 全屏模式下的题目选择器按钮 */
.fullscreen-question-selector {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.fullscreen-question-selector:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fullscreen-question-selector:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.3);
}

.fullscreen-question-selector i:first-child {
    font-size: 12px;
    opacity: 0.8;
}

.fullscreen-question-selector i:last-child {
    font-size: 10px;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.fullscreen-question-selector:hover i:last-child {
    transform: rotate(180deg);
}

/* 全屏模式下的模态框z-index调整 */
.unified-fullscreen-overlay .modal {
    z-index: 10001 !important;
}

.unified-fullscreen-overlay .modal-backdrop {
    z-index: 10000 !important;
}

/* 核心切换按钮组 */
.content-toggle-buttons {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.toggle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.toggle-btn:hover::before {
    left: 100%;
}

.toggle-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 20px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    position: relative;
}

.toggle-btn.active::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask-composite: xor;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideInRight {
    0% {
        transform: translateX(30px) scale(0.95);
        opacity: 0;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    0% {
        transform: translateX(-30px) scale(0.95);
        opacity: 0;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.toggle-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-1px);
}

/* 原有的悬浮关闭按钮样式已移除，现在使用顶栏中的关闭按钮样式 */

/* 内容区域 */
.unified-fullscreen-body {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: white;
    margin: 0 20px 20px 20px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.content-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transform: translateX(20px) scale(0.98);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: none;
    filter: blur(2px);
}

.content-area.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    display: block;
    filter: blur(0);
}

.unified-content-wrapper {
    padding: 40px;
    font-size: 18px;
    line-height: 1.7;
    max-width: 1000px;
    margin: 0 auto;
    /* 全屏模式下的内容保护已移除 */
}

/* 真正全屏时的优化 */
:fullscreen .unified-fullscreen-content,
:-webkit-full-screen .unified-fullscreen-content,
:-moz-full-screen .unified-fullscreen-content,
:-ms-fullscreen .unified-fullscreen-content {
    margin: 0;
    border-radius: 0;
    width: 100vw;
    height: 100vh;
}

:fullscreen .unified-fullscreen-body,
:-webkit-full-screen .unified-fullscreen-body,
:-moz-full-screen .unified-fullscreen-body,
:-ms-fullscreen .unified-fullscreen-body {
    margin: 0;
    border-radius: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .unified-fullscreen-top-bar {
        padding: 8px 16px;
        min-height: 44px;
    }
    
    .top-bar-left,
    .top-bar-right {
        width: 80px;
    }
    
    .unified-fullscreen-top-bar .unified-fullscreen-close {
        width: 36px;
        height: 36px;
        font-size: 14px;
        padding: 6px;
    }
    
    .unified-fullscreen-top-bar .teacher-avatar {
        width: 40px;
        height: 40px;
    }
    
    .unified-fullscreen-nav {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .paper-title {
        font-size: 16px;
        text-align: center;
    }
    
    .fullscreen-question-selector {
        padding: 6px 12px;
        font-size: 12px;
        gap: 6px;
    }
    
    .fullscreen-question-selector i:first-child {
        font-size: 10px;
    }
    
    .fullscreen-question-selector i:last-child {
        font-size: 8px;
    }
    
    .unified-nav-center {
        order: -1;
    }
    
    .content-toggle-buttons {
        justify-content: center;
    }
    
    .toggle-btn {
        padding: 10px 12px;
        font-size: 13px;
        flex: 1;
        justify-content: center;
        gap: 6px;
        min-width: 70px;
    }
    
    .toggle-btn span {
        font-size: 13px;
        font-weight: 500;
    }
    
    .unified-fullscreen-body {
        margin: 0 12px 12px 12px;
        border-radius: 12px;
    }
    
    .unified-content-wrapper {
        padding: 24px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .toggle-btn {
        padding: 8px 10px;
        min-width: 60px;
        flex-direction: row;
        gap: 6px;
        font-size: 12px;
        justify-content: center;
    }
    
    .toggle-btn i {
        font-size: 14px;
    }
    
    .toggle-btn span {
        font-size: 12px;
        font-weight: 500;
    }
}

/* ========== Question Selector Styles ========== */

/* Question Selector Button */
.question-selector-btn {
    position: relative;
    background: var(--light-bg) !important;
    color: var(--dark-color) !important;
    font-weight: 600;
    min-width: 120px;
    justify-content: space-between;
    border: 2px solid rgba(91, 95, 222, 0.2) !important;
}

.question-selector-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--light-bg) !important;
    color: var(--dark-color) !important;
    border-color: var(--primary-color) !important;
}

.question-selector-btn i:first-child {
    font-size: 16px;
}

.question-selector-btn i:last-child {
    font-size: 12px;
    transition: transform 0.3s;
}

.question-selector-btn:hover i:last-child {
    transform: rotate(180deg);
}

/* Top Fullscreen Button */
.top-fullscreen-btn {
    background: var(--gradient-primary) !important;
    color: white !important;
    font-weight: 600;
    border: none !important;
    box-shadow: var(--shadow-colored);
}

.top-fullscreen-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6b4190 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(91, 95, 222, 0.4);
    color: white !important;
}

.top-fullscreen-btn .audio-icon-placeholder {
    margin-right: 6px;
    width: 14px;
    height: 14px;
    stroke: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
    vertical-align: middle;
}

/* Question Selector Modal */
.question-selector-modal {
    max-width: 900px !important;
    width: 95% !important;
    max-height: 85vh !important;
}

.question-selector-content {
    padding: 0 30px 30px 30px;
}

.question-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: var(--light-bg);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
}

#questionRangeInfo {
    color: var(--dark-color);
}

#currentQuestionInfo {
    color: var(--primary-color);
    font-weight: 600;
}

/* Question Grid */
.question-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: rgba(247, 249, 251, 0.3);
    border-radius: 16px;
    border: 2px dashed rgba(91, 95, 222, 0.2);
}

.grid-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.grid-loading i {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Question Number Button */
.question-number-btn {
    background: white;
    border: 2px solid rgba(91, 95, 222, 0.2);
    color: var(--dark-color);
    font-weight: 600;
    font-size: 14px;
    padding: 12px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-number-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    transition: left 0.3s;
}

.question-number-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(91, 95, 222, 0.2);
    border-color: var(--primary-color);
}

.question-number-btn:hover::before {
    left: 0;
}

/* Current Question */
.question-number-btn.current {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(91, 95, 222, 0.4);
}

.question-number-btn.current::after {
    content: '当前';
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--accent-color);
    color: var(--dark-color);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255, 230, 109, 0.6);
}

/* Viewed Question */
.question-number-btn.viewed {
    background: rgba(91, 95, 222, 0.1);
    border-color: rgba(91, 95, 222, 0.3);
    color: var(--primary-color);
}

/* Question Grid Scrollbar */
.question-grid::-webkit-scrollbar {
    width: 6px;
}

.question-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.question-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.question-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .question-selector-modal {
        max-width: 95% !important;
        margin: 20px;
    }
    
    .question-selector-content {
        padding: 0 20px 20px 20px;
    }
    
    .question-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .question-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 10px;
        padding: 15px;
        max-height: 300px;
    }
    
    .question-number-btn {
        min-height: 44px;
        font-size: 13px;
        padding: 10px 6px;
    }
    
    .question-number-btn.current::after {
        font-size: 8px;
        padding: 1px 4px;
    }
}

@media (max-width: 576px) {
    .question-selector-btn {
        min-width: 100px;
        font-size: 13px;
    }
    
    .question-selector-btn span {
        display: block;
    }
    
    .question-grid {
        grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
        gap: 8px;
        padding: 12px;
    }
    
    .question-number-btn {
        min-height: 40px;
        font-size: 12px;
        padding: 8px 4px;
        border-radius: 10px;
    }
}

/* ========== 全屏模式音频播放组件样式 ========== */

/* 音频播放组件容器 */
.audio-player-container {
    display: flex;
    align-items: center;
    position: relative;
    margin-right: 20px;
    z-index: 1000;
}

/* 老师头像 */
.teacher-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    overflow: visible;
}

.teacher-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.teacher-avatar i {
    color: white;
    font-size: 24px;
}

/* 呼吸效果 */
.breathing-effect {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.breathing-effect.active {
    opacity: 1;
    animation: breathe 2s ease-in-out infinite;
}

@keyframes breathe {
    0% { 
        transform: scale(0.8);
        opacity: 0.7;
    }
    50% { 
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
    }
    100% { 
        transform: scale(0.8);
        opacity: 0.7;
    }
}

/* 音频控制器 */
.audio-controls {
    position: absolute;
    top: 50%;
    /* 默认优先显示在头像左侧，由JS按可用空间动态切换 */
    right: 60px;
    left: auto;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 8px 15px;
    min-width: 200px;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 10050;
}

.audio-controls.visible {
    display: flex !important;
    opacity: 1;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50%) translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
    }
}

/* 播放/暂停按钮 */
.play-pause-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 10px;
}

.play-pause-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.play-pause-btn i {
    font-size: 14px;
}

/* 进度条容器 */
.audio-progress-container {
    flex: 1;
    position: relative;
    padding: 8px 0; /* 放大命中区域，便于拖拽 */
    touch-action: none; /* 避免拖拽时触发页面滚动 */
}

.audio-progress-bar {
    width: 100%;
    height: 10px; /* 更易操作 */
    background: rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.audio-progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 6px;
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
}

.audio-progress::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -4px;
    width: 16px; /* 更大的拖动手柄 */
    height: 16px;
    background: white;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .audio-player-container {
        margin-right: 10px;
    }
    
    .teacher-avatar {
        width: 40px;
        height: 40px;
    }
    
    .teacher-avatar i {
        font-size: 20px;
    }
    
    .breathing-effect {
        width: 16px;
        height: 16px;
    }
    
    .audio-controls {
        right: 50px; /* 默认左侧显示时，移动端靠左的间距 */
        left: auto;
        min-width: 160px;
        padding: 6px 12px;
    }
    
    .play-pause-btn {
        width: 30px;
        height: 30px;
    }
    
    .play-pause-btn i {
        font-size: 12px;
    }
    
    .audio-progress-bar { height: 8px; }
    .audio-progress::after { width: 14px; height: 14px; right: -3px; }
}

/* 原有的unified-nav-right样式已移除，现在使用顶栏布局 */

/* 音频按钮通用样式 */
.audio-btn {
    outline: none;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* 隐藏的音频元素 */
#fullscreenAudioElement {
    display: none;
}

/* ========== 播放速度控制 ========== */
.audio-speed-control {
    position: relative;
    margin: 0 10px;
}

.audio-speed-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 5px 12px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 50px;
}

.audio-speed-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.speed-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    min-width: 70px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10060;
}

.speed-menu.visible {
    display: flex;
    animation: speedMenuFadeIn 0.2s ease;
}

@keyframes speedMenuFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.speed-option {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s ease;
    text-align: center;
}

.speed-option:hover {
    background: rgba(102, 126, 234, 0.3);
    color: white;
}

.speed-option.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
}

/* 移动端播放速度适配 */
@media (max-width: 768px) {
    .audio-speed-btn {
        padding: 4px 10px;
        font-size: 12px;
        min-width: 45px;
    }
    
    .speed-menu {
        min-width: 60px;
        padding: 6px;
    }
    
    .speed-option {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* ========== 扩展音频进度条面板 ========== */
.audio-seek-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10100;
}

.audio-seek-panel.visible {
    display: flex;
    animation: seekPanelFadeIn 0.2s ease;
}

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

.seek-panel-content {
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px 32px;
    min-width: 400px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.seek-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.seek-panel-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.seek-panel-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seek-panel-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 大进度条 */
.seek-progress-container {
    padding: 16px 0;
}

.seek-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
}

.seek-progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 6px;
    width: 0%;
    transition: width 0.1s ease;
    pointer-events: none;
}

.seek-thumb {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    cursor: grab;
    left: 0%;
    transition: transform 0.1s ease;
}

.seek-thumb:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.15);
}

/* 时间显示 */
.seek-time-display {
    text-align: center;
    margin-top: 16px;
    font-size: 28px;
    font-weight: 600;
    color: white;
    font-family: 'Courier New', monospace;
}

.seek-separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 8px;
}

.seek-total-time {
    color: rgba(255, 255, 255, 0.6);
}

/* 拖动预览时间 */
.seek-preview-time {
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
    color: #ffa726;
    font-weight: 500;
}

#seekPreviewValue {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .seek-panel-content {
        min-width: 90vw;
        padding: 20px 24px;
    }
    
    .seek-time-display {
        font-size: 24px;
    }
    
    .seek-thumb {
        width: 28px;
        height: 28px;
    }
    
    .seek-progress-bar {
        height: 14px;
    }
}

/* ========== 词汇注解样式 ========== */

/* 高亮词汇样式 */
.vocab-term {
    border-bottom: 2px dashed #667eea;
    background: rgba(102, 126, 234, 0.08);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: inline-block;
}

.vocab-term:hover {
    background: rgba(102, 126, 234, 0.18);
    border-bottom-color: #764ba2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.vocab-term::after {
    content: '📖';
    position: absolute;
    top: -18px;
    right: -2px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

.vocab-term:hover::after {
    opacity: 1;
}

/* 词汇解释浮层遮罩 */
.vocabulary-explanation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(10px);
    z-index: 20000; /* raised above unified-fullscreen-overlay (10000) */
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vocabulary-explanation-overlay.active {
    opacity: 1;
}

/* 词汇解释模态框 */
.vocabulary-explanation-modal {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.vocabulary-explanation-overlay.active .vocabulary-explanation-modal {
    transform: scale(1);
    opacity: 1;
}

/* 模态框头部 */
.vocab-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 30px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px 24px 0 0;
}

.vocab-term-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.vocab-term-title i {
    font-size: 26px;
    opacity: 0.9;
}

.vocab-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ========== 词汇收藏下拉菜单 ========== */
.vocab-save-dropdown {
    position: relative;
    display: inline-block;
}

/* "+" 按钮 */
.vocab-add-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.vocab-add-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.vocab-add-btn:active {
    transform: scale(0.95);
}

/* 已有任一收藏（笔记本/词汇本）时的高亮状态 */
.vocab-add-btn.has-saved {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    border-color: rgba(34, 197, 94, 0.7);
}

.vocab-add-btn.has-saved::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

/* 下拉菜单 */
.vocab-save-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 10000;
    animation: vocabMenuSlideDown 0.2s ease;
}

@keyframes vocabMenuSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vocab-save-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #333;
    font-size: 14px;
}

.vocab-save-option:hover {
    background: #f3f4f6;
}

.vocab-save-option.saved {
    background: #ecfdf5;
    color: #047857;
}

.vocab-save-option.saved i {
    color: #047857;
}

.vocab-save-option i {
    width: 18px;
    text-align: center;
}

.vocab-save-option:first-child i {
    color: #6366f1; /* 笔记本图标 - 蓝紫色 */
}

.vocab-save-option:last-child i {
    color: #10b981; /* 词汇本图标 - 绿色 */
}

.vocab-save-option + .vocab-save-option {
    border-top: 1px solid #e5e7eb;
}

.vocab-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
}

.vocab-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* 模态框主体 */
.vocab-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* 上下文引用 */
.vocab-context {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ebf5 100%);
    border-left: 4px solid #667eea;
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 12px;
    font-size: 15px;
    color: #4a5568;
    font-style: italic;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.vocab-context i {
    color: #667eea;
    font-size: 16px;
    margin-top: 2px;
    opacity: 0.7;
}

/* Markdown渲染内容 */
.vocab-explanation.markdown-content {
    line-height: 1.8;
    color: #2d3748;
}

.vocab-explanation h3 {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    margin-top: 24px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8ebf5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vocab-explanation h3:first-child {
    margin-top: 0;
}

.vocab-explanation p {
    margin-bottom: 16px;
    color: #4a5568;
}

.vocab-explanation strong {
    color: #764ba2;
    font-weight: 700;
}

.vocab-explanation em {
    color: #667eea;
    font-style: italic;
}

.vocab-explanation ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.vocab-explanation li {
    margin-bottom: 10px;
    color: #4a5568;
    position: relative;
    padding-left: 8px;
}

.vocab-explanation li::marker {
    color: #667eea;
    font-weight: 700;
}

/* 模态框底部 */
.vocab-modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f0f0f0;
    background: linear-gradient(to right, #f7f9fb 0%, #eef2f7 100%);
    border-radius: 0 0 24px 24px;
}

.vocab-questions-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #718096;
    font-weight: 600;
}

.vocab-questions-info i {
    color: #667eea;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .vocabulary-explanation-modal {
        width: 95%;
        max-height: 90vh;
        border-radius: 16px;
    }
    
    .vocab-modal-header {
        padding: 20px;
        border-radius: 16px 16px 0 0;
    }
    
    .vocab-term-title {
        font-size: 20px;
    }
    
    .vocab-modal-body {
        padding: 20px;
    }
    
    .vocab-explanation h3 {
        font-size: 16px;
    }
    
    .vocab-modal-footer {
        padding: 16px 20px;
        border-radius: 0 0 16px 16px;
    }
    
    .vocab-term::after {
        font-size: 10px;
        top: -16px;
    }
}

/* ========== Toast通知样式 ========== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    min-width: 250px;
    max-width: 400px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast i {
    font-size: 18px;
    flex-shrink: 0;
}

.toast span {
    flex: 1;
    font-size: 14px;
    color: #2d3748;
    line-height: 1.4;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success i {
    color: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error i {
    color: #ef4444;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-info i {
    color: #3b82f6;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-warning i {
    color: #f59e0b;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .toast-container {
        top: 70px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* ========== 划词摘录工具条 ========== */
.selection-toolbar {
    position: absolute;
    display: none;
    opacity: 0;
    z-index: 10000;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    padding: 4px;
    transition: opacity 0.2s ease;
}

.selection-toolbar .toolbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 6px;
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.selection-toolbar .toolbar-btn:hover {
    background: white;
    transform: scale(1.05);
}

.selection-toolbar .toolbar-btn i {
    font-size: 16px;
}

/* 已摘录文本标记 */
.excerpted-text {
    background: rgba(251, 191, 36, 0.12); /* 淡橙色背景微提示 */
    border-bottom: 2px solid #f6ad55;     /* 淡橙色实线下划线 */
    cursor: help;
    transition: background 0.3s ease;
}

.excerpted-text:hover {
    background: rgba(251, 191, 36, 0.2);
}

/* ========== 笔记本快捷按钮样式 ========== */
.notebook-quick-btn {
    position: relative;
}

.notebook-quick-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Notebook quick button highlight */
.control-bar .notebook-quick-btn i {
    color: var(--warning-color);
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.control-bar .notebook-quick-btn:hover i,
.control-bar .notebook-quick-btn:focus i {
    color: #FFB74D;
    text-shadow: 0 0 8px rgba(255, 167, 38, 0.45);
}

.control-bar .notebook-quick-btn .badge {
    background: var(--warning-color);
    color: #fff;
}

/* ========== 笔记本侧边抽屉 ========== */
.notebook-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    visibility: hidden;
    transition: visibility 0.3s ease;
}

.notebook-drawer.active {
    visibility: visible;
}

.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notebook-drawer.active .drawer-overlay {
    opacity: 1;
}

.drawer-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.notebook-drawer.active .drawer-content {
    transform: translateX(0);
}

/* 抽屉头部 */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.drawer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.drawer-title i {
    font-size: 22px;
}

.drawer-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 抽屉主体 */
.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.drawer-section {
    margin-bottom: 24px;
}

.drawer-section .section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.drawer-section .section-header i {
    color: #667eea;
    font-size: 18px;
}

.drawer-section .section-content {
    font-size: 14px;
    color: #4a5568;
}

.loading-text {
    padding: 12px;
    text-align: center;
    color: #9ca3af;
    font-style: italic;
}

/* 搜索输入框 */
.drawer-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.drawer-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 复习摘要卡片 */
.review-summary-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ebf5 100%);
    border-left: 4px solid #667eea;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.review-summary-card .count {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.review-summary-card .text {
    font-size: 14px;
    color: #4a5568;
}

/* 笔记列表项 */
.note-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.note-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
    transform: translateX(-2px);
}

.note-item .note-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.note-item .note-type.vocabulary {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.note-item .note-type.excerpt {
    background: rgba(251, 191, 36, 0.1);
    color: #f59e0b;
}

.note-item .note-content {
    font-size: 14px;
    color: #2d3748;
    line-height: 1.5;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.note-item .note-meta {
    font-size: 12px;
    color: #9ca3af;
}

/* 抽屉底部 */
.drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f9fafb;
}

.btn-drawer-action {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* 响应式布局 */
@media (max-width: 768px) {
    .drawer-content {
        width: 100%;
    }
} 