/* ========== CSS变量定义 ========== */
:root {
    --primary: #FFC107;
    --secondary: #FF9800;
    --accent: #8BC34A;
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --transition: all 0.3s ease;
    --animation-curve: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 卡片固定尺寸 */
    --card-width: 320px;
    --card-height: 280px;
    --card-gap: 24px;
}

/* 暗色主题 */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border: #404040;
}

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

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 防止移动端横向滚动 */
html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========== 大纲功能样式（新增） ========== */
/* 悬浮球 */
.outline-floating-button {
    position: fixed;
    bottom: 80px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 100;
    font-size: 20px;
    animation: fadeIn 0.5s ease;
}

.outline-floating-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: var(--secondary);
}

.outline-floating-button:active {
    transform: scale(0.95);
}

/* 大纲面板 */
.outline-panel {
    position: fixed;
    right: -350px;
    top: 0;
    width: 350px;
    height: 100vh;
    background: var(--bg-secondary);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s var(--animation-curve);
    z-index: 101;
    display: flex;
    flex-direction: column;
}

.outline-panel.show {
    right: 0;
}

/* 大纲头部 */
.outline-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-primary);
}

.outline-header h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0;
}

.outline-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.outline-close:hover {
    background: var(--bg-secondary);
    color: var(--primary);
    transform: rotate(90deg);
}

/* 大纲内容 */
.outline-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* 大纲项 */
.outline-item {
    padding: 10px 15px;
    margin-bottom: 5px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 不同级别的缩进 */
.outline-level-1 { padding-left: 15px; font-weight: 600; }
.outline-level-2 { padding-left: 30px; }
.outline-level-3 { padding-left: 45px; }
.outline-level-4 { padding-left: 60px; }
.outline-level-5 { padding-left: 75px; }
.outline-level-6 { padding-left: 90px; }

.outline-item:hover {
    background: var(--bg-primary);
    color: var(--primary);
    transform: translateX(5px);
}

.outline-item.active {
    background: rgba(255, 193, 7, 0.1);
    color: var(--primary);
    font-weight: 500;
}

.outline-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

/* 大纲文本 */
.outline-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 暗色主题大纲适配 */
[data-theme="dark"] .outline-panel {
    background: var(--bg-secondary);
}

[data-theme="dark"] .outline-header {
    background: #1a1a1a;
}

[data-theme="dark"] .outline-item:hover {
    background: #404040;
}

/* 移动端大纲适配 */
@media (max-width: 768px) {
    .outline-floating-button {
        bottom: 70px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .outline-panel {
        width: 100%;
        right: -100%;
    }
    
    .outline-panel.show {
        right: 0;
    }
    
    .outline-content {
        padding: 15px;
    }
    
    .outline-item {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .outline-floating-button {
        bottom: 60px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* ========== 图片图标样式 ========== */
.icon-image {
    width: 1em;
    height: 1em;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
}

/* 导航图标 */
.nav-item-icon.icon-image {
    width: 24px;
    height: 24px;
    margin-right: 12px;
}

/* 卡片图标 */
.card-icon-wrapper .icon-image {
    width: 4rem;
    height: 4rem;
}

/* 快速链接图标 */
.quick-link-card .icon-image {
    width: 3rem;
    height: 3rem;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* 面包屑图标 */
.breadcrumb .icon-image {
    width: 1rem;
    height: 1rem;
}

/* 下载项图标 */
.download-item > .icon-image {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
}

/* 标题图标 */
.section-title .icon-image,
.welcome-title .icon-image,
.content-title .icon-image {
    width: 1.2em;
    height: 1.2em;
}

/* 图片图标过渡效果 */
.icon-image {
    transition: transform 0.3s ease;
}

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

.quick-link-card:hover .icon-image {
    transform: scale(1.05);
}

/* ========== 加载动画 - 优化版 ========== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s var(--animation-curve), visibility 0.5s;
}

.loader.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    position: relative;
}

.loader-icon {
    font-size: 48px;
    color: var(--primary);
    animation: sunflowerRotate 1.5s linear infinite;
    display: inline-block;
    margin-bottom: 20px;
}

.loader-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 20px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: var(--bg-primary);
    border-radius: 2px;
    overflow: hidden;
    margin: 15px auto 0;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.5s forwards;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    animation: loadingProgress 2s ease-in-out infinite;
}

@keyframes loadingProgress {
    0% { width: 0%; transform: translateX(0); }
    50% { width: 70%; }
    100% { width: 100%; transform: translateX(200px); }
}

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

/* ========== 主容器 ========== */
.main-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ========== 侧边栏 ========== */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s var(--animation-curve);
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.site-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.site-title:hover {
    transform: translateX(5px);
}

.site-title span:first-child {
    display: inline-block;
    animation: sunflowerRotate 20s linear infinite;
}

@keyframes sunflowerRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 5px;
    opacity: 0;
    animation: slideInLeft 0.4s ease forwards;
}

.nav-section:nth-child(1) { animation-delay: 0.1s; }
.nav-section:nth-child(2) { animation-delay: 0.15s; }
.nav-section:nth-child(3) { animation-delay: 0.2s; }
.nav-section:nth-child(4) { animation-delay: 0.25s; }
.nav-section:nth-child(5) { animation-delay: 0.3s; }

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

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.1), transparent);
    transition: width 0.3s ease;
}

.nav-item:hover::before {
    width: 100%;
}

.nav-item:hover {
    background: var(--bg-primary);
    padding-left: 25px;
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--secondary);
    animation: slideInHeight 0.3s ease;
}

@keyframes slideInHeight {
    from { height: 0; }
    to { height: 100%; }
}

/* 首页导航项特殊样式 */
.nav-home {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%);
    border: 1px solid rgba(255, 193, 7, 0.2);
    margin: 0 10px 10px 10px;
    border-radius: var(--radius);
}

.nav-home:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 152, 0, 0.1) 100%);
    border-color: var(--primary);
    padding-left: 20px;
}

.nav-home.active {
    background: var(--primary);
    border-color: var(--primary);
}

.nav-item-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    margin-right: 12px;
    transition: transform 0.3s ease;
}

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

.nav-item-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item-title {
    font-size: 1rem;
}

.nav-item-subtitle {
    font-size: 0.8rem;
    opacity: 0.7;
}

.nav-arrow {
    margin-left: auto;
    transition: transform 0.3s;
}

.nav-item:hover .nav-arrow {
    transform: translateX(3px);
}

.nav-item.locked::after {
    content: '🔒';
    margin-left: auto;
    animation: swing 2s ease-in-out infinite;
}

@keyframes swing {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* 侧边栏分隔线 */
.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 10px 20px;
    opacity: 0.5;
}

/* ========== 内容区域 ========== */
.content-area {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.3s var(--animation-curve);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
}

.top-header {
    background: var(--bg-secondary);
    padding: 15px 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    animation: slideDown 0.5s ease;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-primary);
    transition: transform 0.3s ease;
}

.menu-toggle:hover {
    transform: scale(1.1) rotate(180deg);
}

.header-actions {
    display: flex;
    gap: 15px;
}

.theme-toggle,
.token-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.theme-toggle::before,
.token-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 193, 7, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.theme-toggle:hover::before,
.token-btn:hover::before {
    width: 100px;
    height: 100px;
}

.theme-toggle:hover,
.token-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.token-btn.authenticated {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
    animation: authenticatedPulse 2s ease-in-out infinite;
}

@keyframes authenticatedPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
}

/* ========== 内容包装器 ========== */
.content-wrapper {
    padding: 30px;
    flex: 1;
    width: 100%;
    max-width: 100%;
    opacity: 0;
    animation: fadeIn 0.5s ease 0.3s forwards;
    display: flex;
    flex-direction: column;
}

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

/* ========== 内容容器 ========== */
.content-container,
.section-container,
.welcome-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ========== 欢迎页面 ========== */
.welcome-page {
    text-align: center;
    padding: 40px 20px;
}

.welcome-header {
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.welcome-title {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.welcome-logo {
    font-size: 4rem;
    animation: bounceIn 1s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.welcome-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
}

.quick-links {
    margin-top: 40px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.quick-links h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--text-primary);
}

/* ========== 卡片网格 - 优化动画版 ========== */
.cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--card-gap);
    justify-content: center;
    margin: 30px auto 0;
    padding: 0 20px;
}

/* 内容卡片 - 增强动画 */
.content-card {
    width: var(--card-width);
    height: var(--card-height);
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s var(--animation-curve);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: center;
    flex-shrink: 0;
    transform: translateY(20px);
    opacity: 0;
    animation: cardFadeIn 0.6s ease forwards;
}

.content-card:nth-child(1) { animation-delay: 0.1s; }
.content-card:nth-child(2) { animation-delay: 0.2s; }
.content-card:nth-child(3) { animation-delay: 0.3s; }
.content-card:nth-child(4) { animation-delay: 0.4s; }
.content-card:nth-child(5) { animation-delay: 0.5s; }
.content-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes cardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0) 0%, rgba(255, 193, 7, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.content-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card-image-wrapper {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: var(--bg-primary);
    flex-shrink: 0;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.content-card:hover .card-image {
    transform: scale(1.15) rotate(2deg);
}

.card-icon-wrapper {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 4rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.card-icon-wrapper::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: iconShine 3s ease-in-out infinite;
}

@keyframes iconShine {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-description {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: auto;
    padding-top: 10px;
}

.tag {
    background: var(--bg-primary);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    transition: var(--transition);
}

.content-card:hover .tag {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.card-lock {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    backdrop-filter: blur(5px);
    animation: lockPulse 2s ease-in-out infinite;
}

@keyframes lockPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.9; }
}

/* 快速链接卡片 - 优化动画 */
.quick-link-card {
    width: var(--card-width);
    height: 220px;
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.4s var(--animation-curve);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.quick-link-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.1) 0%, transparent 40%);
    transition: transform 0.6s ease;
}

.quick-link-card:hover::before {
    transform: translate(50%, 50%);
}

.quick-link-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.quick-link-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
    display: block;
    transition: transform 0.3s ease;
}

.quick-link-card:hover i {
    transform: scale(1.2) rotate(10deg);
}

.quick-link-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.quick-link-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ========== Token提示 - 动画增强版 ========== */
.token-prompt {
    margin-top: 50px;
    padding: 40px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(255, 193, 7, 0.05) 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.token-prompt::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(0.8) rotate(0deg); opacity: 0.5; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 1; }
}

.token-prompt p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* ========== 团队预览卡片 - 动画优化 ========== */
.team-preview {
    margin-top: 60px;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.8s forwards;
}

.team-preview h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.team-preview-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.4s var(--animation-curve);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.team-preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.1), transparent);
    transition: left 0.6s ease;
}

.team-preview-card:hover::before {
    left: 100%;
}

.team-preview-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.team-preview-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.team-preview-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.4s var(--animation-curve);
}

.team-preview-card:hover .team-preview-avatar {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 30px rgba(255, 193, 7, 0.4);
}

.team-preview-info {
    flex: 1;
    text-align: left;
}

.team-preview-info h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.team-preview-info p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
}

.team-preview-link {
    color: var(--primary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.team-preview-card:hover .team-preview-link {
    gap: 15px;
}

/* ========== 栏目页面 ========== */
.section-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* 返回首页按钮 - 动画增强 */
.btn-back-home {
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.btn-back-home::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-back-home:hover::before {
    left: 0;
}

.btn-back-home:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* ========== 内容页头部导航 ========== */
.content-header-nav {
    margin-bottom: 20px;
    text-align: right;
}

.content-header-nav .btn-back-home {
    position: static;
    display: inline-flex;
}

/* ========== 面包屑导航 - 动画优化 ========== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-size: 0.9rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    animation: slideInLeft 0.5s ease 0.2s forwards;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.breadcrumb a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.breadcrumb a:hover::after {
    width: 100%;
}

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

.breadcrumb .separator {
    color: var(--text-secondary);
    opacity: 0.5;
    flex-shrink: 0;
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
    flex-shrink: 0;
}

/* ========== 内容展示 - 动画优化 ========== */
.content-display {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    margin: 0 auto;
    max-width: 900px;
    width: 100%;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

.content-header {
    margin-bottom: 30px;
    text-align: center;
}

.content-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 10px;
    word-break: break-word;
}

.content-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    word-break: break-word;
}

/* ========== Markdown内容 ========== */
.markdown-body {
    line-height: 1.8;
    color: var(--text-primary);
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    width: 100%;
    overflow: hidden;
}

.markdown-body * {
    max-width: 100%;
}

.markdown-body h1, 
.markdown-body h2, 
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    color: var(--text-primary);
    line-height: 1.25;
    word-break: break-word;
    scroll-margin-top: 80px; /* 为锚点跳转留出顶部空间 */
}

.markdown-body p {
    margin-bottom: 16px;
    word-break: break-word;
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 1.5em;
    margin-bottom: 16px;
    max-width: 100%;
}

.markdown-body li {
    word-break: break-word;
}

.markdown-body blockquote {
    padding: 0 1em;
    margin: 0 0 16px 0;
    color: var(--text-secondary);
    border-left: 4px solid var(--primary);
    overflow: hidden;
}

/* 表格滚动容器 */
.markdown-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
    border-collapse: collapse;
}

.markdown-body table th,
.markdown-body table td {
    padding: 6px 13px;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.markdown-body table tr {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.markdown-body table tr:nth-child(2n) {
    background-color: var(--bg-primary);
}

/* 图片响应式 */
.markdown-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 16px auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.markdown-body img:hover {
    transform: scale(1.02);
}

.markdown-body a {
    color: var(--primary);
    text-decoration: none;
    word-break: break-word;
}

.markdown-body a:hover {
    text-decoration: underline;
}

/* 代码块样式 */
.markdown-body code {
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    word-break: break-word;
}

.markdown-body pre {
    background: #2d2d2d;
    padding: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
    position: relative;
    max-width: 100%;
}

.markdown-body pre code {
    background: transparent;
    padding: 0;
    color: #f8f8f2;
    font-size: 0.9em;
    line-height: 1.5;
    display: block;
    overflow-x: auto;
    white-space: pre;
    word-break: normal;
    word-wrap: normal;
}

/* 代码复制按钮 */
.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #404040;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.markdown-body pre:hover .code-copy-btn {
    opacity: 1;
}

.code-copy-btn:hover {
    background: #404040;
}

.code-copy-btn.copied {
    background: #4CAF50;
    animation: copySuccess 0.5s ease;
}

@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ========== PDF阅读器样式 ========== */
.pdf-container {
    margin-top: 20px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-primary);
}

.pdf-toolbar {
    background: var(--bg-secondary);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
}

.pdf-btn {
    padding: 8px 12px;
    background: #2196F3;
    color: white;
    border: 1px solid #2196F3;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.pdf-btn:hover {
    background: #1976D2;
    transform: translateY(-1px);
}

.pdf-page-info {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.pdf-viewer {
    width: 100%;
    overflow: auto;
    position: relative;
    background: #525659;
    min-height: 600px;
}

.pdf-viewer iframe {
    display: block;
    width: 100%;
    min-height: 800px;
}

/* ========== TXT阅读器样式 ========== */
.txt-container {
    margin-top: 20px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-primary);
}

.txt-toolbar {
    background: var(--bg-secondary);
    padding: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
}

.txt-btn {
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.txt-viewer {
    padding: 20px;
    background: var(--bg-secondary);
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    transition: var(--transition);
}

.txt-viewer pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-primary);
}

.txt-viewer.dark-theme {
    background: #1e1e1e;
    color: #d4d4d4;
}

/* ========== 视频播放器 - 完全重写版 ========== */
.video-container {
    margin: 20px auto;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    background: #000;
    max-width: 100%;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 比例 */
    background: #000;
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* ========== 视频质量控制样式 ========== */
.video-quality-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeIn 0.5s ease 0.5s forwards;
}

.video-container:hover .video-quality-controls {
    opacity: 1;
}

.video-quality-controls:hover {
    background: rgba(0, 0, 0, 0.85);
}

/* 质量选择器 */
.quality-selector {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.quality-selector:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.quality-selector:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
}

.quality-selector option {
    background: #2d2d2d;
    color: white;
    padding: 8px;
}

/* 缓冲状态 */
.buffer-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 14px;
    background: rgba(255, 193, 7, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    animation: bufferPulse 1.5s ease-in-out infinite;
}

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

.buffer-status i {
    font-size: 16px;
}

/* 网速显示 */
.network-speed {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    min-width: 120px;
    text-align: center;
}

/* Canvas渲染器 */
.quality-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* 视频错误提示 */
.video-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px 30px;
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    25% { transform: translate(-52%, -50%) rotate(-1deg); }
    75% { transform: translate(-48%, -50%) rotate(1deg); }
}

.video-error i {
    font-size: 48px;
    color: var(--secondary);
    display: block;
    margin-bottom: 15px;
}

/* 质量切换动画 */
.video-player.switching-quality {
    animation: qualitySwitch 0.5s ease;
}

@keyframes qualitySwitch {
    0% { opacity: 0.7; filter: blur(2px); }
    50% { opacity: 0.5; filter: blur(4px); }
    100% { opacity: 1; filter: blur(0); }
}

/* 自适应质量标识 */
.quality-selector option[value="auto"]::after {
    content: " (推荐)";
    color: var(--primary);
}

/* ========== 标签页 - 动画优化版 ========== */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bg-primary);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 0 10px;
}

.tab {
    padding: 12px 24px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius) var(--radius) 0 0;
    margin-top: 5px;
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.tab:nth-child(1) { animation-delay: 0.1s; }
.tab:nth-child(2) { animation-delay: 0.2s; }
.tab:nth-child(3) { animation-delay: 0.3s; }
.tab:nth-child(4) { animation-delay: 0.4s; }

.tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.tab:hover::before {
    width: 50%;
}

.tab:hover {
    color: var(--primary);
    background: rgba(255, 193, 7, 0.1);
}

.tab.active {
    color: var(--primary);
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-bottom: 2px solid var(--bg-secondary);
    margin-bottom: -2px;
}

.tab.active::before {
    width: 100%;
}

/* 标签内容容器 */
.tab-contents {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 20px;
    margin-top: -2px;
}

.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
    animation: tabContentFade 0.4s ease;
}

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

/* 确保标签内容中的视频正常显示 */
.tab-content .video-container {
    margin: 0 0 20px 0;
}

.tab-content .markdown-body {
    margin: 0;
}

/* ========== 内容导航 - 动画优化版 ========== */
.content-navigation {
    margin-top: 50px;
    padding: 30px 0;
    border-top: 1px solid var(--border);
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.5s forwards;
}

/* 导航按钮顶部行 */
.nav-top-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
}

.nav-top-row .nav-btn {
    flex: 0 0 auto;
    min-width: 140px;
}

.nav-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.nav-btn {
    padding: 12px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    color: var(--text-primary);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 193, 7, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.nav-btn:hover::before {
    width: 200px;
    height: 200px;
}

.nav-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.nav-home {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%);
    border-color: var(--primary);
}

.nav-home:hover {
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.nav-prev {
    text-align: left;
    justify-content: flex-start;
}

.nav-next {
    text-align: right;
    justify-content: flex-end;
}

/* ========== 开发团队 - 动画增强 ========== */
.team-container {
    margin-top: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.team-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
    opacity: 0;
    animation: slideInLeft 0.6s ease forwards;
}

.team-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.team-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.team-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 4px solid var(--bg-secondary);
    transition: all 0.4s ease;
}

.team-card:hover .team-avatar {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.team-status {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.team-info {
    flex: 1;
}

.team-name {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.team-role {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.team-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.team-tag {
    background: var(--bg-primary);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.team-card:hover .team-tag {
    background: var(--primary);
    color: white;
}

.team-bio {
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.team-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact-item:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.team-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

.stat-item {
    background: var(--bg-primary);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
    animation: countUp 1s ease-out;
}

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

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

/* 团队项目展示 */
.team-projects {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-primary);
    border-radius: 16px;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.4s forwards;
}

.team-projects h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 25px;
}

.project-list {
    display: grid;
    gap: 20px;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    transform: translateX(0);
}

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

.project-item i {
    font-size: 2rem;
    color: var(--primary);
    width: 50px;
    text-align: center;
}

.project-item h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

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

/* ========== 下载区域 - 动画优化版 ========== */
.download-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px dashed var(--border);
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

.download-section-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-section-title i {
    color: #2196F3;
    animation: bounce 2s ease-in-out infinite;
}

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

/* 下载列表 */
.download-list {
    max-width: 800px;
    margin: 30px auto 0;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    margin-bottom: 15px;
    transition: var(--transition);
    border: 2px solid transparent;
    opacity: 0;
    animation: slideInLeft 0.5s ease forwards;
}

.download-item:nth-child(1) { animation-delay: 0.1s; }
.download-item:nth-child(2) { animation-delay: 0.2s; }
.download-item:nth-child(3) { animation-delay: 0.3s; }

.download-item:hover {
    transform: translateX(5px);
    border-color: #2196F3;
    box-shadow: var(--shadow);
}

.download-item > i {
    font-size: 2.5rem;
    color: #2196F3;
    flex-shrink: 0;
}

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

.download-info h4 {
    margin-bottom: 5px;
    color: var(--text-primary);
    word-break: break-word;
}

.download-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    word-break: break-word;
}

.download-size {
    display: inline-block;
    margin-top: 5px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 下载按钮 */
.download-item .btn-primary {
    background: #2196F3;
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(33, 150, 243, 0.3);
    transition: var(--transition);
}

.download-item .btn-primary:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.download-item .btn-primary i {
    transition: transform 0.3s ease;
}

.download-item .btn-primary:hover i {
    transform: translateY(2px);
}

/* ========== 模板展示 ========== */
.template-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
    margin: 30px auto 0;
}

.template-item {
    width: 280px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    animation: zoomIn 0.5s ease forwards;
}

.template-item:nth-child(1) { animation-delay: 0.1s; }
.template-item:nth-child(2) { animation-delay: 0.2s; }
.template-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.template-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.template-preview {
    width: 100%;
    height: 160px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    margin-bottom: 15px;
    overflow: hidden;
}

.template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.template-item:hover .template-preview img {
    transform: scale(1.05);
}

.template-item h4 {
    margin-bottom: 10px;
    color: var(--text-primary);
    word-break: break-word;
}

.template-item p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.9rem;
    word-break: break-word;
}

/* ========== 模态框 - 动画增强版 ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal.show {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        background: rgba(0, 0, 0, 0);
    }
    to {
        opacity: 1;
        background: rgba(0, 0, 0, 0.7);
    }
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: modalSlideUp 0.4s var(--animation-curve);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

@keyframes modalSlideUp {
    from {
        transform: translateY(40px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

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

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

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
    background: var(--bg-primary);
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* ========== Token信息 - 动画美化版 ========== */
.token-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.token-info::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.token-info::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 152, 0, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.qq-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 5px solid var(--bg-secondary);
    position: relative;
    z-index: 1;
    transition: all 0.4s ease;
    animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); }
    50% { transform: scale(1.05); box-shadow: 0 15px 50px rgba(255, 193, 7, 0.3); }
}

.qq-avatar:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 50px rgba(255, 193, 7, 0.4);
}

.qq-number {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.token-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

/* ========== 表单元素 ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.1);
    transform: translateY(-2px);
}

/* ========== 按钮 - 动画增强版 ========== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--animation-curve);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: var(--border);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* ========== 页脚 ========== */
.content-footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeIn 0.6s ease 0.5s forwards;
    background: var(--bg-primary);
}

.content-footer p {
    margin: 5px 0;
}

/* 页脚快速导航 */
.footer-nav {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: var(--radius);
}

.footer-nav a:hover {
    color: var(--primary);
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

.footer-nav span {
    color: var(--border);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* ========== 错误提示 ========== */
.error-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    animation: errorBounce 0.6s ease;
}

@keyframes errorBounce {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.error-message i {
    font-size: 4rem;
    color: var(--secondary);
    margin-bottom: 20px;
    display: block;
}

.error-message p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* ========== 加载动画 ========== */
.loading {
    text-align: center;
    padding: 80px 20px;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.loading i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== Toast提示 - 动画优化 ========== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: all 0.3s var(--animation-curve);
    z-index: 1100;
    font-weight: 500;
    border: 1px solid var(--border);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    animation: toastShake 0.5s ease;
}

@keyframes toastShake {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
    25% { transform: translateX(-52%) translateY(0) rotate(-1deg); }
    75% { transform: translateX(-48%) translateY(0) rotate(1deg); }
}

/* ========== 图片模态框 ========== */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.image-modal-close:hover {
    transform: scale(1.1) rotate(90deg);
}

/* ========== 侧边栏遮罩 ========== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    backdrop-filter: blur(5px);
}

.sidebar-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

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

/* ========== 响应式设计 - 优化版 ========== */
@media (max-width: 1024px) {
    .cards-grid {
        --card-width: 300px;
        --card-gap: 20px;
    }
    
    .content-card {
        width: var(--card-width);
        height: var(--card-height);
    }
}

@media (max-width: 768px) {
    body {
        width: 100vw;
        overflow-x: hidden;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .content-area {
        margin-left: 0;
        width: 100vw;
        max-width: 100vw;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .content-wrapper {
        padding: 15px;
        width: 100%;
        max-width: 100%;
    }
    
    .content-container,
    .section-container,
    .welcome-container {
        max-width: 100%;
        padding: 0;
    }
    
    /* 移动端卡片全宽显示 */
    .cards-grid {
        flex-direction: column;
        gap: 15px;
        padding: 0;
    }
    
    .content-card,
    .quick-link-card {
        width: 100%;
        height: auto;
        min-height: 200px;
    }
    
    .card-content {
        padding: 15px;
    }
    
    .card-image-wrapper,
    .card-icon-wrapper {
        height: 120px;
    }
    
    .content-display {
        padding: 20px;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
    
    .content-title {
        font-size: 1.5rem;
        word-break: break-word;
    }
    
    .content-subtitle {
        font-size: 0.9rem;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .welcome-logo {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-header {
        position: relative;
        padding-bottom: 60px;
    }
    
    .btn-back-home {
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        top: auto;
    }
    
    .nav-top-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-top-row .nav-btn {
        min-width: 100%;
    }
    
    .markdown-body {
        font-size: 0.9rem;
        padding: 0;
        width: 100%;
    }
    
    .markdown-body h1 { font-size: 1.5rem; }
    .markdown-body h2 { font-size: 1.3rem; }
    .markdown-body h3 { font-size: 1.1rem; }
    .markdown-body h4 { font-size: 1rem; }
    .markdown-body h5 { font-size: 0.9rem; }
    .markdown-body h6 { font-size: 0.85rem; }
    
    .markdown-body pre {
        font-size: 0.8rem;
        padding: 12px;
        margin-left: 0;
        margin-right: 0;
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
    }
    
    .markdown-body blockquote {
        margin-left: 0;
        margin-right: 0;
        padding-left: 1em;
    }
    
    .markdown-body table {
        font-size: 0.85rem;
    }
    
    .pdf-viewer iframe {
        min-height: 500px;
    }
    
    .txt-viewer {
        font-size: 12px;
        max-height: 400px;
    }
    
    .pdf-toolbar,
    .txt-toolbar {
        padding: 8px;
    }
    
    .pdf-btn,
    .txt-btn {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    
    /* 移动端视频质量控制优化 */
    .video-quality-controls {
        top: 5px;
        right: 5px;
        padding: 6px 10px;
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
        max-width: 150px;
    }
    
    .quality-selector {
        min-width: 80px;
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .buffer-status {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .network-speed {
        font-size: 11px;
        padding: 4px 8px;
        min-width: 100px;
    }
    
    .video-error {
        padding: 15px 20px;
        font-size: 14px;
    }
    
    .video-error i {
        font-size: 36px;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
        padding: 10px 15px;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        border-radius: 8px;
    }
    
    .content-navigation {
        margin-left: 0;
        margin-right: 0;
        padding: 30px 0;
    }
    
    .nav-buttons {
        grid-template-columns: 1fr;
    }
    
    .top-header {
        padding: 10px 15px;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    .token-btn span {
        display: none;
    }
    
    .content-footer {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        padding: 40px 15px;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .team-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .team-avatar {
        width: 120px;
        height: 120px;
    }
    
    .team-contact {
        justify-content: center;
    }
    
    .team-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-item {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .download-item {
        flex-direction: column;
        text-align: center;
    }
    
    .download-item .btn {
        margin-top: 10px;
        width: 100%;
    }
    
    .template-gallery {
        flex-direction: column;
    }
    
    .template-item {
        width: 100%;
    }
    
    .team-preview-content {
        flex-direction: column;
        text-align: center;
    }
    
    .qq-avatar {
        width: 100px;
        height: 100px;
    }
    
    .token-info {
        padding: 20px;
    }
    
    /* 移动端视频优化 */
    .video-wrapper {
        padding-bottom: 56.25% !important;
    }
    
    .video-wrapper.flex-video {
        min-height: 200px;
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 10px;
    }
    
    .content-display {
        padding: 15px;
    }
    
    .markdown-body {
        font-size: 0.85rem;
    }
    
    .markdown-body pre {
        padding: 10px;
        font-size: 0.75rem;
    }
    
    .team-stats {
        grid-template-columns: 1fr;
    }
    
    .content-card {
        border-radius: 8px;
    }
    
    .card-content {
        padding: 15px;
    }
    
    .top-header {
        padding: 8px 10px;
    }
    
    .theme-toggle,
    .token-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .pdf-viewer iframe {
        min-height: 400px;
    }
    
    .txt-viewer {
        font-size: 11px;
        max-height: 300px;
        padding: 15px;
    }
    
    /* 小屏幕视频质量控制 */
    .video-quality-controls {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        max-width: 100%;
        margin-top: 10px;
        background: var(--bg-secondary);
        color: var(--text-primary);
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px;
        border-radius: 8px;
    }
    
    .quality-selector {
        background: var(--bg-primary);
        color: var(--text-primary);
        border-color: var(--border);
        flex: 1;
        min-width: 120px;
    }
    
    .buffer-status {
        background: rgba(255, 193, 7, 0.1);
        color: var(--primary);
    }
    
    .network-speed {
        background: var(--bg-primary);
        color: var(--text-secondary);
        flex: 1;
    }
}

/* ========== 横屏模式优化 ========== */
@media (orientation: landscape) and (max-height: 500px) {
    .video-quality-controls {
        top: 5px;
        right: 5px;
        padding: 4px 8px;
        gap: 10px;
    }
    
    .quality-selector {
        padding: 3px 8px;
        font-size: 12px;
    }
    
    .buffer-status,
    .network-speed {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* ========== 全屏模式优化 ========== */
.video-container:fullscreen .video-quality-controls,
.video-container:-webkit-full-screen .video-quality-controls,
.video-container:-moz-full-screen .video-quality-controls,
.video-container:-ms-fullscreen .video-quality-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 16px;
}

/* ========== 暗色主题适配 ========== */
[data-theme="dark"] .video-quality-controls {
    background: rgba(45, 45, 45, 0.9);
}

[data-theme="dark"] .quality-selector {
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .quality-selector:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ========== 打印样式 ========== */
@media print {
    .sidebar,
    .top-header,
    .breadcrumb,
    .content-navigation,
    .content-footer,
    .pdf-toolbar,
    .txt-toolbar,
    .video-controls,
    .video-quality-controls,
    .btn-back-home,
    .content-header-nav,
    .nav-top-row,
    .outline-floating-button,
    .outline-panel {
        display: none !important;
    }
    
    .content-area {
        margin-left: 0 !important;
    }
    
    .content-display {
        box-shadow: none !important;
        padding: 0 !important;
    }
    
    .markdown-body {
        font-size: 12pt !important;
    }
    
    /* 确保页脚在打印时不显示 */
    .main-container > .content-footer {
        display: none !important;
    }
}

/* ========== 减少动画延迟 ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========== 高对比度模式 ========== */
@media (prefers-contrast: high) {
    .video-quality-controls {
        background: rgba(0, 0, 0, 0.95);
        border: 1px solid white;
    }
    
    .quality-selector {
        border-width: 2px;
    }
    
    .outline-panel {
        border-left: 2px solid var(--text-primary);
    }
    
    .outline-item.active {
        border: 2px solid var(--primary);
    }
}

/* ========== 性能优化 ========== */
.video-quality-controls,
.quality-canvas,
.outline-panel,
.outline-floating-button {
    will-change: transform, opacity;
}

/* ========== 可访问性优化 ========== */
.quality-selector:focus-visible,
.outline-floating-button:focus-visible,
.outline-close:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ========== 防止样式冲突 ========== */
.video-container *,
.outline-panel * {
    box-sizing: border-box;
}

/* ========== 加载状态优化 ========== */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 48px;
    z-index: 5;
    pointer-events: none;
}

.video-loading i {
    animation: spin 1s linear infinite;
}

/* ========== 质量标签 ========== */
.quality-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .quality-badge {
    opacity: 1;
}

/* 质量切换动画 */
.video-player.switching-quality {
    animation: qualitySwitch 0.5s ease;
}

@keyframes qualitySwitch {
    0% { opacity: 0.7; filter: blur(2px); }
    50% { opacity: 0.5; filter: blur(4px); }
    100% { opacity: 1; filter: blur(0); }
}

/* 自适应质量标识 */
.quality-selector option[value="auto"]::after {
    content: " (推荐)";
    color: var(--primary);
}

/* ========== 确保页脚始终在底部 ========== */
.main-container {
    position: relative;
    padding-bottom: 120px; /* 为页脚留出空间 */
}

.main-container > .content-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
}

/* 移动端页脚调整 */
@media (max-width: 768px) {
    .main-container {
        padding-bottom: 150px;
    }
}

/* ========== 大纲内容滚动优化 ========== */
.outline-content::-webkit-scrollbar {
    width: 6px;
}

.outline-content::-webkit-scrollbar-track {
    background: transparent;
}

.outline-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.outline-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ========== 额外的辅助类 ========== */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ========== 修复页脚定位问题 ========== */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-container {
    flex: 1;
    display: flex;
    position: relative;
    padding-bottom: 0;
}

.content-area {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.content-wrapper {
    flex: 1;
}

/* 页脚样式调整 */
.main-container > .content-footer {
    position: relative;
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
}