/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --accent-color: #9b59b6;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #34495e;
    --gray-light: #ecf0f1;
    --gray-medium: #bdc3c7;
    --gray-dark: #7f8c8d;
    --border-radius: 12px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
    min-height: 100vh;
}

/* 容器样式 */
.main-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 头部样式 */
.main-header {
    background: white;
    box-shadow: var(--box-shadow);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-section h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-section i {
    font-size: 1.8rem;
}

/* 用户信息样式 */
.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

.status-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.user-name {
    font-weight: 600;
}

.expiry-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.expiry-status.valid {
    background: var(--secondary-color);
    color: white;
}

.expiry-status.warning {
    background: var(--warning-color);
    color: white;
}

.expiry-status.expired {
    background: var(--danger-color);
    color: white;
}

/* 用户菜单 */
.user-menu {
    position: relative;
}

.user-menu-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

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

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 12px 20px;
    color: var(--dark-color);
    text-decoration: none;
    border-bottom: 1px solid var(--light-color);
    transition: var(--transition);
}

.user-dropdown a:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.user-dropdown a i {
    margin-right: 8px;
    width: 20px;
}

/* 调整主要内容区域的位置，为固定侧边栏腾出空间 */
.main-content {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 20px 20px 20px 290px; /* 左边距增加，为侧边栏腾出空间 */
    position: relative;
}

/* 修改侧边栏为固定定位 */
.sidebar {
    position: fixed;
    left: 20px;
    top: calc(80px + 20px); /* 80px是头部高度，20px是上边距 */
    width: 200px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px 0;
    height: calc(50vh - 140px); /* 100vh减去头部和上下边距 */
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
}

.main-nav ul {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    color: var(--dark-color);
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.nav-link.active {
    background: var(--light-color);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

/* 内容区域 */
.content-area {
    flex: 1;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    overflow-y: auto;
}

.mode-content {
    display: none;
}

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

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

/* 练习模式等级分类优化 */
.level-filter {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 30px;
}

.level-filter h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group label {
    font-weight: 600;
    min-width: 100px;
}

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

.level-btn {
    padding: 12px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

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

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

/* 题目状态标识 */
.question-status {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.question-status.unanswered {
    background: #f8f9fa;
    color: var(--gray-color);
    border: 2px solid #ddd;
}

.question-status.answered {
    background: #e3f2fd;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.question-status.correct {
    background: #e8f5e9;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.question-status.incorrect {
    background: #ffebee;
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
}

/* 提交后错误题目标识 */
.question-card.wrong {
    border: 2px solid var(--danger-color);
    background: #fff5f5;
}

.question-card.wrong .question-header {
    border-bottom-color: var(--danger-color);
}

/* 练习控制按钮间距 */
.practice-controls {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.form-control {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.type-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

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

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

.number-controls input {
    width: 80px;
    text-align: center;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

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

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

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-success:hover {
    background: #27ae60;
}

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

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

.btn-secondary {
    background: var(--gray-color);
    color: white;
}

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-block {
    display: block;
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 题目容器 */
.questions-container {
    margin-top: 30px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-color);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

/* 题目卡片 */
.question-card {
    background: white;
    border: 2px solid #eee;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 20px;
    transition: var(--transition);
    position: relative;
}

.question-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--box-shadow);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-color);
}

.question-number {
    font-weight: 600;
    color: var(--dark-color);
}

.question-type {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.question-type.single {
    background: #e3f2fd;
    color: #1976d2;
}

.question-type.multiple {
    background: #f3e5f5;
    color: #7b1fa2;
}

.question-type.judge {
    background: #e8f5e9;
    color: #388e3c;
}

.question-type.fill {
    background: #fff3e0;
    color: #f57c00;
}

.question-type.program {
    background: #fce4ec;
    color: #c2185b;
}

.question-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* 选项样式 */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 15px;
    background: var(--light-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.option-item.selected {
    background: #d1ecf1;
    border-color: var(--primary-color);
}

.option-checkbox {
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.option-label {
    font-weight: 600;
    margin-right: 10px;
    min-width: 30px;
}

.option-content {
    flex: 1;
}

/* 填空题样式 */
.fill-input {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    width: 100%;
    max-width: 300px;
    margin: 10px 0;
}

/* 编程题样式 */
.code-editor {
    width: 100%;
    height: 200px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    padding: 15px;
    margin: 10px 0;
    resize: vertical;
}

/* 模拟考试选择优化 */
.exam-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.exam-card {
    background: white;
    border: 2px solid #eee;
    border-radius: var(--border-radius);
    padding: 20px;
    width: 180px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.exam-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.exam-card.selected {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.exam-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.exam-card h4 {
    margin: 15px 0 10px;
    color: var(--dark-color);
}

.exam-card p {
    color: var(--gray-color);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
}

/* 考试等级选择 */
.exam-level-selection {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.level-selection-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.level-selection-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

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

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

/* 考试列表样式 */
.fixed-exam-list {
    margin-top: 20px;
}

.exam-list-item {
    background: white;
    border: 2px solid #eee;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.exam-list-item:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.exam-list-item.selected {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

.exam-description {
    color: var(--gray-color);
    margin: 10px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.exam-meta {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.exam-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.no-exams {
    text-align: center;
    padding: 30px;
    color: var(--gray-color);
    font-style: italic;
}

/* 修改考试计时器的固定定位 */
.exam-header {
    background: var(--dark-color);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 20px; /* 距离顶部20px */
    z-index: 50;
    box-shadow: var(--box-shadow);
}

/* 考试计时器样式 */
.exam-timer-container {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--dark-color);
    color: white;
    border-radius: var(--border-radius);
    padding: 15px 25px;
    box-shadow: var(--box-shadow);
    z-index: 1000;
    display: none; /* 默认隐藏，考试开始后显示 */
}

.exam-timer-container.active {
    display: block;
}

.exam-timer {
    font-size: 1.3rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.timer-label {
    font-size: 0.9rem;
    opacity: 0.8;
    font-family: inherit;
}

.timer-value {
    font-size: 1.5rem;
    color: white;
}

/* 考试内容区域调整，避免被计时器遮挡 */
.exam-container {
    margin-top: 20px;
}

.exam-info h3 {
    margin-bottom: 10px;
}

.timer {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: var(--border-radius);
}

.exam-submit {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.exam-warning {
    margin-top: 15px;
    padding: 10px;
    background: #fff3cd;
    color: #856404;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 账户过期提醒 */
.expiry-alert {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 20px 0;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

.expiry-alert h3 {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.expiry-alert .btn {
    margin-top: 15px;
    background: white;
    color: var(--danger-color);
}

.expiry-alert .btn:hover {
    background: #f8f9fa;
}

/* 禁用状态 */
.content-disabled {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.content-disabled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* 支付界面优化 */
.modal-content.payment-modal {
    max-width: 600px;
    width: 90%;
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid var(--light-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-color);
    line-height: 1;
}

.close-modal:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 20px;
}

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

.payment-option {
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}

.payment-option:hover {
    border-color: var(--primary-color);
}

.payment-option.active {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.payment-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.payment-option h4 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.price {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 10px 0;
}

.payment-methods {
    margin: 30px 0;
}

.method-options {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.method-btn {
    flex: 1;
    padding: 15px;
    border: 2px solid #ddd;
    background: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.method-btn.active {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

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

.payment-qrcode {
    text-align: center;
    padding: 30px;
    background: var(--light-color);
    border-radius: var(--border-radius);
    margin: 20px 0;
}

.qrcode-placeholder {
    font-size: 4rem;
    color: var(--gray-color);
    margin-bottom: 20px;
}

.payment-tip {
    color: var(--gray-color);
    font-style: italic;
}

.payment-confirm {
    margin-top: 30px;
}

.payment-note {
    text-align: center;
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-top: 15px;
}

/* 成绩结果样式 */
.score-result {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
}

.score-result h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.score-item strong {
    font-size: 1.2rem;
}

.score-item .success {
    color: var(--secondary-color);
}

.score-item .error {
    color: var(--danger-color);
}

.wrong-questions {
    margin-top: 20px;
    padding: 15px;
    background: #fff5f5;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--danger-color);
}

.wrong-questions p {
    margin: 5px 0;
}

/* 底部样式 */
.main-footer {
    background: var(--dark-color);
    color: white;
    padding: 30px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-qrcode {
    text-align: center;
}

.qrcode {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qrcode i {
    font-size: 3rem;
    opacity: 0.8;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* 错误提示 */
.error-message {
    background: #fee;
    color: var(--danger-color);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin: 10px 0;
    border-left: 4px solid var(--danger-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin: 10px 0;
    border-left: 4px solid var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 解析样式 */
.explanation-header {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.explanation-content {
    line-height: 1.6;
    color: #666;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .main-content {
        padding-left: 290px; /* 保持左侧边栏空间 */
    }
}

@media (max-width: 991px) {
    .sidebar {
        position: relative;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .main-content {
        padding: 20px;
        flex-direction: column;
    }
    
    .exam-timer-container {
        position: sticky;
        top: 80px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        margin: 10px auto;
    }
}

@media (max-width: 767px) {
    .exam-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        position: relative;
        top: 0;
    }
    
    .exam-timer-container {
        position: fixed;
        top: 10px;
        right: 10px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .timer-value {
        font-size: 1.2rem;
    }
}

/* 添加平滑滚动效果 */
.questions-container {
    scroll-margin-top: 100px; /* 确保滚动时题目不会被顶部固定元素遮挡 */
}

.question-card {
    scroll-margin-top: 80px;
}

/* 防止内容被固定元素遮挡的通用类 */
.scroll-margin {
    scroll-margin-top: 120px;
}

/* 改进的固定定位效果 */
.fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.fixed-left {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1020;
}

/* 为固定元素添加背景模糊效果 */
.sidebar,
.exam-timer-container,
.exam-header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 深色模式下调整 */
@media (prefers-color-scheme: dark) {
    .sidebar {
        background: rgba(52, 58, 64, 0.9);
    }
    
    .exam-timer-container {
        background: rgba(52, 58, 64, 0.9);
    }
}

/* 错误状态样式 */
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--danger-color);
}

.error-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.error-state h3 {
    margin-bottom: 15px;
}

.error-state p {
    margin-bottom: 20px;
    line-height: 1.5;
}

/* 成绩结果样式 */
.score-result {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid #e0e0e0;
}

.score-result h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.score-item strong {
    font-size: 1.2rem;
}

.score-item .success {
    color: var(--secondary-color);
}

.score-item .error {
    color: var(--danger-color);
}

.wrong-questions {
    margin-top: 20px;
    padding: 15px;
    background: #fff5f5;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--danger-color);
}

.wrong-questions p {
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 练习结果模态框样式 */
.practice-result-modal {
    max-width: 600px;
    width: 90%;
}

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

.result-summary {
    text-align: center;
    padding: 20px;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.result-icon.success {
    color: var(--secondary-color);
}

.result-icon.warning {
    color: var(--warning-color);
}

.total-score {
    font-size: 3rem;
    font-weight: 700;
    margin: 20px 0;
    color: var(--primary-color);
}

.score-label {
    font-size: 1.2rem;
    color: var(--gray-color);
    margin-bottom: 10px;
}

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

.stat-item {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.stat-value.correct {
    color: var(--secondary-color);
}

.stat-value.incorrect {
    color: var(--danger-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.result-details {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.wrong-questions-list {
    margin-top: 15px;
}

.wrong-question-item {
    padding: 10px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 3px solid var(--danger-color);
}

.submit-status {
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.submit-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.submit-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.submit-status.loading {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .result-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .result-stats {
        grid-template-columns: 1fr;
    }
    
    .total-score {
        font-size: 2.5rem;
    }
}

/* 添加动画效果 */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

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

.practice-result-modal .modal-content {
    animation: fadeIn 0.3s ease;
}

.success-message {
    padding: 15px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 8px;
    text-align: center;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* 加载动画 */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 在文件末尾添加以下样式 */

/* 优化模态框大小 */
.modal-content {
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* 支付模态框优化 */
.modal-content.payment-modal {
    max-width: 500px;
    width: 90%;
}

/* 练习结果模态框优化 */
.modal-content.practice-result-modal {
    max-width: 450px;
    width: 90%;
    max-height: 70vh;
}

/* 调整模态框内容内边距 */
.modal-body {
    padding: 20px 25px;
}

.modal-header {
    padding: 15px 25px;
}

.modal-footer {
    padding: 15px 25px;
}

/* 缩小练习结果内容 */
.practice-result-modal .result-summary {
    padding: 15px 0;
}

.practice-result-modal .total-score {
    font-size: 2.2rem;
    margin: 10px 0;
}

.practice-result-modal .result-stats {
    margin: 20px 0;
}

.practice-result-modal .stat-item {
    padding: 15px;
}

.practice-result-modal .stat-value {
    font-size: 1.5rem;
}


/* 添加到 style.css 文件末尾 */

/* 练习统计特定样式 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark-color);
}

.stat-value.success {
    color: var(--secondary-color);
}

.stat-value.danger {
    color: var(--danger-color);
}

.level-stats {
    margin-bottom: 25px;
}

.level-filter-section {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.detail-loading {
    text-align: center;
    padding: 30px;
}

.loading-spinner.small {
    width: 30px;
    height: 30px;
    border-width: 3px;
}

.summary-table {
    overflow-x: auto;
    margin-top: 15px;
}

.summary-table table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table th,
.summary-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.summary-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--dark-color);
    white-space: nowrap;
}

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

.detail-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.detail-table th,
.detail-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.detail-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--dark-color);
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .summary-table th,
    .summary-table td,
    .detail-table th,
    .detail-table td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}


/* 添加到 style.css 文件末尾 */

/* 考试类型徽章 */
.exam-type-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.exam-type-badge.type-custom {
    background: #d4edda;
    color: #155724;
}

.exam-type-badge.type-fixed {
    background: #cce5ff;
    color: #004085;
}

/* 考试列表项 */
.exam-list-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.exam-list-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.exam-list-item.selected {
    border-color: var(--primary-color);
    background: #f0f8ff;
}

.exam-list-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.exam-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.exam-description {
    color: var(--gray-color);
    margin: 10px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.exam-meta {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.exam-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.status-available {
    color: var(--secondary-color);
}

.status-unavailable {
    color: var(--danger-color);
}

.exam-time-status {
    margin-top: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.exam-disabled-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
}

.exam-disabled-overlay i {
    font-size: 2rem;
    color: var(--danger-color);
    margin-bottom: 10px;
}

/* 考试计时器警告状态 */
.timer-value.warning {
    color: var(--warning-color);
    animation: pulse 2s infinite;
}

.timer-value.danger {
    color: var(--danger-color);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 题目分值 */
.question-marks {
    padding: 4px 10px;
    background: #e3f2fd;
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* 加载状态 */
.loading-exams, .loading-exam {
    text-align: center;
    padding: 40px;
    color: var(--gray-color);
}

/* 等级选择按钮 */
.level-selection-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.level-selection-btn {
    padding: 12px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

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

.level-selection-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}


/* 全局考试计时器样式 */
.global-exam-timer-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  text-align: center;
  pointer-events: none; /* 让点击穿透到下方内容 */
}

.global-exam-timer {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 20px;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  font-family: 'Arial', sans-serif;
  font-size: 16px;
  font-weight: bold;
  animation: slideDown 0.3s ease-out;
  pointer-events: auto; /* 允许点击计时器本身 */
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.global-exam-timer .timer-label {
  margin-right: 10px;
}

.global-exam-timer .timer-value {
  font-family: 'Courier New', monospace;
  font-size: 18px;
  min-width: 60px;
  display: inline-block;
  text-align: center;
}

/* 计时器警告状态 */
.global-exam-timer .timer-value.warning {
  color: #ff9800;
  animation: pulse 1s infinite;
}

.global-exam-timer .timer-value.danger {
  color: #f44336;
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* 确保页面内容不被计时器遮挡 */
body.exam-mode-active {
  padding-top: 50px;
}

/* 紧急状态样式 */
.global-exam-timer .timer-value.urgent {
    color: #ff0000;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
    animation: urgentPulse 0.3s infinite alternate;
}

@keyframes urgentPulse {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* 用户中心样式 - 添加到 style.css 末尾 */

/* 用户中心容器 */
.user-center-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* 用户头部 */
.user-header {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.user-avatar {
    font-size: 4rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-details {
    flex: 1;
}

.user-details h2 {
    margin-bottom: 5px;
    font-size: 1.8rem;
}

.user-id {
    opacity: 0.8;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* 状态徽章 */
.user-status-badge {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
}

.user-status-badge.valid {
    background: rgba(46, 204, 113, 0.2);
    color: #37f888;
}

.user-status-badge.warning {
    background: rgba(243, 156, 18, 0.2);
    color: #d35400;
}

.user-status-badge.expired {
    background: rgba(231, 76, 60, 0.2);
    color: #c0392b;
}

/* 用户选项卡 */
.user-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 5px;
    flex-wrap: wrap;
}

.user-tab {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    background: none;
    border: none;
    border-radius: calc(var(--border-radius) - 4px);
    color: var(--dark-color);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    font-weight: 500;
}

.user-tab:hover {
    background: #e9ecef;
    color: var(--primary-color);
}

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

/* 选项卡内容 */
.user-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

/* 表单样式 */
.info-form, .security-form, .payments-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.info-form h3, .security-form h3, .payments-container h3 {
    margin-bottom: 25px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-color);
}

/* 安全设置部分 */
.security-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.security-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.security-section h4 {
    margin-bottom: 15px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

/* 密码输入框包装 */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 45px;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    font-size: 1.1rem;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* 消息提示 */
.message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--secondary-color);
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger-color);
}

.message.warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

.message.loading {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--primary-color);
}

.message i {
    font-size: 1.1rem;
}

/* 充值统计 */
.payment-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0 30px;
}

.summary-item {
    text-align: center;
    padding: 25px 20px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    transition: var(--transition);
}

.summary-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.summary-label {
    font-size: 0.95rem;
    color: var(--gray-color);
    margin-bottom: 12px;
    font-weight: 500;
}

.summary-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
}

/* 充值按钮区域 */
.payment-actions {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

/* 充值表格 */
.payment-table {
    margin-top: 30px;
}

.table-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.table-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark-color);
}

.table-responsive {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid #e9ecef;
}

.payment-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.payment-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--dark-color);
    text-align: left;
    padding: 15px;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.payment-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

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

.payment-table .amount {
    font-weight: 600;
    color: var(--primary-color);
}

/* 状态徽章 */
.status-badge {
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-badge.success {
    background: #d4edda;
    color: #155724;
}

.status-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.status-badge.danger {
    background: #f8d7da;
    color: #721c24;
}

/* 无记录状态 */
.no-records {
    text-align: center;
    padding: 50px 20px;
    color: var(--gray-color);
}

.no-records i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-records h4 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

/* 加载状态 */
.loading-records {
    text-align: center;
    padding: 40px;
    color: var(--gray-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .user-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
    
    .user-avatar {
        width: 80px;
        height: 80px;
        font-size: 3rem;
    }
    
    .user-tabs {
        flex-direction: column;
    }
    
    .user-tab {
        min-width: 100%;
        justify-content: flex-start;
    }
    
    .payment-summary {
        grid-template-columns: 1fr;
    }
    
    .summary-item {
        padding: 20px 15px;
    }
    
    .summary-value {
        font-size: 1.5rem;
    }
    
    .payment-actions {
        flex-direction: column;
    }
    
    .payment-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .user-center-container {
        padding: 10px;
    }
    
    .info-form, .security-form, .payments-container {
        padding: 20px 15px;
    }
    
    .payment-table th, .payment-table td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
}


/* 错题本样式 */

/* 错题本头部 */
.wrong-questions-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: var(--box-shadow);
}

.wrong-questions-header h3 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wrong-questions-header .subtitle {
    opacity: 0.9;
    font-size: 1rem;
}

/* style.css - 添加错题本卡片式样式 */

/* 错题本卡片容器 */
.wrong-questions-cards {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

/* 错题卡片 */
.wrong-question-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 2px solid #e0e0e0;
    overflow: hidden;
    transition: var(--transition);
}

.wrong-question-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 错题头部 */
.wrong-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 15px;
}

.question-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.question-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark-color);
}

/* 错题统计信息 */
.wrong-stats {
    display: flex;
    align-items: center;
    gap: 15px;
}

.wrong-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.wrong-count-badge i {
    font-size: 0.9rem;
}

.wrong-count-badge.low {
    background: #fff8e1;
    color: #ff8f00;
    border: 1px solid #ffd54f;
}

.wrong-count-badge.medium {
    background: #ffecb3;
    color: #ef6c00;
    border: 1px solid #ffb74d;
}

.wrong-count-badge.high {
    background: #ffcdd2;
    color: #d32f2f;
    border: 1px solid #ef9a9a;
}

.last-wrong-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #e3f2fd;
    color: #1565c0;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid #bbdefb;
}

.last-wrong-time i {
    font-size: 0.9rem;
}

/* 错题主体 */
.wrong-question-body {
    padding: 25px;
}

/* 题目内容区域 */
.question-content {
    margin-bottom: 25px;
}



/* 题目文本样式 */
.question-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
    color: #444;
}

.question-text-with-code {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    border: 1px solid #e0e0e0;
    overflow-x: auto;
}

.question-text-with-code pre {
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
}

.question-text-with-code code {
    background: none;
    padding: 0;
    color: #333;
}

/* 选项容器（错题本版本） */
.options-container {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 选项项目（错题本版本） */
.option-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    transition: var(--transition);
}

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

.option-item.correct-option {
    background: #e8f5e9;
    border-color: #4caf50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.option-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-top: 2px;
    color: #757575;
    font-size: 1rem;
}

.option-label {
    font-weight: 700;
    min-width: 24px;
    color: var(--dark-color);
}

.option-content {
    flex: 1;
    line-height: 1.5;
    color: #444;
}

.correct-indicator {
    margin-left: 10px;
    padding: 4px 10px;
    background: #4caf50;
    color: white;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 答案反馈区域 */
.answer-feedback {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 25px;
    border-left: 4px solid var(--primary-color);
}

.feedback-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.feedback-header i {
    color: var(--warning-color);
}

/* 各部分样式 */
.correct-answer-section,
.explanation-section {
    margin-bottom: 20px;
}

.section-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-content {
    background: white;
    padding: 15px;
    border-radius: 8px;
    line-height: 1.6;
    border: 1px solid #e0e0e0;
}

.correct-answer-text {
    color: #2e7d32;
    font-weight: 600;
}

.code-answer {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    overflow-x: auto;
    border: 1px solid #e0e0e0;
}

.code-answer pre {
    margin: 0;
}

.code-answer code {
    color: #333;
    line-height: 1.5;
}

/* 答案详情 */
.answer-details {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
    flex-wrap: wrap;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.detail-label {
    color: #757575;
}

.detail-value {
    font-weight: 600;
    color: var(--dark-color);
    background: #e3f2fd;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #bbdefb;
}

/* 操作按钮区域 */
.wrong-question-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.wrong-question-actions .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .wrong-question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .wrong-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .wrong-question-body {
        padding: 20px 15px;
    }
    
    .option-item {
        padding: 12px 15px;
    }
    
    .answer-feedback {
        padding: 15px;
    }
    
    .answer-details {
        flex-direction: column;
        gap: 10px;
    }
    
    .wrong-question-actions {
        justify-content: center;
    }
    
    .wrong-question-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .question-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .wrong-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .wrong-count-badge,
    .last-wrong-time {
        width: 100%;
        justify-content: center;
    }
    
    .option-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .option-checkbox {
        align-self: flex-start;
    }
}


/* style.css - 添加到文件末尾 */

/* ==============================
   分页组件大气样式
   ============================== */

.pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0;
    gap: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    border-radius: 16px;
    border: 2px solid #e9ecef;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    min-width: 48px;
    height: 48px;
    padding: 0 15px;
    border: 2px solid #dee2e6;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    color: #495057;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(52, 152, 219, 0.2);
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2980b9 100%);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
}

.pagination-btn.disabled:hover {
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
    transform: none !important;
    box-shadow: none !important;
}

.pagination-ellipsis {
    padding: 0 12px;
    color: #6c757d;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    height: 48px;
}

/* 每页数量选择器 */
.page-size-selector {
    margin-left: 25px;
    position: relative;
}

.page-size-selector::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, transparent, #dee2e6, transparent);
}

.page-size-selector select {
    width: 140px;
    height: 48px;
    padding: 0 15px;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    background: white;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233495db' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    padding-right: 45px;
}

.page-size-selector select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.page-size-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 分页信息 */
.pagination-info {
    color: #495057;
    font-size: 15px;
    font-weight: 500;
    padding: 12px 20px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-info::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-right: 5px;
}

/* 分页图标按钮 */
.pagination-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.pagination-btn:hover i {
    transform: scale(1.1);
}

.pagination-btn.active i {
    transform: scale(1.1);
}

/* 分页动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pagination-btn:not(.disabled):not(.active):hover {
    animation: pulse 0.6s ease;
}

/* 分页容器 */
.pagination-container {
    width: 100%;
    margin-top: 30px;
}

/* 自适应调整 */
@media (max-width: 991px) {
    .pagination-wrapper {
        padding: 20px;
        margin: 30px 0;
    }
    
    .pagination-btn {
        min-width: 44px;
        height: 44px;
        font-size: 15px;
    }
    
    .pagination-info {
        font-size: 14px;
    }
    
    .page-size-selector select {
        width: 130px;
        height: 44px;
    }
}

@media (max-width: 768px) {
    .pagination-wrapper {
        padding: 18px 15px;
        margin: 25px 0;
    }
    
    .pagination {
        gap: 10px;
    }
    
    .pagination-btn {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
        padding: 0 12px;
    }
    
    .pagination-info {
        font-size: 13px;
        padding: 10px 15px;
    }
    
    .page-size-selector {
        margin-left: 15px;
    }
    
    .page-size-selector select {
        width: 120px;
        height: 40px;
        font-size: 14px;
        padding-right: 40px;
        background-position: right 12px center;
        background-size: 16px;
    }
    
    .pagination-ellipsis {
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .pagination-wrapper {
        padding: 15px 12px;
        margin: 20px 0;
    }
    
    .pagination {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    .pagination > * {
        width: 100%;
    }
    
    .pagination-btn {
        width: 100%;
        height: 45px;
        justify-content: center;
        margin-bottom: 5px;
    }
    
    .pagination-ellipsis {
        justify-content: center;
        height: 45px;
    }
    
    .page-size-selector {
        margin: 10px 0 0 0;
        width: 100%;
    }
    
    .page-size-selector::before {
        display: none;
    }
    
    .page-size-selector select {
        width: 100%;
        height: 45px;
    }
    
    .pagination-info {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* 针对错题本的特殊调整 */
#wrong-questions-mode .pagination-wrapper {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
    border: 2px solid #d1e3ff;
}

#wrong-questions-mode .pagination-btn:hover:not(.disabled):not(.active) {
    border-color: #5a8dee;
    color: #5a8dee;
    box-shadow: 0 8px 15px rgba(90, 141, 238, 0.2);
}

#wrong-questions-mode .pagination-btn.active {
    background: linear-gradient(135deg, #5a8dee 0%, #4066c5 100%);
    border-color: #5a8dee;
    box-shadow: 0 8px 20px rgba(90, 141, 238, 0.3);
}

/* 练习统计页面的分页样式 */
#practice-statistics .pagination-wrapper,
#exam-statistics .pagination-wrapper {
    background: linear-gradient(135deg, #f9f7ff 0%, #f3f0ff 100%);
    border: 2px solid #e6e1ff;
}

#practice-statistics .pagination-btn:hover:not(.disabled):not(.active),
#exam-statistics .pagination-btn:hover:not(.disabled):not(.active) {
    border-color: #9b59b6;
    color: #9b59b6;
    box-shadow: 0 8px 15px rgba(155, 89, 182, 0.2);
}

#practice-statistics .pagination-btn.active,
#exam-statistics .pagination-btn.active {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    border-color: #9b59b6;
    box-shadow: 0 8px 20px rgba(155, 89, 182, 0.3);
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .pagination-wrapper {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        border-color: #4a5568;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    }
    
    .pagination-btn {
        background: linear-gradient(145deg, #4a5568 0%, #2d3748 100%);
        border-color: #718096;
        color: #e2e8f0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    
    .pagination-btn:hover:not(.disabled):not(.active) {
        background: linear-gradient(145deg, #718096 0%, #4a5568 100%);
        border-color: #63b3ed;
        color: #63b3ed;
        box-shadow: 0 8px 15px rgba(99, 179, 237, 0.2);
    }
    
    .pagination-btn.active {
        background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
        border-color: #3182ce;
        box-shadow: 0 8px 20px rgba(49, 130, 206, 0.3);
    }
    
    .pagination-btn.disabled {
        background: #4a5568 !important;
        border-color: #718096 !important;
        color: #a0aec0 !important;
    }
    
    .page-size-selector select {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2363b3ed' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    }
    
    .pagination-info {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
}

/* 表格中的分页样式 */
.table-pagination-wrapper {
    margin-top: 30px;
    margin-bottom: 20px;
}

/* 卡片式布局中的分页样式 */
.cards-pagination-wrapper {
    margin-top: 40px;
    margin-bottom: 30px;
}

/* 大型分页（用于重点页面） */
.pagination-wrapper.large {
    padding: 30px;
    margin: 50px 0;
}

.pagination-wrapper.large .pagination-btn {
    min-width: 56px;
    height: 56px;
    font-size: 18px;
}

.pagination-wrapper.large .pagination-info {
    font-size: 16px;
    padding: 15px 25px;
}

/* 小型分页（用于紧凑布局） */
.pagination-wrapper.small {
    padding: 15px;
    margin: 20px 0;
    border-radius: 12px;
}

.pagination-wrapper.small .pagination-btn {
    min-width: 36px;
    height: 36px;
    font-size: 14px;
    padding: 0 10px;
}

.pagination-wrapper.small .pagination-info {
    font-size: 13px;
    padding: 8px 12px;
}

/* 无边框分页样式 */
.pagination-wrapper.no-border {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 20px 0;
}

/* 分页组件的过渡效果 */
.pagination-btn {
    position: relative;
    overflow: hidden;
}

.pagination-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.pagination-btn:focus:not(.disabled)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* 分页组件的加载状态 */
.pagination-wrapper.loading .pagination-btn {
    pointer-events: none;
    opacity: 0.7;
}

.pagination-wrapper.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    border-radius: 16px;
}

.pagination-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

/* 分页组件的空状态 */
.pagination-wrapper.empty {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    box-shadow: none;
}

.pagination-wrapper.empty .pagination-info {
    background: transparent;
    border: none;
    box-shadow: none;
    color: #6c757d;
}

/* 分页组件的成功状态 */
.pagination-wrapper.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #c3e6cb;
}

.pagination-wrapper.success .pagination-info {
    background: white;
    color: #155724;
}

/* 分页组件的错误状态 */
.pagination-wrapper.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #f5c6cb;
}

.pagination-wrapper.error .pagination-info {
    background: white;
    color: #721c24;
}
