/* ============================================
   MYAIGC 小说创作平台 - 现代化设计系统
   设计风格: 紫色渐变 + 玻璃拟态
   ============================================ */

/* ==================== 设计系统变量 ==================== */
:root {
    /* 主色调 - 紫色系 (完整色阶) */
    --primary-50: #f5f3ff;
    --primary-100: #ede9fe;
    --primary-200: #ddd6fe;
    --primary-300: #c4b5fd;
    --primary-400: #a78bfa;
    --primary-500: #8b5cf6;      /* 主品牌色 */
    --primary-600: #7c3aed;
    --primary-700: #6d28d9;
    --primary-800: #5b21b6;
    --primary-900: #4c1d95;
    
    /* 兼容旧变量 */
    --primary-color: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --secondary-color: #06b6d4;
    --accent-color: #f59e0b;

    /* 渐变系统 */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.1) 100%);
    --gradient-shimmer: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-gradient: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-400) 100%);

    /* 中性色 (完整色阶) */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* 功能色 */
    --success-color: #10b981;
    --success-light: #d1fae5;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --error-color: #ef4444;
    --error-light: #fee2e2;
    --info-color: #3b82f6;
    --info-light: #dbeafe;

    /* 玻璃拟态效果 */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-light: rgba(255, 255, 255, 0.25);
    --glass-bg-solid: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    --glass-blur: blur(20px);
    --glass-blur-light: blur(10px);

    /* 间距系统 */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.5rem;    /* 24px */
    --space-6: 2rem;      /* 32px */
    --space-8: 3rem;      /* 48px */
    --space-10: 4rem;     /* 64px */

    /* 阴影系统 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);
    --shadow-glow-lg: 0 0 60px rgba(139, 92, 246, 0.4);

    /* 圆角系统 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* 动画系统 */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* 字体系统 */
    --font-sans: 'Inter', 'Microsoft YaHei', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* 全局样式重置和优化 */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    color: var(--gray-800);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ==================== 玻璃拟态组件库 ==================== */

/* 基础玻璃卡片 */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-normal);
}

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

/* 玻璃容器（登录/注册页面使用） */
.glass-container {
    background: var(--glass-bg-solid);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
}

.glass-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

/* 玻璃按钮 */
.glass-btn {
    background: var(--glass-bg-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: white;
    padding: var(--space-2) var(--space-4);
    font-weight: 500;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* 玻璃导航栏 */
.glass-navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* 玻璃输入框 */
.glass-input {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    font-size: 1rem;
    transition: all var(--transition-normal);
    width: 100%;
}

.glass-input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), var(--shadow-md);
    outline: none;
    background: white;
}

.glass-input::placeholder {
    color: var(--gray-400);
}

/* 玻璃头部（登录/注册卡片头部） */
.glass-header {
    background: var(--gradient-primary);
    padding: var(--space-10) var(--space-6);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.glass-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: rotate 20s linear infinite;
}

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

.glass-header .logo-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.glass-header h4 {
    margin: 0;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* 玻璃主体内容 */
.glass-body {
    padding: var(--space-8) var(--space-6);
}

/* 玻璃效果工具类 */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
}

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

/* 发光边框效果 */
.glow-border {
    position: relative;
}

.glow-border::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: var(--gradient-primary);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.glow-border:hover::after {
    opacity: 1;
    animation: glow-pulse 2s ease-in-out infinite;
}

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

/* ===== 浅紫色玻璃拟态导航栏 ===== */
.navbar {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.75), rgba(167, 139, 250, 0.7)) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 4px 30px rgba(139, 92, 246, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.2) inset,
        0 2px 4px rgba(136, 104, 213, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.6rem 0;
}

.navbar.scrolled {
    background: linear-gradient(135deg, rgba(109, 70, 206, 0.9), rgba(139, 92, 246, 0.85)) !important;
    box-shadow: 
        0 8px 40px rgba(139, 92, 246, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.25) inset;
}

/* 导航栏底部发光线 */
.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(139, 92, 246, 0.6) 20%, 
        rgba(167, 139, 250, 0.8) 50%, 
        rgba(139, 92, 246, 0.6) 80%, 
        transparent);
    opacity: 0.7;
}

/* Logo区域 - 3D发光效果 */
.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    position: relative;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.navbar-brand i {
    font-size: 1.8rem;
    color: #5b21b6;
    position: relative;
    animation: logoGlow 3s ease-in-out infinite;
    text-shadow: 
        0 0 10px rgba(91, 33, 182, 0.6),
        0 0 20px rgba(91, 33, 182, 0.4),
        0 0 30px rgba(91, 33, 182, 0.2);
}

/* Logo发光脉冲动画 */
@keyframes logoGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(91, 33, 182, 0.6),
            0 0 20px rgba(91, 33, 182, 0.4),
            0 0 30px rgba(91, 33, 182, 0.2);
        transform: scale(1);
    }
    50% {
        text-shadow: 
            0 0 15px rgba(91, 33, 182, 0.8),
            0 0 30px rgba(91, 33, 182, 0.5),
            0 0 45px rgba(91, 33, 182, 0.3);
        transform: scale(1.05);
    }
}

.navbar-brand .gradient-text {
    background: linear-gradient(135deg, #4c1d95, #5b21b6, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* 导航项 - 发光上浮效果 */
.navbar-nav .nav-link {
    color: rgba(58, 37, 106, 0.95) !important;
    font-weight: 500;
    padding: 0.6rem 1rem !important;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin: 0 0.15rem;
    border: 1px solid transparent;
}

.navbar-nav .nav-link i {
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-3px);
    box-shadow: 
        0 4px 15px rgba(139, 92, 246, 0.3),
        0 0 20px rgba(139, 92, 246, 0.2);
}

.navbar-nav .nav-link:hover i {
    color: #c4b5fd;
    text-shadow: 0 0 10px rgba(167, 139, 250, 0.8);
}

.navbar-nav .nav-link.active {
    color: #fff !important;
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.5);
    font-weight: 600;
    box-shadow: 
        0 2px 10px rgba(139, 92, 246, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* 导航项激活指示线 */
.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, #a78bfa, #c4b5fd);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.8);
}

/* 汉堡按钮 - 深色发光风格 */
.navbar-toggler {
    border: 1px solid rgba(139, 92, 246, 0.5) !important;
    border-radius: 8px !important;
    padding: 0.5rem 0.6rem !important;
    background: rgba(139, 92, 246, 0.1) !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: rgba(139, 92, 246, 0.2) !important;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3) !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(167, 139, 250, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* 用户头像 - 发光边框 */
#userArea .user-avatar {
    border: 2px solid rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
}

#userArea .dropdown-toggle:hover .user-avatar {
    border-color: rgba(167, 139, 250, 0.8);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

#userName {
    color: rgba(76, 29, 149, 0.9) !important;
}

/* 下拉菜单 - 浅紫色玻璃风格 */
.navbar .dropdown-menu {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 243, 255, 0.95)) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    box-shadow: 
        0 10px 40px rgba(139, 92, 246, 0.2),
        0 0 20px rgba(139, 92, 246, 0.1);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.navbar .dropdown-item {
    color: rgba(76, 29, 149, 0.85);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
    background: rgba(139, 92, 246, 0.15);
    color: #5b21b6;
    transform: translateX(3px);
}

.navbar .dropdown-item i {
    color: #8b5cf6;
    width: 1.2rem;
}

.navbar .dropdown-item.text-danger {
    color: #dc2626 !important;
}

.navbar .dropdown-item.text-danger:hover {
    background: rgba(248, 113, 113, 0.15);
}

.navbar .dropdown-divider {
    border-color: rgba(139, 92, 246, 0.2);
    margin: 0.5rem 0;
}

/* 登录按钮 - 玻璃发光 */
#loginArea .btn-outline-primary {
    color: #5b21b6 !important;
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 0.4rem 1rem;
    transition: all 0.3s ease;
}

#loginArea .btn-outline-primary:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(109, 70, 206, 0.8);
    color: #4c1d95 !important;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

/* 进度跟踪器按钮 */
.navbar .btn-outline-primary.btn-sm {
    color: #5b21b6 !important;
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar .btn-outline-primary.btn-sm:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(109, 70, 206, 0.6);
    color: #4c1d95 !important;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

/* 连接状态指示器 - 浅色适配 */
#connectionStatus {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: rgba(76, 29, 149, 0.9) !important;
    transition: all 0.3s ease;
}

#connectionStatus .bi-circle-fill {
    font-size: 0.65rem;
    margin-right: 0.4rem;
    animation: pulse 2s infinite;
}

#connectionStatus .bi-circle-fill.text-secondary {
    color: #fbbf24 !important;
}

#connectionStatus .bi-circle-fill.text-success {
    color: #34d399 !important;
}

/* 响应式调整 */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: linear-gradient(135deg, rgba(167, 139, 250, 0.85), rgba(196, 181, 253, 0.8));
        border-radius: 12px;
        margin-top: 0.75rem;
        padding: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 10px 40px rgba(139, 92, 246, 0.2);
    }
    
    .navbar-nav {
        padding: 0.5rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
    }
    
    #userArea, #loginArea {
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(139, 92, 246, 0.2);
    }
}

/* 导航栏占位符 */
.navbar-spacer {
    height: 75px;
}

/* 用户头像样式 */
#userArea .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    border: 2px solid rgba(167, 139, 250, 0.6);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
}

#userArea .dropdown-toggle {
    color: rgba(255, 255, 255, 0.9) !important;
}

#userArea .dropdown-toggle:hover .user-avatar {
    border-color: rgba(167, 139, 250, 1);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
    transform: scale(1.05);
}

/* 主要内容区域 */
.content-section {
    min-height: 500px;
    width: 100%;
    position: relative;
}

/* 确保生成设置页面可见 */
#preferencesSection {
    min-height: 600px !important;
}

/* 强制显示类 */
.force-show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 首页英雄区域 - 优化对比度 */
.hero-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-section > * {
    position: relative;
    z-index: 2;
}

.hero-section .card {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 特色功能项 */
.feature-item {
    text-align: center;
    padding: 1rem;
    margin-bottom: 1rem;
}

.feature-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feature-item h6 {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.feature-item p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0;
}

/* 现代化卡片样式 */
.card {
    border: none;
    border-radius: var(--radius-xl);
    background: var(--card-gradient);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

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

.card-header {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
    border: none;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    font-weight: 600;
}

.card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
    pointer-events: none;
}

.card-header:hover::before {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header i {
    font-size: 1.5rem;
}

.card-body {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

/* 现代化按钮系统 */
.btn {
    border-radius: var(--radius-lg);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all var(--transition-normal);
    border: none;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.025em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

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

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-color) 0%, #dc2626 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #2563eb 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-info:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    backdrop-filter: blur(10px);
}

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

.btn-outline-secondary {
    border: 2px solid var(--gray-400);
    color: var(--gray-600);
    background: rgba(107, 114, 128, 0.05);
    backdrop-filter: blur(10px);
}

.btn-outline-secondary:hover {
    background: var(--gray-600);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-600);
}

/* 现代化表单样式 */
.form-control, .form-select {
    border-radius: var(--radius-lg);
    border: 2px solid var(--gray-200);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), var(--shadow-md);
    background: rgba(255, 255, 255, 1);
    outline: none;
}

.form-control:hover, .form-select:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-md);
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-text {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* 现代化范围滑块 */
.form-range {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-gradient);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-gradient);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.form-range::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

/* 生成进度样式 */
.generation-progress-container {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.generation-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.generation-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.generation-step.pending {
    background: rgba(107, 114, 128, 0.05);
    color: var(--gray-500);
}

.generation-step.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow-sm);
}

.generation-step.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border-color: rgba(16, 185, 129, 0.2);
}

.generation-step.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border-color: rgba(239, 68, 68, 0.2);
}

.step-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.generation-step.pending .step-icon {
    background: rgba(107, 114, 128, 0.1);
    color: var(--gray-400);
}

.generation-step.active .step-icon {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

.generation-step.completed .step-icon {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.generation-step.error .step-icon {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error-color);
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.step-description {
    font-size: 0.875rem;
    opacity: 0.8;
}

.overall-progress {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.overall-progress .progress {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.overall-progress .progress-bar {
    background: var(--primary-gradient);
    transition: width 0.6s ease;
}

.progress-text {
    text-align: center;
}

/* 复选框和单选框现代化 */
.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.9);
    transition: all var(--transition-normal);
}

.form-check-input:checked {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

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

.form-check-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-left: 0.5rem;
}

/* 现代化小说列表样式 */
.novel-item {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 1.5rem;
    background: var(--card-gradient);
    transition: all var(--transition-normal);
    position: relative;
    overflow: visible; /* 修复：允许下拉菜单溢出显示 */
    box-shadow: var(--shadow-md);
}

.novel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

.novel-item:hover::before {
    opacity: 1;
}

.novel-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.novel-meta {
    font-size: 0.95rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.novel-meta .badge {
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
}

.novel-progress {
    margin-top: 1.5rem;
}

/* 小说统计信息样式 */
.novel-stats {
    background: rgba(248, 249, 250, 0.8);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    backdrop-filter: blur(10px);
}

.novel-stats .row > div {
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
    font-size: 0.875rem;
}

.novel-stats i {
    color: var(--gray-600);
    font-size: 0.875rem;
    width: 16px;
    text-align: center;
}

.novel-stats strong {
    color: var(--gray-800);
    font-weight: 600;
}

/* 修复小说列表下拉菜单遮挡问题 */
.novel-item .dropdown-menu {
    z-index: 99999 !important;
    border: 1px solid var(--gray-300) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    border-radius: var(--radius-lg) !important;
    padding: 0.5rem 0 !important;
    min-width: 160px !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    margin-top: 0.25rem !important;
}

.novel-item .dropdown-item {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
}

.novel-item .dropdown-item:hover {
    background-color: var(--gray-100) !important;
    color: var(--gray-800) !important;
}

.novel-item .dropdown-item.text-danger:hover {
    background-color: var(--error-light) !important;
    color: var(--error-color) !important;
}

/* 确保下拉菜单容器正确定位 */
.novel-item .btn-group {
    position: relative !important;
}

.novel-item .dropdown {
    position: relative !important;
}

/* 确保下拉菜单按钮容器有足够的空间 */
.novel-item .ms-3 {
    position: relative;
    z-index: 10;
}

/* 全局下拉菜单修复 - 确保在小说卡片中正确显示 */
.dropdown-menu {
    z-index: 99999 !important;
    position: absolute !important;
    will-change: transform !important;
}

/* 小说列表容器确保不遮挡下拉菜单 */
#novelsList {
    overflow: visible !important;
}

.content-section {
    overflow: visible !important;
}

/* 修复Bootstrap下拉菜单在卡片中的显示问题 */
.novel-item .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: auto !important;
    right: 0 !important;
    transform: none !important;
    margin-top: 0.125rem !important;
}

.progress {
    height: 10px;
    border-radius: var(--radius-md);
    background: var(--gray-200);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background: var(--primary-gradient);
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(45deg, transparent 33%, rgba(255,255,255,0.3) 33%, rgba(255,255,255,0.3) 66%, transparent 66%);
    background-size: 30px 30px;
    animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 30px 0;
    }
}

/* 配置列表样式 */
.config-item {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    position: relative;
}

.config-item.active {
    border-color: #28a745;
    background: #f8fff9;
}

.config-item.active::before {
    content: "当前激活";
    position: absolute;
    top: -8px;
    right: 10px;
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.config-name {
    font-weight: bold;
    color: #333;
}

.config-model {
    font-size: 0.9rem;
    color: #666;
}

.config-actions {
    margin-top: 0.5rem;
}

.config-actions .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}



.step-title {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.step-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0;
}

/* 系统状态样式 */
.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    font-weight: 500;
}

.status-value {
    font-size: 0.9rem;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

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

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

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

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem !important;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .feature-item {
        margin-bottom: 2rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
}

/* ==================== 高级动画系统 ==================== */

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* 滑入动画 */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 缩放动画 */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleInBounce {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    70% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 闪烁动画 */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes shimmer-slide {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(200%) rotate(45deg);
    }
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(139, 92, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
    }
}

/* 弹跳动画 */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -12px, 0);
    }
    70% {
        transform: translate3d(0, -6px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 悬浮动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes float-slow {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(2deg);
    }
}

/* 旋转动画 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* 涟漪动画 */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* 打字机动画 */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-500); }
}

/* 渐变流动 */
@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 动画应用类 */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.4s ease-out;
}

.scale-in-bounce {
    animation: scaleInBounce 0.5s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

.pulse-glow {
    animation: pulse-glow 2s infinite;
}

.bounce {
    animation: bounce 1s ease-in-out;
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

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

.float-slow {
    animation: float-slow 6s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-flow 3s ease infinite;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Toast 通知样式 */
.toast {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.toast-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

/* 小说详情页样式 */
.novel-detail-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: #495057;
}

.info-value {
    color: #212529;
}

/* 章节列表样式 */
.chapter-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.chapter-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.chapter-item.generating {
    border-color: #ffc107;
    background: #fff3cd;
}

.chapter-header {
    display: flex;
    justify-content-between;
    align-items-center;
    margin-bottom: 0.5rem;
}

.chapter-title {
    font-weight: bold;
    color: #333;
    margin: 0;
}

.chapter-status {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.chapter-status.completed {
    background: #d4edda;
    color: #155724;
}

.chapter-status.generating {
    background: #fff3cd;
    color: #856404;
}

.chapter-status.draft {
    background: #f8d7da;
    color: #721c24;
}

.chapter-meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.chapter-summary {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

.chapter-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

/* 章节内容阅读样式 */
.chapter-content {
    font-family: 'Microsoft YaHei', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    max-height: 70vh;
    overflow-y: auto;
    padding: 1rem;
}

.chapter-content h1, .chapter-content h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.chapter-content p {
    margin-bottom: 1rem;
    text-indent: 2em;
}

/* 人物卡片样式 */
.character-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
}

.character-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.character-role {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.character-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

/* 情节线索样式 */
.plot-thread-item {
    border-left: 4px solid #007bff;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
}

.plot-thread-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.plot-thread-status {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.plot-thread-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

/* 进度条样式 */
.progress-item {
    margin-bottom: 1rem;
}

.progress-label {
    display: flex;
    justify-content-between;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.progress-bar-custom {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* 现代化空状态样式 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-600);
    background: var(--card-gradient);
    border-radius: var(--radius-xl);
    border: 2px dashed var(--gray-300);
    margin: 2rem 0;
    transition: all var(--transition-normal);
}

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

.empty-state i {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: float 3s ease-in-out infinite;
}

.empty-state h5 {
    margin-bottom: 1rem;
    color: var(--gray-800);
    font-weight: 700;
    font-size: 1.5rem;
}

.empty-state p {
    margin-bottom: 2rem;
    color: var(--gray-600);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 预设配置卡片样式 */
.preset-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
}

.preset-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.preset-card.active {
    border-color: #28a745;
    background-color: #f8fff9;
}

.preset-card .card-body {
    padding: 1.5rem;
}

.preset-card i {
    margin-bottom: 0.75rem;
}

.preset-card .card-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.preset-card .card-text {
    color: #666;
    line-height: 1.4;
}

/* 生成设置页面样式 */
#preferencesSection .card {
    border: 1px solid #dee2e6;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1rem;
    min-height: 100px;
}

#preferencesSection .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* 预设配置容器样式 */
#presetCards {
    min-height: 200px;
    width: 100%;
}

#presetCards .col-md-4 {
    margin-bottom: 1rem;
}



/* 滑块样式优化 */
.form-range:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-range::-webkit-slider-thumb {
    background-color: #007bff;
    border: 0;
    border-radius: 50%;
    transition: background-color 0.15s ease-in-out;
}

.form-range::-webkit-slider-thumb:hover {
    background-color: #0056b3;
}

/* 标签页样式 */
.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
    color: #495057;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
    color: #007bff;
}

.nav-tabs .nav-link.active {
    color: #495057;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

/* 表单控件样式 */
.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* 按钮组样式 */
.btn-group-preferences {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-group-preferences .btn {
    flex: 0 0 auto;
}

/* 现代化徽章样式 */
.badge {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.bg-primary {
    background: var(--primary-gradient) !important;
}

.bg-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%) !important;
}

.bg-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%) !important;
}

.bg-danger {
    background: linear-gradient(135deg, var(--error-color) 0%, #dc2626 100%) !important;
}

.bg-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #2563eb 100%) !important;
}

.bg-secondary {
    background: linear-gradient(135deg, var(--gray-500) 0%, var(--gray-600) 100%) !important;
}

/* 现代化加载状态 */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: var(--shadow-sm);
}

.loading-spinner.lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

.loading-spinner.sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* 现代化Toast通知 */
.toast {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: none;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
}

.toast-header {
    background: var(--card-gradient);
    border-bottom: 1px solid var(--gray-200);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1rem 1.25rem;
}

.toast-body {
    padding: 1.25rem;
    font-weight: 500;
}

/* 实用工具类 */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: var(--shadow-md);
}

.shadow-strong {
    box-shadow: var(--shadow-xl);
}

.rounded-modern {
    border-radius: var(--radius-xl);
}

.rounded-pill-modern {
    border-radius: var(--radius-2xl);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .preset-card .card-body {
        padding: 1rem;
    }

    .preset-card i {
        font-size: 1.5rem !important;
    }

    #preferencesSection .col-md-6 {
        margin-bottom: 1rem;
    }

    .btn-group-preferences {
        justify-content: center;
    }

    .card-body {
        padding: 1.5rem;
    }

    .novel-item {
        padding: 1.5rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

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

    .empty-state {
        padding: 3rem 1rem;
    }

    .empty-state i {
        font-size: 4rem;
    }
}

@media (max-width: 576px) {
    .card-header {
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .novel-item {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state i {
        font-size: 3rem;
    }

    .novel-title {
        font-size: 1.125rem;
    }
}

/* Toast 通知样式 - 紧凑型设计 */
.toast-container {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 99999 !important;
    pointer-events: none !important;
    width: 280px !important;
    height: auto !important;
}

.toast {
    /* 基础布局 */
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    pointer-events: auto !important;

    /* 尺寸设置 */
    width: 260px !important;
    min-height: auto !important;
    max-width: none !important;

    /* 外观样式 */
    background: white !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;

    /* 可见性强制 */
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;

    /* 间距 */
    margin-bottom: 10px !important;

    /* 字体 */
    font-family: inherit !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

.toast-header {
    /* 布局 */
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    /* 尺寸 */
    width: 100% !important;
    min-height: 28px !important;
    padding: 6px 10px !important;

    /* 外观 */
    background: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6 !important;
    border-radius: 5px 5px 0 0 !important;

    /* 文字 */
    font-weight: 600 !important;
    font-size: 12px !important;
    color: #495057 !important;
}

.toast-body {
    /* 布局 */
    display: block !important;

    /* 尺寸 */
    width: 100% !important;
    min-height: auto !important;
    padding: 8px 10px !important;

    /* 外观 */
    background: white !important;
    border-radius: 0 0 5px 5px !important;

    /* 文字 */
    font-weight: 500 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #495057 !important;
    word-wrap: break-word !important;
}

/* Toast 类型样式 - 强化可见性 */
.toast.bg-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: #10b981 !important;
}

.toast.bg-success .toast-header,
.toast.bg-success .toast-body {
    background: #10b981 !important;
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.toast.bg-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border-color: #ef4444 !important;
}

.toast.bg-danger .toast-header,
.toast.bg-danger .toast-body {
    background: #ef4444 !important;
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.toast.bg-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-color: #f59e0b !important;
}

.toast.bg-warning .toast-header,
.toast.bg-warning .toast-body {
    background: #f59e0b !important;
    color: #1f2937 !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3) !important;
}

.toast.bg-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    border-color: #3b82f6 !important;
}

.toast.bg-info .toast-header,
.toast.bg-info .toast-body {
    background: #3b82f6 !important;
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Toast 强制显示类 */
.toast.show {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    transform: translateX(0) !important;
}

.toast.showing {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    transform: translateX(0) !important;
}

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

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

/* 调试用：Toast可见性检查 */
.toast-debug {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 999999 !important;
    background: red !important;
    color: white !important;
    padding: 20px !important;
    border: 5px solid yellow !important;
    font-size: 18px !important;
    font-weight: bold !important;
}

/* ==================== 扩展功能样式 ==================== */

/* 扩展控制中心样式 */
.expansion-control-panel {
    margin-bottom: 1.5rem;
}

.expansion-control-center {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.expansion-control-center::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0.8;
}

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

/* 扩展控制中心头部 */
.expansion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.expansion-title {
    margin: 0;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.expansion-title i {
    font-size: 1.25rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.expansion-status-badge .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
}

/* 扩展内容区域 */
.expansion-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 当前状态显示 */
.expansion-current-status {
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border-left: 4px solid var(--primary-color);
    transition: all var(--transition-normal);
}

.expansion-current-status.expanding {
    background: rgba(59, 130, 246, 0.05);
    border-left-color: var(--info-color);
}

.expansion-current-status.completed {
    background: rgba(16, 185, 129, 0.05);
    border-left-color: var(--success-color);
}

.expansion-current-status.in-progress {
    background: rgba(245, 158, 11, 0.05);
    border-left-color: var(--warning-color);
}

.expansion-current-status .status-info {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.expansion-current-status .status-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.expansion-current-status .status-icon-container i {
    font-size: 1.25rem;
}

.expansion-current-status .status-content {
    flex: 1;
    min-width: 0;
}

.expansion-current-status .status-text {
    display: block;
    font-weight: 600;
    color: var(--gray-800);
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.expansion-current-status .status-subtitle {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.expansion-current-status .progress-info {
    margin-top: 0.75rem;
}

.expansion-current-status .progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.expansion-current-status .progress-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.expansion-current-status .progress-percentage {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
}

.expansion-current-status .progress-details {
    margin-top: 0.5rem;
}

/* 旋转动画 */
.spinning {
    animation: spin 2s linear infinite;
}

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

/* 操作按钮区域 */
.expansion-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.expansion-actions .action-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.expansion-actions.ready .primary-actions {
    margin-bottom: 0.5rem;
}

.expansion-actions.expanding .action-group {
    justify-content: space-between;
}

.expansion-actions .action-btn {
    border-radius: var(--radius-lg);
    font-weight: 500;
    padding: 0.625rem 1rem;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    min-height: 2.5rem;
    border-width: 2px;
}

.expansion-actions .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.expansion-actions .action-btn:active {
    transform: translateY(0);
}

.expansion-actions .action-btn i {
    font-size: 1rem;
    flex-shrink: 0;
}

.expansion-actions .btn-text {
    font-weight: 500;
    white-space: nowrap;
}

.expansion-actions .primary-action {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.expansion-actions .primary-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.expansion-actions .primary-action:hover::before {
    left: 100%;
}



.expansion-actions .btn-count {
    background: var(--info-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 50%;
    margin-left: 0.25rem;
    font-weight: 600;
    min-width: 1.25rem;
    text-align: center;
}

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

.expansion-actions .disabled-info {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.expansion-actions .disabled-info small {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
}

/* 工具提示样式 */
.action-btn[data-tooltip] {
    position: relative;
}

.action-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 0.25rem;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease-out forwards;
}

.action-btn[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--gray-800);
    z-index: 1000;
    margin-bottom: 0.125rem;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease-out forwards;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 快速统计 */
.expansion-quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.expansion-quick-stats .stat-item {
    text-align: center;
    padding: 0.5rem;
}

.expansion-quick-stats .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.expansion-quick-stats .stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* 扩展控制中心响应式设计 */
@media (max-width: 768px) {
    .expansion-control-center {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .expansion-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .expansion-current-status {
        padding: 1rem;
    }

    .expansion-current-status .status-info {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .expansion-current-status .status-icon-container {
        width: 2rem;
        height: 2rem;
    }

    .expansion-current-status .status-icon-container i {
        font-size: 1rem;
    }

    .expansion-current-status .status-text {
        font-size: 0.95rem;
    }

    .expansion-current-status .status-subtitle {
        font-size: 0.8rem;
    }

    .expansion-actions .action-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .expansion-actions .action-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    .expansion-actions .primary-action {
        order: -1;
    }

    .expansion-quick-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .expansion-quick-stats .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.375rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .expansion-quick-stats .stat-item:last-child {
        border-bottom: none;
    }

    .expansion-quick-stats .stat-value {
        font-size: 1.25rem;
    }

    .expansion-quick-stats .stat-label {
        font-size: 0.875rem;
        margin-top: 0;
    }

    /* 工具提示在移动端隐藏 */
    .action-btn[data-tooltip]:hover::after,
    .action-btn[data-tooltip]:hover::before {
        display: none;
    }
}

@media (max-width: 576px) {
    .expansion-control-center {
        padding: 0.75rem;
        border-radius: var(--radius-lg);
    }

    .expansion-title {
        font-size: 0.95rem;
    }

    .expansion-current-status {
        padding: 0.75rem;
    }

    .expansion-actions .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* ==================== 导航系统样式 ==================== */

/* 导航侧边栏 */
.navigation-sidebar {
    position: fixed;
    top: 80px;
    right: -320px;
    width: 320px;
    height: calc(100vh - 80px);
    background: white;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1040;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.navigation-sidebar.show {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.sidebar-title {
    margin: 0;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-toggle {
    border: none;
    background: transparent;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
}

.sidebar-content {
    padding: 1rem;
}

.sidebar-section {
    margin-bottom: 2rem;
}

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

.sidebar-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    color: var(--gray-700);
    text-decoration: none;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.sidebar-nav-item:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary-color);
    border-color: rgba(99, 102, 241, 0.1);
    transform: translateX(4px);
}

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

.sidebar-nav-item i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    width: 100%;
    justify-content: flex-start;
}

.sidebar-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* 面包屑导航 */
.navigation-breadcrumbs {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.75rem 0;
    margin-bottom: 1rem;
}

.navigation-breadcrumbs .breadcrumb {
    margin: 0;
    background: transparent;
    padding: 0;
}

.navigation-breadcrumbs .breadcrumb-item {
    font-size: 0.875rem;
}

.navigation-breadcrumbs .breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.navigation-breadcrumbs .breadcrumb-item a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.navigation-breadcrumbs .breadcrumb-item.active {
    color: var(--gray-600);
    font-weight: 500;
}

/* 扩展概览模态框样式 */
.expansion-overview-content h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.expansion-overview-content h6:first-child {
    margin-top: 0;
}

.expansion-overview-content ul,
.expansion-overview-content ol {
    padding-left: 1.5rem;
}

.expansion-overview-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.expansion-stats-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius-lg);
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.expansion-stats-card h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.expansion-stats-card .stat-item {
    text-align: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.expansion-stats-card .stat-item:last-child {
    border-bottom: none;
}

.expansion-stats-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.expansion-stats-card .stat-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* 导航栏增强 */
.navbar .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.navbar .dropdown-item {
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
}

.navbar .dropdown-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

.navbar .dropdown-item i {
    width: 1.25rem;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.85rem;
    }
}

@media (max-width: 992px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .navigation-sidebar {
        width: 280px;
        right: -280px;
    }

    .navbar-brand {
        font-size: 0.95rem;
    }

    .navbar-nav {
        margin-top: 0.5rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 1rem !important;
        font-size: 0.9rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
}

    .sidebar-header {
        padding: 0.75rem;
    }

    .sidebar-content {
        padding: 0.75rem;
    }

    .sidebar-nav-item {
        padding: 0.625rem;
    }

    .navigation-breadcrumbs {
        padding: 0.5rem 0;
    }

    .navigation-breadcrumbs .breadcrumb-item {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .navigation-sidebar {
        width: 100vw;
        right: -100vw;
        top: 70px;
        height: calc(100vh - 70px);
    }

    .sidebar-section {
        margin-bottom: 1.5rem;
    }

    .expansion-stats-card .stat-value {
        font-size: 1.25rem;
    }
}

/* 侧边栏遮罩层 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1039;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 扩展历史管理器样式 */
.expansion-history-list {
    max-height: 60vh;
    overflow-y: auto;
}

.history-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.summary-item {
    padding: 0.5rem;
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.summary-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.expansion-history-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.expansion-history-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gray-300);
    transition: background var(--transition-normal);
}

.expansion-history-item.status-success::before {
    background: var(--success-color);
}

.expansion-history-item.status-error::before {
    background: var(--danger-color);
}

.expansion-history-item.status-warning::before {
    background: var(--warning-color);
}

.expansion-history-item.status-info::before {
    background: var(--info-color);
}

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

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.history-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.history-number {
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

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

.history-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.history-chapters {
    font-weight: 600;
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.history-direction,
.history-intent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.history-direction i,
.history-intent i {
    color: var(--primary-color);
    margin-top: 0.125rem;
}

.history-meta {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.history-actions {
    display: flex;
    gap: 0.5rem;
}

.history-actions .btn {
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .history-summary {
        padding: 1rem;
    }

    .summary-value {
        font-size: 1.5rem;
    }

    .expansion-history-item {
        padding: 0.75rem;
    }

    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .history-info {
        gap: 0.5rem;
    }

    .history-actions {
        flex-direction: column;
        width: 100%;
    }

    .history-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .expansion-history-list {
        max-height: 50vh;
    }

    .history-summary .row {
        text-align: left;
    }

    .summary-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.375rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .summary-item:last-child {
        border-bottom: none;
    }

    .summary-value {
        font-size: 1.25rem;
    }
}

/* 扩展对话框样式 */
.expansion-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #28a745;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.expansion-info .info-item {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.expansion-info .info-label {
    font-weight: 600;
    color: #495057;
    min-width: 80px;
}

.expansion-info .info-value {
    color: #212529;
    font-weight: 500;
}

.expansion-form {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.expansion-suggestions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.suggestions-content {
    margin-top: 16px;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.suggestion-item {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.suggestion-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.suggestion-item:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
}

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

.suggestion-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
    font-size: 1rem;
}

.suggestion-description {
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.5;
}

/* 扩展进度监控样式 */
.expansion-progress-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.expansion-progress-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.expansion-progress-card .card-header h6 {
    margin: 0;
    font-weight: 600;
    color: #495057;
}

.expansion-controls {
    display: flex;
    gap: 8px;
}

.expansion-controls .btn {
    padding: 6px 12px;
    font-size: 0.8em;
    border-radius: 6px;
    font-weight: 500;
}

.expansion-progress-card .card-body {
    padding: 20px;
}

.overall-progress, .phase-progress {
    margin-bottom: 20px;
}

.overall-progress:last-child, .phase-progress:last-child {
    margin-bottom: 0;
}

.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    border-radius: 4px;
    transition: width 0.6s ease;
}

.expansion-status {
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
}

.expansion-status small {
    font-weight: 500;
    color: #495057;
}

/* 扩展进度模态框样式 */
#expansionProgressModal .modal-dialog {
    max-width: 900px;
}

#expansionProgressModal .modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 20px 24px;
}

#expansionProgressModal .modal-title {
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

#expansionProgressModal .modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

#expansionProgressModal .modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 16px 24px;
}

/* 任务信息样式 */
.expansion-task-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #007bff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.expansion-task-info .info-item {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.expansion-task-info .info-label {
    font-weight: 600;
    color: #495057;
    min-width: 80px;
}

.expansion-task-info .info-value {
    color: #212529;
    font-weight: 500;
}

/* 进度区域样式 */
.progress-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.progress-section h6 {
    margin: 0;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-section .progress {
    height: 12px;
    border-radius: 6px;
    background-color: #e9ecef;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-section .progress-bar {
    border-radius: 6px;
    transition: width 0.8s ease;
    background: linear-gradient(45deg, #007bff, #0056b3);
}

.progress-details {
    margin-top: 8px;
    font-size: 0.9em;
}

/* 阶段区域样式 */
.phase-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.phase-section h6 {
    margin: 0;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-phase-name {
    font-size: 1.1em;
    font-weight: 500;
    color: #495057;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #17a2b8;
}

.phase-section .progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.phase-section .progress-bar {
    background: linear-gradient(45deg, #17a2b8, #138496);
}

/* 状态区域样式 */
.status-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.expansion-status {
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.status-message {
    font-size: 1em;
    color: #495057;
    margin-bottom: 8px;
    font-weight: 500;
}

.last-update {
    font-size: 0.85em;
    color: #6c757d;
    font-style: italic;
}

/* 阶段列表样式 */
.phases-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.phases-section h6 {
    margin: 0 0 16px 0;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.phases-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.phase-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
}

.phase-item.generating {
    border-color: #007bff;
    background: linear-gradient(135deg, #f8f9fa 0%, #e3f2fd 100%);
}

.phase-item.completed {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e8 100%);
}

.phase-item.failed {
    border-color: #dc3545;
    background: linear-gradient(135deg, #f8f9fa 0%, #fdeaea 100%);
}

.phase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.phase-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.phase-number {
    background: #007bff;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 600;
}

.phase-item.completed .phase-number {
    background: #28a745;
}

.phase-item.failed .phase-number {
    background: #dc3545;
}

.phase-name {
    font-weight: 600;
    color: #495057;
}

.phase-status-icon {
    display: flex;
    align-items: center;
}

.phase-progress-text {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
}

.phase-progress-bar {
    margin-bottom: 8px;
}

.phase-progress-bar .progress {
    height: 4px;
    border-radius: 2px;
}

.phase-goal {
    font-size: 0.9em;
    color: #6c757d;
    line-height: 1.4;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

/* 扩展控制按钮样式 */
.expansion-controls {
    width: 100%;
}

.control-buttons {
    display: flex;
    gap: 8px;
}

.control-buttons .btn {
    padding: 8px 16px;
    font-size: 0.9em;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.control-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 小说详情页扩展功能样式 */
#expansionStatusCard {
    border-left: 4px solid #28a745;
}

.expansion-status-active {
    padding: 12px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
    border-radius: 8px;
    border: 1px solid #e3f2fd;
}

.expansion-status-completed {
    padding: 12px;
    background: linear-gradient(135deg, #e8f5e8 0%, #f8f9fa 100%);
    border-radius: 8px;
    border: 1px solid #e8f5e8;
}

.expansion-progress-summary .progress {
    height: 6px;
    border-radius: 3px;
    background-color: #e9ecef;
}

.expansion-progress-summary .progress-bar {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 3px;
}

/* 扩展历史记录样式 */
#expansionHistoryCard {
    border-left: 4px solid #17a2b8;
}

.expansion-history-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.expansion-history-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #17a2b8, #138496);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.expansion-history-item:hover {
    border-color: #17a2b8;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.15);
    transform: translateY(-2px);
}

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

.expansion-history-item:last-child {
    margin-bottom: 0;
}

.expansion-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.expansion-title i {
    color: #17a2b8;
}

.expansion-meta {
    margin-bottom: 8px;
}

.expansion-meta small {
    color: #6c757d;
    font-size: 0.85em;
}

.expansion-intent {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 8px;
    border-left: 3px solid #17a2b8;
}

.expansion-intent small {
    color: #495057;
    line-height: 1.4;
}

.expansion-result {
    margin-top: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #e8f5e8 0%, #f8f9fa 100%);
    border-radius: 6px;
    border-left: 3px solid #28a745;
}

.expansion-actions {
    display: flex;
    gap: 4px;
}

.expansion-actions .btn {
    padding: 4px 8px;
    font-size: 0.8em;
    border-radius: 4px;
}

/* 扩展按钮样式 */
#expandNovelBtn {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

#expandNovelBtn:hover {
    background: linear-gradient(135deg, #20c997, #28a745);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    color: white;
}

#expandNovelBtn:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    color: white;
}

/* 响应式设计增强 */
@media (max-width: 768px) {
    .expansion-history-item {
        padding: 12px;
    }

    .expansion-title {
        font-size: 0.9em;
    }

    .expansion-actions {
        flex-direction: column;
        gap: 2px;
    }

    .expansion-actions .btn {
        font-size: 0.75em;
        padding: 3px 6px;
    }

    .expansion-status-active,
    .expansion-status-completed {
        padding: 10px;
    }
}

/* ==================== 创作控制中心样式 ==================== */

/* 创作控制中心容器 */
.creation-control-center {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.creation-control-center::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
    border-radius: 16px 16px 0 0;
}

/* 状态概览 */
.status-overview {
    margin-bottom: 24px;
}

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

.status-info {
    flex: 1;
}

.status-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

.status-badge {
    margin-left: 16px;
}

.status-badge .badge {
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* 进度部分 */
.progress-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e9ecef;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.progress-percentage {
    font-weight: 600;
    color: #007bff;
    font-size: 0.9rem;
}

.progress-details {
    margin-top: 8px;
}

/* 推荐操作 */
.recommended-actions {
    margin-bottom: 24px;
}

.actions-title {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.primary-action {
    margin-bottom: 12px;
}

.primary-action .btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 12px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.primary-action .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.primary-action .btn:hover::before {
    left: 100%;
}

.primary-action .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.primary-action .btn small {
    opacity: 0.8;
    font-size: 0.75rem;
    font-weight: 400;
}

.secondary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.secondary-actions .btn {
    border-radius: 8px;
    font-size: 0.85rem;
    padding: 6px 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.secondary-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 快速统计 */
.quick-stats {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e9ecef;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 8px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
    line-height: 1.2;
}

/* 状态特定样式 */
.creation-control-center[data-status="expanding"] {
    border-left: 4px solid #007bff;
}

.creation-control-center[data-status="generating"] {
    border-left: 4px solid #17a2b8;
}

.creation-control-center[data-status="completed"] {
    border-left: 4px solid #28a745;
}

.creation-control-center[data-status="in_progress"] {
    border-left: 4px solid #ffc107;
}

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

.creation-control-center[data-status="expanding"] .status-title i,
.creation-control-center[data-status="generating"] .status-title i {
    animation: pulse 2s infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .creation-control-center {
        padding: 16px;
        margin-bottom: 16px;
    }

    .status-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .status-badge {
        margin-left: 0;
    }

    .status-title {
        font-size: 1.1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .secondary-actions {
        justify-content: center;
    }

    .secondary-actions .btn {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .progress-section {
        padding: 12px;
    }

    .quick-stats {
        padding: 12px;
    }
}

@media (max-width: 576px) {
    .creation-control-center {
        padding: 12px;
        border-radius: 12px;
    }

    .status-title {
        font-size: 1rem;
    }

    .primary-action .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .stat-item {
        padding: 6px;
    }

    .stat-value {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }
}

/* ==================== 小说统计信息样式 ==================== */

/* 统计信息网格 */
.novel-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.novel-stats-grid .stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.novel-stats-grid .stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.novel-stats-grid .stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.novel-stats-grid .stat-icon i {
    font-size: 1.2rem;
}

.novel-stats-grid .stat-content {
    flex: 1;
    min-width: 0;
}

.novel-stats-grid .stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 2px;
    line-height: 1.2;
}

.novel-stats-grid .stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
    line-height: 1.2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .novel-stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .novel-stats-grid .stat-item {
        padding: 10px;
        gap: 10px;
    }

    .novel-stats-grid .stat-icon {
        width: 32px;
        height: 32px;
    }

    .novel-stats-grid .stat-icon i {
        font-size: 1rem;
    }

    .novel-stats-grid .stat-value {
        font-size: 0.9rem;
    }

    .novel-stats-grid .stat-label {
        font-size: 0.7rem;
    }
}















/* 扩展模态框样式增强 */
#expansionModal .modal-dialog {
    max-width: 800px;
}

#expansionModal .modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 20px 24px;
}

#expansionModal .modal-title {
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

#expansionModal .modal-body {
    padding: 24px;
}

#expansionModal .modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 16px 24px;
}

/* 表单控件增强 */
#expansionModal .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

#expansionModal .form-control,
#expansionModal .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

#expansionModal .form-control:focus,
#expansionModal .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.1);
}

#expansionModal .form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 6px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #expansionModal .modal-dialog {
        max-width: 95%;
        margin: 10px auto;
    }

    .expansion-form {
        padding: 16px;
    }

    .expansion-suggestions {
        padding: 16px;
    }

    .expansion-info {
        padding: 16px;
    }

    .expansion-info .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .expansion-info .info-label {
        min-width: auto;
    }

    .suggestion-item {
        padding: 12px;
    }

    .expansion-controls {
        flex-direction: column;
        gap: 4px;
    }

    .expansion-controls .btn {
        font-size: 0.75em;
        padding: 4px 8px;
    }
}

@media (max-width: 576px) {
    #expansionModal .modal-body {
        padding: 16px;
    }

    #expansionModal .modal-header {
        padding: 16px;
    }

    #expansionModal .modal-footer {
        padding: 12px 16px;
    }

    .expansion-form,
    .expansion-suggestions,
    .expansion-info {
        padding: 12px;
    }
}

/* ==================== 扩展信息显示样式 ==================== */

/* 扩展状态徽章样式 */
.badge.bg-info {
    background-color: #17a2b8 !important;
    color: white;
}

.badge.bg-success {
    background-color: #28a745 !important;
    color: white;
}

/* 扩展信息文本样式 */
.novel-progress .text-info {
    font-size: 0.75rem;
    line-height: 1.3;
    color: #17a2b8 !important;
    font-weight: 500;
}

.novel-progress .text-info i {
    margin-right: 4px;
    font-size: 0.7rem;
}

/* 扩展进度条样式 */
.novel-progress .progress {
    position: relative;
    overflow: hidden;
}

.novel-progress .progress-bar {
    transition: width 0.8s ease;
}

/* 扩展中的动画效果 */
.novel-item .progress-bar-striped.progress-bar-animated {
    background-image: linear-gradient(45deg, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

/* 扩展信息布局优化 */
.novel-progress .d-flex.justify-content-between {
    align-items: center;
    margin-bottom: 0.5rem;
}

.novel-progress .d-flex.justify-content-between:last-child {
    margin-bottom: 0;
    margin-top: 0.5rem;
}

/* 扩展详情信息样式 */
.novel-progress small.text-info {
    display: block;
    padding: 0.25rem 0.5rem;
    background: rgba(23, 162, 184, 0.1);
    border-radius: 4px;
    border-left: 3px solid #17a2b8;
}

/* 响应式扩展信息 */
@media (max-width: 768px) {
    .novel-progress .text-info {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .novel-progress .text-info i {
        margin-right: 2px;
        font-size: 0.65rem;
    }

    .novel-progress small.text-info {
        padding: 0.2rem 0.4rem;
    }
}

/* ==================== 扩展历史样式 ==================== */

/* 扩展历史项目 */
.expansion-history-item {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    background: var(--card-gradient);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.expansion-history-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gray-300);
    transition: all var(--transition-normal);
}

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

.expansion-history-item:hover::before {
    background: var(--primary-gradient);
}

/* 状态样式 */
.expansion-history-item.status-success {
    border-left-color: var(--success-color);
}

.expansion-history-item.status-success::before {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.expansion-history-item.status-error {
    border-left-color: var(--error-color);
}

.expansion-history-item.status-error::before {
    background: linear-gradient(135deg, var(--error-color) 0%, #dc2626 100%);
}

.expansion-history-item.status-info {
    border-left-color: var(--info-color);
}

.expansion-history-item.status-info::before {
    background: linear-gradient(135deg, var(--info-color) 0%, #2563eb 100%);
}

.expansion-history-item.status-warning {
    border-left-color: var(--warning-color);
}

.expansion-history-item.status-warning::before {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
}

/* 历史头部 */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.history-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.history-number {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.history-target {
    text-align: right;
    flex-shrink: 0;
}

.history-target small {
    font-weight: 500;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
}

.history-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

/* 历史详情 */
.history-details {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
}

.history-date i {
    color: var(--primary-color);
    font-size: 1rem;
}

.history-direction,
.history-intent {
    padding: 0.75rem 1rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.history-direction i,
.history-intent i {
    color: var(--primary-color);
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.history-direction span,
.history-intent span {
    color: var(--gray-700);
    font-weight: 500;
}

/* 历史元数据 */
.history-meta {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
}

.history-meta small {
    color: var(--gray-500);
    font-size: 0.8rem;
    font-weight: 500;
}

/* 历史操作按钮 */
.history-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.history-actions .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
    transition: all var(--transition-normal);
}

.history-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ==================== Markdown渲染样式 ==================== */
.novel-outline-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--gray-800);
}

.novel-outline-content .md-h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-600);
    margin: 1.25rem 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-200);
}

.novel-outline-content .md-h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 1.25rem 0 0.5rem 0;
}

.novel-outline-content .md-h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 1rem 0 0.5rem 0;
}

.novel-outline-content .md-h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0.875rem 0 0.5rem 0;
}

.novel-outline-content .md-h5,
.novel-outline-content .md-h6 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0.75rem 0 0.5rem 0;
}

.novel-outline-content .md-p {
    margin: 0.5rem 0;
    line-height: 1.8;
}

.novel-outline-content .md-ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.novel-outline-content .md-li {
    margin: 0.3rem 0;
    line-height: 1.6;
}

.novel-outline-content .md-hr {
    border: none;
    border-top: 1px solid var(--gray-300);
    margin: 1rem 0;
}

.novel-outline-content strong {
    font-weight: 600;
    color: var(--gray-900);
}

.novel-outline-content em {
    font-style: italic;
    color: var(--gray-700);
}

.novel-outline-content .md-code {
    background: var(--gray-200);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85em;
    color: var(--danger-600);
}

.novel-outline-content .md-code-block {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 0.75rem 0;
    overflow-x: auto;
}

.novel-outline-content .md-code-block code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    color: var(--gray-800);
    background: none;
    padding: 0;
}

.novel-outline-content .md-link {
    color: var(--primary-600);
    text-decoration: none;
    border-bottom: 1px dashed var(--primary-400);
    transition: all var(--transition-fast);
}

.novel-outline-content .md-link:hover {
    color: var(--primary-800);
    border-bottom-style: solid;
}

/* ==================== 全新首页样式 ==================== */

/* 飘落元素背景 */
.falling-elements-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.falling-element {
    position: absolute;
    top: -50px;
    opacity: 0.6;
    animation: fall linear infinite;
    color: rgba(139, 92, 246, 0.4);
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

@keyframes fall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 新英雄区 */
.hero-new {
    position: relative;
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-10) var(--space-6);
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%),
                linear-gradient(180deg, rgba(15, 23, 42, 0.02) 0%, rgba(99, 102, 241, 0.05) 50%, transparent 100%);
    z-index: 1;
}

.hero-content-wrapper {
    text-align: center;
    max-width: 900px;
    animation: fadeInUp 0.8s ease-out;
}

/* 3D书籍图标 */
.hero-book-icon {
    margin-bottom: var(--space-8);
}

.book-3d {
    position: relative;
    display: inline-block;
}

.book-cover {
    width: 120px;
    height: 140px;
    background: var(--gradient-primary);
    border-radius: 8px 16px 16px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        inset -5px 0 10px rgba(0,0,0,0.2),
        0 20px 40px rgba(99, 102, 241, 0.3),
        0 0 60px rgba(139, 92, 246, 0.2);
    animation: bookFloat 4s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.book-cover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 12px;
    background: linear-gradient(90deg, rgba(0,0,0,0.3), transparent);
    border-radius: 8px 0 0 8px;
}

.book-cover i {
    font-size: 3.5rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.book-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
    animation: glowPulse 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes bookFloat {
    0%, 100% { transform: translateY(0) rotateY(-5deg); }
    50% { transform: translateY(-15px) rotateY(5deg); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

/* 主标题 */
.hero-title {
    margin-bottom: var(--space-6);
}

.title-main {
    display: block;
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #a78bfa 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    letter-spacing: -2px;
    animation: titleShimmer 3s ease-in-out infinite;
    background-size: 200% 200%;
}

@keyframes titleShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.title-sub {
    display: block;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-top: var(--space-3);
    letter-spacing: 2px;
}

/* 描述文字 */
.hero-description {
    font-size: 1.25rem;
    color: var(--gray-500);
    margin-bottom: var(--space-8);
    font-style: italic;
}

/* 核心数据条 */
.hero-stats-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-6);
    padding: var(--space-5) var(--space-8);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
}

.stat-item-hero {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.stat-item-hero .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.stat-item-hero .stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-800);
    line-height: 1;
}

.stat-item-hero .stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--gray-200);
}

/* CTA按钮组 */
.hero-cta-group {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.btn-hero {
    position: relative;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    overflow: hidden;
}

.btn-hero i {
    font-size: 1.25rem;
}

.btn-hero-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.btn-hero-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

.btn-hero-primary .btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: btnShine 3s ease-in-out infinite;
}

@keyframes btnShine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.btn-hero-secondary {
    background: white;
    color: var(--primary-600);
    border: 2px solid var(--primary-200);
    box-shadow: var(--shadow-md);
}

.btn-hero-secondary:hover {
    background: var(--primary-50);
    border-color: var(--primary-400);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.btn-hero-outline {
    background: transparent;
    color: var(--gray-600);
    border: 2px solid var(--gray-300);
}

.btn-hero-outline:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    transform: translateY(-4px);
}

/* 功能书架区 */
.features-shelf {
    position: relative;
    padding: var(--space-10) var(--space-6);
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.03) 50%, transparent 100%);
    z-index: 1;
}

.shelf-title {
    text-align: center;
    margin-bottom: var(--space-10);
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
}

.shelf-title i {
    color: var(--primary-500);
    animation: spin 4s linear infinite;
}

/* 书籍卡片网格 */
.books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    max-width: 1400px;
    margin: 0 auto;
}

.book-card {
    position: relative;
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    cursor: pointer;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out backwards;
    animation-delay: var(--delay);
}

.book-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl), 0 0 40px rgba(139, 92, 246, 0.1);
}

.book-spine {
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}

.book-content {
    position: relative;
    z-index: 1;
}

.book-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    font-size: 1.75rem;
    color: var(--gray-600);
    transition: all var(--transition-normal);
}

.book-card:hover .book-icon {
    transform: scale(1.1) rotate(-5deg);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    color: var(--primary-500);
}

.book-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: var(--space-2);
}

.book-content p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.5;
    margin-bottom: 0;
}

.book-tag {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    padding: var(--space-1) var(--space-3);
    background: var(--gray-100);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
}

.book-effect {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.book-card:hover .book-effect {
    opacity: 1;
}

/* Agent工作流程区 */
.workflow-section {
    position: relative;
    padding: var(--space-10) var(--space-6);
    z-index: 1;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-10);
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
}

.section-title i {
    color: var(--primary-500);
}

.workflow-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.workflow-node {
    text-align: center;
    padding: var(--space-6);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    min-width: 140px;
    transition: all var(--transition-normal);
    position: relative;
    border: 2px solid transparent;
}

.workflow-node::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-xl);
    background: linear-gradient(var(--node-color), var(--node-color));
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

.workflow-node:hover::before {
    opacity: 0.1;
}

.workflow-node .node-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--node-color), color-mix(in srgb, var(--node-color) 70%, white));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-3);
    font-size: 1.25rem;
    color: white;
}

.workflow-node .node-title {
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: var(--space-1);
    font-size: 0.95rem;
}

.workflow-node .node-desc {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.workflow-arrow {
    color: var(--gray-300);
    font-size: 1.5rem;
    animation: arrowPulse 1.5s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.3; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(5px); }
}

/* 系统状态卡片 */
.system-status-card {
    margin: var(--space-8) auto;
    max-width: 800px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.status-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
}

.status-header i {
    color: var(--success-color);
}

.status-content {
    padding: var(--space-6);
}

.status-loading {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--gray-500);
}

/* 平台数据统计卡片 */
.platform-stats-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: var(--space-8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.stats-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--gray-100);
}

.stats-header i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-header span {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-5);
}

.stat-item {
    text-align: center;
    padding: var(--space-4);
    background: linear-gradient(135deg, var(--gray-50), white);
    border-radius: var(--radius-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: var(--space-2);
}

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

.stats-highlights {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--gray-100);
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--gray-600);
    transition: all 0.3s ease;
}

.highlight-item i {
    color: var(--primary-color);
    font-size: 1rem;
}

.highlight-item:hover {
    background: linear-gradient(135deg, var(--primary-color), #667eea);
    color: white;
    transform: scale(1.05);
}

.highlight-item:hover i {
    color: white;
}

/* ==================== 3D翻转卡片 - 平台优势 ==================== */
.platform-advantage-section {
    margin-top: var(--space-8);
    padding: var(--space-6);
}

.advantage-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}

.advantage-section-title i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.flip-cards-container {
    display: flex;
    justify-content: center;
    gap: var(--space-5);
    flex-wrap: wrap;
    perspective: 1000px;
}

/* 单个翻转卡片 */
.flip-card {
    width: 160px;
    height: 180px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* 正面样式 */
.flip-card-front {
    color: white;
    gap: var(--space-3);
}

.flip-card-front i {
    font-size: 3rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.flip-card-front span {
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 背面样式 */
.flip-card-back {
    transform: rotateY(180deg);
    color: white;
    text-align: center;
    padding: var(--space-4);
    gap: var(--space-2);
}

.flip-card-back p {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.flip-card-back small {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* 渐变色 - 蓝紫 */
.gradient-blue-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-blue-purple-dark {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* 渐变色 - 青绿 */
.gradient-cyan-green {
    background: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
}

.gradient-cyan-green-dark {
    background: linear-gradient(135deg, #0891b2 0%, #059669 100%);
}

/* 渐变色 - 橙红 */
.gradient-orange-red {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.gradient-orange-red-dark {
    background: linear-gradient(135deg, #d97706 0%, #dc2626 100%);
}

/* 渐变色 - 粉紫 */
.gradient-pink-purple {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
}

.gradient-pink-purple-dark {
    background: linear-gradient(135deg, #db2777 0%, #7c3aed 100%);
}

/* 悬浮发光效果 */
.flip-card:hover .flip-card-front {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25), 0 0 30px rgba(139, 92, 246, 0.3);
}

/* 响应式设计 - 3D翻转卡片 */
@media (max-width: 768px) {
    .flip-cards-container {
        gap: var(--space-3);
    }
    
    .flip-card {
        width: 140px;
        height: 160px;
    }
    
    .flip-card-front i {
        font-size: 2.5rem;
    }
    
    .flip-card-front span {
        font-size: 1rem;
    }
    
    .flip-card-back p {
        font-size: 0.9rem;
    }
    
    .flip-card-back small {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .flip-card {
        width: 120px;
        height: 140px;
    }
    
    .flip-card-front i {
        font-size: 2rem;
    }
    
    .flip-card-front span {
        font-size: 0.9rem;
    }
}

/* 响应式设计 - 统计卡片 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-3);
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .stats-highlights {
        gap: var(--space-2);
    }
    
    .highlight-item {
        padding: var(--space-1) var(--space-3);
        font-size: 0.75rem;
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .title-main {
        font-size: 3.5rem;
    }
    
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .workflow-diagram {
        gap: var(--space-2);
    }
    
    .workflow-node {
        min-width: 120px;
        padding: var(--space-4);
    }
    
    .workflow-arrow {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-new {
        padding: var(--space-6) var(--space-4);
        min-height: auto;
    }
    
    .title-main {
        font-size: 2.5rem;
    }
    
    .title-sub {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }
    
    .hero-stats-bar {
        flex-direction: column;
        gap: var(--space-4);
        padding: var(--space-5);
    }
    
    .stat-divider {
        width: 80%;
        height: 1px;
    }
    
    .hero-cta-group {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-hero {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .book-card {
        display: flex;
        align-items: center;
        padding: var(--space-4);
    }
    
    .book-spine {
        width: 100%;
        height: 6px;
        top: 0;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }
    
    .book-icon {
        width: 50px;
        height: 50px;
        margin-right: var(--space-4);
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .book-tag {
        position: static;
        margin-top: var(--space-2);
    }
}

@media (max-width: 576px) {
    .title-main {
        font-size: 2rem;
    }
    
    .book-cover {
        width: 80px;
        height: 95px;
    }
    
    .book-cover i {
        font-size: 2.5rem;
    }
    
    .workflow-node {
        min-width: 100px;
    }
    
    .workflow-node .node-icon {
        width: 40px;
        height: 40px;
    }
}
