/* 全站通用样式 */
:root {
    /* 主色调 */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    /* 辅助色 */
    --secondary: #10b981;
    --secondary-light: #34d399;
    --accent: #f59e0b;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --info: #3b82f6;
    /* 背景色 */
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-gradient-start: #e0e7ff;
    --bg-gradient-end: #f0fdf4;
    /* 表面色 */
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    /* 文字色 */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    /* 边框 */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.35s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Inter", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-primary) 50%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* 头部导航 */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

header.scrolled {
    box-shadow: var(--shadow-lg);
}

.navbar {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand i {
    color: var(--primary);
    font-size: 1.6rem;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.navbar-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    background: transparent;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.navbar-links a:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.navbar-links a.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.navbar-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-full);
    transform: translateX(-50%);
    transition: width var(--transition-normal);
}

.navbar-links a:hover::before,
.navbar-links a.active::before {
    width: 60%;
}

.navbar-links .btn {
    margin-left: 8px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.95rem;
}

.navbar-links .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all var(--transition-normal);
}

.navbar-links .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.navbar-links .btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border-color);
    transition: all var(--transition-normal);
}

.navbar-links .btn-secondary:hover {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

/* 主内容区 */
.main-container {
    width: 100%;
    max-width: 1600px;
    min-height: calc(100vh - 80px);
    margin: 0 auto;
    padding: 32px 24px;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.page-header .page-title {
    display: flex;
    flex-direction: column;
}

.page-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 1rem;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.45);
}

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

/* 特色标签 */
.features-section {
    margin-bottom: 24px;
}

.features-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.feature-tag i {
    color: var(--primary);
    font-size: 0.875rem;
}

.feature-tag:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    color: var(--primary);
}

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

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

.btn-success {
    background: linear-gradient(135deg, var(--secondary) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(16, 185, 129, 0.45);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.35);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

/* 卡片样式 */
.card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-bottom: 24px;
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-sm {
    padding: 16px;
}

.card-lg {
    padding: 32px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* 网格布局 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card-list {
    display: grid;
    gap: 16px;
}

/* 统计卡片 */
.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

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

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

.stat-icon.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.stat-icon.secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, #059669 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.stat-icon.accent {
    background: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.stat-icon.info {
    background: linear-gradient(135deg, var(--info) 0%, #2563eb 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.stat-content {
    flex: 1;
}

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

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* 徽章 */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.badge-secondary {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
}

.badge-accent {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* 消息提示 */
.message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    transition: all var(--transition-normal);
}

.message.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #86efac;
    color: #065f46;
}

.message.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.message.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fcd34d;
    color: #92400e;
}

.message.info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #93c5fd;
    color: #1e40af;
}

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

/* 表单样式 */
form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* 列表项 */
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.list-item:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* 视频卡片 */
.video-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.video-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.video-card:hover .video-cover img {
    transform: scale(1.05);
}

.video-cover-fallback {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    font-size: 4rem;
    color: rgba(99, 102, 241, 0.2);
}

.video-duration {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
}

.video-meta {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-meta h3 {
    margin: 0 0 8px 0;
    font-size: 1.125rem;
    line-height: 1.4;
}

.video-meta h3 a {
    color: var(--text-primary);
}

.video-meta h3 a:hover {
    color: var(--primary);
}

.video-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.video-description {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.video-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 20px;
}

/* 题库样式 */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.subject-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    cursor: pointer;
    overflow: hidden;
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.subject-card:hover::before {
    transform: scaleX(1);
}

.subject-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.subject-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary);
    transition: all var(--transition-normal);
}

.subject-card:hover .subject-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
}

.subject-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.375rem;
    color: var(--text-primary);
}

.subject-card p {
    margin: 0 0 20px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.unit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.unit-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.unit-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
}

.unit-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--secondary);
}

.unit-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.unit-card p {
    margin: 0 0 16px 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

.question-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 28px;
    margin-bottom: 24px;
    transition: all var(--transition-normal);
}

.question-card:hover {
    box-shadow: var(--shadow-xl);
}

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

.question-header h4 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--primary);
    font-weight: 600;
}

.question-meta {
    display: flex;
    gap: 12px;
}

.question-id,
.subject-badge {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
}

.question-id {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.subject-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
}

.question-content {
    margin-bottom: 24px;
}

.question-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.question-options {
    display: grid;
    gap: 12px;
}

.option-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--surface);
    cursor: pointer;
    transition: all var(--transition-fast);
    overflow: hidden;
}

.option-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
}

.option-item:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.02);
}

.option-item:hover::before {
    transform: scaleY(1);
}

.option-item.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.option-item.selected::before {
    transform: scaleY(1);
}

.option-item.correct {
    border-color: var(--secondary);
    background: rgba(16, 185, 129, 0.08);
}

.option-item.correct::before {
    background: var(--secondary);
    transform: scaleY(1);
}

.option-item.incorrect {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
}

.option-item.incorrect::before {
    background: var(--danger);
    transform: scaleY(1);
}

.option-item input[type="radio"] {
    margin: 3px 14px 0 0;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.option-text {
    flex: 1;
    line-height: 1.5;
    font-size: 1rem;
    color: var(--text-primary);
}

/* 导航按钮 */
.navigation-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.navigation-buttons .btn {
    min-width: 100px;
}

.question-counter {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.question-counter .divider {
    color: var(--text-muted);
    font-weight: 400;
}

.current-num {
    color: var(--primary);
}

.total-num {
    color: var(--text-secondary);
}

/* 反馈区域 */
.feedback-container {
    margin-top: 20px;
    padding: 20px;
    border-radius: var(--radius-lg);
    animation: fadeIn 0.3s ease;
}

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

.feedback-container.correct {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #86efac;
}

.feedback-container.incorrect {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
}

.feedback-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.feedback-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.feedback-container.correct .feedback-icon {
    background: rgba(16, 185, 129, 0.2);
    color: var(--secondary);
}

.feedback-container.incorrect .feedback-icon {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.feedback-message {
    font-size: 1.125rem;
    font-weight: 600;
}

.feedback-container.correct .feedback-message {
    color: #065f46;
}

.feedback-container.incorrect .feedback-message {
    color: #991b1b;
}

.feedback-explanation {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
    line-height: 1.6;
}

.feedback-explanation strong {
    color: var(--text-primary);
}

/* 练习结果样式 */
.result-summary {
    margin-bottom: 32px;
}

.score-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.score-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}

.score-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 60%;
    height: 60%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
}

.score-display {
    position: relative;
    z-index: 1;
    margin-bottom: 28px;
}

.score-number {
    display: block;
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}

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

.score-details {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
}

.detail-label {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 8px;
}

.detail-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.wrong-questions-section {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 28px;
}

.wrong-questions-section h3 {
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--danger);
    color: var(--text-primary);
    font-size: 1.25rem;
}

.wrong-questions-list {
    display: grid;
    gap: 16px;
}

.wrong-question-item {
    padding: 20px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.wrong-question-item:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* 练习历史样式 */
.practice-history {
    display: grid;
    gap: 20px;
}

.history-item {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 24px;
    transition: all var(--transition-normal);
}

.history-item:hover {
    box-shadow: var(--shadow-lg);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.history-info h4 {
    margin: 0 0 6px 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.history-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.history-score {
    text-align: right;
}

.history-score .score-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.history-score .score-unit {
    font-size: 1rem;
    color: var(--text-muted);
    margin-left: 4px;
}

.history-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.history-detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-detail-item i {
    font-size: 0.875rem;
}

/* 错题本样式 */
.wrong-book-container {
    max-width: 1000px;
    margin: 0 auto;
}

.subject-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.subject-stat-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 24px;
    transition: all var(--transition-normal);
}

.subject-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.subject-stat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.subject-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.subject-stat-info h4 {
    margin: 0 0 2px 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.subject-stat-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.subject-stat-count {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--danger);
}

/* 图表样式 */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 24px;
    transition: all var(--transition-normal);
}

.chart-card:hover {
    box-shadow: var(--shadow-lg);
}

.chart-card h3 {
    margin: 0 0 20px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-card h3 i {
    color: var(--primary);
}

.chart-card canvas {
    max-height: 250px;
}

.chart-card-wide {
    grid-column: span 2;
}

.chart-card-wide canvas {
    max-height: 280px;
}

.doughnut-chart-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.doughnut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.doughnut-center .accuracy-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.doughnut-center .accuracy-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* 特色功能区域 */
.features-section {
    margin: 48px 0;
    text-align: center;
}

.features-section h2 {
    margin: 0 0 32px 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.feature-item {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 32px 24px;
    text-align: center;
    transition: all var(--transition-normal);
}

.feature-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
}

.feature-item h4 {
    margin: 0 0 12px 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.feature-item p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 行动召唤区域 */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius-xl);
    padding: 48px 32px;
    text-align: center;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 50%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
}

.cta-section h2 {
    position: relative;
    z-index: 1;
    margin: 0 0 16px 0;
    font-size: 2.25rem;
    font-weight: 700;
}

.cta-section p {
    position: relative;
    z-index: 1;
    margin: 0 0 32px 0;
    font-size: 1.125rem;
    opacity: 0.9;
}

.cta-buttons {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

/* 登录/注册表单容器 */
.auth-container {
    max-width: 420px;
    margin: 40px auto;
}

.auth-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

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

.auth-header p {
    margin: 0;
    color: var(--text-muted);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.auth-footer p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 20px;
    }
    
    .navbar-links {
        gap: 4px;
    }
    
    .navbar-links a {
        padding: 8px 12px;
        font-size: 0.875rem;
    }
    
    .navbar-links .btn {
        padding: 8px 16px;
        font-size: 0.875rem;
    }
    
    .main-container {
        padding: 20px 16px;
        max-width: 100%;
    }
    
    .page-header {
        padding: 20px 16px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .score-card {
        padding: 28px 20px;
    }
    
    .score-number {
        font-size: 3.5rem;
    }
    
    .chart-card-wide {
        grid-column: span 1;
    }
    
    .footer-top {
        gap: 24px;
    }
    
    .navigation-buttons {
        flex-wrap: wrap;
    }
    
    .question-counter {
        order: -1;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .navbar-links {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .main-container {
        padding: 16px;
        max-width: 100%;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .subject-card,
    .unit-card {
        padding: 20px 16px;
    }
    
    .subject-icon {
        width: 56px;
        height: 56px;
        font-size: 2rem;
    }
}

/* 动画效果 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* 选择文本样式 */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}
