/* ========================================
   事业单位考试学习平台 - 现代智能主题
   设计理念：Serene Intelligence (静谧智能)
   - 护眼柔和的色调，适合长时间学习
   - AI时代的智能感知与流畅交互
   - 优雅克制的视觉层次
   ======================================== */

/* ========================================
   CSS 变量定义
   ======================================== */
:root {
    /* 主色调 - 柔和的鼠尾草绿系，护眼舒适 */
    --primary-50: #f4f7f4;
    --primary-100: #e3ebe3;
    --primary-200: #c5d9c5;
    --primary-300: #9bbf9b;
    --primary-400: #729e72;
    --primary-500: #528152;
    --primary-600: #3d653d;
    --primary-700: #325132;
    --primary-800: #2a412a;
    --primary-900: #233623;

    /* 强调色 - 温润的琥珀金，象征智慧与成就 */
    --accent-50: #fdf8f3;
    --accent-100: #f9efe3;
    --accent-200: #f2dcc5;
    --accent-300: #e9c299;
    --accent-400: #dda06a;
    --accent-500: #d48546;
    --accent-600: #c66b39;
    --accent-700: #a55231;
    --accent-800: #85432d;
    --accent-900: #6c3827;

    /* 中性色 - 温暖的灰，不刺眼 */
    --neutral-0: #ffffff;
    --neutral-50: #fafaf9;
    --neutral-100: #f5f5f4;
    --neutral-200: #e7e5e4;
    --neutral-300: #d6d3d1;
    --neutral-400: #a8a29e;
    --neutral-500: #78716c;
    --neutral-600: #57534e;
    --neutral-700: #44403c;
    --neutral-800: #292524;
    --neutral-900: #1c1917;

    /* AI智能感 - 柔和的蓝紫渐变 */
    --ai-glow: rgba(139, 165, 223, 0.4);
    --ai-primary: #6b7c9c;
    --ai-secondary: #8ba5df;
    --ai-gradient-start: #e8ecf5;
    --ai-gradient-end: #d4dde8;

    /* 功能色 */
    --success: #4a7c59;
    --warning: #c78d3a;
    --error: #b85c5c;
    --info: #5a7a9c;

    /* 字体 */
    --font-display: 'Plus Jakarta Sans', 'Noto Sans SC', sans-serif;
    --font-body: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* 间距 */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-glow: 0 0 40px rgba(139, 165, 223, 0.15);

    /* 动画 */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-sine: cubic-bezier(0.37, 0, 0.63, 1);
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
}

/* ========================================
   基础样式重置
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--neutral-700);
    background: linear-gradient(135deg, var(--neutral-50) 0%, var(--primary-50) 50%, var(--ai-gradient-start) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* 自定义字体导入 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

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

::-webkit-scrollbar-track {
    background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

/* ========================================
   玻璃拟态效果
   ======================================== */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.glass-dark {
    background: rgba(41, 37, 36, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   导航侧边栏
   ======================================== */
.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, var(--neutral-0) 0%, var(--neutral-50) 100%);
    border-right: 1px solid var(--neutral-200);
    display: flex;
    flex-direction: column;
    transition: transform var(--duration-normal) var(--ease-out-expo);
}

.sidebar-logo {
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    border-bottom: 1px solid var(--neutral-100);
}

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md), 0 0 20px rgba(82, 129, 82, 0.3);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--neutral-800);
    line-height: 1.3;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--neutral-500);
    font-weight: 500;
}

/* 导航菜单 */
.nav-menu {
    flex: 1;
    padding: var(--space-lg);
    overflow-y: auto;
}

.nav-section {
    margin-bottom: var(--space-xl);
}

.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--neutral-400);
    padding: 0 var(--space-md);
    margin-bottom: var(--space-sm);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    color: var(--neutral-600);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--duration-fast) var(--ease-out-expo);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--primary-400), var(--primary-600));
    border-radius: 0 2px 2px 0;
    transition: height var(--duration-normal) var(--ease-out-expo);
}

.nav-item:hover {
    background: var(--neutral-100);
    color: var(--neutral-700);
}

.nav-item.active {
    background: linear-gradient(90deg, var(--primary-50) 0%, rgba(226, 235, 226, 0.5) 100%);
    color: var(--primary-700);
}

.nav-item.active::before {
    height: 60%;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform var(--duration-fast);
}

.nav-item:hover .nav-icon {
    transform: scale(1.1);
}

.nav-badge {
    margin-left: auto;
    background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 4px rgba(212, 133, 70, 0.3);
}

/* 用户区域 */
.sidebar-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--neutral-200);
}

.user-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: linear-gradient(135deg, var(--neutral-0) 0%, var(--neutral-50) 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
    cursor: pointer;
    transition: all var(--duration-fast);
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--neutral-800);
}

.user-status {
    font-size: 0.75rem;
    color: var(--neutral-500);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: var(--radius-full);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--success); }
    50% { opacity: 0.6; box-shadow: 0 0 8px var(--success); }
}

/* ========================================
   主内容区域
   ======================================== */
.main-wrapper {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部栏 */
.top-bar {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-2xl);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--neutral-200);
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.page-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-800);
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 0.8125rem;
    color: var(--neutral-500);
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* 搜索框 */
.search-box {
    position: relative;
    width: 320px;
}

.search-input {
    width: 100%;
    height: 40px;
    padding: 0 var(--space-md) 0 2.5rem;
    background: var(--neutral-100);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--neutral-700);
    transition: all var(--duration-fast);
}

.search-input:focus {
    outline: none;
    background: var(--neutral-0);
    border-color: var(--primary-300);
    box-shadow: 0 0 0 3px rgba(82, 129, 82, 0.1);
}

.search-input::placeholder {
    color: var(--neutral-400);
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral-400);
    font-size: 1rem;
}

/* 图标按钮 */
.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--neutral-100);
    border: none;
    color: var(--neutral-600);
    cursor: pointer;
    transition: all var(--duration-fast);
    position: relative;
}

.icon-btn:hover {
    background: var(--primary-100);
    color: var(--primary-600);
    transform: translateY(-1px);
}

.icon-btn .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(212, 133, 70, 0.3);
}

/* ========================================
   内容区域
   ======================================== */
.main-content {
    flex: 1;
    padding: var(--space-2xl);
    max-width: 1440px;
}

/* 页面切换动画 */
.page {
    animation: pageEnter var(--duration-slow) var(--ease-out-expo);
}

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

/* ========================================
   卡片组件
   ======================================== */
.card {
    background: var(--neutral-0);
    border-radius: var(--radius-lg);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    transition: all var(--duration-normal) var(--ease-out-expo);
    overflow: hidden;
}

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

.card-header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--neutral-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-800);
}

.card-body {
    padding: var(--space-xl);
}

/* 统计卡片 */
.stat-card {
    position: relative;
    padding: var(--space-xl);
    background: var(--neutral-0);
    border-radius: var(--radius-lg);
    border: 1px solid var(--neutral-200);
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
    opacity: 0;
    transition: opacity var(--duration-fast);
}

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

.stat-card:hover::before {
    opacity: 1;
}

.stat-card.accent::before {
    background: linear-gradient(90deg, var(--accent-400), var(--accent-600));
}

.stat-card.success::before {
    background: linear-gradient(90deg, var(--success), #3d6b4a);
}

.stat-card.info::before {
    background: linear-gradient(90deg, var(--info), #4a6a8c);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.stat-card .stat-icon {
    background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
}

.stat-card.accent .stat-icon {
    background: linear-gradient(135deg, var(--accent-100), var(--accent-50));
}

.stat-card.success .stat-icon {
    background: linear-gradient(135deg, #e3f0e6, #f4f9f5);
}

.stat-card.info .stat-icon {
    background: linear-gradient(135deg, #e8eef5, #f5f8fa);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--neutral-800);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--neutral-500);
    font-weight: 500;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
    margin-top: var(--space-sm);
}

.stat-change.positive {
    background: #e3f0e6;
    color: var(--success);
}

.stat-change.negative {
    background: #f5e3e3;
    color: var(--error);
}

/* ========================================
   按钮组件
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    height: 40px;
    padding: 0 var(--space-lg);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out-expo);
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--duration-fast);
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(82, 129, 82, 0.3), 0 0 0 1px rgba(82, 129, 82, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(82, 129, 82, 0.35), 0 0 0 1px rgba(82, 129, 82, 0.1);
}

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

.btn-secondary {
    background: var(--neutral-100);
    color: var(--neutral-700);
    border: 1px solid var(--neutral-200);
}

.btn-secondary:hover {
    background: var(--neutral-200);
    border-color: var(--neutral-300);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-600) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(212, 133, 70, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 133, 70, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--neutral-600);
}

.btn-ghost:hover {
    background: var(--neutral-100);
    color: var(--neutral-800);
}

.btn-sm {
    height: 32px;
    padding: 0 var(--space-md);
    font-size: 0.8125rem;
}

.btn-lg {
    height: 48px;
    padding: 0 var(--space-xl);
    font-size: 1rem;
}

/* ========================================
   进度条
   ======================================== */
.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--neutral-200);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset var(--duration-slow) var(--ease-out-expo);
}

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

.progress-ring-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--neutral-800);
    line-height: 1;
}

.progress-ring-label {
    font-size: 0.6875rem;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* 线性进度条 */
.progress-bar {
    height: 6px;
    background: var(--neutral-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

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

/* ========================================
   知识树样式
   ======================================== */
.knowledge-tree-container {
    background: var(--neutral-0);
    border-radius: var(--radius-lg);
    border: 1px solid var(--neutral-200);
    overflow: hidden;
}

.knowledge-tree-header {
    padding: var(--space-lg) var(--space-xl);
    background: linear-gradient(180deg, var(--neutral-50) 0%, var(--neutral-0) 100%);
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.knowledge-tree {
    padding: var(--space-lg);
}

.tree-node-wrapper {
    margin-bottom: var(--space-sm);
}

.tree-node {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-fast);
    border: 1px solid transparent;
}

.tree-node:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-200);
}

.tree-node.active {
    background: linear-gradient(90deg, var(--primary-50), rgba(195, 217, 195, 0.3));
    border-color: var(--primary-200);
}

.tree-toggle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-400);
    transition: transform var(--duration-fast);
}

.tree-toggle.expanded {
    transform: rotate(90deg);
    color: var(--primary-500);
}

.tree-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.tree-content {
    flex: 1;
}

.tree-title {
    font-weight: 600;
    color: var(--neutral-800);
    font-size: 0.9375rem;
}

.tree-meta {
    font-size: 0.75rem;
    color: var(--neutral-500);
    margin-top: 0.125rem;
}

.tree-children {
    margin-left: 1.75rem;
    padding-left: var(--space-md);
    border-left: 2px solid var(--neutral-200);
}

.tree-leaf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-fast);
    margin-bottom: var(--space-xs);
}

.tree-leaf:hover {
    background: var(--neutral-50);
}

.tree-leaf-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.leaf-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
}

.leaf-dot.high { background: var(--accent-500); box-shadow: 0 0 6px var(--accent-400); }
.leaf-dot.medium { background: var(--primary-500); }
.leaf-dot.low { background: var(--neutral-400); }

.leaf-title {
    font-size: 0.875rem;
    color: var(--neutral-700);
}

.leaf-badge {
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    background: var(--neutral-100);
    color: var(--neutral-500);
}

/* ========================================
   题目卡片
   ======================================== */
.question-card {
    background: var(--neutral-0);
    border-radius: var(--radius-xl);
    border: 1px solid var(--neutral-200);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
}

.question-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--neutral-100);
}

.question-number {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}

.question-meta {
    flex: 1;
}

.question-type {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-600);
    margin-bottom: 0.125rem;
}

.question-difficulty {
    display: flex;
    gap: 0.25rem;
}

.difficulty-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--neutral-300);
}

.difficulty-dot.active {
    background: var(--accent-500);
    box-shadow: 0 0 6px rgba(212, 133, 70, 0.4);
}

.question-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--neutral-800);
    margin-bottom: var(--space-xl);
    font-weight: 500;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--neutral-50);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-fast);
}

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

.option-item.selected {
    background: linear-gradient(135deg, var(--primary-50), rgba(195, 217, 195, 0.3));
    border-color: var(--primary-500);
}

.option-item.correct {
    background: linear-gradient(135deg, #e3f0e6, rgba(227, 240, 230, 0.5));
    border-color: var(--success);
}

.option-item.wrong {
    background: linear-gradient(135deg, #f5e3e3, rgba(245, 227, 227, 0.5));
    border-color: var(--error);
}

.option-label {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--neutral-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--neutral-600);
    flex-shrink: 0;
    transition: all var(--duration-fast);
}

.option-item:hover .option-label {
    background: var(--primary-200);
    color: var(--primary-700);
}

.option-item.selected .option-label {
    background: var(--primary-500);
    color: white;
}

.option-item.correct .option-label {
    background: var(--success);
    color: white;
}

.option-item.wrong .option-label {
    background: var(--error);
    color: white;
}

.option-text {
    flex: 1;
    padding-top: 0.25rem;
    color: var(--neutral-700);
    line-height: 1.6;
}

/* 解析区域 */
.explanation-box {
    margin-top: var(--space-xl);
    padding: var(--space-xl);
    background: linear-gradient(135deg, var(--primary-50), rgba(244, 247, 244, 0.5));
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-500);
}

.explanation-title {
    font-weight: 600;
    color: var(--primary-700);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.explanation-content {
    color: var(--neutral-600);
    line-height: 1.7;
}

/* ========================================
   错题本样式
   ======================================== */
.wrongbook-item {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--neutral-0);
    border-radius: var(--radius-lg);
    border: 1px solid var(--neutral-200);
    margin-bottom: var(--space-md);
    transition: all var(--duration-fast);
}

.wrongbook-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--neutral-300);
}

.wrongbook-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #f5e3e3, #faf0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.wrongbook-content {
    flex: 1;
}

.wrongbook-question {
    font-weight: 500;
    color: var(--neutral-800);
    margin-bottom: var(--space-sm);
    line-height: 1.5;
}

.wrongbook-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.8125rem;
    color: var(--neutral-500);
}

.wrongbook-tag {
    padding: 0.25rem 0.75rem;
    background: var(--neutral-100);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.wrongbook-actions {
    display: flex;
    gap: var(--space-sm);
}

/* ========================================
   标签页
   ======================================== */
.tabs {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-xs);
    background: var(--neutral-100);
    border-radius: var(--radius-md);
    width: fit-content;
}

.tab {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-600);
    cursor: pointer;
    transition: all var(--duration-fast);
    border: none;
    background: transparent;
}

.tab:hover {
    color: var(--neutral-800);
}

.tab.active {
    background: var(--neutral-0);
    color: var(--neutral-800);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   输入框
   ======================================== */
.input-field {
    width: 100%;
    height: 44px;
    padding: 0 var(--space-md);
    background: var(--neutral-0);
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--neutral-800);
    transition: all var(--duration-fast);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(82, 129, 82, 0.1);
}

.input-field::placeholder {
    color: var(--neutral-400);
}

/* ========================================
   模态框
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(41, 37, 36, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--neutral-0);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 60px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--duration-normal) var(--ease-out-expo);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--neutral-800);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--neutral-100);
    color: var(--neutral-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast);
}

.modal-close:hover {
    background: var(--neutral-200);
    color: var(--neutral-700);
}

.modal-body {
    padding: var(--space-xl);
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--neutral-200);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
}

/* ========================================
   Toast 通知
   ======================================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--neutral-0);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl), 0 4px 20px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-500);
    animation: toastSlideIn var(--duration-normal) var(--ease-out-expo);
    max-width: 400px;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.toast.success .toast-icon { background: #e3f0e6; color: var(--success); }
.toast.error .toast-icon { background: #f5e3e3; color: var(--error); }
.toast.warning .toast-icon { background: #faf3e8; color: var(--warning); }
.toast.info .toast-icon { background: #e8eef5; color: var(--info); }

.toast-message {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--neutral-700);
}

/* ========================================
   AI 智能助手
   ======================================== */
.ai-assistant {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
}

.ai-button {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-secondary));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(107, 124, 156, 0.4), 0 0 0 4px rgba(139, 165, 223, 0.2);
    transition: all var(--duration-fast);
    animation: aiPulse 3s ease-in-out infinite;
}

@keyframes aiPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(107, 124, 156, 0.4), 0 0 0 4px rgba(139, 165, 223, 0.2); }
    50% { box-shadow: 0 6px 30px rgba(107, 124, 156, 0.5), 0 0 0 8px rgba(139, 165, 223, 0.15); }
}

.ai-button:hover {
    transform: scale(1.05);
}

.ai-panel {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 360px;
    background: var(--neutral-0);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.ai-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.ai-header {
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-secondary));
    color: white;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.ai-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.ai-info {
    flex: 1;
}

.ai-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.ai-status {
    font-size: 0.75rem;
    opacity: 0.8;
}

.ai-body {
    padding: var(--space-lg);
    max-height: 400px;
    overflow-y: auto;
}

.ai-message {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.ai-message-content {
    background: var(--neutral-100);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border-bottom-left-radius: 4px;
    font-size: 0.875rem;
    color: var(--neutral-700);
    line-height: 1.6;
}

.ai-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.ai-action-chip {
    padding: var(--space-sm) var(--space-md);
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    color: var(--primary-700);
    cursor: pointer;
    transition: all var(--duration-fast);
}

.ai-action-chip:hover {
    background: var(--primary-100);
    border-color: var(--primary-300);
}

/* ========================================
   动画效果
   ======================================== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-fade-in-up {
    animation: fadeInUp var(--duration-slow) var(--ease-out-expo);
}

.animate-scale-in {
    animation: scaleIn var(--duration-normal) var(--ease-out-expo);
}

/* 交错动画 */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ========================================
   网格布局
   ======================================== */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1280px) {
    .grid-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: var(--space-lg);
    }

    .grid-stats,
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .top-bar {
        padding: 0 var(--space-lg);
    }

    .search-box {
        width: 200px;
    }

    .page-title {
        font-size: 1.25rem;
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ========================================
   Markdown 内容样式
   ======================================== */
.prose {
    color: var(--neutral-700);
    line-height: 1.8;
}

.prose h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--neutral-200);
}

.prose h2 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--neutral-800);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--neutral-700);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-700);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.prose p {
    margin-bottom: 1rem;
}

.prose ul,
.prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose li::marker {
    color: var(--primary-500);
}

.prose strong {
    font-weight: 600;
    color: var(--neutral-800);
}

.prose em {
    font-style: italic;
    color: var(--neutral-600);
}

.prose code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    background: var(--neutral-100);
    color: var(--primary-700);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.prose pre {
    background: var(--neutral-800);
    color: var(--neutral-100);
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: 1rem;
}

.prose pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.prose blockquote {
    border-left: 4px solid var(--primary-400);
    background: linear-gradient(90deg, var(--primary-50), transparent);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--neutral-600);
}

.prose blockquote p:last-child {
    margin-bottom: 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.prose th {
    background: var(--neutral-100);
    color: var(--neutral-800);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--neutral-200);
}

.prose td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--neutral-200);
}

.prose tr:nth-child(even) {
    background: var(--neutral-50);
}

.prose tr:hover {
    background: var(--primary-50);
}

.prose a {
    color: var(--primary-600);
    text-decoration: none;
    border-bottom: 1px dashed var(--primary-400);
    transition: all var(--duration-fast);
}

.prose a:hover {
    color: var(--primary-700);
    border-bottom-style: solid;
}

.prose hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neutral-300), transparent);
    margin: 2rem 0;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

/* ========================================
   脑图样式
   ======================================== */
.mindmap-node circle {
    transition: all 0.3s ease;
}

.mindmap-node:hover circle {
    filter: drop-shadow(0 4px 8px rgba(82, 129, 82, 0.3));
    transform: scale(1.05);
}

.mindmap-node text {
    pointer-events: none;
}

/* ========================================
   知识点详情双面板布局
   ======================================== */

/* 主容器 - 双面板布局 */
.knowledge-detail-container {
    display: flex;
    max-width: 960px;
    width: auto;
    max-height: 85vh;
    background: var(--neutral-0);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateX(50px);
    opacity: 0;
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.modal-overlay.active .knowledge-detail-container {
    transform: translateX(0);
    opacity: 1;
}

/* 脑图收起时，容器宽度调整 */
.knowledge-detail-container.mindmap-collapsed {
    max-width: 480px;
}

/* 左侧面板 - 知识点内容 */
.knowledge-content-panel {
    width: 480px;
    min-width: 480px;
    display: flex;
    flex-direction: column;
    background: var(--neutral-0);
    border-right: 1px solid var(--neutral-200);
    transition: border-color var(--duration-normal);
}

/* 脑图收起时，左侧面板右边框移除 */
.knowledge-detail-container.mindmap-collapsed .knowledge-content-panel {
    border-right: none;
}

/* 右侧面板 - 知识脑图 */
.knowledge-mindmap-panel {
    width: 400px;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--neutral-50) 0%, var(--neutral-0) 100%);
    transition: all var(--duration-normal) var(--ease-out-expo);
    overflow: hidden;
}

/* 脑图面板收起状态 */
.knowledge-mindmap-panel.collapsed {
    width: 0;
    min-width: 0;
    opacity: 0;
    padding: 0;
}

/* 面板头部 */
.knowledge-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--neutral-200);
    background: linear-gradient(180deg, var(--neutral-50) 0%, var(--neutral-0) 100%);
    flex-shrink: 0;
}

.knowledge-panel-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--neutral-800);
    margin: 0;
    line-height: 1.4;
}

.knowledge-panel-module {
    font-size: 0.8125rem;
    color: var(--primary-600);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.25rem;
}

.knowledge-panel-module::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary-500);
    border-radius: var(--radius-full);
}

.knowledge-panel-subtitle {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-700);
    margin: 0;
}

/* 面板操作按钮组 */
.knowledge-panel-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.knowledge-panel-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
    background: var(--neutral-0);
    color: var(--neutral-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast);
}

.knowledge-panel-btn:hover {
    background: var(--neutral-100);
    color: var(--neutral-700);
    border-color: var(--neutral-300);
}

.knowledge-panel-btn.active {
    background: var(--primary-100);
    color: var(--primary-600);
    border-color: var(--primary-300);
}

/* 面板内容区 */
.knowledge-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-xl);
    scrollbar-width: thin;
    scrollbar-color: var(--neutral-300) transparent;
}

.knowledge-panel-body::-webkit-scrollbar {
    width: 6px;
}

.knowledge-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.knowledge-panel-body::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: var(--radius-full);
}

.knowledge-panel-body::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

/* 脑图面板内容区特殊样式 */
#knowledge-mindmap-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--neutral-50) 50%, var(--primary-50) 100%);
}

#knowledge-mindmap-content svg {
    width: 100%;
    height: auto;
    max-height: 500px;
}

/* 面板底部 */
.knowledge-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--neutral-200);
    background: var(--neutral-0);
    flex-shrink: 0;
}

/* 脑图收起时的底部调整 */
.knowledge-mindmap-panel.collapsed + .knowledge-content-panel .knowledge-panel-footer,
.knowledge-content-panel:has(+ .knowledge-mindmap-panel.collapsed) .knowledge-panel-footer {
    justify-content: space-between;
}

/* 知识点内容样式 */
.knowledge-section {
    margin-bottom: var(--space-xl);
}

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

.knowledge-section-title {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--neutral-800);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.knowledge-section-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.knowledge-summary {
    background: linear-gradient(135deg, var(--primary-50) 0%, rgba(195, 217, 195, 0.3) 100%);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.knowledge-summary-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-700);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.knowledge-summary-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--neutral-700);
}

/* 要点列表样式 */
.knowledge-points-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.knowledge-point-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--neutral-50);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-400);
}

.knowledge-point-icon {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--primary-100);
    color: var(--primary-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.knowledge-point-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--neutral-700);
}

/* 记忆技巧特殊样式 */
.knowledge-memory-tips .knowledge-point-item {
    background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%);
    border-left-color: #c084fc;
}

.knowledge-memory-tips .knowledge-point-icon {
    background: #fae8ff;
    color: #9333ea;
}

/* 常见陷阱特殊样式 */
.knowledge-traps .knowledge-point-item {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left-color: #f87171;
}

.knowledge-traps .knowledge-point-icon {
    background: #fee2e2;
    color: #dc2626;
}

/* 元信息标签 */
.knowledge-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    padding-top: var(--space-lg);
    margin-top: var(--space-lg);
    border-top: 1px solid var(--neutral-200);
}

.knowledge-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
}

.knowledge-meta-label {
    color: var(--neutral-500);
}

.knowledge-meta-value {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
}

.knowledge-meta-value.high {
    background: #fef2f2;
    color: #dc2626;
}

.knowledge-meta-value.medium {
    background: #fffbeb;
    color: #d97706;
}

.knowledge-meta-value.low {
    background: #f0fdf4;
    color: #16a34a;
}

/* 脑图加载状态 */
.mindmap-loading {
    text-align: center;
    padding: var(--space-2xl);
}

.mindmap-loading-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    animation: pulse 2s ease-in-out infinite;
}

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

.mindmap-loading-text {
    font-size: 0.937rem;
    color: var(--neutral-500);
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .knowledge-detail-container {
        max-width: 480px;
        width: 95vw;
    }

    .knowledge-content-panel {
        width: 100%;
        min-width: auto;
        border-right: none;
    }

    .knowledge-mindmap-panel {
        display: none;
    }

    .knowledge-mindmap-panel.mobile-visible {
        display: flex;
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 100%;
        z-index: 10;
        background: var(--neutral-0);
    }
}

@media (max-width: 640px) {
    .knowledge-detail-container {
        max-height: 90vh;
        border-radius: var(--radius-lg);
    }

    .knowledge-panel-header {
        padding: var(--space-md) var(--space-lg);
    }

    .knowledge-panel-body {
        padding: var(--space-lg);
    }

    .knowledge-panel-footer {
        padding: var(--space-md) var(--space-lg);
    }

    .knowledge-panel-title {
        font-size: 1rem;
    }
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 渐变文字 */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 分隔线 */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neutral-300), transparent);
    margin: var(--space-xl) 0;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: var(--space-3xl);
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    border-radius: var(--radius-full);
    background: var(--neutral-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.empty-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--neutral-800);
    margin-bottom: var(--space-sm);
}

.empty-desc {
    font-size: 0.9375rem;
    color: var(--neutral-500);
}
