/* 易班题目练习系统 - 样式文件 */

/* 基础重置和变量 */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --info-color: #0891b2;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --transition: all 0.2s ease-in-out;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    overflow-x: hidden;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.loading-spinner p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 应用容器 */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏 */
.navbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--primary-color);
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: var(--bg-tertiary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* 页面容器 */
.page {
    flex: 1;
    display: none;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page.active {
    display: block;
}

/* 认证页面 */
.auth-container {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

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

.auth-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    background: var(--bg-tertiary);
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    border-radius: calc(var(--border-radius) - 4px);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-secondary);
}

.tab-btn.active {
    background: var(--bg-primary);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.auth-form {
    display: none;
}

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

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-primary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.auth-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-btn:hover {
    background: var(--primary-hover);
}

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

/* 练习页面 */
.practice-container {
    max-width: 800px;
    margin: 0 auto;
}

.practice-settings {
    margin-bottom: 2rem;
}

.settings-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
}

.settings-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.settings-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-item label {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.setting-item select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
}

.start-btn {
    padding: 0.75rem 1.5rem;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.start-btn:hover {
    background: #047857;
}

/* 练习区域 */
.practice-area {
    animation: fadeInUp 0.5s ease;
}

.progress-bar {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-weight: 600;
}

.question-type-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.progress-track {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.question-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
}

.question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.question-difficulty {
    padding: 0.25rem 0.75rem;
    background: var(--info-color);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.question-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-primary);
}

.option-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
}

.option-item.selected {
    border-color: var(--primary-color);
    background: rgb(37 99 235 / 0.1);
}

.option-item.correct {
    border-color: var(--success-color);
    background: rgb(5 150 105 / 0.1);
}

.option-item.incorrect {
    border-color: var(--danger-color);
    background: rgb(220 38 38 / 0.1);
}

.option-radio {
    margin-right: 1rem;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.option-radio.checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.option-text {
    flex: 1;
    font-weight: 500;
}

.question-result {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid;
}

.question-result.correct {
    background: rgb(5 150 105 / 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.question-result.incorrect {
    background: rgb(220 38 38 / 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.result-icon {
    margin-right: 0.5rem;
}

.correct-answer {
    margin-top: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* 操作按钮 */
.practice-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
}

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

.action-btn.primary:hover {
    background: var(--primary-hover);
}

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

.action-btn.secondary:hover {
    background: #475569;
}

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

.action-btn.success:hover {
    background: #047857;
}

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

/* 练习结果 */
.practice-result {
    animation: fadeInUp 0.5s ease;
}

.result-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    text-align: center;
}

.result-header {
    margin-bottom: 2rem;
}

.result-header i {
    font-size: 3rem;
    color: var(--warning-color);
    margin-bottom: 1rem;
}

.result-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

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

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

/* 响应式设计 */
@media (max-width: 768px) {
    /* 导航栏优化 */
    .nav-container {
        padding: 0 0.75rem;
        height: 56px;
    }
    
    .nav-brand {
        font-size: 1.1rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 56px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 56px);
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: flex-start;
        padding: 1.5rem 1rem;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        padding: 1rem;
        width: 100%;
        justify-content: flex-start;
        border-radius: var(--border-radius);
        margin-bottom: 0.5rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* 页面容器优化 */
    .page {
        padding: 1rem 0.75rem;
    }
    
    /* 认证页面优化 */
    .auth-container {
        padding: 1rem 0.75rem;
        min-height: calc(100vh - 56px);
    }
    
    .auth-card {
        margin: 0;
        padding: 1.5rem;
        border-radius: var(--border-radius);
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .auth-header i {
        font-size: 2.5rem;
    }
    
    /* 练习设置优化 */
    .settings-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .setting-item {
        justify-content: space-between;
        flex-direction: row;
        align-items: center;
    }
    
    .setting-item select {
        min-width: 120px;
    }
    
    .start-btn {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
        justify-content: center;
    }
    
    /* 练习区域优化 */
    .practice-container {
        max-width: 100%;
    }
    
    .progress-bar {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .progress-info {
        font-size: 0.9rem;
    }
    
    .question-type-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
    
    .question-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .question-number {
        font-size: 1rem;
    }
    
    .question-content {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }
    
    .option-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .option-text {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .question-result {
        margin-top: 1rem;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* 操作按钮优化 */
    .practice-actions {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0 0.5rem;
    }
    
    .action-btn {
        width: 100%;
        padding: 0.875rem 1rem;
        font-size: 1rem;
        min-width: auto;
    }
    
    /* 练习结果优化 */
    .result-card {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .result-header i {
        font-size: 2.5rem;
    }
    
    .result-header h3 {
        font-size: 1.25rem;
    }
    
    .result-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .result-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* 统计页面手机端优化 */
    .statistics-container {
        max-width: 100%;
    }
    
    .stats-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .stats-header h2 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .reset-btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
    
    .stat-info p {
        font-size: 0.85rem;
    }
    
    .stats-by-type {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .stats-by-type h3 {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .type-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .type-stat-card {
        padding: 1rem;
    }
    
    .type-stat-card h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .type-progress {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .type-progress span {
        text-align: center;
        min-width: auto;
    }
    
    .type-details {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    /* 个人中心手机端优化 */
    .profile-container {
        max-width: 100%;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .profile-avatar {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .profile-info h2 {
        font-size: 1.25rem;
    }
    
    .profile-info p {
        font-size: 0.9rem;
    }
    
    .profile-sections {
        gap: 1.5rem;
    }
    
    .profile-section {
        padding: 1.5rem;
    }
    
    .profile-section h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .profile-form {
        max-width: 100%;
    }
    
    .profile-form .form-group {
        margin-bottom: 1rem;
    }
    
    .profile-form input {
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    .profile-btn {
        width: 100%;
        padding: 0.875rem;
        justify-content: center;
    }
    
    .account-info {
        gap: 0.75rem;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.75rem;
    }
    
    .info-label {
        font-size: 0.85rem;
    }
    
    .info-value {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    /* 小屏手机优化 */
    .page {
        padding: 0.75rem 0.5rem;
    }
    
    /* 导航栏小屏优化 */
    .nav-container {
        padding: 0 0.5rem;
        height: 52px;
    }
    
    .nav-brand {
        font-size: 1rem;
    }
    
    .nav-brand span {
        display: none;
    }
    
    .nav-menu {
        top: 52px;
        height: calc(100vh - 52px);
        padding: 1rem 0.75rem;
    }
    
    /* 认证页面小屏优化 */
    .auth-container {
        padding: 0.75rem 0.5rem;
        min-height: calc(100vh - 52px);
    }
    
    .auth-card {
        margin: 0;
        padding: 1rem;
        border-radius: var(--border-radius);
    }
    
    .auth-header h1 {
        font-size: 1.25rem;
    }
    
    .auth-header i {
        font-size: 2rem;
    }
    
    .auth-header p {
        font-size: 0.85rem;
    }
    
    .tab-btn {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .form-group input {
        padding: 0.6rem;
        font-size: 1rem;
    }
    
    .auth-btn {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    /* 练习页面小屏优化 */
    .settings-card {
        padding: 1rem;
    }
    
    .settings-card h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .setting-item label {
        font-size: 0.9rem;
    }
    
    .setting-item select {
        min-width: auto;
        width: 100%;
        padding: 0.6rem;
    }
    
    .start-btn {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .progress-bar {
        padding: 0.6rem;
    }
    
    .progress-info {
        font-size: 0.85rem;
    }
    
    .question-type-badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }
    
    .question-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .question-header {
        margin-bottom: 0.75rem;
        padding-bottom: 0.6rem;
    }
    
    .question-number {
        font-size: 0.9rem;
    }
    
    .question-difficulty {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .question-content {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }
    
    .option-item {
        padding: 0.6rem;
        margin-bottom: 0.6rem;
    }
    
    .option-radio {
        width: 18px;
        height: 18px;
        margin-right: 0.75rem;
    }
    
    .option-radio.checked::after {
        width: 8px;
        height: 8px;
    }
    
    .option-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .question-result {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    .practice-actions {
        gap: 0.6rem;
        padding: 0;
    }
    
    .action-btn {
        padding: 0.75rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* 结果页面小屏优化 */
    .result-card {
        padding: 1rem;
        margin: 0.25rem;
    }
    
    .result-header i {
        font-size: 2rem;
    }
    
    .result-header h3 {
        font-size: 1.1rem;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        margin-bottom: 1rem;
    }
    
    .stat-item {
        padding: 0.6rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .result-actions {
        gap: 0.6rem;
    }
    
    /* 统计页面小屏优化 */
    .stats-header h2 {
        font-size: 1.25rem;
    }
    
    .stats-overview {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .stat-info h3 {
        font-size: 1.25rem;
    }
    
    .stat-info p {
        font-size: 0.8rem;
    }
    
    .stats-by-type {
        padding: 0.75rem;
    }
    
    .stats-by-type h3 {
        font-size: 1rem;
    }
    
    .type-stat-card {
        padding: 0.75rem;
    }
    
    .type-stat-card h4 {
        font-size: 0.95rem;
    }
    
    /* 个人中心小屏优化 */
    .profile-header {
        padding: 1rem;
    }
    
    .profile-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }
    
    .profile-info h2 {
        font-size: 1.1rem;
    }
    
    .profile-info p {
        font-size: 0.85rem;
    }
    
    .profile-section {
        padding: 1rem;
    }
    
    .profile-section h3 {
        font-size: 1rem;
    }
    
    .profile-form input {
        padding: 0.6rem;
        font-size: 0.95rem;
    }
    
    .profile-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .info-item {
        padding: 0.6rem;
    }
    
    .info-label {
        font-size: 0.8rem;
    }
    
    .info-value {
        font-size: 0.9rem;
    }
    
    /* 消息提示小屏优化 */
    .toast-container {
        top: 60px;
        right: 0.25rem;
        left: 0.25rem;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .toast-icon {
        font-size: 1.1rem;
    }
    
    /* 模态框小屏优化 */
    .modal-content {
        margin: 0.5rem;
        width: calc(100% - 1rem);
    }
    
    .modal-header {
        padding: 1rem 1rem 0.75rem;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-body p {
        font-size: 0.9rem;
    }
    
    .modal-actions {
        padding: 0.75rem 1rem 1rem;
        flex-direction: column;
        gap: 0.6rem;
    }
    
    .modal-btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* 手机端触摸优化 */
@media (hover: none) and (pointer: coarse) {
    /* 移除hover效果，优化触摸体验 */
    .option-item:hover {
        border-color: var(--border-color);
        background: var(--bg-primary);
    }
    
    .nav-link:hover {
        color: var(--text-secondary);
        background-color: transparent;
    }
    
    .stat-card:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    /* 增强触摸反馈 */
    .option-item:active {
        transform: scale(0.98);
        background: var(--bg-tertiary);
    }
    
    .action-btn:active {
        transform: scale(0.98);
    }
    
    .nav-link:active {
        background-color: var(--bg-tertiary);
    }
    
    .start-btn:active {
        transform: scale(0.98);
    }
    
    /* 触摸目标最小尺寸 */
    .option-item {
        min-height: 44px;
    }
    
    .action-btn {
        min-height: 44px;
    }
    
    .nav-link {
        min-height: 44px;
    }
    
    .tab-btn {
        min-height: 44px;
    }
}

/* 防止双击缩放 */
.option-item,
.action-btn,
.nav-link,
.auth-btn,
.start-btn,
.profile-btn,
.reset-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* 滚动优化 */
.page {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

.nav-menu {
    -webkit-overflow-scrolling: touch;
}

/* 输入框优化 */
@media (max-width: 768px) {
    input[type="text"],
    input[type="tel"],
    input[type="password"],
    input[type="url"],
    select {
        font-size: 16px; /* 防止iOS缩放 */
        -webkit-appearance: none;
        appearance: none;
    }
    
    select {
        background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        background-size: 16px 12px;
        padding-right: 2.5rem;
    }
}

/* 安全区域适配 */
@supports (padding: max(0px)) {
    .page {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
    
    .nav-container {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }
    
    .practice-actions {
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    }
}

/* 横屏适配 */
@media (max-width: 768px) and (orientation: landscape) {
    .auth-container {
        padding: 0.5rem;
    }
    
    .auth-card {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .question-card {
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }
    
    .nav-container {
        height: 48px;
    }
    
    .nav-menu {
        top: 48px;
        height: calc(100vh - 48px);
    }
}

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

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

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease;
}

/* 统计页面 */
.statistics-container {
    max-width: 1000px;
    margin: 0 auto;
}

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

.stats-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 1.75rem;
}

.reset-btn {
    padding: 0.75rem 1.5rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.stat-card:nth-child(1) .stat-icon {
    background: var(--primary-color);
}

.stat-card:nth-child(2) .stat-icon {
    background: var(--success-color);
}

.stat-card:nth-child(3) .stat-icon {
    background: var(--warning-color);
}

.stat-card:nth-child(4) .stat-icon {
    background: var(--info-color);
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--text-secondary);
    font-weight: 500;
}

.stats-by-type {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 3rem;
}

.stats-by-type h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

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

.type-stat-card {
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.type-stat-card h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

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

.type-progress .progress-bar {
    flex: 1;
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    box-shadow: none;
}

.type-progress .progress-fill {
    height: 100%;
    background: var(--success-color);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.type-progress span {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 50px;
    text-align: right;
}

.type-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.type-details span {
    font-weight: 500;
}

.progress-chart {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

.progress-chart h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.chart-container {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-placeholder {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* 个人中心页面 */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.profile-info h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.profile-info p {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.profile-sections {
    display: grid;
    gap: 2rem;
}

.profile-section {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

.profile-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.profile-form {
    max-width: 400px;
}

.profile-form .form-group {
    margin-bottom: 1.5rem;
}

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

.profile-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-primary);
}

.profile-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.profile-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-btn:hover {
    background: var(--primary-hover);
}

.account-info {
    display: grid;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
}

.info-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.info-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* 消息提示 */
.toast-container {
    position: fixed;
    top: 80px;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
}

.toast.success {
    border-color: var(--success-color);
    color: var(--success-color);
}

.toast.error {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.toast.warning {
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.toast.info {
    border-color: var(--info-color);
    color: var(--info-color);
}

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

.toast-message {
    flex: 1;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

/* 确认对话框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 90%;
    animation: fadeInUp 0.3s ease;
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-actions {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

.modal-btn.primary:hover {
    background: var(--primary-hover);
}

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

.modal-btn.secondary:hover {
    background: #475569;
}

/* 动画 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式设计补充 */
@media (max-width: 768px) {
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .type-stats {
        grid-template-columns: 1fr;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .toast-container {
        right: 0.5rem;
        left: 0.5rem;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
    
    .modal-content {
        margin: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .type-progress {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .type-progress span {
        text-align: center;
    }
    
    .type-details {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* 题目导航样式 */
.question-navigation {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    user-select: none;
}

.nav-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.nav-header i {
    margin-right: 0.5rem;
}

.nav-toggle-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-toggle-btn.collapsed i {
    transform: rotate(-90deg);
}

.nav-content {
    padding: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.nav-content.collapsed {
    max-height: 0;
    padding: 0 1.5rem;
    overflow: hidden;
}

.nav-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.nav-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.nav-input-group label {
    font-weight: 500;
    color: var(--text-primary);
    min-width: 120px;
    font-size: 0.9rem;
}

.nav-input-group input {
    flex: 1;
    min-width: 120px;
    padding: 0.5rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.nav-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

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

.question-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.5rem;
    max-height: 0px;
    overflow-y: auto;
}

.question-grid-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.question-grid-item:hover {
    background: #e0e7ff;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.question-grid-item.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.question-grid-item.answered {
    background: #dcfce7;
    border-color: #16a34a;
    color: #15803d;
}

.question-grid-item.answered.correct {
    background: #dcfce7;
    border-color: #16a34a;
}

.question-grid-item.answered.incorrect {
    background: #fecaca;
    border-color: #dc2626;
    color: #dc2626;
}

.question-grid-item.current.answered.correct {
    background: #16a34a;
    color: white;
}

.question-grid-item.current.answered.incorrect {
    background: #dc2626;
    color: white;
}

/* 题目状态图标 */
.question-grid-item::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.question-grid-item.answered.correct::after {
    background: #16a34a;
    opacity: 1;
}

.question-grid-item.answered.incorrect::after {
    background: #dc2626;
    opacity: 1;
}

/* 导航响应式设计 */
@media (max-width: 768px) {
    .nav-controls {
        gap: 1rem;
    }
    
    .nav-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .nav-input-group label {
        min-width: auto;
        font-size: 0.85rem;
    }
    
    .nav-input-group input {
        min-width: auto;
    }
    
    .nav-btn {
        justify-content: center;
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }
    
    .question-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
        gap: 0.4rem;
    }
    
    .question-grid-item {
        font-size: 0.8rem;
    }
}