/* ==================== 全局高级 UI 样式 v4.0 - 现代设计系统 ==================== */

/* CSS Reset & 跨浏览器兼容 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

/* 根变量 - 2024现代设计系统 */
:root {
    /* 主色调 - 更柔和的渐变 */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --secondary: #8b5cf6;
    --accent: #f59e0b;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --dark: #1e1b4b;
    
    /* 中性色 - 更细腻的层次 */
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    
    /* 高级渐变 */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-cool: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-aurora: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-sunset: linear-gradient(135deg, #ff6b6b 0%, #feca57 50%, #48dbfb 100%);
    --gradient-ocean: linear-gradient(135deg, #0077b6 0%, #00b4d8 50%, #90e0ef 100%);
    --gradient-forest: linear-gradient(135deg, #2d6a4f 0%, #40916c 50%, #74c69d 100%);
    
    /* 玻璃态效果 */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    
    /* iOS 26 液态玻璃变量 */
    --liquid-glass-bg: rgba(255, 255, 255, 0.45);
    --liquid-glass-bg-hover: rgba(255, 255, 255, 0.55);
    --liquid-glass-border: rgba(255, 255, 255, 0.6);
    --liquid-glass-border-inner: rgba(255, 255, 255, 0.8);
    --liquid-glass-shadow: 0 8px 40px rgba(0, 0, 0, 0.08), 0 2px 12px rgba(0, 0, 0, 0.04);
    --liquid-glass-shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
    --liquid-glass-blur: 25px;
    --liquid-glass-saturate: 180%;
    --liquid-glass-highlight: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
    --liquid-glass-refraction: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 40%);
    
    /* 阴影系统 - 更柔和 */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.03);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.04);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.15);
    --shadow-2xl: 0 35px 60px -15px rgb(0 0 0 / 0.2);
    --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --shadow-glow-lg: 0 0 40px rgba(99, 102, 241, 0.4);
    
    /* 圆角系统 */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-3xl: 32px;
    --radius-full: 9999px;
    
    /* 动画时长 */
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 350ms;
    --duration-slower: 500ms;
    
    /* 缓动函数 */
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* iOS 安全区域 */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
}

/* HTML & Body 基础 */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
    background: var(--gray-100);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    color: var(--gray-900);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    padding-top: var(--safe-area-top);
    padding-bottom: var(--safe-area-bottom);
    padding-left: var(--safe-area-left);
    padding-right: var(--safe-area-right);
}

/* ========== 主题变量定义 ========== */

/* 深海蓝主题 */
body.theme-ocean {
    --primary: #0077b6;
    --primary-dark: #005f8f;
    --primary-light: #00b4d8;
    --secondary: #0096c7;
    --gradient-primary: linear-gradient(135deg, #0077b6 0%, #00b4d8 50%, #48cae4 100%);
    --gradient-secondary: linear-gradient(135deg, #023e8a 0%, #0077b6 100%);
    background: linear-gradient(180deg, #e8f4f8 0%, #f0f9ff 100%);
}

/* 森林绿主题 */
body.theme-forest {
    --primary: #2d6a4f;
    --primary-dark: #1b4332;
    --primary-light: #52b788;
    --secondary: #40916c;
    --gradient-primary: linear-gradient(135deg, #2d6a4f 0%, #52b788 50%, #74c69d 100%);
    --gradient-secondary: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
    background: linear-gradient(180deg, #e8f5e9 0%, #f0fdf4 100%);
}

/* 落日橙主题 */
body.theme-sunset {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fb923c;
    --secondary: #f59e0b;
    --gradient-primary: linear-gradient(135deg, #f97316 0%, #fb923c 50%, #fbbf24 100%);
    --gradient-secondary: linear-gradient(135deg, #c2410c 0%, #f97316 100%);
    background: linear-gradient(180deg, #fff7ed 0%, #fffbf5 100%);
}

/* 玫瑰粉主题 */
body.theme-rose {
    --primary: #db2777;
    --primary-dark: #be185d;
    --primary-light: #f472b6;
    --secondary: #ec4899;
    --gradient-primary: linear-gradient(135deg, #db2777 0%, #f472b6 50%, #f9a8d4 100%);
    --gradient-secondary: linear-gradient(135deg, #9d174d 0%, #db2777 100%);
    background: linear-gradient(180deg, #fdf2f8 0%, #fef7fb 100%);
}

/* 暗夜黑主题 */
body.theme-dark {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --gray-900: #f9fafb;
    --gray-800: #f3f4f6;
    --gray-700: #e5e7eb;
    --gray-600: #d1d5db;
    --gray-500: #9ca3af;
    --gray-400: #6b7280;
    --gray-300: #4b5563;
    --gray-200: #374151;
    --gray-100: #1f2937;
    --gray-50: #111827;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    background: linear-gradient(180deg, #111827 0%, #1f2937 100%);
    color: #f9fafb;
}

body.theme-dark .module-card,
body.theme-dark .stat-card,
body.theme-dark .progress-card,
body.theme-dark .goal-item,
body.theme-dark .settings-card,
body.theme-dark .word-card,
body.theme-dark .quiz-option,
body.theme-dark .sentence-card,
body.theme-dark .modal-content,
body.theme-dark .answer-option {
    background: rgba(31, 41, 55, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

body.theme-dark .settings-page-title,
body.theme-dark .greeting,
body.theme-dark .streak-badge,
body.theme-dark .stat-value,
body.theme-dark .stat-label {
    color: #f9fafb;
}

body.theme-dark .theme-name {
    color: #d1d5db;
}

/* 薄荷青主题 */
body.theme-mint {
    --primary: #14b8a6;
    --primary-dark: #0d9488;
    --primary-light: #5eead4;
    --secondary: #2dd4bf;
    --gradient-primary: linear-gradient(135deg, #14b8a6 0%, #5eead4 50%, #99f6e4 100%);
    --gradient-secondary: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    background: linear-gradient(180deg, #f0fdfa 0%, #f5fffe 100%);
}

/* 咖啡棕主题 */
body.theme-coffee {
    --primary: #92400e;
    --primary-dark: #78350f;
    --primary-light: #a16207;
    --secondary: #b45309;
    --gradient-primary: linear-gradient(135deg, #78350f 0%, #a16207 50%, #ca8a04 100%);
    --gradient-secondary: linear-gradient(135deg, #451a03 0%, #78350f 100%);
    background: linear-gradient(180deg, #fef3c7 0%, #fffbeb 100%);
}

/* 薰衣紫主题 */
body.theme-lavender {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
    --secondary: #8b5cf6;
    --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #a78bfa 50%, #c4b5fd 100%);
    --gradient-secondary: linear-gradient(135deg, #5b21b6 0%, #7c3aed 100%);
    background: linear-gradient(180deg, #f5f3ff 0%, #faf5ff 100%);
}

/* ==================== iOS 26 液态玻璃效果 ==================== */

/* 液态玻璃模式背景 - 更丰富的渐变 */
body.liquid-glass-mode {
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(236, 72, 153, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    background-attachment: fixed;
}

/* 液态玻璃通用类 */
.liquid-glass {
    background: var(--liquid-glass-bg) !important;
    backdrop-filter: blur(var(--liquid-glass-blur)) saturate(var(--liquid-glass-saturate));
    -webkit-backdrop-filter: blur(var(--liquid-glass-blur)) saturate(var(--liquid-glass-saturate));
    border: 1px solid var(--liquid-glass-border) !important;
    box-shadow: 
        var(--liquid-glass-shadow),
        inset 0 1px 1px rgba(255, 255, 255, 0.6),
        inset 0 -1px 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 液态玻璃高光效果 */
.liquid-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: var(--liquid-glass-refraction);
    pointer-events: none;
    border-radius: inherit;
}

/* 液态玻璃悬停效果 */
.liquid-glass:hover {
    background: var(--liquid-glass-bg-hover) !important;
    box-shadow: 
        var(--liquid-glass-shadow-hover),
        inset 0 1px 2px rgba(255, 255, 255, 0.7),
        inset 0 -1px 1px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 液态玻璃激活效果 */
.liquid-glass:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.06),
        inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* 液态玻璃模式下的卡片 */
body.liquid-glass-mode .module-card,
body.liquid-glass-mode .stat-card,
body.liquid-glass-mode .progress-card,
body.liquid-glass-mode .goal-item,
body.liquid-glass-mode .settings-card,
body.liquid-glass-mode .word-card,
body.liquid-glass-mode .sentence-card,
body.liquid-glass-mode .quiz-option,
body.liquid-glass-mode .answer-option,
body.liquid-glass-mode .passage-card,
body.liquid-glass-mode .topic-card,
body.liquid-glass-mode .listening-card {
    background: var(--liquid-glass-bg) !important;
    backdrop-filter: blur(var(--liquid-glass-blur)) saturate(var(--liquid-glass-saturate));
    -webkit-backdrop-filter: blur(var(--liquid-glass-blur)) saturate(var(--liquid-glass-saturate));
    border: 1px solid var(--liquid-glass-border) !important;
    box-shadow: 
        var(--liquid-glass-shadow),
        inset 0 1px 1px rgba(255, 255, 255, 0.6),
        inset 0 -1px 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

body.liquid-glass-mode .module-card::before,
body.liquid-glass-mode .stat-card::before,
body.liquid-glass-mode .progress-card::before,
body.liquid-glass-mode .settings-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
}

body.liquid-glass-mode .module-card:hover,
body.liquid-glass-mode .stat-card:hover,
body.liquid-glass-mode .progress-card:hover,
body.liquid-glass-mode .settings-card:hover {
    background: var(--liquid-glass-bg-hover) !important;
    box-shadow: 
        var(--liquid-glass-shadow-hover),
        inset 0 1px 2px rgba(255, 255, 255, 0.7),
        inset 0 -1px 1px rgba(255, 255, 255, 0.3);
    transform: translateY(-3px) scale(1.01);
}

/* 液态玻璃模式下的模态框 */
body.liquid-glass-mode .modal-content {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* 液态玻璃模式下的导航栏 */
body.liquid-glass-mode .navbar,
body.liquid-glass-mode header {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

/* 液态玻璃模式下的按钮 */
body.liquid-glass-mode .btn-primary,
body.liquid-glass-mode .action-btn {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.85) 0%, rgba(139, 92, 246, 0.85) 100%) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 4px 15px rgba(99, 102, 241, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

body.liquid-glass-mode .btn-primary:hover,
body.liquid-glass-mode .action-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(139, 92, 246, 0.95) 100%) !important;
    box-shadow: 
        0 6px 25px rgba(99, 102, 241, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* 液态玻璃模式下的输入框 */
body.liquid-glass-mode input,
body.liquid-glass-mode textarea,
body.liquid-glass-mode select {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.liquid-glass-mode input:focus,
body.liquid-glass-mode textarea:focus,
body.liquid-glass-mode select:focus {
    background: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(99, 102, 241, 0.5) !important;
    box-shadow: 
        0 0 0 3px rgba(99, 102, 241, 0.15),
        inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* 液态玻璃模式下的标签页 */
body.liquid-glass-mode .tab-btn,
body.liquid-glass-mode .filter-btn {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

body.liquid-glass-mode .tab-btn.active,
body.liquid-glass-mode .filter-btn.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

/* 液态玻璃彩虹边框动画 */
@keyframes liquidGlassShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.liquid-glass-shimmer {
    position: relative;
}

.liquid-glass-shimmer::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        90deg,
        rgba(99, 102, 241, 0.3),
        rgba(139, 92, 246, 0.3),
        rgba(236, 72, 153, 0.3),
        rgba(245, 158, 11, 0.3),
        rgba(16, 185, 129, 0.3),
        rgba(99, 102, 241, 0.3)
    );
    background-size: 300% 100%;
    border-radius: inherit;
    z-index: -1;
    animation: liquidGlassShimmer 4s ease infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.liquid-glass-shimmer:hover::after {
    opacity: 1;
}

/* 液态玻璃浮动动画 */
@keyframes liquidFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

body.liquid-glass-mode .floating-card {
    animation: liquidFloat 4s ease-in-out infinite;
}

/* 暗色模式下的液态玻璃 */
body.theme-dark.liquid-glass-mode {
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --liquid-glass-bg: rgba(30, 41, 59, 0.6);
    --liquid-glass-bg-hover: rgba(30, 41, 59, 0.75);
    --liquid-glass-border: rgba(255, 255, 255, 0.1);
    --liquid-glass-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    --liquid-glass-refraction: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 40%);
}

/* ==================== 液态玻璃 - 各模块专属样式 ==================== */

/* 首页模块 - 名言卡片 */
body.liquid-glass-mode .quote-card,
body.liquid-glass-mode .daily-goals-card {
    background: var(--liquid-glass-bg) !important;
    backdrop-filter: blur(var(--liquid-glass-blur)) saturate(var(--liquid-glass-saturate));
    -webkit-backdrop-filter: blur(var(--liquid-glass-blur)) saturate(var(--liquid-glass-saturate));
    border: 1px solid var(--liquid-glass-border) !important;
    box-shadow: var(--liquid-glass-shadow), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

/* 词汇模块 - 单词卡片 */
body.liquid-glass-mode .word-card,
body.liquid-glass-mode .word-card-inner {
    background: var(--liquid-glass-bg) !important;
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid var(--liquid-glass-border) !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.8),
        inset 0 -1px 1px rgba(255, 255, 255, 0.3);
}

body.liquid-glass-mode .word-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
}

/* 听力模块 - 播放器和听写卡片 */
body.liquid-glass-mode .audio-player-card-new,
body.liquid-glass-mode .dictation-card-new,
body.liquid-glass-mode .listening-card {
    background: var(--liquid-glass-bg) !important;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--liquid-glass-border) !important;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.7);
}

body.liquid-glass-mode .audio-player-card-new::before,
body.liquid-glass-mode .dictation-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
    animation: none !important;
}

/* 液态玻璃模式 - 播放按钮高级版 */
body.liquid-glass-mode .play-btn-premium {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.95));
    box-shadow: 
        0 8px 32px rgba(37, 99, 235, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

body.liquid-glass-mode .speed-btn-new {
    background: var(--liquid-glass-bg);
    border-color: var(--liquid-glass-border);
    backdrop-filter: blur(10px);
}

body.liquid-glass-mode .speed-indicator {
    background: var(--liquid-glass-bg);
    border-color: var(--liquid-glass-border);
    backdrop-filter: blur(10px);
}

/* 口语模块 - 句子卡片和结果卡片 */
body.liquid-glass-mode .sentence-card-new,
body.liquid-glass-mode .result-card-new {
    background: var(--liquid-glass-bg) !important;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--liquid-glass-border) !important;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
}

body.liquid-glass-mode .sentence-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
}

/* 阅读模块 - 文章卡片和问题卡片 */
body.liquid-glass-mode .passage-card-new,
body.liquid-glass-mode .questions-card-new,
body.liquid-glass-mode .reading-list {
    background: var(--liquid-glass-bg) !important;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--liquid-glass-border) !important;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
}

body.liquid-glass-mode .passage-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
}

/* 答案选项 - 液态玻璃效果 */
body.liquid-glass-mode .answer-option,
body.liquid-glass-mode .quiz-option {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(15px) saturate(150%);
    -webkit-backdrop-filter: blur(15px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

body.liquid-glass-mode .answer-option:hover,
body.liquid-glass-mode .quiz-option:hover {
    background: rgba(255, 255, 255, 0.7) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

body.liquid-glass-mode .answer-option.selected,
body.liquid-glass-mode .quiz-option.selected {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
}

body.liquid-glass-mode .answer-option.correct {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
}

body.liquid-glass-mode .answer-option.incorrect {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}

/* 复习模块 - 复习计划卡片 */
body.liquid-glass-mode .review-plan-card,
body.liquid-glass-mode .review-stats-card {
    background: var(--liquid-glass-bg) !important;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--liquid-glass-border) !important;
    box-shadow: var(--liquid-glass-shadow), inset 0 1px 2px rgba(255, 255, 255, 0.7);
}

/* 统计模块 - 统计卡片 */
body.liquid-glass-mode .stats-overview-card,
body.liquid-glass-mode .stat-card-new {
    background: var(--liquid-glass-bg) !important;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--liquid-glass-border) !important;
    box-shadow: var(--liquid-glass-shadow), inset 0 1px 2px rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
}

body.liquid-glass-mode .stat-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
}

body.liquid-glass-mode .stat-card-new:hover {
    transform: translateY(-3px);
    box-shadow: var(--liquid-glass-shadow-hover), inset 0 1px 3px rgba(255, 255, 255, 0.8);
}

/* 设置模块 - 设置卡片 */
body.liquid-glass-mode .settings-card-modern {
    background: var(--liquid-glass-bg) !important;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--liquid-glass-border) !important;
    box-shadow: var(--liquid-glass-shadow), inset 0 1px 2px rgba(255, 255, 255, 0.7);
}

/* 设置页面底部栏 - 液态玻璃 */
body.liquid-glass-mode .settings-bottom-bar {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

/* 模态框头部 - 液态玻璃 (已移至文件末尾 v1-v5 修复) */

/* 底部导航栏 - 液态玻璃 */
body.liquid-glass-mode #bottomNav,
body.liquid-glass-mode .bottom-nav {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.06);
}

/* 控制按钮组 - 液态玻璃 */
body.liquid-glass-mode .control-buttons button,
body.liquid-glass-mode .action-buttons button {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

body.liquid-glass-mode .control-buttons button:hover,
body.liquid-glass-mode .action-buttons button:hover {
    background: rgba(255, 255, 255, 0.8) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* 主操作按钮 - 渐变液态玻璃 */
body.liquid-glass-mode .btn-record,
body.liquid-glass-mode .btn-play,
body.liquid-glass-mode .btn-check {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 
        0 8px 25px rgba(99, 102, 241, 0.35),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

body.liquid-glass-mode .btn-record:hover,
body.liquid-glass-mode .btn-play:hover,
body.liquid-glass-mode .btn-check:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 35px rgba(99, 102, 241, 0.45),
        inset 0 1px 3px rgba(255, 255, 255, 0.5);
}

/* 进度条 - 液态玻璃 */
body.liquid-glass-mode .progress-bar-container {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

body.liquid-glass-mode .progress-bar-fill {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.8), rgba(139, 92, 246, 0.8)) !important;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

/* 头像选择器 - 液态玻璃 */
body.liquid-glass-mode .avatar-picker-modal {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
}

/* 设置标签页 - 液态玻璃 */
body.liquid-glass-mode .settings-tabs-top {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

body.liquid-glass-mode .settings-tab-new {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

body.liquid-glass-mode .settings-tab-new.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

/* 激活结果弹窗 - 液态玻璃 */
body.liquid-glass-mode .activation-result-modal {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
}

/* 确保100vh在移动端正确工作 */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
}

/* 隐藏类 */
.hidden { display: none !important; }

/* 按钮基础样式 - 跨浏览器 */
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* 输入框跨浏览器样式 */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}

/* iOS 输入框聚焦时不缩放 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Flexbox 兼容 */
.flex {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

/* 图片响应式 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* SVG 兼容 */
svg {
    display: inline-block;
    vertical-align: middle;
}

/* ==================== 登录页面 ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--dark);
    background-image: 
        radial-gradient(at 20% 80%, rgba(99, 102, 241, 0.4) 0px, transparent 50%),
        radial-gradient(at 80% 20%, rgba(139, 92, 246, 0.4) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(168, 85, 247, 0.2) 0px, transparent 70%);
}

.login-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    width: 100%;
    animation: slideUp 0.6s ease-out;
}

/* ==================== V2.0 试用优先登录页样式 ==================== */
.login-container-v2 {
    padding: 40px 32px;
    max-width: 400px;
}

/* ==================== V10 试用/激活一体化设计 ==================== */
/* V1: 欢迎卡片 */
.welcome-card-v10 {
    margin: 28px 0 20px;
    padding: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    box-shadow: 
        0 4px 20px rgba(99, 102, 241, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.08);
}

.welcome-greeting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.greeting-emoji {
    font-size: 28px;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-10deg); }
}

.greeting-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-700);
}

/* V2: 价值展示 */
.value-showcase {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 16px 0;
}

.value-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.value-icon {
    font-size: 28px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.value-item:hover .value-icon {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
}

.value-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
}

/* V3: 主CTA按钮 */
.main-cta-v10 {
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    border: none;
    border-radius: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 24px rgba(16, 185, 129, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* 增强版按钮样式 */
.main-cta-v10.enhanced {
    padding: 20px 24px;
    box-shadow: 
        0 12px 36px rgba(16, 185, 129, 0.5),
        0 0 0 4px rgba(16, 185, 129, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 0.25);
    animation: ctaPulse 3s ease-in-out infinite;
}

@keyframes ctaPulse {
    0%, 100% { 
        box-shadow: 
            0 12px 36px rgba(16, 185, 129, 0.5),
            0 0 0 4px rgba(16, 185, 129, 0.1),
            inset 0 2px 0 rgba(255, 255, 255, 0.25);
    }
    50% { 
        box-shadow: 
            0 16px 48px rgba(16, 185, 129, 0.6),
            0 0 0 8px rgba(16, 185, 129, 0.15),
            inset 0 2px 0 rgba(255, 255, 255, 0.3);
    }
}

.main-cta-v10.enhanced .cta-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    animation: ctaGlow 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ctaGlow {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.main-cta-v10::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;
}

.main-cta-v10:hover::before {
    left: 100%;
}

.main-cta-v10:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 32px rgba(16, 185, 129, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.main-cta-v10.enhanced:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(16, 185, 129, 0.7),
        0 0 0 6px rgba(16, 185, 129, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.main-cta-v10:active {
    transform: translateY(-1px);
}

.cta-content {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.cta-icon {
    font-size: 28px;
    animation: rocketBounce 2s ease-in-out infinite;
}

.cta-icon.pulse {
    animation: rocketBounce 2s ease-in-out infinite, iconPulse 2s ease-in-out infinite;
}

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

@keyframes iconPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.cta-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.cta-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.cta-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.cta-subtitle.highlight {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.cta-arrow {
    color: white;
    opacity: 0.9;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.cta-arrow.bounce {
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

.main-cta-v10:hover .cta-arrow {
    transform: translateX(4px);
}

/* V4: 信任标志 */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.trust-item {
    font-size: 12px;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* V5: 激活码区域 */
.activation-section-v10 {
    margin-top: 20px;
}

.activation-toggle {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px dashed var(--gray-300);
    border-radius: 12px;
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.activation-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.03);
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.activation-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

/* V6: 激活表单 */
.activation-form-v10 {
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 300px;
    opacity: 1;
    padding-top: 16px;
}

.activation-form-v10.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
}

.input-container-v10 {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.activation-input-v10 {
    width: 100%;
    padding: 14px 52px 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
    background: var(--gray-50);
    color: var(--gray-900);
    -webkit-appearance: none;
    appearance: none;
}

.activation-input-v10:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.activation-input-v10::placeholder {
    color: var(--gray-400);
    font-size: 15px;
}

.paste-btn-v10 {
    position: absolute;
    right: 8px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
    border: none;
    border-radius: 10px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.paste-btn-v10:hover {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
    transform: scale(1.05);
}

.paste-btn-v10:active {
    transform: scale(0.95);
}

/* V7: 协议 */
.agreement-v10 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    cursor: pointer;
    padding: 8px 0;
}

.agreement-checkbox-v10 {
    display: none;
}

.checkbox-visual {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.agreement-checkbox-v10:checked + .checkbox-visual {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    border-color: var(--primary);
}

.agreement-checkbox-v10:checked + .checkbox-visual::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.agreement-text-v10 {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.4;
}

.agreement-text-v10 a {
    color: var(--primary);
    text-decoration: none;
}

.agreement-text-v10 a:hover {
    text-decoration: underline;
}

/* V8: 激活按钮 */
.activate-btn-v10 {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

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

/* V9: 帮助链接 */
.help-links-v10 {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-100);
}

.help-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-400);
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 6px 10px;
    border-radius: 8px;
}

.help-link:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

/* V10: 试用已使用状态 */
.welcome-card-v10.trial-used .main-cta-v10 {
    background: linear-gradient(135deg, var(--gray-400) 0%, var(--gray-500) 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: not-allowed;
}

.welcome-card-v10.trial-used .main-cta-v10::before {
    display: none;
}

.welcome-card-v10.trial-used .cta-title {
    font-size: 16px;
}

.welcome-card-v10.trial-used .cta-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
    .welcome-card-v10 {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-color: rgba(99, 102, 241, 0.15);
    }
    
    .greeting-text,
    .value-text {
        color: var(--gray-300);
    }
    
    .value-icon {
        background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%);
    }
    
    .activation-input-v10 {
        background: #1e293b;
        border-color: #334155;
        color: white;
    }
    
    .activation-toggle {
        border-color: #334155;
        color: var(--gray-400);
    }
}

/* 移动端优化 */
@media (max-width: 400px) {
    .welcome-card-v10 {
        padding: 20px 16px;
        margin: 20px 0 16px;
    }
    
    .value-showcase {
        gap: 12px;
    }
    
    .value-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .cta-title {
        font-size: 16px;
    }
    
    .trust-badges {
        gap: 10px;
    }
    
    .help-links-v10 {
        gap: 16px;
    }
}

/* 保留旧版试用区域样式兼容 */
/* 试用区域 */
.trial-section {
    margin: 24px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.trial-badge {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.trial-desc {
    color: var(--gray-500);
    font-size: 13px;
    margin-bottom: 16px;
}

.trial-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.trial-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
}

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

.trial-features {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.trial-feature {
    font-size: 12px;
    color: var(--gray-600);
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 10px;
    border-radius: 8px;
}

/* 分割线 */
.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 20px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-200), transparent);
}

.divider-text {
    color: var(--gray-400);
    font-size: 13px;
    white-space: nowrap;
}

/* 改进的输入框 V2 */
.activation-input-wrapper {
    margin-bottom: 16px;
    text-align: left;
}

.input-label-v2 {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.input-group-v2 {
    position: relative;
    display: flex;
    align-items: center;
}

/* V1-V5: 修复输入框显示问题 */
.login-input-v2 {
    width: 100%;
    padding: 14px 50px 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 18px;
    /* V1: 使用系统默认字体，避免兼容性问题 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* V2: 移除 text-transform，用 JS 处理大写转换 */
    /* V3: 适当的字符间距 */
    letter-spacing: 0.5px;
    transition: all 0.3s;
    background: var(--gray-50);
    /* V4: 确保文本清晰可见 */
    color: var(--gray-900);
    -webkit-appearance: none;
    appearance: none;
}

.login-input-v2:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* V5: placeholder 样式 */
.login-input-v2::placeholder {
    letter-spacing: normal;
    color: var(--gray-400);
    font-size: 15px;
}

.paste-btn-v2 {
    position: absolute;
    right: 8px;
    padding: 8px;
    background: var(--gray-100);
    border: none;
    border-radius: 8px;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.paste-btn-v2:active {
    transform: scale(0.95);
}

.input-hint {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 6px;
    transition: all 0.2s;
}

.input-hint.success {
    color: #10b981;
}

.input-hint.error {
    color: #ef4444;
}

/* 底部链接 */
.login-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.login-footer-links .footer-link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.2s;
}

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

.login-footer-links .link-divider {
    color: var(--gray-300);
}

/* 已使用过试用的样式 */
.trial-section.used {
    opacity: 0.6;
    pointer-events: none;
}

.trial-section.used .trial-badge {
    background: var(--gray-400);
}

.trial-section.used .trial-btn {
    background: var(--gray-400);
    box-shadow: none;
}

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

.login-logo {
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

.login-logo svg {
    filter: drop-shadow(0 8px 16px rgba(99, 102, 241, 0.3));
}

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

.login-container h1 {
    color: var(--gray-900);
    margin-bottom: 8px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.login-subtitle { color: var(--gray-500); margin-bottom: 35px; font-size: 16px; }
.login-form { margin-bottom: 25px; }

.input-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    transition: color 0.3s;
}

.input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

.login-input {
    width: 100%;
    padding: 16px 20px 16px 48px;
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.3s;
    background: var(--gray-50);
}

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

.login-btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45);
}

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

.login-hint { color: var(--gray-400); font-size: 13px; margin-top: 20px; }

/* ==================== 协议同意勾选样式 ==================== */
.agreement-check {
    margin: 16px 0;
    text-align: left;
}

.agreement-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
}

.agreement-checkbox {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.agreement-checkbox:checked + .checkbox-custom {
    background: var(--gradient-primary);
    border-color: transparent;
}

.agreement-checkbox:checked + .checkbox-custom::after {
    content: '';
    width: 5px;
    height: 9px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

.agreement-text {
    color: var(--gray-500);
}

.agreement-text a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.agreement-text a:hover {
    text-decoration: underline;
}

/* ==================== 激活结果弹窗 ==================== */
.activation-result-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.activation-result-modal.active {
    display: flex;
}

.activation-result-content {
    width: 100%;
    max-width: 360px;
    animation: resultPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes resultPopIn {
    0% { 
        opacity: 0;
        transform: scale(0.7) translateY(30px);
    }
    100% { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 成功状态 */
.activation-success,
.activation-failure {
    display: none;
    background: white;
    border-radius: 28px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}

.activation-success.show,
.activation-failure.show {
    display: block;
}

/* 成功图标 */
.success-icon {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
}

.success-icon svg {
    width: 100%;
    height: 100%;
    color: #10b981;
    position: relative;
    z-index: 2;
    animation: successCheck 0.6s ease 0.2s both;
}

@keyframes successCheck {
    0% { 
        stroke-dasharray: 100;
        stroke-dashoffset: 100;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% { 
        stroke-dasharray: 100;
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

.success-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(52, 211, 153, 0.1) 100%);
    animation: ringPulse 2s ease infinite;
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.success-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.success-particles span {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: particleBurst 0.8s ease forwards;
}

.success-particles span:nth-child(1) { top: 50%; left: 0; animation-delay: 0.3s; }
.success-particles span:nth-child(2) { top: 50%; right: 0; animation-delay: 0.35s; }
.success-particles span:nth-child(3) { top: 0; left: 50%; animation-delay: 0.4s; }
.success-particles span:nth-child(4) { bottom: 0; left: 50%; animation-delay: 0.45s; }
.success-particles span:nth-child(5) { top: 15%; left: 15%; animation-delay: 0.5s; }
.success-particles span:nth-child(6) { top: 15%; right: 15%; animation-delay: 0.55s; }
.success-particles span:nth-child(7) { bottom: 15%; left: 15%; animation-delay: 0.6s; }
.success-particles span:nth-child(8) { bottom: 15%; right: 15%; animation-delay: 0.65s; }

@keyframes particleBurst {
    0% { 
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% { 
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

.activation-success h2 {
    font-size: 26px;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.success-subtitle {
    font-size: 15px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

.success-features {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 28px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 16px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.feature-icon {
    font-size: 24px;
    animation: featureBounce 0.5s ease both;
}

.feature-item:nth-child(1) .feature-icon { animation-delay: 0.4s; }
.feature-item:nth-child(2) .feature-icon { animation-delay: 0.5s; }
.feature-item:nth-child(3) .feature-icon { animation-delay: 0.6s; }

@keyframes featureBounce {
    0% { transform: translateY(20px); opacity: 0; }
    60% { transform: translateY(-5px); }
    100% { transform: translateY(0); opacity: 1; }
}

.feature-item span:last-child {
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 500;
}

.start-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.45);
}

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

/* 失败状态 */
.failure-icon {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
}

.failure-icon svg {
    width: 100%;
    height: 100%;
    color: #ef4444;
    position: relative;
    z-index: 2;
    animation: failureShake 0.5s ease 0.2s both;
}

@keyframes failureShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

.failure-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(248, 113, 113, 0.1) 100%);
}

.activation-failure h2 {
    font-size: 26px;
    font-weight: 800;
    color: #ef4444;
    margin-bottom: 8px;
}

.failure-message {
    font-size: 15px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

.failure-tips {
    text-align: left;
    background: #fef2f2;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.failure-tips p {
    font-size: 14px;
    font-weight: 600;
    color: #ef4444;
    margin-bottom: 10px;
}

.failure-tips ul {
    margin: 0;
    padding-left: 20px;
}

.failure-tips li {
    font-size: 13px;
    color: #b91c1c;
    margin-bottom: 6px;
    line-height: 1.5;
}

.failure-tips li:last-child {
    margin-bottom: 0;
}

.retry-btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--gray-100);
    color: var(--gray-700);
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: var(--gray-200);
}

.retry-btn:active {
    transform: scale(0.98);
}

/* ==================== 主应用 ==================== */
.container {
    max-width: 500px;
    margin: 0 auto;
    background: var(--gray-100);
    min-height: 100vh;
    padding-bottom: 90px;
}

.header {
    background: var(--gradient-primary);
    color: white;
    padding: 30px 20px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%; right: -50%;
    width: 100%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.header h1 { font-size: 28px; font-weight: 800; position: relative; z-index: 1; }
.subtitle { opacity: 0.9; font-size: 15px; position: relative; z-index: 1; }

.main-content { padding: 20px; margin-top: -20px; position: relative; z-index: 2; }

/* ==================== V10 首页模块卡片 - 第一性原理设计 ==================== */
/* V1: 极简标题区 */
.modules-section-v10 {
    margin-top: 24px;
}

.section-header-v10 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 4px;
}

.section-header-v10 h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-800);
    margin: 0;
}

.section-hint {
    font-size: 13px;
    color: var(--gray-400);
}

/* V2: 核心模块网格 */
.core-modules-v10 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

/* V3-V10: 核心卡片设计 */
.core-card-v10 {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* V4: 卡片光晕效果 */
.card-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.core-card-v10:hover .card-glow {
    opacity: 1;
}

/* 词汇卡片 - 紫色主题 */
.core-card-v10.vocab {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-color: rgba(139, 92, 246, 0.1);
}
.core-card-v10.vocab .card-glow {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
}
.core-card-v10.vocab:hover {
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
    transform: translateY(-4px);
}
.core-card-v10.vocab .card-action {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}
.core-card-v10.vocab .progress-fill {
    background: linear-gradient(90deg, #8b5cf6, #a855f7);
}

/* 阅读卡片 - 绿色主题 */
.core-card-v10.reading {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: rgba(34, 197, 94, 0.1);
}
.core-card-v10.reading .card-glow {
    background: radial-gradient(circle, rgba(34, 197, 94, 0.15) 0%, transparent 70%);
}
.core-card-v10.reading:hover {
    box-shadow: 0 20px 40px rgba(34, 197, 94, 0.2);
    transform: translateY(-4px);
}
.core-card-v10.reading .card-action {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}
.core-card-v10.reading .progress-fill {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

/* 听力卡片 - 蓝色主题 */
.core-card-v10.listening {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: rgba(59, 130, 246, 0.1);
}
.core-card-v10.listening .card-glow {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
}
.core-card-v10.listening:hover {
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
    transform: translateY(-4px);
}
.core-card-v10.listening .card-action {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}
.core-card-v10.listening .progress-fill {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

/* 口语卡片 - 粉色主题 */
.core-card-v10.speaking {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border-color: rgba(236, 72, 153, 0.1);
}
.core-card-v10.speaking .card-glow {
    background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, transparent 70%);
}
.core-card-v10.speaking:hover {
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.2);
    transform: translateY(-4px);
}
.core-card-v10.speaking .card-action {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

/* V5: 卡片内容布局 */
.card-content {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.icon-emoji {
    font-size: 28px;
}

.card-info {
    flex: 1;
}

.card-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 4px 0;
}

.card-info p {
    font-size: 13px;
    color: var(--gray-500);
    margin: 0;
}

/* V6: 核心标签 */
.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
}

.badge-text {
    font-size: 11px;
    font-weight: 700;
    color: #7c3aed;
    background: rgba(139, 92, 246, 0.15);
    padding: 4px 10px;
    border-radius: 20px;
}

/* V7: 统计数据 */
.card-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    margin-bottom: 14px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-size: 20px;
    font-weight: 800;
    color: var(--gray-800);
}

.stat-label {
    font-size: 11px;
    color: var(--gray-500);
}

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

/* V8: 进度条 */
.card-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.progress-bar-mini {
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.card-progress .progress-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    min-width: 45px;
    text-align: right;
}

/* V9: 功能标签 */
.card-feature {
    margin-bottom: 14px;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    background: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    border-radius: 20px;
}

/* V10: 行动按钮 */
.card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.core-card-v10:hover .card-action {
    transform: translateX(4px);
}

.card-action svg {
    transition: transform 0.3s ease;
}

.core-card-v10:hover .card-action svg {
    transform: translateX(4px);
}

/* 辅助模块 */
.aux-modules-v10 {
    display: flex;
    gap: 10px;
}

.aux-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    background: white;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-100);
}

.aux-card:hover {
    background: var(--gray-50);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.aux-card:active {
    transform: scale(0.97);
}

.aux-icon {
    font-size: 22px;
}

.aux-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
    .section-header-v10 h2 {
        color: var(--gray-100);
    }
    
    .core-card-v10.vocab {
        background: linear-gradient(135deg, #2e1065 0%, #3b0764 100%);
    }
    .core-card-v10.reading {
        background: linear-gradient(135deg, #052e16 0%, #14532d 100%);
    }
    .core-card-v10.listening {
        background: linear-gradient(135deg, #172554 0%, #1e3a8a 100%);
    }
    .core-card-v10.speaking {
        background: linear-gradient(135deg, #500724 0%, #831843 100%);
    }
    
    .card-icon {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .card-info h3,
    .stat-num {
        color: white;
    }
    
    .card-info p,
    .stat-label {
        color: rgba(255, 255, 255, 0.7);
    }
    
    .card-stats {
        background: rgba(0, 0, 0, 0.2);
    }
    
    .aux-card {
        background: var(--gray-800);
        border-color: var(--gray-700);
    }
    
    .aux-name {
        color: var(--gray-300);
    }
}

/* 移动端优化 */
@media (max-width: 400px) {
    .core-card-v10 {
        padding: 16px;
    }
    
    .card-icon {
        width: 46px;
        height: 46px;
    }
    
    .icon-emoji {
        font-size: 24px;
    }
    
    .card-info h3 {
        font-size: 16px;
    }
    
    .aux-card {
        padding: 12px 8px;
    }
    
    .aux-icon {
        font-size: 20px;
    }
}

/* 保留旧版模块卡片样式兼容 */
/* ==================== 模块卡片 - 全新高级设计 ==================== */
.quick-start-section {
    margin-top: 24px;
}

.section-header {
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--gray-800);
    margin: 0;
}

.section-title svg {
    color: var(--primary);
}

.module-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 16px; 
}

/* ==================== 模块卡片 - 高级悬浮效果 v3 ==================== */
.module-card {
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
    border-radius: 22px;
    padding: 24px 18px 20px;
    text-align: left;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.03),
        0 4px 16px rgba(99, 102, 241, 0.04);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.06);
}

/* 卡片顶部光泽 */
.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* 卡片底部渐变 */
.module-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.module-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(99, 102, 241, 0.18),
        0 10px 25px rgba(99, 102, 241, 0.12),
        0 0 0 1px rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.15);
}

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

.module-card:hover::after {
    opacity: 1;
}

.module-card:active { 
    transform: translateY(-5px) scale(0.99); 
    transition-duration: 0.15s;
}

/* 模块图标容器 - 精美渐变背景 v3 */
.module-icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 图标悬浮时的放大效果 */
.module-card:hover .module-icon-wrapper {
    transform: scale(1.1) translateY(-2px);
}

.module-icon-wrapper svg {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.module-card:hover .module-icon-wrapper svg {
    transform: scale(1.05);
}

.module-icon-wrapper.vocab-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}
.module-icon-wrapper.vocab-icon svg { stroke: white; }

.module-icon-wrapper.listen-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}
.module-icon-wrapper.listen-icon svg { stroke: white; }

.module-icon-wrapper.speak-icon {
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    box-shadow: 0 8px 24px rgba(236, 72, 153, 0.35);
}
.module-icon-wrapper.speak-icon svg { stroke: white; }

.module-icon-wrapper.read-icon {
    background: linear-gradient(135deg, #14b8a6 0%, #10b981 100%);
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.35);
}
.module-icon-wrapper.read-icon svg { stroke: white; }

.module-icon-wrapper.review-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}
.module-icon-wrapper.review-icon svg { stroke: white; }

.module-icon-wrapper.resource-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}
.module-icon-wrapper.resource-icon svg { stroke: white; }

.module-card h3 { 
    color: var(--gray-800); 
    font-size: 16px; 
    margin-bottom: 4px; 
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.module-card p { 
    color: var(--gray-500); 
    font-size: 12px;
    margin: 0;
    position: relative;
    z-index: 1;
}

.module-arrow {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s;
}

.module-arrow svg {
    color: var(--gray-500);
}

.module-card:hover .module-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ==================== 模态框 ==================== */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--gray-100);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal.active { transform: translateX(0); }

.modal-header {
    background: var(--gradient-primary);
    color: white;
    padding: 18px 20px;
    padding-top: calc(18px + env(safe-area-inset-top, 0px));
    padding-left: calc(20px + env(safe-area-inset-left, 0px));
    padding-right: calc(20px + env(safe-area-inset-right, 0px));
    display: flex;
    align-items: center;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

/* PWA standalone模式 - 增加顶部安全区域 */
@media all and (display-mode: standalone) {
    .modal-header {
        padding-top: calc(18px + env(safe-area-inset-top, 50px));
    }
}

/* iOS 书签/主屏幕模式兜底 - 避免返回按钮贴顶 */
html.ios.pwa-mode .modal-header {
    padding-top: calc(18px + env(safe-area-inset-top, 50px));
}

.back-btn {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
    z-index: 1001;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.back-btn:hover { background: rgba(255,255,255,0.25); }
.modal-header h2 { flex: 1; font-size: 20px; font-weight: 700; }

/* ==================== 核心词汇 V10 - 沉浸式背单词体验 ==================== */
/* V1: 极简头部设计 */
.vocab-header-v10 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.vocab-back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.vocab-back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* V4: 智能进度环 */
.vocab-progress-ring {
    position: relative;
    width: 48px;
    height: 48px;
}

.progress-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    stroke: rgba(255, 255, 255, 0.2);
}

.progress-ring-fill {
    stroke: white;
    stroke-linecap: round;
    stroke-dasharray: 125.6;
    stroke-dashoffset: 125.6;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.vocab-stats-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.vocab-stats-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* V8: 学习统计面板 */
.vocab-stats-panel {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 16px 20px;
    animation: slideDown 0.3s ease;
}

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

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-number {
    font-size: 20px;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 4px;
}

.stat-desc {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

/* V2+V3: 沉浸式内容区 */
.vocab-immersive-content {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 80px);
    padding: 0;
    background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%);
}

/* V5: 快速工具栏 */
.vocab-toolbar {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    padding-bottom: 10px;
}

.tool-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: white;
    border-radius: 14px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.tool-btn:hover {
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.tool-btn:active {
    transform: scale(0.95);
}

.tool-btn.active {
    color: #667eea;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
}

/* V2: 极简单词展示 */
.word-display-v10 {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px 20px 20px;
}

.word-focus-area {
    background: white;
    border-radius: 24px;
    padding: 48px 24px 40px;
    text-align: center;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.word-focus-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.word-focus-area:hover::before {
    opacity: 1;
}

.word-focus-area:active {
    transform: scale(0.99);
}

/* 单词主体 - 超大字号 */
.word-text-v10 {
    font-size: 52px;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -1px;
    margin-bottom: 12px;
    line-height: 1.1;
    transition: all 0.3s ease;
    user-select: none;
}

.word-phonetic-v10 {
    font-size: 18px;
    color: #94a3b8;
    font-family: 'Lucida Sans Unicode', serif;
    margin-bottom: 16px;
}

/* V12: 学习进度三点指示器 */
.learning-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.learning-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #e2e8f0;
    transition: all 0.3s ease;
}

.learning-dots .dot.active {
    background-color: #6366f1;
}

.learning-dots .dot.completed {
    background-color: #22c55e;
}

/* V3: 释义区域 */
.word-meaning-v10 {
    margin-top: 16px;
    animation: fadeInUp 0.4s ease;
}

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

.meaning-section {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.meaning-primary {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    line-height: 1.4;
}

.meaning-secondary {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
}

.example-section {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border-radius: 16px;
    padding: 16px 20px;
    border-left: 4px solid #eab308;
}

.example-label {
    font-size: 12px;
    font-weight: 700;
    color: #ca8a04;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.example-text {
    font-size: 15px;
    color: #713f12;
    line-height: 1.6;
    font-style: italic;
}

/* V7: 操作区域 */
.vocab-actions-v10 {
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    background: white;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

/* 显示释义按钮 - V10重设计 */
.show-meaning-btn-v10 {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.show-meaning-btn-v10:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
}

.show-meaning-btn-v10:active {
    transform: scale(0.98);
}

.show-meaning-btn-v10 .btn-shortcut {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

/* V7: 极简评分系统 */
.rate-system-v10 {
    margin-top: 16px;
    animation: fadeInUp 0.3s ease;
}

.rate-track {
    display: flex;
    gap: 10px;
}

.rate-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.rate-option .rate-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.rate-option .rate-text {
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.rate-option kbd {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    opacity: 0.5;
    font-family: inherit;
}

/* 不认识 - 红色 */
.rate-option.again {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
}
.rate-option.again .rate-dot {
    background: linear-gradient(135deg, #fca5a5 0%, #f87171 100%);
}
.rate-option.again kbd { background: rgba(220, 38, 38, 0.1); }
.rate-option.again:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.2);
}
.rate-option.again:active { transform: scale(0.95); }

/* 模糊 - 橙色 */
.rate-option.hard {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #ea580c;
}
.rate-option.hard .rate-dot {
    background: linear-gradient(135deg, #fdba74 0%, #fb923c 100%);
}
.rate-option.hard kbd { background: rgba(234, 88, 12, 0.1); }
.rate-option.hard:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.2);
}
.rate-option.hard:active { transform: scale(0.95); }

/* 认识 - 绿色 */
.rate-option.good {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #16a34a;
}
.rate-option.good .rate-dot {
    background: linear-gradient(135deg, #86efac 0%, #4ade80 100%);
}
.rate-option.good kbd { background: rgba(22, 163, 74, 0.1); }
.rate-option.good:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.2);
}
.rate-option.good:active { transform: scale(0.95); }

/* 简单 - 蓝色 */
.rate-option.easy {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
}
.rate-option.easy .rate-dot {
    background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
}
.rate-option.easy kbd { background: rgba(37, 99, 235, 0.1); }
.rate-option.easy:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}
.rate-option.easy:active { transform: scale(0.95); }

/* V12: 简化版评分按钮 - 只有认识/不认识 */
.rate-track.rate-simple {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.rate-track.rate-simple .rate-option {
    flex: none;
    width: 45%;
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
}

.rate-track.rate-simple .rate-option .rate-text {
    font-size: 15px;
}

.rate-track.rate-simple .rate-option.again {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #fecaca;
}

.rate-track.rate-simple .rate-option.good {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #bbf7d0;
}

/* V9: 键盘快捷键提示 */
.keyboard-hints {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

.keyboard-hints .hint-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.keyboard-hints kbd {
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    color: white;
}

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

/* V10: 单词切换动画 */
@keyframes wordEnter {
    0% { opacity: 0; transform: translateX(20px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes wordExit {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(-20px); }
}

.word-text-v10.entering {
    animation: wordEnter 0.35s ease forwards;
}

.word-text-v10.exiting {
    animation: wordExit 0.25s ease forwards;
}

/* V10: 评分反馈动画 */
@keyframes rateSuccess {
    0% { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.rate-option.selected {
    animation: rateSuccess 0.3s ease;
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
    .vocab-immersive-content {
        background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    }
    
    .word-focus-area,
    .meaning-section,
    .vocab-actions-v10 {
        background: #1e293b;
    }
    
    .word-text-v10,
    .meaning-primary {
        color: #f1f5f9;
    }
    
    .stat-card {
        background: #334155;
    }
    
    .tool-btn {
        background: #334155;
        color: #94a3b8;
    }
}

/* 移动端优化 */
@media (max-width: 400px) {
    .word-text-v10 {
        font-size: 40px;
    }
    
    .meaning-primary {
        font-size: 20px;
    }
    
    .rate-option .rate-text {
        font-size: 11px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== 保留旧版样式兼容 ==================== */
/* ==================== 词汇卡片 - 高级翻转动画 v1 ==================== */
.word-card {
    background: white;
    margin: 20px;
    border-radius: var(--radius-xl);
    padding: 40px 25px;
    text-align: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.word-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.word-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 40px rgba(99, 102, 241, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.06);
}

.word-card:active { 
    transform: scale(0.98) translateY(-2px); 
}

/* 卡片内容翻转容器 */
.word-card-inner {
    position: relative;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.word-card.flipped .word-card-inner {
    transform: rotateY(10deg);
}

/* 发音提示悬浮动画 */
.word-speaker-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    border-radius: 20px;
    font-size: 13px;
    color: #6366f1;
    margin-bottom: 20px;
    animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.2);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0);
    }
}

.word-speaker-hint svg {
    animation: speakerBounce 1.5s ease-in-out infinite;
}

@keyframes speakerBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(2px); }
}

.word-main { 
    font-size: 42px; 
    font-weight: 800; 
    color: var(--gray-900); 
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
}

/* V5: 深色模式文字对比度增强 */
body.theme-dark .word-main {
    color: #f3f4f6;
}

body.theme-dark .meaning-cn {
    color: #f3f4f6;
}

body.theme-dark .meaning-en {
    color: #d1d5db;
}

body.theme-dark .word-phonetic {
    color: #9ca3af;
}

.word-card:hover .word-main {
    color: #4f46e5;
}

body.theme-dark .word-card:hover .word-main {
    color: #818cf8;
}

.word-phonetic { 
    color: var(--gray-500); 
    font-size: 20px; 
    margin-bottom: 25px;
    font-family: 'Lucida Sans Unicode', 'Times New Roman', serif;
}

.word-meaning {
    text-align: left;
    padding: 24px;
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border-radius: var(--radius-lg);
    margin-top: 20px;
    border: 1px solid var(--gray-200);
}

.meaning-cn { font-size: 22px; color: var(--gray-800); margin-bottom: 12px; font-weight: 600; }
.meaning-en { color: var(--gray-600); font-size: 15px; margin-bottom: 16px; line-height: 1.6; }
.word-example { color: var(--gray-500); font-size: 14px; font-style: italic; padding-top: 16px; border-top: 1px solid var(--gray-200); }

/* ==================== 操作按钮 ==================== */
.word-actions { padding: 0 20px 25px; }

.show-btn {
    width: 100%;
    padding: 18px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s;
}

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

/* ==================== V1-V10: Anki风格智能评分按钮系统 ==================== */
.rate-buttons { 
    display: flex; 
    gap: 8px; 
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.rate-btn {
    flex: 1;
    min-width: 72px;
    max-width: 90px;
    padding: 12px 6px;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rate-btn:active { 
    transform: scale(0.92); 
    transition: transform 0.1s;
}

.rate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.rate-btn .btn-icon {
    font-size: 18px;
    margin-bottom: 2px;
}

.rate-btn .btn-label {
    font-weight: 700;
    font-size: 13px;
}

.rate-btn .btn-interval {
    font-size: 10px;
    opacity: 0.75;
    font-weight: 500;
}

/* 重学按钮 - 红色 */
.rate-btn.again { 
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); 
    color: #dc2626;
    border-color: #fecaca;
}
.rate-btn.again:hover { 
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #f87171;
}

/* 困难按钮 - 橙色 */
.rate-btn.hard { 
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%); 
    color: #ea580c;
    border-color: #fed7aa;
}
.rate-btn.hard:hover { 
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    border-color: #fb923c;
}

/* 良好按钮 - 绿色 */
.rate-btn.good { 
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); 
    color: #16a34a;
    border-color: #bbf7d0;
}
.rate-btn.good:hover { 
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #4ade80;
}

/* 简单按钮 - 蓝色 */
.rate-btn.easy { 
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); 
    color: #2563eb;
    border-color: #bfdbfe;
}
.rate-btn.easy:hover { 
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #60a5fa;
}

/* 按钮按下动画 */
.rate-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.rate-btn:active::after {
    width: 200%;
    height: 200%;
}

/* V5: 评分反馈卡片动画 */
@keyframes feedbackBounce {
    0% { opacity: 0; transform: translateX(-50%) scale(0.8) translateY(-20px); }
    50% { transform: translateX(-50%) scale(1.05) translateY(0); }
    100% { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
}

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

/* V6: 学习模式指示器动画 */
@keyframes modeIndicatorIn {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(0.9); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* V6: 学习模式指示器样式 */
.learning-mode-indicator {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.learning-mode-indicator .mode-icon {
    font-size: 14px;
}

.learning-mode-indicator .mode-text {
    font-weight: 700;
}

.learning-mode-indicator .mode-hint {
    font-size: 10px;
    opacity: 0.7;
    margin-left: 2px;
}

/* V6: 不同模式的脉冲动画 */
.learning-mode-indicator.mode-immediate {
    animation: modeIndicatorIn 0.3s ease, immediateModePulse 1.5s ease-in-out infinite;
}

@keyframes immediateModePulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2); }
    50% { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4); }
}

.learning-mode-indicator.mode-difficult {
    animation: modeIndicatorIn 0.3s ease, difficultModePulse 2s ease-in-out infinite;
}

@keyframes difficultModePulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(234, 88, 12, 0.2); }
    50% { box-shadow: 0 4px 18px rgba(234, 88, 12, 0.35); }
}

/* 评分反馈卡片样式 */
.rating-feedback-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.rating-feedback-card .feedback-icon {
    font-size: 20px;
}

.rating-feedback-card .feedback-text {
    white-space: nowrap;
}

/* 旧版兼容 - 保留 medium 样式 */
.rate-btn.medium { 
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); 
    color: #d97706;
    border-color: #fcd34d;
}

/* V10: 完成动画 */
@keyframes completionBounce {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

/* V10: Toast动画（如果不存在） */
@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    to { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

/* ==================== 新版底部导航 ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 20px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    margin: 0 auto;
    border-radius: 24px 24px 0 0;
    z-index: 1000;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav.hidden {
    transform: translateY(100%);
}

.nav-item {
    position: relative;
    background: none;
    border: none;
    padding: 8px 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--gray-400);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    min-width: 70px;
    overflow: hidden;
}

/* 点击涟漪效果 */
.nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    pointer-events: none;
}

.nav-item:active::before {
    width: 150px;
    height: 150px;
}

.nav-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

/* 图标悬浮光晕 */
.nav-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-primary);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: -1;
}

.nav-item.active .nav-icon-wrapper::after {
    opacity: 0.12;
    transform: scale(1);
}

.nav-svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    transition: all 0.3s ease;
}

/* 悬浮时图标弹跳 */
.nav-item:hover .nav-svg {
    animation: navIconBounce 0.5s ease;
}

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

.nav-label {
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

/* 标签下划线动画 - 已禁用 */
/*
.nav-label::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-item.active .nav-label::after {
    width: 100%;
}
*/

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

.nav-item.active .nav-icon-wrapper {
    background: rgba(99, 102, 241, 0.12);
    transform: scale(1.08);
}

/* 激活状态图标动画 */
.nav-item.active .nav-svg {
    stroke-width: 2.5;
    animation: navActiveIcon 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes navActiveIcon {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.nav-item.active .nav-label {
    font-weight: 700;
}

.nav-item:hover:not(.active) {
    color: var(--gray-600);
}

.nav-item:hover:not(.active) .nav-icon-wrapper {
    background: var(--gray-100);
    transform: scale(1.02);
}

.nav-item:active {
    transform: scale(0.92);
}

/* ==================== 新版统计页面样式 ==================== */
.stats-content-new {
    padding: 20px;
    padding-bottom: 100px;
}

/* 总览卡片 */
.stats-overview-card {
    background: var(--gradient-primary);
    border-radius: 24px;
    padding: 24px;
    color: white;
    margin-bottom: 24px;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.stats-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(99, 102, 241, 0.4);
}

/* 总览卡片背景装饰 */
.stats-overview-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    animation: overviewGlow 6s ease-in-out infinite alternate;
    pointer-events: none;
}

.stats-overview-card::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: overviewGlow 6s ease-in-out infinite alternate-reverse;
    pointer-events: none;
}

@keyframes overviewGlow {
    0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    100% { transform: translate(10%, -10%) scale(1.1); opacity: 0.8; }
}

.stats-overview-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.stats-avatar {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
}

.stats-avatar::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.1));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stats-overview-card:hover .stats-avatar::before {
    opacity: 1;
}

.stats-overview-card:hover .stats-avatar {
    transform: scale(1.05) rotate(-5deg);
}

.stats-avatar svg {
    stroke: white;
}

.stats-overview-info h3 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.stats-overview-info p {
    margin: 0;
    font-size: 14px;
    opacity: 0.85;
    position: relative;
    z-index: 1;
}

.stats-overview-numbers {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.stats-overview-card:hover .stats-overview-numbers {
    background: rgba(255, 255, 255, 0.2);
}

.overview-stat {
    flex: 1;
    text-align: center;
    /* v4.9.3: 删除hover动画,避免白斑闪烁 */
}

/* v4.9.3: 删除hover动画效果
.stats-overview-card:hover .overview-stat:nth-child(1) {
    transform: translateY(-2px);
    transition-delay: 0s;
}

.stats-overview-card:hover .overview-stat:nth-child(3) {
    transform: translateY(-2px);
    transition-delay: 0.1s;
}

.stats-overview-card:hover .overview-stat:nth-child(5) {
    transform: translateY(-2px);
    transition-delay: 0.2s;
}
*/

.overview-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    position: relative;
}

/* 数值闪烁高亮效果 */
.overview-value::after {
    content: '';
    position: absolute;
    inset: -4px -8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    opacity: 0;
    animation: valueHighlight 3s ease-in-out infinite;
}

@keyframes valueHighlight {
    0%, 70%, 100% { opacity: 0; transform: scale(0.8); }
    75%, 85% { opacity: 1; transform: scale(1); }
}

.overview-label {
    display: block;
    font-size: 12px;
    opacity: 0.85;
    margin-top: 4px;
}

.overview-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
}

/* 分隔线闪光动画 */
.overview-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: rgba(255, 255, 255, 0.8);
    animation: dividerShine 3s ease-in-out infinite;
}

@keyframes dividerShine {
    0%, 100% { height: 0%; top: 0; }
    50% { height: 100%; top: 0; }
    51% { height: 100%; top: 0; }
    100% { height: 0%; top: 100%; }
}

/* 分类标题 */
.stats-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
}

.section-icon {
    font-size: 20px;
}

/* 统计卡片网格 */
.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card-new {
    background: white;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-card-new:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.stat-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: height 0.3s ease;
}

.stat-card-new:hover::before {
    height: 6px;
}

/* 统计卡片背景光晕效果 */
.stat-card-new::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, currentColor 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.stat-card-new:hover::after {
    opacity: 0.03;
}

.stat-card-new.vocabulary::before { background: var(--gradient-primary); }
.stat-card-new.listening::before { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stat-card-new.speaking::before { background: linear-gradient(135deg, #ec4899, #be185d); }
.stat-card-new.reading::before { background: linear-gradient(135deg, #10b981, #047857); }

/* 卡片背景渐变色 */
.stat-card-new.vocabulary { color: var(--primary); }
.stat-card-new.listening { color: #3b82f6; }
.stat-card-new.speaking { color: #ec4899; }
.stat-card-new.reading { color: #10b981; }

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.stat-card-new:hover .stat-card-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* 图标脉冲动画 */
.stat-card-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    opacity: 0;
    animation: statIconPulse 2s ease-in-out infinite;
}

@keyframes statIconPulse {
    0%, 100% { transform: scale(1); opacity: 0; }
    50% { transform: scale(1.3); opacity: 0.3; }
}

.stat-card-new.vocabulary .stat-card-icon { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.stat-card-new.listening .stat-card-icon { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-card-new.speaking .stat-card-icon { background: rgba(236, 72, 153, 0.1); color: #ec4899; }
.stat-card-new.reading .stat-card-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }

.stat-card-icon svg {
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
}

.stat-card-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    position: relative;
    display: inline-flex;
    align-items: baseline;
}

/* 数值动画效果 - 悬浮时数字弹跳 */
.stat-card-new:hover .stat-card-value {
    animation: statValueBounce 0.4s ease;
}

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

.stat-card-label {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

/* 学习趋势折线图容器 */
.stats-chart-container {
    background: var(--card-background);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.chart-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot.vocabulary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.legend-dot.listening {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.legend-dot.speaking {
    background: linear-gradient(135deg, #ec4899, #be185d);
}

.legend-dot.reading {
    background: linear-gradient(135deg, #10b981, #047857);
}

#learningChart {
    width: 100% !important;
    height: auto !important;
    max-height: 250px;
}

/* 迷你进度条/图表 */
.stat-mini-chart {
    height: 4px;
    background: var(--gray-100);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.stat-mini-chart-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.stat-card-new.vocabulary .stat-mini-chart-fill { background: var(--gradient-primary); }
.stat-card-new.listening .stat-mini-chart-fill { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stat-card-new.speaking .stat-mini-chart-fill { background: linear-gradient(135deg, #ec4899, #be185d); }
.stat-card-new.reading .stat-mini-chart-fill { background: linear-gradient(135deg, #10b981, #047857); }

/* 进度条闪光效果 */
.stat-mini-chart-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: chartShine 2.5s ease-in-out infinite;
}

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

.stat-card-trend {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.stat-card-new:hover .stat-card-trend {
    transform: scale(1.15);
}

.stat-card-trend.up {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-card-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* 趋势箭头动画 */
.stat-card-trend.up svg {
    animation: trendUp 1.5s ease-in-out infinite;
}

.stat-card-trend.down svg {
    animation: trendDown 1.5s ease-in-out infinite;
}

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

@keyframes trendDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

.stat-card-trend svg {
    width: 16px;
    height: 16px;
}

/* 复习统计卡片 */
.review-stats-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.review-stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.review-stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.review-stat-icon.mastered { background: rgba(16, 185, 129, 0.1); }
.review-stat-icon.reviewing { background: rgba(245, 158, 11, 0.1); }
.review-stat-icon.pending { background: rgba(99, 102, 241, 0.1); }

.review-stat-info {
    display: flex;
    flex-direction: column;
}

.review-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.review-stat-label {
    font-size: 12px;
    color: var(--gray-500);
}

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

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

.review-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--gray-500);
}

.review-progress-text span:last-child {
    font-weight: 600;
    color: var(--success);
}

/* 操作按钮 */
.stats-actions {
    display: flex;
    gap: 12px;
}

.stats-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.stats-action-btn svg {
    width: 20px;
    height: 20px;
}

.stats-action-btn.export {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

.stats-action-btn.reset {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 2px solid var(--gray-200);
}

.stats-action-btn.reset:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

/* ==================== 听力模块 ==================== */
.listening-content { padding: 20px; }

.audio-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.transcript-card {
    background: white;
    border: 2px solid var(--success);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

/* ==================== 口语模块 ==================== */
.speaking-content { padding: 20px; }

.sentence-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.sentence-card p { font-size: 20px; line-height: 1.7; color: var(--gray-800); margin-bottom: 20px; }

/* ==================== 资源列表 ==================== */
.resource-list { background: var(--gray-50); border-radius: var(--radius-lg); padding: 12px; }

.exercise-item, .passage-item {
    padding: 18px;
    margin: 10px 0;
    background: white;
    border-radius: var(--radius);
    cursor: pointer;
    border-left: 4px solid var(--primary);
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.exercise-item:hover, .passage-item:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow);
}

/* ==================== 反馈样式 ==================== */
.answer-feedback, .q-feedback { padding: 15px; border-radius: var(--radius); margin-top: 15px; }
.answer-feedback.correct, .q-feedback.correct { background: #d1fae5; color: #065f46; }
.answer-feedback.incorrect, .q-feedback.incorrect { background: #fee2e2; color: #991b1b; }

/* ==================== 通用按钮 ==================== */
.check-btn, .submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.check-btn:hover, .submit-btn:hover { transform: translateY(-2px); }

/* ==================== 问题块 ==================== */
.question-block { background: white; padding: 20px; border-radius: var(--radius-lg); margin-bottom: 15px; box-shadow: var(--shadow-sm); }
.options label { display: block; padding: 14px 18px; margin: 10px 0; background: var(--gray-50); border-radius: var(--radius); cursor: pointer; transition: all 0.2s; border: 2px solid transparent; }
.options label:hover { background: rgba(99, 102, 241, 0.05); border-color: var(--primary-light); }

/* ==================== 录音按钮 ==================== */
#recordBtn {
    padding: 20px 40px;
    background: var(--gradient-warm);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
    transition: all 0.3s;
}

#recordBtn:hover { transform: scale(1.05); }

/* ==================== 得分圆圈 ==================== */
#scoreCircle {
    width: 100px; height: 100px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: white;
    background: var(--gradient-success);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

/* ==================== 今日目标区域 ==================== */
.daily-goals-section {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

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

.goals-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.goals-icon {
    font-size: 24px;
}

.goals-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

.goals-edit-btn {
    background: linear-gradient(180deg, #f8f7ff 0%, #f1f5f9 100%);
    border: 2px solid rgba(99, 102, 241, 0.2);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.goals-progress-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.goal-progress-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.goal-progress-item:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(4px);
}

/* 完成状态样式 */
.goal-progress-item.completed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.05) 100%);
}

.goal-progress-item.completed::after {
    content: '✓';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #10b981, #34d399);
    border-radius: 50%;
    color: white;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: completedCheck 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes completedCheck {
    0% { transform: translateY(-50%) scale(0) rotate(-180deg); }
    100% { transform: translateY(-50%) scale(1) rotate(0deg); }
}

.goal-progress-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: linear-gradient(180deg, #f8f7ff 0%, #f1f5f9 100%);
    transition: all 0.3s ease;
    position: relative;
}

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

/* 图标脉冲 */
.goal-progress-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    opacity: 0;
    animation: goalIconPulse 2.5s ease-in-out infinite;
}

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

.goal-progress-info {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.goal-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    width: 100%;
}

.goal-progress-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    transition: color 0.3s ease;
}

.goal-progress-item.completed .goal-progress-name {
    color: #10b981;
}

.goal-progress-count {
    font-size: 13px;
    color: var(--gray-500);
    transition: all 0.3s ease;
}

.goal-progress-item.completed .goal-progress-count {
    color: #10b981;
    font-weight: 600;
}

.goal-progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    position: relative;
}

.goal-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* 进度条闪光效果 */
.goal-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: goalProgressShine 2.5s ease-in-out infinite;
}

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

/* 完成时进度条发光 */
.goal-progress-item.completed .goal-progress-fill::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: inherit;
    filter: blur(8px);
    opacity: 0.5;
    border-radius: inherit;
}

.goal-progress-fill.vocabulary { background: var(--gradient-primary); }
.goal-progress-fill.listening { background: var(--gradient-secondary); }
.goal-progress-fill.speaking { background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%); }
.goal-progress-fill.reading { background: linear-gradient(135deg, #14b8a6 0%, #10b981 100%); }
.goal-progress-fill.review { background: var(--gradient-warm); }

/* 全部完成时的庆祝动画 */
.goals-all-completed {
    position: relative;
}

.goals-all-completed::before {
    content: '🎉';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 32px;
    animation: celebrationBounce 1s ease-in-out infinite;
}

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

.goals-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.goals-stats span {
    font-size: 14px;
    color: var(--gray-500);
}

#goalsTotalProgress {
    font-weight: 700;
    fill: #6366f1;
}

/* ====== 进度圈百分比居中 v9-11：彻底修复 0% 不居中问题 ====== */

/* ========== 版本9: 基础居中修复 ========== */
/* 确保容器是精确的定位上下文 */
.progress-ring-container {
    position: relative !important;
    width: 80px !important;
    height: 80px !important;
    flex-shrink: 0;
    box-sizing: border-box !important;
    /* v9: 确保容器本身居中展示 */
    margin: 0 auto;
}

/* SVG进度环 - 精确占满容器 */
.progress-ring-container .progress-ring {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* v9: 文字覆盖层 - 使用绝对定位+transform实现精确居中 */
.progress-ring-text-overlay {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: auto !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10;
    pointer-events: none;
    box-sizing: border-box !important;
    /* v9: 移除可能导致偏移的属性 */
    margin: 0 !important;
    padding: 0 !important;
}

/* ========== 版本10: 数字和百分号打包居中 ========== */
/* v10: 内联包装器 - 将数字和%作为整体打包 */
.progress-text-inner {
    display: inline-flex !important;
    align-items: baseline !important;  /* v10: 使用baseline确保数字和%底部对齐 */
    justify-content: center !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    /* v10: 确保包装器没有额外空间 */
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
}

/* v10: 数字样式 - 使用更稳定的布局 */
.progress-number {
    font-size: 18px;
    font-weight: 800;
    color: #6366f1;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    letter-spacing: -0.3px;
    display: inline-block !important;  /* v10: 改用inline-block更稳定 */
    /* v10: 移除可能导致偏移的margin/padding */
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: baseline !important;
}

/* v10: 百分号样式 - 紧贴数字 */
.progress-percent {
    font-size: 10px;
    font-weight: 700;
    color: #8b5cf6;
    line-height: 1;
    display: inline-block !important;  /* v10: 改用inline-block更稳定 */
    margin: 0 0 0 1px !important;  /* v10: 只保留左边1px间距 */
    padding: 0 !important;
    vertical-align: baseline !important;
}

/* ========== 版本11: 响应式和位数自适应 ========== */
/* v11: 单位数字（0-9）保持默认大小 */
.progress-number.single-digit {
    font-size: 20px;
    min-width: 12px;
    text-align: center;
}

/* v11: 两位数（10-99）稍微缩小 */
.progress-number.two-digits {
    font-size: 17px;
    min-width: 22px;
    text-align: center;
}

/* v11: 三位数（100）进一步缩小 */
.progress-number.three-digits {
    font-size: 14px;
    letter-spacing: -0.5px;
    min-width: 32px;
    text-align: center;
}

/* v11: 三位数时百分号也要缩小 */
.progress-number.three-digits + .progress-percent {
    font-size: 8px;
    margin-left: 0px !important;
}

/* 完成状态样式 */
.progress-ring-text-overlay.completed .progress-number {
    color: #10b981;
}

.progress-ring-text-overlay.completed .progress-percent {
    color: #059669;
}

/* v11: 确保在小屏幕上也能居中 */
@media (max-width: 380px) {
    .progress-ring-container {
        width: 70px !important;
        height: 70px !important;
    }
    
    .progress-number {
        font-size: 16px;
    }
    
    .progress-percent {
        font-size: 9px;
    }
}

/* ==================== 目标设置弹窗 ==================== */
.goal-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.goal-settings-modal.active {
    display: flex;
}

.goal-settings-content {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: fadeIn 0.3s ease;
}

.goal-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--gradient-primary);
    border-radius: 24px 24px 0 0;
}

.goal-settings-header h3 {
    margin: 0;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.goal-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.goal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.goal-settings-body {
    padding: 24px;
}

.goal-settings-tip {
    background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    color: #92400e;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
}

.goal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 14px;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.goal-item:hover {
    background: var(--gray-100);
}

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

.goal-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.goal-item-icon.vocab {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
}
.goal-item-icon.vocab svg { stroke: #7c3aed; }

.goal-item-icon.listen {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}
.goal-item-icon.listen svg { stroke: #2563eb; }

.goal-item-icon.speak {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}
.goal-item-icon.speak svg { stroke: #db2777; }

.goal-item-icon.read {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}
.goal-item-icon.read svg { stroke: #059669; }

.goal-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
}

.goal-item-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.goal-item-input input {
    width: 70px;
    padding: 10px 12px;
    border: 2px solid var(--primary);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

.goal-item-input input:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.goal-item-unit {
    font-size: 14px;
    color: var(--gray-500);
    min-width: 24px;
}

.goal-settings-footer {
    display: flex;
    gap: 12px;
    padding: 0 24px 24px;
}

.goal-save-btn {
    flex: 2;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.goal-reset-btn {
    width: 56px;
    height: 56px;
    padding: 0;
    background: white;
    color: var(--gray-500);
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.goal-reset-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

/* ==================== 设置页面新样式 ==================== */
.settings-content {
    padding: 0;
    padding-bottom: 100px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 设置标签页导航 */
.settings-tabs {
    display: flex;
    background: white;
    padding: 12px 16px;
    gap: 8px;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 56px;
    z-index: 5;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.settings-tabs::-webkit-scrollbar {
    display: none;
}

.settings-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--gray-50);
    border: 2px solid transparent;
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.settings-tab-icon {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-tab-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.settings-tab:hover .settings-tab-icon svg {
    transform: scale(1.1);
}

.settings-tab.active .settings-tab-icon svg {
    filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.3));
}

.settings-tab.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.settings-tab:hover:not(.active) {
    background: var(--gray-100);
}

/* 设置面板 */
.settings-panel {
    display: none;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.settings-panel.active {
    display: block;
}

/* 设置卡片 - 现代风格 */
.settings-card-modern {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.settings-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.settings-card-icon.theme-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.settings-card-icon.study-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.settings-card-icon.audio-icon {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
}

.settings-card-icon.speed-icon {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.settings-card-icon.data-icon {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}

.settings-card-icon.storage-icon {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

.settings-card-icon.link-icon {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
}

/* 新版设置标签图标容器 */
.settings-tab-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-tab-icon-wrap svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    transition: transform 0.2s ease;
}

.settings-tab-icon-wrap.general {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.15) 0%, rgba(234, 179, 8, 0.15) 100%);
    color: #ca8a04;
}

.settings-tab-icon-wrap.audio {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #9333ea;
}

.settings-tab-icon-wrap.data {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
    color: #16a34a;
}

.settings-tab-icon-wrap.about {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(99, 102, 241, 0.15) 100%);
    color: #3b82f6;
}

.settings-tab:hover .settings-tab-icon-wrap {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.settings-tab.active .settings-tab-icon-wrap {
    transform: scale(1.05);
}

.settings-tab.active .settings-tab-icon-wrap.general {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.25) 0%, rgba(234, 179, 8, 0.25) 100%);
    box-shadow: 0 4px 16px rgba(234, 179, 8, 0.25);
}

.settings-tab.active .settings-tab-icon-wrap.audio {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.25);
}

.settings-tab.active .settings-tab-icon-wrap.data {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(16, 185, 129, 0.25) 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.settings-tab.active .settings-tab-icon-wrap.about {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(99, 102, 241, 0.25) 100%);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
}

/* 新版设置卡片图标 */
.settings-card-icon-new {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.settings-card-icon-new svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.settings-card-icon-new.theme {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #ca8a04;
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.2);
}

.settings-card-icon-new.study {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.settings-card-icon-new.audio {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #7c3aed;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.settings-card-icon-new.speed {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.settings-card-icon-new.backup {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #db2777;
    box-shadow: 0 4px 12px rgba(219, 39, 119, 0.2);
}

.settings-card-icon-new.storage {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.settings-card-icon-new.link {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
    color: #0d9488;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
}

.settings-card-icon-new.avatar {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #db2777;
    box-shadow: 0 4px 12px rgba(219, 39, 119, 0.2);
}

/* 液态玻璃图标样式 */
.settings-card-icon-new.glass {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.settings-card-icon-new.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: inherit;
}

/* 液态玻璃预览区域 */
.liquid-glass-preview {
    padding: 20px;
    margin: 0 -20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 16px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.liquid-glass-demo {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.glass-demo-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.6),
        inset 0 -1px 1px rgba(255, 255, 255, 0.2);
    position: relative;
    animation: glassDemoFloat 3s ease-in-out infinite;
}

.glass-demo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: inherit;
    pointer-events: none;
}

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

.glass-demo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.glass-demo-text {
    font-size: 16px;
    font-weight: 600;
    color: #1e1b4b;
}

.glass-demo-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.2) 0%, transparent 30%);
    pointer-events: none;
}

/* 液态玻璃开关特殊样式 */
.liquid-toggle .toggle-track {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

.liquid-toggle input:checked + .toggle-track {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 15px rgba(99, 102, 241, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.liquid-toggle input:checked + .toggle-track .toggle-thumb {
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* 液态玻璃设置卡片特殊效果 */
.liquid-glass-settings {
    position: relative;
    overflow: hidden;
}

body.liquid-glass-mode .liquid-glass-settings {
    background: var(--liquid-glass-bg) !important;
    backdrop-filter: blur(var(--liquid-glass-blur)) saturate(var(--liquid-glass-saturate));
    -webkit-backdrop-filter: blur(var(--liquid-glass-blur)) saturate(var(--liquid-glass-saturate));
}

/* ==================== 头像设置样式 ==================== */
.avatar-setting-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 16px;
}

.current-avatar-preview {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    cursor: pointer;
}

.avatar-preview-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: transform 0.3s ease;
}

.current-avatar-preview:hover .avatar-preview-inner {
    transform: scale(1.05);
}

.avatar-preview-inner .avatar-emoji {
    font-size: 32px;
}

.avatar-preview-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-edit-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.avatar-edit-badge svg {
    width: 12px;
    height: 12px;
    stroke: var(--primary);
}

.avatar-setting-info {
    flex: 1;
}

.avatar-setting-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
}

.avatar-setting-desc {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

.avatar-change-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* ==================== 简洁头像选择弹窗 ==================== */
.avatar-picker-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.avatar-picker-modal.active {
    display: flex;
}

.avatar-picker-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.avatar-picker-simple {
    position: relative;
    width: 100%;
    max-width: 320px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popIn 0.25s ease;
}

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

.avatar-picker-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
}

.avatar-picker-title span {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
}

.avatar-close-btn {
    width: 28px;
    height: 28px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    font-size: 14px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.avatar-close-btn:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.avatar-options-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 16px;
}

.avatar-option {
    width: 100%;
    aspect-ratio: 1;
    background: var(--gray-50);
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-option:hover {
    background: var(--gray-100);
    transform: scale(1.1);
}

.avatar-option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.avatar-option[data-type="scene"] {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-color: #38bdf8;
}

.avatar-option[data-type="scene"]:hover {
    background: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 100%);
}

.avatar-option[data-type="scene"].selected {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.avatar-scene-icon {
    font-size: 22px;
}

/* 首页头像图标可点击样式 */
.scene-icon-ring {
    cursor: pointer;
    transition: all 0.3s ease;
}

.scene-icon-ring:hover {
    transform: scale(1.08);
}

.scene-icon-ring:active {
    transform: scale(0.95);
}

/* 自定义头像在图标环内的样式 */
.scene-icon .custom-avatar {
    font-size: 28px;
    line-height: 1;
}

.avatar-emoji-option {
    width: 100%;
    aspect-ratio: 1;
    background: var(--gray-50);
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-emoji-option:hover {
    background: var(--gray-100);
    transform: scale(1.1);
}

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

/* 图片裁剪区域 */
.avatar-crop-section {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-100);
}

.avatar-crop-section.hidden {
    display: none;
}

.avatar-crop-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.avatar-crop-container {
    display: flex;
    justify-content: center;
    padding: 16px;
    background: var(--gray-900);
    border-radius: 16px;
    margin-bottom: 12px;
}

.avatar-crop-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    overflow: hidden;
    border-radius: 50%;
    border: 3px solid white;
}

#avatarCropImage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    cursor: move;
    transition: transform 0.1s ease;
}

.avatar-crop-circle {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.avatar-crop-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.crop-control-btn {
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crop-control-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--gray-700);
}

.crop-control-btn:hover {
    background: var(--gray-200);
}

#avatarZoomSlider {
    width: 120px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--gray-200);
    border-radius: 3px;
    outline: none;
}

#avatarZoomSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.avatar-crop-actions {
    display: flex;
    gap: 12px;
}

.crop-cancel-btn,
.crop-confirm-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crop-cancel-btn {
    background: var(--gray-100);
    color: var(--gray-700);
}

.crop-cancel-btn:hover {
    background: var(--gray-200);
}

.crop-confirm-btn {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
}

.crop-confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* 底部保存按钮 */
.avatar-picker-footer {
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--gray-100);
}

.avatar-save-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.settings-card-modern:hover .settings-card-icon-new {
    transform: scale(1.05) rotate(-3deg);
}

.settings-card-title h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-900);
}

.settings-card-title p {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: var(--gray-500);
}

/* 设置列表 */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--gray-50);
    border-radius: 12px;
    transition: background 0.2s ease;
}

.setting-row:hover {
    background: var(--gray-100);
}

.setting-info {
    flex: 1;
}

.setting-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.setting-desc {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
}

/* 现代开关样式 */
.toggle-modern {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-modern input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    border-radius: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-thumb {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-modern input:checked + .toggle-track {
    background: var(--gradient-primary);
}

.toggle-modern input:checked + .toggle-track .toggle-thumb {
    transform: translateX(24px);
}

.toggle-modern input:focus + .toggle-track {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* 主题选择器 */
.theme-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.theme-option {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.theme-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-preview {
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-preview-header {
    height: 25%;
}

.theme-preview-content {
    height: 75%;
}

.theme-preview.default-theme .theme-preview-header {
    background: var(--gradient-primary);
}
.theme-preview.default-theme .theme-preview-content {
    background: #f3f4f6;
}

.theme-preview.light-theme .theme-preview-header {
    background: #3b82f6;
}
.theme-preview.light-theme .theme-preview-content {
    background: #ffffff;
}

.theme-preview.dark-theme .theme-preview-header {
    background: #1f2937;
}
.theme-preview.dark-theme .theme-preview-content {
    background: #111827;
}

/* 深海蓝主题预览 */
.theme-preview.ocean-theme .theme-preview-header {
    background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
}
.theme-preview.ocean-theme .theme-preview-content {
    background: #e8f4f8;
}

/* 森林绿主题预览 */
.theme-preview.forest-theme .theme-preview-header {
    background: linear-gradient(135deg, #2d6a4f 0%, #52b788 100%);
}
.theme-preview.forest-theme .theme-preview-content {
    background: #e8f5e9;
}

/* 落日橙主题预览 */
.theme-preview.sunset-theme .theme-preview-header {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
}
.theme-preview.sunset-theme .theme-preview-content {
    background: #fff7ed;
}

/* 玫瑰粉主题预览 */
.theme-preview.rose-theme .theme-preview-header {
    background: linear-gradient(135deg, #db2777 0%, #f472b6 100%);
}
.theme-preview.rose-theme .theme-preview-content {
    background: #fdf2f8;
}

/* 薄荷青主题预览 */
.theme-preview.mint-theme .theme-preview-header {
    background: linear-gradient(135deg, #14b8a6 0%, #5eead4 100%);
}
.theme-preview.mint-theme .theme-preview-content {
    background: #f0fdfa;
}

/* 咖啡棕主题预览 */
.theme-preview.coffee-theme .theme-preview-header {
    background: linear-gradient(135deg, #78350f 0%, #a16207 100%);
}
.theme-preview.coffee-theme .theme-preview-content {
    background: #fef3c7;
}

/* 薰衣紫主题预览 */
.theme-preview.lavender-theme .theme-preview-header {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
}
.theme-preview.lavender-theme .theme-preview-content {
    background: #f5f3ff;
}

.theme-option input:checked + .theme-preview {
    border-color: var(--primary);
}

.theme-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
}

.theme-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.theme-option input:checked ~ .theme-check {
    display: flex;
}

/* 现代输入框 */
.settings-form-group {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-modern {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-modern label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.input-wrapper .input-icon {
    padding: 0 12px;
    font-size: 16px;
}

.input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 0;
    font-size: 15px;
    color: var(--gray-800);
    outline: none;
}

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

.input-action {
    padding: 0 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.input-action:hover {
    opacity: 1;
}

/* 滑动条 */
.slider-modern {
    padding: 10px 0;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--gray-500);
}

.slider-value {
    font-weight: 700;
    color: var(--primary);
    font-size: 16px;
}

.slider-modern input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.slider-modern input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: var(--gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    transition: transform 0.2s;
}

.slider-modern input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* 数据操作按钮 - 简洁版 */
.data-actions-simple {
    display: flex;
    gap: 12px;
}

.data-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    border-radius: 18px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    background: white;
}

.data-btn-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.data-btn-icon-wrap svg {
    width: 26px;
    height: 26px;
}

.data-btn-icon-wrap.export {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.data-btn-icon-wrap.import {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.data-btn-icon-wrap.danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.data-btn-icon-wrap.danger-full {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

/* 选择性清除按钮样式 */
.data-btn.selective {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: #c4b5fd;
}

.data-btn.selective:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.25);
    border-color: #a78bfa;
}

.data-btn-icon-wrap.selective {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.data-btn-text {
    font-size: 14px;
    color: var(--gray-700);
}

.data-btn.export {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #bbf7d0;
}

.data-btn.export:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25);
    border-color: #86efac;
}

.data-btn.export:hover .data-btn-icon-wrap {
    transform: scale(1.1);
}

.data-btn.import {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
}

.data-btn.import:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
    border-color: #93c5fd;
}

.data-btn.import:hover .data-btn-icon-wrap {
    transform: scale(1.1);
}

.data-btn.danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fecaca;
}

.data-btn.danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.2);
    border-color: #fca5a5;
}

.data-btn.danger:hover .data-btn-icon-wrap {
    transform: scale(1.1);
}

.data-btn.danger-full {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fecaca;
}

.data-btn.danger-full:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
    border-color: #f87171;
}

.data-btn.danger-full:hover .data-btn-icon-wrap {
    transform: scale(1.1);
}

.data-btn.danger .data-btn-text,
.data-btn.danger-full .data-btn-text {
    color: #b91c1c;
}

.danger-card {
    border: 1px solid #fecaca !important;
    background: linear-gradient(135deg, #fffbfb 0%, #fff5f5 100%) !important;
}

.danger-card .settings-card-header {
    background: transparent;
}

.settings-card-icon-new.danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
    color: #dc2626 !important;
}

.settings-card-icon-new.danger svg {
    stroke: #dc2626;
}

/* 保留旧样式兼容 */
.data-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.data-actions.danger-zone {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--gray-300);
}

.data-action-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.data-action-btn:hover {
    background: var(--gray-100);
    transform: translateX(4px);
}

.data-action-btn.export {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #a7f3d0;
}

.data-action-btn.export:hover {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.data-action-btn.import {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
}

.data-action-btn.import:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.data-action-btn.danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fecaca;
}

.data-action-btn.danger:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.data-action-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 数据操作SVG图标 */
.data-action-icon-svg {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.data-action-icon-svg svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.data-action-btn.export .data-action-icon-svg {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2);
}

.data-action-btn.import .data-action-icon-svg {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.data-action-icon-svg.danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.2);
}

.data-action-btn:hover .data-action-icon-svg {
    transform: scale(1.08);
}

.data-action-info {
    flex: 1;
}

.data-action-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
}

.data-action-desc {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

.data-action-arrow {
    font-size: 18px;
    color: var(--gray-400);
    transition: transform 0.3s;
}

.data-action-btn:hover .data-action-arrow {
    transform: translateX(4px);
}

/* 存储信息 */
.storage-info {
    margin-bottom: 16px;
}

.storage-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.storage-used {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.storage-details {
    font-size: 13px;
    color: var(--gray-500);
    text-align: center;
}

/* 关于卡片 */
.about-card {
    text-align: center;
}

.about-header {
    margin-bottom: 20px;
}

.about-logo {
    font-size: 64px;
    margin-bottom: 12px;
    animation: float 3s ease-in-out infinite;
}

.about-app-name {
    font-size: 24px;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 8px 0;
}

.about-version {
    display: inline-block;
    padding: 4px 12px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.about-description {
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--gray-50);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}

.feature-icon {
    font-size: 18px;
}

/* 新版关于功能项 */
.about-feature-new {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    transition: all 0.3s ease;
}

.about-feature-new:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.feature-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon-wrap svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.feature-icon-wrap.listening {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #ca8a04;
}

.feature-icon-wrap.speaking {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.feature-icon-wrap.reading {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #7c3aed;
}

.feature-icon-wrap.vocabulary {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
}

/* 关于链接 */
.about-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.about-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--gray-50);
    border-radius: 12px;
    text-decoration: none;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.about-link:hover {
    background: var(--gray-100);
}

.about-link .link-icon {
    font-size: 20px;
}

.about-link .link-arrow {
    margin-left: auto;
    color: var(--gray-400);
    transition: transform 0.3s;
}

.about-link:hover .link-arrow {
    transform: translateX(4px);
}

/* 新版关于链接 */
.about-link-new {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--gray-50);
    border-radius: 14px;
    text-decoration: none;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.about-link-new:hover {
    background: var(--gray-100);
    transform: translateX(4px);
}

.link-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4f46e5;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.link-icon-wrap svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.about-link-new:hover .link-icon-wrap {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.link-arrow-svg {
    width: 18px;
    height: 18px;
    margin-left: auto;
    color: var(--gray-400);
    stroke: currentColor;
    fill: none;
    transition: transform 0.3s;
}

.about-link-new:hover .link-arrow-svg {
    transform: translateX(4px);
    color: var(--primary);
}

/* 新版关于Logo */
.about-logo-new {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.about-logo-new svg {
    width: 40px;
    height: 40px;
}

.about-footer {
    text-align: center;
    padding: 20px;
    color: var(--gray-400);
    font-size: 13px;
}

.about-footer .copyright {
    margin-top: 4px;
    font-size: 11px;
}

.about-footer .trademark-notice {
    margin-top: 8px;
    font-size: 10px;
    color: var(--gray-400);
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

/* ========== 设置页面 V10 重设计 ========== */

/* V10 设置头部 */
.settings-header-v10 {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    padding-top: calc(18px + env(safe-area-inset-top, 0px));
    padding-left: calc(20px + env(safe-area-inset-left, 0px));
    padding-right: calc(20px + env(safe-area-inset-right, 0px));
    background: var(--gradient-primary);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* PWA standalone 模式 - 增加顶部安全区域 */
@media all and (display-mode: standalone) {
    .settings-header-v10 {
        padding-top: calc(18px + env(safe-area-inset-top, 50px));
    }
}

.settings-back-v10 {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
}

.settings-back-v10:hover {
    background: rgba(255,255,255,0.3);
}

.settings-back-v10:active {
    transform: scale(0.95);
}

.settings-title-v10 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-emoji-v10 {
    font-size: 1.6rem;
}

.settings-title-v10 h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

/* V10 设置内容区 */
.settings-content-v10 {
    padding: 0;
    background: var(--bg-secondary, #f5f5f7);
    min-height: calc(100vh - 80px);
    overflow-y: auto;
}

/* V12: 设置分区标题 - 减少间距 */
.settings-section-title-v12 {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px 6px;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-section-title-v12 svg {
    color: var(--accent-color, #6366f1);
}

/* V12: 所有面板始终显示 */
.settings-panel {
    display: block !important;
}

/* V10 标签导航 - 隐藏 */
.settings-tabs-v10 {
    display: none;
}

.settings-tabs-v10::-webkit-scrollbar {
    display: none;
}

.settings-tab-v10 {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 20px;
    background: var(--bg-secondary, #f5f5f7);
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
}

.settings-tab-v10:hover {
    background: var(--accent-light, #eff6ff);
    color: var(--accent-color, #6366f1);
}

.settings-tab-v10.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tab-emoji-v10 {
    font-size: 1rem;
}

.tab-name-v10 {
    font-size: 0.85rem;
}

/* V10 设置面板 */
.settings-panel {
    display: none;
    padding: 16px;
    padding-bottom: 100px;
}

.settings-panel.active {
    display: block;
}

/* V10 设置卡片 */
.settings-card-v10 {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}

.settings-card-v10.danger {
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.5) 0%, white 100%);
}

.settings-card-v10.subscription {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, white 100%);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.settings-card-v10.about {
    text-align: center;
    padding: 30px 20px;
}

/* V10 卡片头部 */
.card-header-v10 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.card-emoji-v10 {
    font-size: 1.8rem;
}

.card-title-v10 h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.card-title-v10 p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 3px 0 0;
}

/* V10 主题选择器 */
.theme-selector-v10 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.theme-option-v10 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
    background: var(--bg-secondary, #f5f5f7);
    cursor: pointer;
    transition: all 0.25s;
    border: 2px solid transparent;
}

.theme-option-v10:hover {
    transform: translateY(-2px);
}

.theme-option-v10:has(input:checked) {
    border-color: var(--accent-color, #6366f1);
    background: var(--accent-light, #eff6ff);
}

.theme-option-v10 input {
    display: none;
}

.theme-color-v10 {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.theme-name-v10 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* V10 设置列表 */
.settings-list-v10 {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setting-row-v10 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-row-v10:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-info-v10 {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.setting-icon-v10 {
    font-size: 1.3rem;
}

.setting-name-v10 {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.setting-desc-v10 {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* V10 开关 */
.toggle-v10 {
    position: relative;
    width: 52px;
    height: 30px;
    flex-shrink: 0;
}

.toggle-v10 input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider-v10 {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #e5e7eb;
    border-radius: 30px;
    transition: all 0.3s;
}

.toggle-slider-v10::before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.toggle-v10 input:checked + .toggle-slider-v10 {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.toggle-v10 input:checked + .toggle-slider-v10::before {
    transform: translateX(22px);
}

/* V10 全盘复习统计 */
.review-stats-v10 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-secondary, #f5f5f7);
    border-radius: 14px;
}

.review-stat-v10 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.stat-icon-v10 {
    font-size: 1.3rem;
}

.stat-value-v10 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color, #6366f1);
}

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

/* V10 TTS配置 */
.tts-config-v10 {
    margin: 16px 0;
    padding: 16px;
    background: var(--bg-secondary, #f5f5f7);
    border-radius: 14px;
}

.input-group-v10 {
    margin-bottom: 14px;
}

.input-group-v10:last-child {
    margin-bottom: 0;
}

.input-group-v10 label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.input-group-v10 input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9rem;
    background: white;
    transition: all 0.2s;
}

.input-group-v10 input:focus {
    outline: none;
    border-color: var(--accent-color, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-with-action-v10 {
    display: flex;
    gap: 8px;
}

.input-with-action-v10 input {
    flex: 1;
}

.input-action-v10 {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.input-action-v10:hover {
    background: var(--bg-secondary);
}

/* V10 操作按钮 */
.action-btn-v10 {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    border: none;
}

.action-btn-v10.primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

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

.action-btn-v10:active {
    transform: scale(0.98);
}

/* V10 速度滑块 */
.speed-slider-v10 {
    padding: 12px;
    background: var(--bg-secondary, #f5f5f7);
    border-radius: 14px;
}

.slider-labels-v10 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.speed-value-v10 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color, #6366f1);
}

.slider-input-v10 {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    appearance: none;
    cursor: pointer;
}

.slider-input-v10::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    cursor: pointer;
}

/* V10 数据操作按钮 */
.data-actions-v10 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.data-actions-v10.danger {
    grid-template-columns: repeat(3, 1fr);
}

.data-btn-v10 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border-radius: 16px;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.data-btn-v10.export {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    color: #059669;
}

.data-btn-v10.import {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    color: #2563eb;
}

.data-btn-v10.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.data-btn-v10.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.data-btn-v10.danger-full {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.data-btn-v10:hover {
    transform: translateY(-2px);
}

.data-btn-v10:active {
    transform: scale(0.96);
}

.data-btn-icon-v10 {
    font-size: 1.5rem;
}

/* V10 存储信息 */
.storage-info-v10 {
    padding: 16px;
    background: var(--bg-secondary, #f5f5f7);
    border-radius: 14px;
}

.storage-bar-v10 {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.storage-used-v10 {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.storage-text-v10 {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* V10 关于页面 */
.about-header-v10 {
    margin-bottom: 20px;
}

.about-logo-v10 {
    font-size: 4rem;
    margin-bottom: 12px;
}

.about-header-v10 h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.about-version-v10 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-secondary, #f5f5f7);
    padding: 4px 12px;
    border-radius: 12px;
}

.about-desc-v10 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.about-features-v10 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.feature-tag-v10 {
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: #6366f1;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* V10 链接列表 */
.links-list-v10 {
    display: flex;
    flex-direction: column;
}

.link-item-v10 {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

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

.link-item-v10:hover {
    color: var(--accent-color, #6366f1);
}

.link-icon-v10 {
    font-size: 1.3rem;
}

.link-text-v10 {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
}

.link-arrow-v10 {
    font-size: 1.2rem;
    color: var(--text-tertiary);
    transition: transform 0.2s;
}

.link-item-v10:hover .link-arrow-v10 {
    transform: translateX(4px);
}

/* AI客服高亮样式 */
.link-item-v10.highlight {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    border-radius: 10px;
    border-bottom: none !important;
    margin-bottom: 4px;
}

.link-item-v10.highlight:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
}

.link-badge-v10 {
    font-size: 10px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* V10 订阅状态 */
.subscription-status-v10 {
    padding: 16px;
    background: var(--bg-secondary, #f5f5f7);
    border-radius: 14px;
}

/* 深色模式适配 */
body.theme-dark .settings-header-v10 {
    background: var(--gradient-primary);
}

/* 各主题设置页眉颜色 */
body.theme-ocean .settings-header-v10 {
    background: var(--gradient-primary);
}

body.theme-forest .settings-header-v10 {
    background: var(--gradient-primary);
}

body.theme-sunset .settings-header-v10 {
    background: var(--gradient-primary);
}

body.theme-rose .settings-header-v10 {
    background: var(--gradient-primary);
}

body.theme-dark .settings-content-v10 {
    background: var(--bg-primary);
}

body.theme-dark .settings-tabs-v10,
body.theme-dark .settings-card-v10 {
    background: var(--card-bg);
    border-color: var(--border-color);
}

body.theme-dark .settings-tab-v10 {
    background: var(--bg-secondary);
}

body.theme-dark .theme-option-v10,
body.theme-dark .review-stats-v10,
body.theme-dark .tts-config-v10,
body.theme-dark .speed-slider-v10,
body.theme-dark .storage-info-v10 {
    background: var(--bg-secondary);
}

body.theme-dark .input-group-v10 input,
body.theme-dark .input-action-v10 {
    background: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* ========== 旧设置页面样式保留兼容 ========== */

/* 固定的设置操作栏 */
.settings-sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.settings-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

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

.settings-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-action-btn.reset {
    background: var(--gray-100);
    color: var(--gray-600);
}

.settings-action-btn.reset:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.settings-action-btn.save {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.settings-action-btn.save:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.settings-action-btn:active {
    transform: scale(0.96);
}

/* 液态玻璃模式下的固定操作栏 */
body.liquid-glass-mode .settings-sticky-header {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

body.liquid-glass-mode .settings-action-btn.reset {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

body.liquid-glass-mode .settings-action-btn.save {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.85) 0%, rgba(139, 92, 246, 0.85) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 简洁返回按钮头部 */
.settings-header-simple {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    background: white;
    border-bottom: 1px solid var(--gray-100);
}

.back-btn-simple {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn-simple:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.back-btn-simple:active {
    transform: scale(0.95);
}

/* 顶部分组导航 - 大图标 */
.settings-tabs-top {
    display: flex;
    justify-content: space-around;
    background: white;
    padding: 20px 16px;
    gap: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.settings-tab-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    border-radius: 16px;
    background: transparent;
    border: none;
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 80px;
}

.settings-tab-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.settings-tab-icon svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

/* 各分类图标颜色 */
.settings-tab-icon.general {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #6366f1;
}

.settings-tab-icon.audio {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #10b981;
}

.settings-tab-icon.data {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(234, 88, 12, 0.15) 100%);
    color: #f59e0b;
}

.settings-tab-icon.about {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: #3b82f6;
}

.settings-tab-new.active .settings-tab-icon.general {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.settings-tab-new.active .settings-tab-icon.audio {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.settings-tab-new.active .settings-tab-icon.data {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.settings-tab-new.active .settings-tab-icon.about {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.settings-tab-new.active {
    color: var(--gray-900);
}

.settings-tab-new:hover:not(.active) .settings-tab-icon {
    transform: scale(1.05);
}

.settings-tab-new span {
    font-size: 12px;
    font-weight: 600;
}

/* 底部固定操作栏 - 悬浮胶囊样式 */
.settings-bottom-bar {
    position: fixed;
    bottom: 30px;
    left: 20px;
    right: 20px;
    max-width: 360px;
    margin: 0 auto;
    padding: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    gap: 10px;
    z-index: 1001;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease;
}

/* 滚动时隐藏底部栏 */
.settings-bottom-bar.hiding,
.settings-bottom-bar.hidden-bar {
    transform: translateY(150%);
    opacity: 0;
    pointer-events: none;
}

/* 显示时的状态 */
.settings-bottom-bar.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.settings-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.settings-action-btn.reset {
    background: var(--gray-100);
    color: var(--gray-700);
}

.settings-action-btn.reset:hover {
    background: var(--gray-200);
}

.settings-action-btn.save {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.settings-action-btn.save:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.settings-action-btn:active {
    transform: scale(0.98);
}

.settings-action-btn svg {
    flex-shrink: 0;
}

/* 设置底部固定按钮 */
.settings-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 500px;
    margin: 0 auto;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    background: white;
    display: flex;
    gap: 12px;
    z-index: 1001;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 20px 20px 0 0;
}

/* 现代按钮 */
.btn-modern {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-modern.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

.btn-modern.secondary {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 2px solid var(--gray-200);
}

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

.btn-icon {
    font-size: 18px;
}

/* Toast 提示样式 */
.toast-message {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--gray-900);
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 90%;
    text-align: center;
}

.toast-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==================== 滚动条 - 跨浏览器 ==================== */
/* Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) var(--gray-100);
}

/* ==================== 动画 - 跨浏览器 ==================== */
@-webkit-keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

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

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

/* ==================== 响应式设计 - 手机适配 ==================== */

/* 超小屏幕 (iPhone SE, 小型安卓机) */
@media screen and (max-width: 374px) {
    html { font-size: 14px; }
    
    .home-header .header-content {
        padding: 20px 15px 25px;
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .greeting-text h1 { font-size: 20px; }
    .greeting-emoji { font-size: 28px; }
    
    .streak-badge {
        align-self: flex-start;
        padding: 8px 12px;
    }
    
    .module-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .module-card {
        padding: 18px 12px;
    }
    
    .module-icon { font-size: 36px; }
    .module-card h3 { font-size: 14px; }
    .module-card p { font-size: 11px; }
    
    .daily-goals-card {
        border-radius: 18px;
    }
    
    .goals-card-header {
        padding: 18px;
    }
    
    .goals-icon-wrapper {
        width: 42px;
        height: 42px;
    }
    
    .goals-title-text h3 { font-size: 16px; }
    
    /* 居中改进v4: 小屏响应式 */
    .progress-ring-container {
        width: 70px;
        height: 70px;
    }
    
    .progress-ring-container .progress-ring {
        width: 100% !important;
        height: 100% !important;
    }
    
    .progress-ring {
        width: 70px;
        height: 70px;
    }
    
    .progress-percent { font-size: 18px; }
    
    .goal-settings-content {
        max-width: 95%;
        border-radius: 20px;
    }
    
    .goal-item {
        padding: 12px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .goal-item-input input {
        width: 60px;
        padding: 8px 10px;
    }
    
    /* 设置页面超小屏幕优化 */
    .settings-tabs {
        padding: 10px 12px;
        gap: 6px;
    }
    
    .settings-tab {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .settings-tab-icon {
        font-size: 16px;
    }
    
    .settings-panel {
        padding: 16px;
    }
    
    .settings-card-modern {
        padding: 16px;
        border-radius: 16px;
    }
    
    .settings-card-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .theme-selector {
        gap: 8px;
    }
    
    .theme-name {
        font-size: 10px;
    }
    
    .about-logo {
        font-size: 48px;
    }
    
    .about-app-name {
        font-size: 20px;
    }
    
    .about-features {
        grid-template-columns: 1fr 1fr;
    }
    
    /* 底部导航超小屏幕优化 */
    .bottom-nav {
        padding: 6px 12px;
    }
    
    .nav-item {
        padding: 6px 12px;
        min-width: 60px;
    }
    
    .nav-icon-wrapper {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }
    
    .nav-svg {
        width: 20px;
        height: 20px;
    }
    
    .nav-label {
        font-size: 10px;
    }
    
    /* 统计页面超小屏幕优化 */
    .stats-overview-card {
        padding: 18px;
        border-radius: 20px;
    }
    
    .stats-avatar {
        width: 48px;
        height: 48px;
    }
    
    .overview-value {
        font-size: 22px;
    }
    
    .stats-cards-grid {
        gap: 10px;
    }
    
    .stat-card-new {
        padding: 16px;
        border-radius: 16px;
    }
    
    .stat-card-value {
        font-size: 26px;
    }
    
    .review-stat-row {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .review-stat-item {
        flex: 1;
        min-width: 80px;
    }
}

/* 小屏幕手机 (iPhone 6/7/8, 标准安卓机) */
@media screen and (min-width: 375px) and (max-width: 413px) {
    .home-header .header-content {
        padding: 25px 18px 30px;
    }
    
    .greeting-text h1 { font-size: 22px; }
    
    .module-grid {
        gap: 12px;
    }
    
    .module-card {
        padding: 22px 14px;
    }
    
    .module-icon { font-size: 40px; }
    .module-card h3 { font-size: 15px; }
}

/* 中等屏幕手机 (iPhone Plus/Max, 大屏安卓) */
@media screen and (min-width: 414px) and (max-width: 767px) {
    .home-header .header-content {
        padding: 28px 20px 35px;
    }
    
    .module-grid {
        gap: 14px;
    }
    
    .module-card {
        padding: 26px 16px;
    }
}

/* 平板设备 */
@media screen and (min-width: 768px) {
    .container {
        max-width: 600px;
    }
    
    .home-header .header-content {
        padding: 35px 25px 40px;
    }
    
    .greeting-text h1 { font-size: 28px; }
    .greeting-emoji { font-size: 42px; }
    
    .module-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
    
    .module-card {
        padding: 30px 20px;
    }
    
    .module-icon { font-size: 52px; }
    .module-card h3 { font-size: 18px; }
    .module-card p { font-size: 14px; }
    
    .daily-goals-card {
        border-radius: 28px;
    }
    
    .goals-total-progress {
        gap: 30px;
    }
    
    /* v9-11: 大屏响应式进度环 */
    .progress-ring-container {
        width: 100px !important;
        height: 100px !important;
    }
    
    .progress-ring-container .progress-ring {
        width: 100% !important;
        height: 100% !important;
    }
    
    /* v11: 大屏幕数字和百分号放大 */
    .progress-number {
        font-size: 24px !important;
    }
    
    .progress-number.two-digits {
        font-size: 22px !important;
    }
    
    .progress-number.three-digits {
        font-size: 18px !important;
    }
    
    .progress-percent {
        font-size: 13px !important;
    }

    .goal-settings-content {
        max-width: 450px;
    }
    
    /* 设置页面平板优化 */
    .settings-tabs {
        justify-content: center;
        gap: 12px;
    }
    
    .settings-tab {
        padding: 12px 24px;
    }
    
    .theme-selector {
        gap: 16px;
    }
    
    .about-features {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* 底部导航平板优化 */
    .bottom-nav {
        max-width: 600px;
        padding: 10px 30px;
    }
    
    .nav-item {
        padding: 10px 30px;
        min-width: 100px;
    }
    
    .nav-icon-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .nav-svg {
        width: 26px;
        height: 26px;
    }
    
    /* 统计页面平板优化 */
    .stats-overview-card {
        padding: 28px;
    }
    
    .overview-value {
        font-size: 32px;
    }
    
    .stats-cards-grid {
        gap: 16px;
    }
    
    .stat-card-new {
        padding: 24px;
    }
    
    .stat-card-value {
        font-size: 36px;
    }
}

/* 大屏幕/桌面 */
@media screen and (min-width: 1024px) {
    .container {
        max-width: 700px;
    }
    
    .module-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    /* 鼠标悬停效果（仅桌面） */
    .module-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
    }
    
    .goals-settings-btn:hover {
        transform: rotate(90deg);
    }
}

/* 横屏手机优化 */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .home-header .header-content {
        padding: 15px 20px;
    }
    
    .daily-goals-card {
        margin-bottom: 15px;
    }
    
    .goals-card-header {
        padding: 15px;
    }
    
    .goals-total-progress {
        gap: 15px;
    }
    
    /* v9-11: 横屏小屏响应式 */
    .progress-ring-container {
        width: 60px !important;
        height: 60px !important;
    }
    
    .progress-ring-container .progress-ring {
        width: 100% !important;
        height: 100% !important;
    }
    
    /* v11: 横屏时缩小字体 */
    .progress-number {
        font-size: 14px !important;
    }
    
    .progress-percent {
        font-size: 8px !important;
    }
    
    .goals-progress-container {
        padding: 15px;
    }
    
    .modal {
        padding-top: 10px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
}

/* 深色模式支持（可选） */
@media (prefers-color-scheme: dark) {
    /* 可以在这里添加深色模式样式 */
}

/* 减少动画（用户偏好设置） */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        -webkit-animation-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        -webkit-animation-iteration-count: 1 !important;
        animation-iteration-count: 1 !important;
        -webkit-transition-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* 打印样式 */
@media print {
    .home-header, .streak-badge, .goals-settings-btn {
        display: none !important;
    }
}

/* ==================== iOS 特殊优化 ==================== */
/* iOS Safari 底部安全区域 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .container {
        padding-bottom: calc(90px + env(safe-area-inset-bottom));
    }
    
    .modal {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .goal-settings-modal {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* iOS 橡皮筋效果优化 */
.modal-content, .goal-settings-content {
    -webkit-overflow-scrolling: touch;
}

/* ==================== 触摸设备优化 ==================== */
@media (hover: none) and (pointer: coarse) {
    /* 移除悬停效果，因为触摸设备没有悬停 */
    .module-card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }
    
    .goals-settings-btn:hover {
        transform: none;
    }
    
    /* 增大触摸目标 */
    .goals-settings-btn {
        min-width: 48px;
        min-height: 48px;
    }
    
    .goal-close-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    button, .module-card {
        min-height: 44px;
    }
}

/* ==================== 高对比度模式 ==================== */
@media (prefers-contrast: high) {
    :root {
        --primary: #4338ca;
        --gray-500: #4b5563;
    }
    
    .module-card {
        border: 2px solid var(--gray-300);
    }
}

/* ==================== 高级首页头部样式 - 动态时段场景系统 ==================== */
.home-header {
    padding: 32px 20px 45px;
    position: relative;
    overflow: hidden;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
    min-height: 140px;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 天空场景层 ===== */
.header-scene {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

/* 天空渐变背景 */
.sky-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: background 1s ease;
}

/* 早晨 (5:00-7:59) - 日出 */
.home-header[data-time-period="dawn"] .sky-layer {
    background: linear-gradient(180deg, 
        #2d3a4f 0%, 
        #5c6b8a 20%,
        #9baac4 40%,
        #f4c4a1 65%,
        #f9a87a 85%,
        #e8806a 100%);
}

/* 上午 (8:00-11:59) - 明亮的蓝天 */
.home-header[data-time-period="morning"] .sky-layer {
    background: linear-gradient(180deg, 
        #4a90d9 0%, 
        #5da4e8 30%,
        #7bb8f0 60%,
        #a0d4f8 100%);
}

/* 中午 (12:00-13:59) - 正午阳光 */
.home-header[data-time-period="noon"] .sky-layer {
    background: linear-gradient(180deg, 
        #3d8fd9 0%, 
        #5aa8eb 40%,
        #8bc8f5 70%,
        #c9e8fc 100%);
}

/* 下午 (14:00-17:59) - 温暖的天空 */
.home-header[data-time-period="afternoon"] .sky-layer {
    background: linear-gradient(180deg, 
        #5a9bd5 0%, 
        #72aee0 30%,
        #9dc8ea 60%,
        #dce9f5 100%);
}

/* 傍晚 (18:00-19:59) - 日落 */
.home-header[data-time-period="sunset"] .sky-layer {
    background: linear-gradient(180deg, 
        #2e4a6d 0%, 
        #5d6f8e 15%,
        #b47a6a 35%,
        #e8a87a 55%,
        #f5c485 75%,
        #f9d9a0 100%);
}

/* 晚上 (20:00-21:59) - 夜幕降临 */
.home-header[data-time-period="evening"] .sky-layer {
    background: linear-gradient(180deg, 
        #0f1a2e 0%, 
        #1a2744 30%,
        #2d3e5c 60%,
        #3d5070 100%);
}

/* 深夜 (22:00-4:59) - 繁星夜空 */
.home-header[data-time-period="night"] .sky-layer {
    background: linear-gradient(180deg, 
        #0a0f1e 0%, 
        #111b30 40%,
        #182540 70%,
        #1e2d4a 100%);
}

/* ===== 天体 (太阳/月亮) ===== */
.celestial-body {
    position: absolute;
    border-radius: 50%;
    transition: all 1s ease;
}

/* 太阳样式 */
.home-header[data-time-period="dawn"] .celestial-body,
.home-header[data-time-period="morning"] .celestial-body,
.home-header[data-time-period="noon"] .celestial-body,
.home-header[data-time-period="afternoon"] .celestial-body,
.home-header[data-time-period="sunset"] .celestial-body {
    width: 32px;
    height: 32px;
    background: radial-gradient(circle, #fff9e6 0%, #ffd54f 40%, #ffb300 100%);
    box-shadow: 
        0 0 20px #ffd54f,
        0 0 40px rgba(255, 193, 7, 0.5),
        0 0 60px rgba(255, 152, 0, 0.3);
}

.home-header[data-time-period="dawn"] .celestial-body {
    right: 15%;
    top: 70%;
    opacity: 0.9;
    background: radial-gradient(circle, #fff5e6 0%, #ffb74d 40%, #ff8a65 100%);
    box-shadow: 
        0 0 30px #ffb74d,
        0 0 50px rgba(255, 138, 101, 0.6);
}

.home-header[data-time-period="morning"] .celestial-body {
    right: 12%;
    top: 30%;
}

.home-header[data-time-period="noon"] .celestial-body {
    right: 18%;
    top: 15%;
    width: 36px;
    height: 36px;
    box-shadow: 
        0 0 25px #ffd54f,
        0 0 50px rgba(255, 193, 7, 0.6),
        0 0 80px rgba(255, 152, 0, 0.4);
}

.home-header[data-time-period="afternoon"] .celestial-body {
    right: 8%;
    top: 25%;
    opacity: 0.95;
}

.home-header[data-time-period="sunset"] .celestial-body {
    right: 10%;
    top: 60%;
    width: 38px;
    height: 38px;
    background: radial-gradient(circle, #ffecb3 0%, #ff9800 50%, #e65100 100%);
    box-shadow: 
        0 0 40px #ff9800,
        0 0 80px rgba(230, 81, 0, 0.5);
}

/* 月亮样式 */
.home-header[data-time-period="evening"] .celestial-body,
.home-header[data-time-period="night"] .celestial-body {
    width: 28px;
    height: 28px;
    background: radial-gradient(circle at 70% 35%, #fafafa 0%, #e8e8e8 50%, #d0d0d0 100%);
    box-shadow: 
        0 0 15px rgba(255, 255, 255, 0.5),
        0 0 30px rgba(200, 200, 220, 0.3),
        inset -4px 2px 6px rgba(0, 0, 0, 0.1);
}

.home-header[data-time-period="evening"] .celestial-body {
    right: 15%;
    top: 20%;
}

.home-header[data-time-period="night"] .celestial-body {
    right: 12%;
    top: 18%;
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 40px rgba(200, 200, 220, 0.4),
        inset -4px 2px 6px rgba(0, 0, 0, 0.1);
}

/* ===== 天空装饰 (云朵/星星) ===== */
.sky-decorations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* 云朵 - 白天时段 */
.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50px;
    animation: float-cloud 20s ease-in-out infinite;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud-1 {
    width: 40px;
    height: 14px;
    top: 25%;
    left: -5%;
    animation-duration: 25s;
}
.cloud-1::before {
    width: 18px;
    height: 18px;
    top: -8px;
    left: 8px;
}
.cloud-1::after {
    width: 14px;
    height: 14px;
    top: -6px;
    left: 22px;
}

.cloud-2 {
    width: 50px;
    height: 16px;
    top: 40%;
    left: -8%;
    animation-duration: 30s;
    animation-delay: -5s;
}
.cloud-2::before {
    width: 22px;
    height: 22px;
    top: -10px;
    left: 10px;
}
.cloud-2::after {
    width: 16px;
    height: 16px;
    top: -7px;
    left: 28px;
}

.cloud-3 {
    width: 35px;
    height: 12px;
    top: 55%;
    left: -3%;
    opacity: 0.7;
    animation-duration: 22s;
    animation-delay: -10s;
}
.cloud-3::before {
    width: 15px;
    height: 15px;
    top: -7px;
    left: 6px;
}
.cloud-3::after {
    width: 11px;
    height: 11px;
    top: -5px;
    left: 18px;
}

@keyframes float-cloud {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(100vw + 100px)); }
}

/* 星星 - 夜间时段 */
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s ease-in-out infinite;
}

.star-1 { width: 2px; height: 2px; top: 15%; left: 10%; animation-delay: 0s; }
.star-2 { width: 3px; height: 3px; top: 25%; left: 25%; animation-delay: 0.5s; }
.star-3 { width: 2px; height: 2px; top: 20%; left: 40%; animation-delay: 1s; }
.star-4 { width: 2px; height: 2px; top: 35%; left: 55%; animation-delay: 0.3s; }
.star-5 { width: 3px; height: 3px; top: 18%; left: 70%; animation-delay: 0.8s; }
.star-6 { width: 2px; height: 2px; top: 30%; left: 85%; animation-delay: 1.2s; }
.star-7 { width: 2px; height: 2px; top: 45%; left: 15%; animation-delay: 0.7s; }
.star-8 { width: 3px; height: 3px; top: 50%; left: 35%; animation-delay: 1.5s; }
.star-9 { width: 2px; height: 2px; top: 40%; left: 78%; animation-delay: 0.2s; }
.star-10 { width: 2px; height: 2px; top: 55%; left: 92%; animation-delay: 1.8s; }

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

/* 隐藏云朵/星星 */
.home-header[data-time-period="dawn"] .star,
.home-header[data-time-period="morning"] .star,
.home-header[data-time-period="noon"] .star,
.home-header[data-time-period="afternoon"] .star,
.home-header[data-time-period="sunset"] .star {
    display: none;
}

.home-header[data-time-period="evening"] .cloud,
.home-header[data-time-period="night"] .cloud {
    display: none;
}

/* 日出/日落时云朵变色 */
.home-header[data-time-period="dawn"] .cloud {
    background: rgba(255, 200, 170, 0.7);
}
.home-header[data-time-period="sunset"] .cloud {
    background: rgba(255, 180, 140, 0.8);
}

/* ===== 远景山脉 ===== */
.mountain-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
}

.mountains {
    width: 100%;
    height: 100%;
}

.mountain-far {
    transition: fill 0.8s ease;
}

.mountain-near {
    transition: fill 0.8s ease;
}

/* 各时段山脉颜色 */
.home-header[data-time-period="dawn"] .mountain-far { fill: rgba(100, 80, 90, 0.5); }
.home-header[data-time-period="dawn"] .mountain-near { fill: rgba(70, 55, 65, 0.6); }

.home-header[data-time-period="morning"] .mountain-far { fill: rgba(100, 140, 180, 0.4); }
.home-header[data-time-period="morning"] .mountain-near { fill: rgba(80, 120, 160, 0.5); }

.home-header[data-time-period="noon"] .mountain-far { fill: rgba(120, 160, 200, 0.35); }
.home-header[data-time-period="noon"] .mountain-near { fill: rgba(100, 140, 180, 0.45); }

.home-header[data-time-period="afternoon"] .mountain-far { fill: rgba(130, 160, 190, 0.4); }
.home-header[data-time-period="afternoon"] .mountain-near { fill: rgba(110, 140, 170, 0.5); }

.home-header[data-time-period="sunset"] .mountain-far { fill: rgba(90, 70, 80, 0.5); }
.home-header[data-time-period="sunset"] .mountain-near { fill: rgba(60, 45, 55, 0.6); }

.home-header[data-time-period="evening"] .mountain-far { fill: rgba(40, 50, 70, 0.6); }
.home-header[data-time-period="evening"] .mountain-near { fill: rgba(25, 35, 55, 0.7); }

.home-header[data-time-period="night"] .mountain-far { fill: rgba(20, 30, 50, 0.7); }
.home-header[data-time-period="night"] .mountain-near { fill: rgba(10, 20, 40, 0.8); }

/* ===== 地面层 ===== */
.ground-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 15px;
    transition: background 0.8s ease;
}

.home-header[data-time-period="dawn"] .ground-layer { background: linear-gradient(180deg, rgba(80, 65, 70, 0.6) 0%, rgba(60, 50, 55, 0.8) 100%); }
.home-header[data-time-period="morning"] .ground-layer { background: linear-gradient(180deg, rgba(90, 130, 90, 0.5) 0%, rgba(70, 110, 70, 0.7) 100%); }
.home-header[data-time-period="noon"] .ground-layer { background: linear-gradient(180deg, rgba(100, 140, 100, 0.45) 0%, rgba(80, 120, 80, 0.65) 100%); }
.home-header[data-time-period="afternoon"] .ground-layer { background: linear-gradient(180deg, rgba(95, 130, 95, 0.5) 0%, rgba(75, 110, 75, 0.7) 100%); }
.home-header[data-time-period="sunset"] .ground-layer { background: linear-gradient(180deg, rgba(70, 55, 60, 0.6) 0%, rgba(50, 40, 45, 0.8) 100%); }
.home-header[data-time-period="evening"] .ground-layer { background: linear-gradient(180deg, rgba(30, 40, 55, 0.7) 0%, rgba(20, 30, 45, 0.9) 100%); }
.home-header[data-time-period="night"] .ground-layer { background: linear-gradient(180deg, rgba(15, 25, 40, 0.8) 0%, rgba(10, 18, 30, 0.95) 100%); }

/* ===== 原有覆盖层保留 ===== */
.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.greeting-section {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ===== 新的场景图标 ===== */
.scene-icon-ring {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
}

.scene-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 自定义头像样式 */
.scene-icon-ring.custom-avatar {
    cursor: pointer;
    transition: all 0.3s ease;
}

.scene-icon-ring.custom-avatar:hover {
    transform: scale(1.05);
}

.scene-icon-ring.custom-avatar:active {
    transform: scale(0.95);
}

.avatar-emoji-display {
    font-size: 28px;
    line-height: 1;
}

.avatar-image-display {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

/* 不同时段的图标容器样式调整 */
.home-header[data-time-period="night"] .scene-icon-ring,
.home-header[data-time-period="evening"] .scene-icon-ring {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.home-header[data-time-period="dawn"] .scene-icon-ring,
.home-header[data-time-period="sunset"] .scene-icon-ring {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

.greeting-text h1 {
    color: white;
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 4px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.date-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin: 0;
}

/* 头部右侧区域 */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* 时间显示 */
.time-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.time-display:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.02);
}

.time-display:active {
    transform: scale(0.98);
}

.time-main {
    color: white;
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.time-zone {
    color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* 连续天数徽章 */
.streak-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.streak-badge:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.28);
}

/* 徽章闪光效果 */
.streak-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: badgeShine 3s ease-in-out infinite;
}

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

.streak-icon-wrap {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.streak-flame {
    filter: drop-shadow(0 2px 4px rgba(249, 115, 22, 0.4));
    animation: flameFlicker 1.5s ease-in-out infinite;
}

@keyframes flameFlicker {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.05) rotate(-3deg); }
    50% { transform: scale(0.95) rotate(3deg); }
    75% { transform: scale(1.08) rotate(-2deg); }
}

.streak-count {
    color: white;
    font-size: 18px;
    font-weight: 800;
}

.streak-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
}

/* ==================== 成就徽章系统 ==================== */
.achievement-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.achievement-badge:hover {
    transform: scale(1.1) rotate(-3deg);
}

/* 徽章等级样式 */
.achievement-badge.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.4);
}

.achievement-badge.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: #333;
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.4);
}

.achievement-badge.gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: #333;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

.achievement-badge.platinum {
    background: linear-gradient(135deg, #e5e4e2 0%, #b8b8b8 100%);
    color: #333;
    box-shadow: 0 4px 15px rgba(229, 228, 226, 0.5);
}

.achievement-badge.diamond {
    background: linear-gradient(135deg, #b9f2ff 0%, #7dd3fc 100%);
    color: #0369a1;
    box-shadow: 0 4px 20px rgba(125, 211, 252, 0.5);
}

/* 徽章闪烁星光效果 */
.achievement-badge::before {
    content: '✦';
    position: absolute;
    font-size: 8px;
    opacity: 0;
    animation: starSparkle 2s ease-in-out infinite;
}

.achievement-badge::after {
    content: '✦';
    position: absolute;
    font-size: 6px;
    opacity: 0;
    animation: starSparkle 2s ease-in-out infinite 0.5s;
}

.achievement-badge.gold::before,
.achievement-badge.platinum::before,
.achievement-badge.diamond::before {
    color: inherit;
    top: 5px;
    right: 8px;
}

.achievement-badge.gold::after,
.achievement-badge.platinum::after,
.achievement-badge.diamond::after {
    color: inherit;
    bottom: 8px;
    left: 10px;
}

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

/* 解锁徽章动画 */
.achievement-badge.unlocked {
    animation: badgeUnlock 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgeUnlock {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* 徽章图标容器 */
.achievement-icon {
    width: 20px;
    height: 20px;
    margin-right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 进度徽章 */
.progress-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.progress-badge:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.progress-badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    position: relative;
}

/* 进度环动画 */
.progress-badge-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 3px solid var(--gray-200);
}

.progress-badge-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    animation: progressRing 2s linear infinite;
}

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

.progress-badge-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-align: center;
}

/* ==================== 名人名言卡片样式 ==================== */
.quote-card {
    position: relative;
    z-index: 2;
    margin: 16px 0 0 0;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quote-card:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.quote-card:active {
    transform: scale(0.99);
}

.quote-icon {
    font-size: 18px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.quote-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
    flex: 1;
    font-style: italic;
}

.quote-author {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 夜间时段名言卡片样式调整 */
.home-header[data-time-period="night"] .quote-card,
.home-header[data-time-period="evening"] .quote-card {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.home-header[data-time-period="night"] .quote-card:hover,
.home-header[data-time-period="evening"] .quote-card:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ==================== 今日目标卡片高级样式 ==================== */
.daily-goals-card {
    background: white;
    border-radius: 24px;
    margin: -20px 0 0 0;
    padding: 24px;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.goals-card-header {
    margin-bottom: 20px;
}

.goals-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.goals-title-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.goals-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.goals-icon-svg {
    filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.3));
}

.goals-title-text h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--gray-900);
}

.goals-title-text p {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: var(--gray-500);
}

.goals-settings-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gray-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--gray-500);
}

.goals-settings-btn:hover {
    background: var(--primary);
    color: white;
    transform: rotate(45deg);
}

/* 总进度环区域 */
.goals-total-progress {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
}

/* 版本4-8已在上方定义 .progress-ring-container */

.progress-ring-bg {
    stroke: #e5e7eb;
}

.progress-ring-fill {
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 旧的文字样式(已不使用，保留兼容) */
.progress-ring-text {
    display: none;
}

.progress-ring-text span {
    font-size: 20px;
    font-weight: 700;
    color: #6366f1;
}

.progress-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.completed-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.encourage-text {
    font-size: 13px;
    color: var(--gray-500);
}

/* 目标进度条 */
.goals-progress-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.goal-progress-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--gray-50);
    border-radius: 14px;
    transition: all 0.3s;
}

.goal-progress-item:hover {
    background: var(--gray-100);
}

.goal-progress-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.goal-progress-icon svg {
    width: 20px;
    height: 20px;
}

.goal-progress-icon.vocab { background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%); }
.goal-progress-icon.vocab svg { stroke: #7c3aed; }

.goal-progress-icon.listen { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
.goal-progress-icon.listen svg { stroke: #2563eb; }

.goal-progress-icon.speak { background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%); }
.goal-progress-icon.speak svg { stroke: #db2777; }

.goal-progress-icon.read { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); }
.goal-progress-icon.read svg { stroke: #059669; }

.goal-progress-info {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.goal-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    width: 100%;
}

.goal-progress-bar {
    width: 100%;
}

.goal-progress-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.goal-progress-count {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

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

.goal-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.goal-progress-fill.vocabulary { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.goal-progress-fill.listening { background: linear-gradient(90deg, #3b82f6, #06b6d4); }
.goal-progress-fill.speaking { background: linear-gradient(90deg, #ec4899, #f43f5e); }
.goal-progress-fill.reading { background: linear-gradient(90deg, #14b8a6, #10b981); }

/* ==================== 模块通用新样式 ==================== */

/* 模块头部变体 */
.modal-header-vocab,
.modal-header-listen,
.modal-header-speak,
.modal-header-read,
.modal-header-review,
.modal-header-resource,
.modal-header-stats {
    background: var(--gradient-primary) !important;
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.modal-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
}

.modal-icon-badge svg { stroke: white; }

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin: 0;
}

/* 阅读模块新样式 */
.passage-card-new {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.passage-card-new:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

/* 文章卡片装饰线条 */
.passage-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #10b981, #14b8a6, #3b82f6);
    transition: width 0.3s ease;
}

.passage-card-new:hover::before {
    width: 6px;
}

/* 文章卡片背景装饰 */
.passage-card-new::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 60%;
    height: 120%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 60%);
    transition: all 0.5s ease;
    pointer-events: none;
}

.passage-card-new:hover::after {
    transform: translate(-10%, 10%) scale(1.2);
    opacity: 0.8;
}

.passage-tags-new {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.tag-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.tag-badge:hover::before {
    left: 100%;
}

.tag-badge:hover {
    transform: scale(1.05);
}

.tag-badge.primary { background: #ede9fe; color: #7c3aed; }
.tag-badge.warning { background: #fef3c7; color: #d97706; }
.tag-badge.success { background: #d1fae5; color: #059669; }

.passage-title-new {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 12px 0;
    line-height: 1.4;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.passage-card-new:hover .passage-title-new {
    color: #10b981;
}

.passage-meta-new {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
    position: relative;
    z-index: 1;
}

/* meta区域下划线动画 */
.passage-meta-new::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981, #3b82f6);
    transition: width 0.5s ease;
}

.passage-card-new:hover .passage-meta-new::after {
    width: 100%;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-500);
    transition: all 0.3s ease;
}

.meta-item:hover {
    color: var(--gray-700);
}

.meta-item svg { 
    color: var(--gray-400);
    transition: all 0.3s ease;
}

.meta-item:hover svg {
    color: #10b981;
    transform: scale(1.1);
}

.passage-text-new {
    font-size: 16px;
    line-height: 1.9;
    color: var(--gray-700);
    text-align: justify;
    position: relative;
    z-index: 1;
}

/* 阅读词汇区新样式 */
.vocab-section-new {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.section-head svg { color: var(--primary); }

.section-head h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
}

.vocab-list-new {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 阅读题目卡新样式 */
.questions-card-new {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.questions-card-new:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 题目卡装饰 */
.questions-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.questions-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.questions-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
}

.questions-icon-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    animation: questionIconPulse 2s ease-in-out infinite;
    z-index: -1;
}

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

.questions-card-new:hover .questions-icon-wrap {
    transform: rotate(-5deg) scale(1.1);
}

.questions-icon-wrap svg { stroke: #d97706; }

.questions-header h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-800);
}

.questions-header p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--gray-500);
}

.questions-list-new {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.btn-submit-answer {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit-answer::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;
}

.btn-submit-answer:hover::before {
    left: 100%;
}

.btn-submit-answer:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

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

/* 复习模块新样式 */
.review-content-new {
    padding: 20px;
}

.review-plan-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.review-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* 复习卡片装饰背景 */
.review-plan-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 60%);
    pointer-events: none;
    transition: all 0.5s ease;
}

.review-plan-card:hover::before {
    transform: scale(1.2);
}

.plan-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
    position: relative;
    z-index: 1;
}

.plan-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
}

/* 计划图标脉冲 */
.plan-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    animation: planIconPulse 2.5s ease-in-out infinite;
    z-index: -1;
}

@keyframes planIconPulse {
    0%, 100% { transform: scale(1); opacity: 0; }
    50% { transform: scale(1.25); opacity: 0.25; }
}

.review-plan-card:hover .plan-icon {
    transform: rotate(-8deg) scale(1.1);
}

.plan-icon svg { stroke: #d97706; }

.plan-header h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-800);
}

.plan-header p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--gray-500);
}

.schedule-list-new {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.schedule-item-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--gray-50);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

/* 进度条动画效果 */
.schedule-item-new::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #f97316);
    transition: width 0.5s ease;
}

.schedule-item-new:hover::after {
    width: 100%;
}

.schedule-item-new:hover {
    background: var(--gray-100);
    transform: translateX(8px);
}

.schedule-item-new.today {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.schedule-item-new.today::after {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

/* 今日项目特殊动画 */
.schedule-item-new.today::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: #3b82f6;
    border-radius: 0 4px 4px 0;
    animation: todayIndicator 1.5s ease-in-out infinite;
}

@keyframes todayIndicator {
    0%, 100% { opacity: 1; height: 60%; }
    50% { opacity: 0.5; height: 80%; }
}

.schedule-date-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.schedule-date-wrap svg { 
    color: var(--gray-400);
    transition: all 0.3s ease;
}

.schedule-item-new:hover .schedule-date-wrap svg {
    color: #f59e0b;
    transform: scale(1.15);
}

.schedule-count-badge {
    padding: 6px 12px;
    background: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.schedule-item-new:hover .schedule-count-badge {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-start-review {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 按钮闪光效果 */
.btn-start-review::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: reviewBtnShine 3s ease-in-out infinite;
}

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

.btn-start-review:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.45);
}

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

/* 资源模块新样式 */
.resources-content-new {
    padding: 20px;
}

.tab-group-new {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--gray-100);
    padding: 6px;
    border-radius: 14px;
}

.tab-btn-new {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn-new.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-btn-new svg { flex-shrink: 0; }

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

/* 统计图标徽章新颜色 */
.modal-icon-badge.stats { background: rgba(255, 255, 255, 0.2); }
.modal-icon-badge.vocab { background: rgba(255, 255, 255, 0.2); }
.modal-icon-badge.listen { background: rgba(255, 255, 255, 0.2); }
.modal-icon-badge.speak { background: rgba(255, 255, 255, 0.2); }
.modal-icon-badge.read { background: rgba(255, 255, 255, 0.2); }
.modal-icon-badge.review { background: rgba(255, 255, 255, 0.2); }
.modal-icon-badge.resource { background: rgba(255, 255, 255, 0.2); }

/* 统计栏紫色图标 */
.stat-icon-wrap.purple {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
}
.stat-icon-wrap.purple svg { stroke: #7c3aed; }

/* ==================== 模块统计栏新样式 ==================== */
.module-stats-bar-new {
    display: flex;
    justify-content: space-around;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid var(--gray-100);
    gap: 8px;
}

.stat-item-new {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: 14px;
    flex: 1;
    max-width: 140px;
}

.stat-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-wrap.blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}
.stat-icon-wrap.blue svg { stroke: #2563eb; }

.stat-icon-wrap.green {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}
.stat-icon-wrap.green svg { stroke: #059669; }

.stat-icon-wrap.orange {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
}
.stat-icon-wrap.orange svg { stroke: #ea580c; }

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-info .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-info .stat-label {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 500;
}

/* ==================== 听力模块新样式 ==================== */
.listening-content {
    padding: 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: calc(100vh - 160px);
}

/* ===== 精听训练 - 高级播放器UI ===== */
.audio-player-card-new {
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
    border-radius: 28px;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 12px 40px rgba(59, 130, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.08);
    position: relative;
    overflow: hidden;
}

.audio-player-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4, #8b5cf6, #3b82f6);
    background-size: 300% 100%;
    animation: gradientShift 4s ease infinite;
}

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

.audio-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
}

.audio-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 
        0 8px 24px rgba(59, 130, 246, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
}

.audio-icon-animated {
    animation: iconFloat 3s ease-in-out infinite;
}

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

.audio-icon-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 22px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    opacity: 0;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 0.15; transform: scale(1.1); }
}

.audio-icon-wrap svg {
    stroke: white;
    fill: none;
    position: relative;
    z-index: 1;
}

.audio-info {
    flex: 1;
}

.audio-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
}

.audio-desc {
    font-size: 14px;
    color: var(--gray-500);
    margin: 0;
}

.audio-controls-new {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 24px;
}

/* 速度调节按钮 - 高级版 */
.speed-btn-new {
    width: auto;
    height: auto;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1.5px solid rgba(99, 102, 241, 0.15);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--gray-500);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.speed-btn-new:hover {
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--primary);
    background: linear-gradient(180deg, #ffffff 0%, #eef2ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.15);
}

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

.speed-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.speed-btn-new:hover .speed-btn-icon {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
}

.speed-btn-minus:hover .speed-btn-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.speed-btn-minus:hover .speed-btn-icon svg {
    stroke: #d97706;
}

.speed-btn-plus:hover .speed-btn-icon {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.speed-btn-plus:hover .speed-btn-icon svg {
    stroke: #059669;
}

.speed-btn-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* 播放按钮 - 高级版 */
.play-btn-premium {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    position: relative;
    box-shadow: 
        0 8px 32px rgba(37, 99, 235, 0.4),
        0 2px 8px rgba(37, 99, 235, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.15),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.play-btn-premium:hover {
    transform: scale(1.08);
    box-shadow: 
        0 12px 40px rgba(37, 99, 235, 0.5),
        0 4px 12px rgba(37, 99, 235, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.play-btn-premium:active {
    transform: scale(0.98);
}

.play-btn-glow {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: linear-gradient(145deg, #3b82f6, #06b6d4);
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.3s;
    z-index: 0;
}

.play-btn-premium:hover .play-btn-glow {
    opacity: 0.4;
}

.play-btn-premium.playing .play-btn-glow {
    opacity: 0.5;
    animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.play-btn-ripple {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    opacity: 0;
    z-index: 1;
}

.play-btn-premium.playing .play-btn-ripple {
    animation: rippleOut 1.5s ease-out infinite;
}

@keyframes rippleOut {
    0% { transform: scale(0.8); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

.play-btn-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn-inner .play-icon {
    transition: all 0.3s;
    margin-left: 4px; /* 视觉居中调整 */
}

.play-btn-inner .pause-icon {
    transition: all 0.3s;
}

.play-btn-premium.playing .play-icon {
    display: none;
}

.play-btn-premium.playing .pause-icon {
    display: block !important;
}

/* 声波动画 */
.play-btn-sound-waves {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.3s;
}

.play-btn-premium.playing .play-btn-sound-waves {
    opacity: 1;
}

.play-btn-sound-waves span {
    width: 3px;
    height: 12px;
    background: linear-gradient(180deg, #3b82f6, #06b6d4);
    border-radius: 2px;
    animation: soundWave 0.6s ease-in-out infinite;
}

.play-btn-sound-waves span:nth-child(1) {
    animation-delay: 0s;
    height: 8px;
}

.play-btn-sound-waves span:nth-child(2) {
    animation-delay: 0.15s;
    height: 14px;
}

.play-btn-sound-waves span:nth-child(3) {
    animation-delay: 0.3s;
    height: 10px;
}

@keyframes soundWave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1.2); }
}

/* 速度显示 - 高级版 */
.speed-display-new {
    text-align: center;
}

.speed-indicator {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.speed-track {
    width: 80px;
    height: 6px;
    background: linear-gradient(90deg, #e2e8f0, #cbd5e1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.speed-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 33%; /* 默认1.0x对应的位置 */
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.speed-badge-new {
    display: inline-flex;
    align-items: baseline;
    padding: 6px 14px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #4f46e5;
    min-width: 54px;
    justify-content: center;
}

.dictation-card-new {
    background: white;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.dictation-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.dictation-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dictation-icon svg {
    stroke: #d97706;
}

.dictation-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-800);
}

.dictation-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--gray-500);
}

.blank-area-new {
    padding: 20px;
    background: var(--gray-50);
    border-radius: 16px;
    margin-bottom: 20px;
    min-height: 100px;
    font-size: 16px;
    line-height: 2;
    color: var(--gray-700);
}

.blank-area-new input {
    border: none;
    border-bottom: 2px solid var(--primary);
    background: transparent;
    padding: 4px 8px;
    margin: 0 4px;
    min-width: 80px;
    font-size: 16px;
    color: var(--primary);
    font-weight: 600;
    outline: none;
    transition: border-color 0.3s;
}

.blank-area-new input:focus {
    border-bottom-color: #8b5cf6;
}

.blank-area-new input.correct {
    border-bottom-color: #10b981;
    color: #059669;
}

.blank-area-new input.incorrect {
    border-bottom-color: #ef4444;
    color: #dc2626;
}

.btn-check-answer {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: all 0.3s;
}

.btn-check-answer:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* ==================== 口语模块新样式 ==================== */
.speaking-module-content {
    padding: 20px;
    background: linear-gradient(180deg, #fdf2f8 0%, #fce7f3 100%);
    min-height: calc(100vh - 160px);
}

.sentence-card-new {
    background: white;
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 30px rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.1);
}

.sentence-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
}

.sentence-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sentence-icon svg {
    stroke: #db2777;
    width: 18px;
    height: 18px;
}

.target-sentence {
    font-size: 20px;
    line-height: 1.7;
    color: var(--gray-800);
    margin: 0 0 20px 0;
    font-weight: 500;
}

.sentence-actions {
    display: flex;
    gap: 12px;
}

.btn-listen, .btn-next {
    flex: 1;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-listen {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #db2777;
    border: 2px solid rgba(219, 39, 119, 0.2);
}

.btn-listen:hover {
    background: linear-gradient(135deg, #fbcfe8 0%, #f9a8d4 100%);
    border-color: rgba(219, 39, 119, 0.3);
}

.btn-next {
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4);
}

/* ==================== 录音按钮 - 高级版 v2 ==================== */
.record-section {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fdf2f8 100%);
    border-radius: 28px;
    margin-bottom: 20px;
    box-shadow: 
        0 8px 32px rgba(236, 72, 153, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.record-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ec4899, #f43f5e, #f472b6, #ec4899);
    background-size: 300% 100%;
    animation: gradientShift 4s ease infinite;
}

.record-btn-new {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #ec4899 0%, #db2777 50%, #be185d 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    position: relative;
    box-shadow: 
        0 12px 40px rgba(236, 72, 153, 0.4),
        0 4px 12px rgba(236, 72, 153, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.15),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto 20px;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 录音按钮外圈光晕 */
.record-btn-new::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ec4899, #f472b6);
    opacity: 0;
    filter: blur(15px);
    transition: opacity 0.3s ease;
    z-index: -1;
}

.record-btn-new:hover::before {
    opacity: 0.5;
}

/* 录音按钮内圈脉冲 */
.record-btn-new::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    opacity: 0;
    animation: none;
}

.record-btn-new.recording::after {
    animation: recordPulse 1.5s ease-out infinite;
}

@keyframes recordPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

.record-btn-new:hover {
    transform: scale(1.06);
    box-shadow: 
        0 16px 50px rgba(236, 72, 153, 0.45),
        0 6px 16px rgba(236, 72, 153, 0.35),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.record-btn-new:active,
.record-btn-new.recording {
    transform: scale(0.96);
    box-shadow: 
        0 6px 25px rgba(236, 72, 153, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(145deg, #db2777 0%, #be185d 50%, #9d174d 100%);
}

.record-btn-inner {
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.record-btn-inner svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.record-btn-new.recording .record-btn-inner svg {
    animation: micPulse 0.8s ease-in-out infinite;
}

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

.record-btn-new span {
    font-size: 13px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.record-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-500);
    margin: 0;
    padding: 10px 20px;
    background: rgba(236, 72, 153, 0.05);
    border-radius: 20px;
    display: inline-flex;
}

.record-hint svg {
    color: #ec4899;
}

.recording-indicator-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-radius: 30px;
    color: #dc2626;
    font-weight: 700;
    margin-top: 20px;
    animation: indicatorPulse 1.5s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

@keyframes indicatorPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2); }
    50% { transform: scale(1.02); box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3); }
}

.recording-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    animation: dotBlink 1s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

@keyframes dotBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.result-card-new {
    background: white;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(236, 72, 153, 0.1);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.result-header svg {
    stroke: var(--gray-400);
}

.result-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-600);
}

.recognized-text {
    font-size: 17px;
    line-height: 1.6;
    color: var(--gray-700);
    margin: 0 0 20px 0;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 14px;
}

.score-section {
    text-align: center;
    padding: 20px 0;
}

.score-circle {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

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

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

.score-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
}

.score-unit {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}

.score-label {
    margin: 0;
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}

.speaking-feedback-new {
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 14px;
    font-size: 14px;
    color: #065f46;
}

/* ==================== 阅读模块新样式 ==================== */
.reading-content {
    padding: 20px;
    background: linear-gradient(180deg, #f0fdfa 0%, #ccfbf1 100%);
    min-height: calc(100vh - 160px);
}

.reading-list {
    background: white;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.passage-area {
    margin-top: 0;
}

/* 反馈样式更新 */
.feedback-new {
    padding: 16px;
    border-radius: 14px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
}

.feedback-new.correct {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.feedback-new.incorrect {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ==================== 学习资源模块样式 ==================== */
.resources-content-new {
    padding: 20px;
    background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%);
    min-height: calc(100vh - 120px);
}

.resource-category-card {
    background: white;
    border-radius: 20px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.resource-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
}

.category-icon {
    font-size: 24px;
}

.category-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-800);
    flex: 1;
}

.category-count {
    font-size: 13px;
    color: var(--gray-500);
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.resource-items {
    padding: 12px;
}

.resource-item-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 14px;
    margin-bottom: 10px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.resource-item-card:last-child {
    margin-bottom: 0;
}

.resource-item-card:hover {
    background: white;
    border-color: var(--primary-light);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
}

.resource-item-card.online:hover {
    border-color: #06b6d4;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.15);
}

.resource-item-main {
    flex: 1;
    min-width: 0;
}

.resource-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-item-source {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gray-500);
}

.resource-item-source svg {
    color: var(--gray-400);
    flex-shrink: 0;
}

.resource-item-desc {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-item-arrow {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
}

.resource-item-arrow svg {
    color: #7c3aed;
}

.resource-item-card:hover .resource-item-arrow {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.resource-item-card:hover .resource-item-arrow svg {
    color: white;
}

.resource-item-card.online .resource-item-arrow {
    background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%);
}

.resource-item-card.online .resource-item-arrow svg {
    color: #0891b2;
}

.resource-item-card.online:hover .resource-item-arrow {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.resource-item-card.online:hover .resource-item-arrow svg {
    color: white;
}

/* ==================== 2024 高级 UI 增强 ==================== */

/* 玻璃态卡片 */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
}

/* 发光按钮 */
.btn-glow {
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
}

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

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

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

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

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

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

.pulse-ring {
    position: relative;
}

.pulse-ring::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid var(--primary);
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 渐变边框 */
.gradient-border {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient-primary);
    border-radius: inherit;
    z-index: -1;
}

/* 卡片悬浮效果 */
.card-hover {
    transition: all 0.3s var(--ease-out);
}

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

/* 波纹效果 */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.ripple:active::after {
    animation: ripple 0.6s ease-out;
}

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

/* ==================== 高级骨架屏加载系统 ==================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

/* 骨架屏闪光覆盖层 */
.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: skeletonShine 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes skeletonShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 卡片骨架屏 */
.skeleton-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.skeleton-card .skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-card .skeleton-title {
    height: 20px;
    width: 60%;
    border-radius: 10px;
    margin-bottom: 12px;
}

.skeleton-card .skeleton-text {
    height: 14px;
    width: 100%;
    border-radius: 7px;
    margin-bottom: 8px;
}

.skeleton-card .skeleton-text:last-child {
    width: 80%;
}

@keyframes skeletonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 列表项骨架屏 */
.skeleton-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.skeleton-list-item .skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-list-item .skeleton-lines {
    flex: 1;
}

.skeleton-list-item .skeleton-line {
    height: 12px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.skeleton-list-item .skeleton-line:first-child {
    width: 70%;
}

.skeleton-list-item .skeleton-line:last-child {
    width: 40%;
    margin-bottom: 0;
}

/* 统计卡片骨架屏 */
.skeleton-stat-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.skeleton-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e5e7eb, #d1d5db, #e5e7eb);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-stat-card .skeleton-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.skeleton-stat-card .skeleton-number {
    height: 32px;
    width: 50%;
    border-radius: 8px;
    margin-bottom: 8px;
}

.skeleton-stat-card .skeleton-label {
    height: 13px;
    width: 70%;
    border-radius: 6px;
}

/* 模块卡片骨架屏 */
.skeleton-module-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.skeleton-module-card .skeleton-module-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    flex-shrink: 0;
}

.skeleton-module-card .skeleton-module-content {
    flex: 1;
}

.skeleton-module-card .skeleton-module-title {
    height: 18px;
    width: 60%;
    border-radius: 9px;
    margin-bottom: 8px;
}

.skeleton-module-card .skeleton-module-desc {
    height: 14px;
    width: 80%;
    border-radius: 7px;
}

/* 页面加载过渡 */
.page-loading {
    opacity: 0;
    animation: pageLoadIn 0.5s ease forwards;
}

@keyframes pageLoadIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 内容淡入动画（分步） */
.stagger-load > * {
    opacity: 0;
    animation: staggerFadeIn 0.4s ease forwards;
}

.stagger-load > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-load > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-load > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-load > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-load > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-load > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-load > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-load > *:nth-child(8) { animation-delay: 0.4s; }

@keyframes staggerFadeIn {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 加载旋转动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spinnerRotate 0.8s linear infinite;
}

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

/* 脉冲加载点 */
.loading-dots {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: dotPulse 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* 进度波浪加载 */
.loading-wave {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 24px;
}

.loading-wave span {
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
    animation: waveBar 1s ease-in-out infinite;
}

.loading-wave span:nth-child(1) { animation-delay: 0s; }
.loading-wave span:nth-child(2) { animation-delay: 0.1s; }
.loading-wave span:nth-child(3) { animation-delay: 0.2s; }
.loading-wave span:nth-child(4) { animation-delay: 0.3s; }
.loading-wave span:nth-child(5) { animation-delay: 0.4s; }

@keyframes waveBar {
    0%, 100% { height: 8px; }
    50% { height: 24px; }
}

/* 成功/错误状态指示 */
.status-success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid var(--success);
}

.status-error {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.status-warning {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.status-info {
    background: var(--info-light);
    color: var(--info);
    border: 1px solid var(--info);
}

/* 进度条动画 */
.progress-animated {
    position: relative;
    overflow: hidden;
}

.progress-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* 标签徽章 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary-dark);
}

.badge-success {
    background: var(--success-light);
    color: #047857;
}

.badge-warning {
    background: var(--warning-light);
    color: #b45309;
}

.badge-danger {
    background: var(--danger-light);
    color: #b91c1c;
}

/* 工具提示 */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: var(--gray-900);
    color: white;
    font-size: 12px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* Electron 桌面端适配 */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    body {
        background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    }
    
    /* 桌面端卡片更大的圆角和阴影 */
    .card, .daily-goals-card, .glass-card {
        border-radius: var(--radius-2xl);
        box-shadow: var(--shadow-lg);
    }
    
    /* 桌面端更大的字体 */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    /* 桌面端悬浮效果更明显 */
    .card-hover:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-2xl);
    }
}

/* 暗色模式准备（可选启用） */
@media (prefers-color-scheme: dark) {
    :root.auto-dark {
        --gray-50: #1f2937;
        --gray-100: #374151;
        --gray-200: #4b5563;
        --gray-300: #6b7280;
        --gray-400: #9ca3af;
        --gray-500: #d1d5db;
        --gray-600: #e5e7eb;
        --gray-700: #f3f4f6;
        --gray-800: #f9fafb;
        --gray-900: #ffffff;
        --glass-bg: rgba(30, 41, 59, 0.8);
    }
}

/* 打印样式 */
@media print {
    .bottom-nav, .modal-header, .back-btn, button {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ==================== 修复设置页面滚动交互 ==================== */
#settingsModal {
    display: flex !important;
    flex-direction: column;
    overflow: hidden !important; /* 禁用整个模态框的滚动，改为内部滚动 */
}

#settingsModal .settings-sticky-header {
    position: relative !important; /* 在 Flex 布局中不需要 sticky */
    flex-shrink: 0;
    z-index: 20;
    width: 100%;
    top: 0;
    background: rgba(255, 255, 255, 0.95); /* 稍微增加不透明度 */
}

/* 液态玻璃模式下的头部背景 */
body.liquid-glass-mode #settingsModal .settings-sticky-header {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

#settingsModal .settings-content {
    flex: 1;
    overflow-y: auto;
    padding-top: 0; /* 头部已经独立出来，不需要 padding-top */
    height: auto;
    overscroll-behavior: contain;
}

/* 调整设置页面内部的标签栏 */
#settingsModal .settings-tabs-top {
    position: sticky;
    top: 0;
    z-index: 15;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.liquid-glass-mode #settingsModal .settings-tabs-top {
    background: rgba(255, 255, 255, 0.5);
}

/* ==================== 法律文档弹窗样式 ==================== */
.legal-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.legal-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.legal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: var(--gradient-primary);
    color: white;
}

.legal-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.legal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.legal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.legal-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    line-height: 1.8;
    color: #374151;
}

.legal-modal-body h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 24px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.legal-modal-body h3:first-of-type {
    margin-top: 12px;
}

.legal-modal-body p {
    margin: 8px 0;
}

.legal-modal-body ul {
    margin: 8px 0;
    padding-left: 24px;
}

.legal-modal-body li {
    margin: 6px 0;
}

.legal-update-date {
    color: #6b7280;
    font-size: 13px;
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 16px;
}

/* Liquid Glass 模式下的法律弹窗 */
body.liquid-glass-mode .legal-modal-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

body.liquid-glass-mode .legal-modal-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
}

/* ==================== 全盘复习模式样式 ==================== */

/* 全盘复习设置卡片 */
.comprehensive-review-settings .settings-card-icon-new.review {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

.review-mode-preview {
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border-radius: 12px;
    margin: 16px 0;
}

.review-mode-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.review-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
}

.review-stat-icon {
    font-size: 20px;
}

.review-stat-label {
    font-size: 11px;
    color: #78350f;
    font-weight: 500;
}

.review-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #d97706;
}

.review-toggle input:checked + .toggle-track {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

/* 口语模式选择器 */
.speaking-mode-selector {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: #f3f4f6;
    border-radius: 16px;
    margin-bottom: 16px;
}

.speaking-mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.speaking-mode-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.speaking-mode-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.speaking-mode-btn svg {
    width: 16px;
    height: 16px;
}

/* 单词级别分析 */
.word-level-analysis {
    margin: 16px 0;
    padding: 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-radius: 14px;
    border: 1px solid #bbf7d0;
}

.word-analysis-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #15803d;
}

.word-score-summary {
    margin-left: auto;
    padding: 4px 10px;
    background: #dcfce7;
    border-radius: 20px;
    font-size: 12px;
    color: #166534;
}

.word-scores-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 0;
}

/* V3-V5: 单词评分卡片样式 */
.word-score-card {
    display: flex;
    flex-direction: column;
    min-width: 90px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: wordCardFadeIn 0.4s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

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

.word-score-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.word-score-card:active {
    transform: scale(0.98);
}

.word-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.word-card-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.word-card-text {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.word-card-score {
    font-size: 16px;
    font-weight: 700;
    min-width: 28px;
    text-align: right;
}

/* 迷你进度条 */
.word-card-progress {
    height: 4px;
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.word-progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 维度详情 - 默认隐藏 */
.word-dimensions {
    display: none;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(0,0,0,0.1);
}

.word-score-card.expanded .word-dimensions {
    display: flex;
}

.dim-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
}

.dim-label {
    opacity: 0.7;
}

.dim-value {
    font-weight: 600;
}

/* 发音建议 */
.word-tip {
    display: none;
    font-size: 11px;
    margin-top: 6px;
    padding: 6px 8px;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    color: #666;
    line-height: 1.4;
}

.word-score-card.expanded .word-tip {
    display: block;
}

/* 难度标签 */
.word-difficulty {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 6px;
    font-weight: 600;
}

.word-difficulty.hard {
    background: #fee2e2;
    color: #dc2626;
}

.word-difficulty.medium {
    background: #fef3c7;
    color: #d97706;
}

/* 状态颜色 */
.word-score-card.correct {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border: 1px solid #86efac;
}

.word-score-card.excellent {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #34d399;
}

.word-score-card.good {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border: 1px solid #60a5fa;
}

.word-score-card.partial {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.word-score-card.poor {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.word-score-card.missing {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.word-score-card.missing .word-card-text {
    text-decoration: line-through;
    opacity: 0.7;
}

/* 汇总信息样式 */
.summary-count {
    font-weight: 700;
    font-size: 1.1em;
}

.summary-percent {
    opacity: 0.7;
    font-size: 0.9em;
}

/* 保留旧样式兼容 */
.word-score-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.word-score-item:hover {
    transform: scale(1.05);
}

.word-score-item.correct {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.word-score-item.partial {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.word-score-item.poor {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.word-score-item.missing {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    text-decoration: line-through;
}

.word-score-icon {
    font-size: 12px;
}

.word-score-text {
    font-size: 12px;
}

/* 目标单词高亮 */
.target-word-highlight {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    border-bottom: 2px solid #f59e0b;
}

/* 段落模式样式 */
#targetSentence.paragraph-mode {
    font-size: 16px;
    line-height: 1.8;
    max-height: 200px;
    overflow-y: auto;
}

/* 液态玻璃模式下的全盘复习 */
body.liquid-glass-mode .speaking-mode-selector {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

body.liquid-glass-mode .speaking-mode-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(139, 92, 246, 0.9));
}

body.liquid-glass-mode .word-level-analysis {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(187, 247, 208, 0.6);
}

body.liquid-glass-mode .review-mode-preview {
    background: rgba(254, 243, 199, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.liquid-glass-mode .review-stat {
    background: rgba(255, 255, 255, 0.6);
}

/* 复习模式标签 */
.review-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
    }
}



/* ==================== 自动更新弹窗样式 v1-v5 ==================== */

/* 版本1: 基础弹窗覆盖层 */
.update-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.update-dialog-overlay.show {
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 版本2: 弹窗主体 - 卡片设计 */
.update-dialog {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 380px;
    overflow: hidden;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.update-dialog-overlay.show .update-dialog {
    transform: scale(1) translateY(0);
}

/* 版本3: 头部装饰区 */
.update-header {
    position: relative;
    height: 120px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.update-header-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.update-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    top: -50px;
    right: -50px;
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* 粒子动画 */
.update-particles {
    position: absolute;
    inset: 0;
}

.update-particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: particle-float 4s ease-in-out infinite;
}

.update-particles span:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.update-particles span:nth-child(2) { left: 20%; top: 60%; animation-delay: 0.5s; }
.update-particles span:nth-child(3) { left: 30%; top: 40%; animation-delay: 1s; }
.update-particles span:nth-child(4) { left: 50%; top: 80%; animation-delay: 1.5s; }
.update-particles span:nth-child(5) { left: 60%; top: 30%; animation-delay: 2s; }
.update-particles span:nth-child(6) { left: 70%; top: 70%; animation-delay: 2.5s; }
.update-particles span:nth-child(7) { left: 80%; top: 20%; animation-delay: 3s; }
.update-particles span:nth-child(8) { left: 90%; top: 50%; animation-delay: 3.5s; }
.update-particles span:nth-child(9) { left: 15%; top: 80%; animation-delay: 0.3s; }
.update-particles span:nth-child(10) { left: 45%; top: 15%; animation-delay: 1.2s; }
.update-particles span:nth-child(11) { left: 75%; top: 45%; animation-delay: 2.2s; }
.update-particles span:nth-child(12) { left: 85%; top: 85%; animation-delay: 0.8s; }

@keyframes particle-float {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { transform: translateY(-15px) scale(1.2); opacity: 1; }
}

/* 更新图标 */
.update-icon-wrapper {
    position: relative;
    z-index: 2;
}

.update-icon-ring {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ring-pulse 2s ease-in-out infinite;
}

@keyframes ring-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.8; }
}

.update-icon {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.update-icon svg {
    width: 32px;
    height: 32px;
}

/* NEW 徽章 */
.update-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fbbf24;
    color: #78350f;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
    animation: badge-bounce 2s ease-in-out infinite;
}

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

/* 版本4: 内容区域 */
.update-content {
    padding: 24px;
    text-align: center;
}

.update-title {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.update-version-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f3f4f6;
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.version-current {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.version-arrow {
    width: 16px;
    height: 16px;
    color: #9ca3af;
}

.version-new {
    color: #6366f1;
    font-size: 14px;
    font-weight: 700;
}

/* 更新日志 */
.update-changelog {
    text-align: left;
    background: #f9fafb;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.update-changelog h3 {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.update-changelog ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.update-changelog li {
    font-size: 13px;
    color: #4b5563;
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.update-changelog li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
}

/* 元信息 */
.update-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #9ca3af;
    font-size: 12px;
}

.update-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.update-meta svg {
    width: 14px;
    height: 14px;
}

/* 版本5: 按钮区域 */
.update-actions {
    padding: 0 24px 24px;
}

.update-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.update-btn.primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

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

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

.update-btn.primary svg {
    width: 18px;
    height: 18px;
}

.update-secondary-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.update-btn.secondary,
.update-btn.tertiary {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
}

.update-btn.secondary {
    background: #f3f4f6;
    color: #4b5563;
}

.update-btn.secondary:hover {
    background: #e5e7eb;
}

.update-btn.tertiary {
    background: transparent;
    color: #6b7280;
}

.update-btn.tertiary:hover {
    background: #f9fafb;
}

/* 强制更新提示 */
.force-update-tip {
    text-align: center;
    font-size: 12px;
    color: #ef4444;
    margin-top: 12px;
    padding: 8px;
    background: #fef2f2;
    border-radius: 8px;
}

/* Toast 提示 */
.update-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(31, 41, 55, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100001;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.update-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .update-dialog {
        background: #1f2937;
    }
    
    .update-title {
        color: #f9fafb;
    }
    
    .update-version-info {
        background: #374151;
    }
    
    .version-current {
        color: #9ca3af;
    }
    
    .update-changelog {
        background: #374151;
    }
    
    .update-changelog h3 {
        color: #e5e7eb;
    }
    
    .update-changelog li {
        color: #d1d5db;
    }
    
    .update-btn.secondary {
        background: #374151;
        color: #e5e7eb;
    }
    
    .update-btn.secondary:hover {
        background: #4b5563;
    }
    
    .update-btn.tertiary {
        color: #9ca3af;
    }
    
    .update-btn.tertiary:hover {
        background: #374151;
    }
}

/* 液态玻璃模式适配 */
body.liquid-glass-mode .update-dialog {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

body.liquid-glass-mode .update-changelog {
    background: rgba(249, 250, 251, 0.7);
}

body.liquid-glass-mode .update-version-info {
    background: rgba(243, 244, 246, 0.8);
}

/* 移动端适配 */
@media (max-width: 480px) {
    .update-dialog {
        max-width: 100%;
        margin: 0 16px;
        border-radius: 20px;
    }
    
    .update-header {
        height: 100px;
    }
    
    .update-icon {
        width: 48px;
        height: 48px;
    }
    
    .update-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .update-content {
        padding: 20px;
    }
    
    .update-title {
        font-size: 20px;
    }
    
    .update-actions {
        padding: 0 20px 20px;
    }
}

/* ==================== 自动更新弹窗样式 v6-v8 改进 ==================== */

/* v6: 关闭按钮 */
.update-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.update-close-btn svg {
    width: 16px;
    height: 16px;
    color: white;
}

.update-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* v6: 更新大小显示 */
.update-size {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
}

/* v7: 重要性标签 */
.importance-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.importance-badge.important {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.importance-badge.critical {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    animation: critical-pulse 1.5s ease-in-out infinite;
}

@keyframes critical-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* v7: 更新日志标题带图标 */
.update-changelog h3 {
    display: flex;
    align-items: center;
    gap: 6px;
}

.update-changelog h3 svg {
    width: 14px;
    height: 14px;
    color: #6366f1;
}

/* v8: 更新进度条 */
.update-progress-container {
    margin-top: 16px;
    padding: 12px;
    background: #f3f4f6;
    border-radius: 12px;
}

.update-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.update-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.update-progress-text {
    display: block;
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
}

/* v6: 按钮图标 */
.update-btn.secondary svg,
.update-btn.tertiary svg {
    width: 14px;
    height: 14px;
    margin-right: 4px;
}

/* v6: 强制更新提示带图标 */
.force-update-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.force-update-tip svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* v6: 加载动画 */
.update-spinner {
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
}

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

.update-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* v7: Toast 类型样式 */
.update-toast {
    display: flex;
    align-items: center;
    gap: 10px;
}

.update-toast svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.update-toast.toast-success {
    background: rgba(16, 185, 129, 0.95);
}

.update-toast.toast-info {
    background: rgba(59, 130, 246, 0.95);
}

.update-toast.toast-warning {
    background: rgba(245, 158, 11, 0.95);
}

.update-toast.toast-error {
    background: rgba(239, 68, 68, 0.95);
}

/* v8: 重要性等级头部颜色 */
.update-dialog-overlay.importance-important .update-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
}

.update-dialog-overlay.importance-critical .update-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
}

/* v8: 深色模式进度条 */
@media (prefers-color-scheme: dark) {
    .update-progress-container {
        background: #374151;
    }
    
    .update-progress-bar {
        background: #4b5563;
    }
    
    .update-size {
        background: rgba(99, 102, 241, 0.2);
    }
}

/* v8: 液态玻璃模式进度条 */
body.liquid-glass-mode .update-progress-container {
    background: rgba(243, 244, 246, 0.7);
}

/* ==================== 用户体验增强样式 v1-v5 ==================== */

/* ========== 版本1: 微交互动画 ========== */

/* 涟漪效果 */
.ux-ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    transform: scale(0);
    animation: uxRipple 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes uxRipple {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* 弹跳效果 */
.ux-bounce {
    animation: uxBounce 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes uxBounce {
    0% { transform: scale(1); }
    40% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* 翻转效果 */
.ux-flip {
    animation: uxFlip 0.6s ease-in-out;
}

@keyframes uxFlip {
    0% { transform: perspective(400px) rotateY(0); }
    50% { transform: perspective(400px) rotateY(180deg); }
    100% { transform: perspective(400px) rotateY(360deg); }
}

/* 脉冲效果 */
.ux-pulse {
    animation: uxPulse 1s ease-in-out;
}

@keyframes uxPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 0 20px 5px rgba(99, 102, 241, 0.2); }
}

/* 五彩纸屑 */
.ux-confetti-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    pointer-events: none;
    z-index: 1000;
}

.ux-confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: uxConfetti 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes uxConfetti {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) rotate(var(--r));
        opacity: 0;
    }
}

/* ========== 版本2: 智能Toast ========== */

.ux-smart-toast {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.15),
        0 2px 10px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.6);
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: calc(100vw - 40px);
    overflow: hidden;
}

.ux-smart-toast.ux-toast-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.ux-smart-toast.ux-toast-hide {
    transform: translateX(-50%) translateY(-20px);
    opacity: 0;
}

.ux-toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    animation: uxToastIcon 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes uxToastIcon {
    0% { transform: scale(0) rotate(-180deg); }
    100% { transform: scale(1) rotate(0); }
}

.ux-toast-message {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ux-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 0 0 16px 16px;
    width: 100%;
    transform-origin: left;
}

@keyframes uxToastProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Toast 类型颜色 */
.ux-toast-success { border-left: 4px solid var(--success); }
.ux-toast-error { border-left: 4px solid var(--danger); }
.ux-toast-warning { border-left: 4px solid var(--warning); }
.ux-toast-info { border-left: 4px solid var(--info); }
.ux-toast-achievement { 
    border-left: 4px solid #fbbf24;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(255, 255, 255, 0.95) 50%);
}
.ux-toast-streak { border-left: 4px solid #f97316; }
.ux-toast-level { border-left: 4px solid #8b5cf6; }
.ux-toast-reward { border-left: 4px solid #ec4899; }

/* ========== 版本2: 加载动画 ========== */

.ux-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ux-loader-overlay.ux-loader-visible {
    opacity: 1;
    visibility: visible;
}

.ux-loader-content {
    text-align: center;
}

.ux-loader-spinner {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
}

.ux-loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: uxLoaderRing 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.ux-loader-ring:nth-child(1) {
    border-top-color: var(--primary);
    animation-delay: -0.45s;
}

.ux-loader-ring:nth-child(2) {
    border-right-color: var(--secondary);
    animation-delay: -0.3s;
}

.ux-loader-ring:nth-child(3) {
    border-bottom-color: #ec4899;
    animation-delay: -0.15s;
}

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

.ux-loader-message {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.ux-loader-tip {
    font-size: 0.9rem;
    color: var(--gray-500);
    animation: uxLoaderTip 3s ease-in-out infinite;
}

@keyframes uxLoaderTip {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ========== 版本3: 引导气泡 ========== */

.ux-guide-bubble {
    position: absolute;
    z-index: 10002;
    animation: uxGuideFadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.ux-guide-content {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
    max-width: 280px;
}

.ux-guide-content p {
    margin: 0 0 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.ux-guide-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.ux-guide-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ux-guide-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.ux-guide-bottom {
    transform: translateX(-50%);
}

.ux-guide-bottom .ux-guide-arrow {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: var(--primary);
}

.ux-guide-top {
    transform: translateX(-50%) translateY(-100%);
}

.ux-guide-top .ux-guide-arrow {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: var(--secondary);
}

.ux-guide-highlight {
    position: relative;
    z-index: 10001;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3), 0 0 20px rgba(99, 102, 241, 0.2);
    border-radius: inherit;
}

/* NEW 徽章 */
.ux-new-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    animation: uxNewBadge 2s ease-in-out infinite;
    z-index: 10;
}

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

/* 工具提示 */
.ux-has-tooltip {
    position: relative;
}

.ux-has-tooltip::after {
    content: attr(data-ux-tooltip);
    position: absolute;
    background: rgba(30, 41, 59, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}

.ux-has-tooltip[data-ux-tooltip-pos="top"]::after {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
}

.ux-has-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* 快捷键提示 */
.ux-shortcut-hint {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: rgba(30, 41, 59, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: uxShortcutIn 0.3s ease-out;
    z-index: 9999;
}

.ux-shortcut-hint kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
}

.ux-shortcut-hint.ux-shortcut-hide {
    animation: uxShortcutOut 0.3s ease-in forwards;
}

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

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

/* ========== 版本4: 成就系统 ========== */

.ux-achievement-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10003;
    animation: uxAchievementOverlayIn 0.3s ease;
}

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

.ux-achievement-overlay.ux-achievement-hide {
    animation: uxAchievementOverlayOut 0.5s ease forwards;
}

@keyframes uxAchievementOverlayOut {
    to { opacity: 0; }
}

.ux-achievement-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.9) 100%);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: uxAchievementCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    max-width: 320px;
}

@keyframes uxAchievementCardIn {
    from { 
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    to { 
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.ux-achievement-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: transparent;
    /* 移除闪烁动画 */
    z-index: 0;
}

.ux-achievement-icon {
    position: relative;
    font-size: 4rem;
    margin-bottom: 16px;
    animation: uxAchievementIconBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s;
    z-index: 1;
}

@keyframes uxAchievementIconBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.ux-achievement-content {
    position: relative;
    z-index: 1;
}

.ux-achievement-label {
    font-size: 1rem;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.ux-achievement-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ux-achievement-desc {
    font-size: 0.95rem;
    color: var(--gray-600);
    margin-bottom: 16px;
}

.ux-achievement-points {
    display: inline-block;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1rem;
    animation: uxAchievementPoints 0.5s ease 0.4s both;
}

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

.ux-achievement-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    z-index: 2;
}

.ux-achievement-particles span {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fbbf24;
    border-radius: 50%;
    animation: uxAchievementParticle 1s ease-out forwards;
}

.ux-achievement-particles span:nth-child(1) { --angle: 0deg; --distance: 80px; }
.ux-achievement-particles span:nth-child(2) { --angle: 18deg; --distance: 100px; animation-delay: 0.05s; }
.ux-achievement-particles span:nth-child(3) { --angle: 36deg; --distance: 90px; animation-delay: 0.1s; }
.ux-achievement-particles span:nth-child(4) { --angle: 54deg; --distance: 110px; animation-delay: 0.15s; }
.ux-achievement-particles span:nth-child(5) { --angle: 72deg; --distance: 85px; animation-delay: 0.2s; }
.ux-achievement-particles span:nth-child(6) { --angle: 90deg; --distance: 95px; animation-delay: 0.25s; }
.ux-achievement-particles span:nth-child(7) { --angle: 108deg; --distance: 105px; animation-delay: 0.3s; }
.ux-achievement-particles span:nth-child(8) { --angle: 126deg; --distance: 88px; animation-delay: 0.35s; }
.ux-achievement-particles span:nth-child(9) { --angle: 144deg; --distance: 98px; animation-delay: 0.4s; }
.ux-achievement-particles span:nth-child(10) { --angle: 162deg; --distance: 92px; animation-delay: 0.45s; }
.ux-achievement-particles span:nth-child(11) { --angle: 180deg; --distance: 82px; }
.ux-achievement-particles span:nth-child(12) { --angle: 198deg; --distance: 102px; animation-delay: 0.05s; }
.ux-achievement-particles span:nth-child(13) { --angle: 216deg; --distance: 87px; animation-delay: 0.1s; }
.ux-achievement-particles span:nth-child(14) { --angle: 234deg; --distance: 97px; animation-delay: 0.15s; }
.ux-achievement-particles span:nth-child(15) { --angle: 252deg; --distance: 93px; animation-delay: 0.2s; }
.ux-achievement-particles span:nth-child(16) { --angle: 270deg; --distance: 83px; animation-delay: 0.25s; }
.ux-achievement-particles span:nth-child(17) { --angle: 288deg; --distance: 103px; animation-delay: 0.3s; }
.ux-achievement-particles span:nth-child(18) { --angle: 306deg; --distance: 89px; animation-delay: 0.35s; }
.ux-achievement-particles span:nth-child(19) { --angle: 324deg; --distance: 99px; animation-delay: 0.4s; }
.ux-achievement-particles span:nth-child(20) { --angle: 342deg; --distance: 91px; animation-delay: 0.45s; }

@keyframes uxAchievementParticle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(
            calc(cos(var(--angle)) * var(--distance)),
            calc(sin(var(--angle)) * var(--distance))
        ) scale(0);
        opacity: 0;
    }
}

/* 等级提升 */
.ux-levelup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10003;
    animation: uxLevelupOverlayIn 0.3s ease;
}

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

.ux-levelup-overlay.ux-levelup-hide {
    animation: uxLevelupOverlayOut 0.5s ease forwards;
}

@keyframes uxLevelupOverlayOut {
    to { opacity: 0; }
}

.ux-levelup-card {
    position: relative;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    border-radius: 24px;
    padding: 50px 60px;
    text-align: center;
    box-shadow: 
        0 0 80px rgba(139, 92, 246, 0.5),
        0 25px 60px rgba(0, 0, 0, 0.4);
    animation: uxLevelupCardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes uxLevelupCardIn {
    from { 
        opacity: 0;
        transform: scale(0.3);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.ux-levelup-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    transform: translate(-50%, -50%);
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(139, 92, 246, 0.3) 10deg,
        transparent 20deg
    );
    animation: uxLevelupRays 10s linear infinite;
}

@keyframes uxLevelupRays {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.ux-levelup-icon {
    position: relative;
    font-size: 5rem;
    margin-bottom: 16px;
    animation: uxLevelupIcon 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s both;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
    z-index: 1;
}

@keyframes uxLevelupIcon {
    0% { transform: scale(0) rotate(-180deg); }
    50% { transform: scale(1.4) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.ux-levelup-content {
    position: relative;
    z-index: 1;
}

.ux-levelup-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.ux-levelup-level {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.8);
    margin-bottom: 8px;
    animation: uxLevelupLevel 0.5s ease 0.5s both;
}

@keyframes uxLevelupLevel {
    from { 
        opacity: 0;
        transform: scale(2);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.ux-levelup-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fbbf24;
    animation: uxLevelupName 0.5s ease 0.7s both;
}

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

/* ========== 版本5: 时间主题 ========== */

body[data-time-theme="morning"] {
    --time-accent: #f59e0b;
    --time-glow: rgba(245, 158, 11, 0.2);
}

body[data-time-theme="afternoon"] {
    --time-accent: #6366f1;
    --time-glow: rgba(99, 102, 241, 0.2);
}

body[data-time-theme="evening"] {
    --time-accent: #f97316;
    --time-glow: rgba(249, 115, 22, 0.2);
}

body[data-time-theme="night"] {
    --time-accent: #8b5cf6;
    --time-glow: rgba(139, 92, 246, 0.2);
}

/* 液态玻璃模式下的UX组件 */
body.liquid-glass-mode .ux-smart-toast {
    background: var(--liquid-glass-bg);
    border: 1px solid var(--liquid-glass-border);
}

body.liquid-glass-mode .ux-guide-content {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

body.liquid-glass-mode .ux-achievement-card,
body.liquid-glass-mode .ux-levelup-card {
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .ux-ripple,
    .ux-confetti,
    .ux-achievement-particles span,
    .ux-levelup-rays,
    .ux-achievement-glow {
        animation: none !important;
    }
}

/* ==================== 液态玻璃模式 - 模态框头部修复 v1-v5 ==================== */

/* v1: 基础修复 - 保留渐变背景，添加玻璃效果叠加 */
body.liquid-glass-mode .modal-header {
    background: var(--gradient-primary) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* v1: 添加玻璃高光层 */
body.liquid-glass-mode .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 0;
}

/* v3: 模态框头部内容层级修复 */
body.liquid-glass-mode .modal-header > * {
    position: relative;
    z-index: 1;
}

body.liquid-glass-mode .modal-header h2,
body.liquid-glass-mode .modal-header .modal-title-group,
body.liquid-glass-mode .modal-header .back-btn {
    position: relative;
    z-index: 2;
}

/* v3: 返回按钮液态玻璃效果 */
body.liquid-glass-mode .modal-header .back-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.liquid-glass-mode .modal-header .back-btn:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    transform: translateY(-1px);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

body.liquid-glass-mode .modal-header .back-btn:active {
    transform: translateY(0) scale(0.98);
}

/* v4: 图标徽章液态玻璃效果 */
body.liquid-glass-mode .modal-header .modal-icon-badge {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* v4: 头部底部边缘发光效果 */
body.liquid-glass-mode .modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.5) 20%, 
        rgba(255, 255, 255, 0.8) 50%, 
        rgba(255, 255, 255, 0.5) 80%, 
        transparent 100%
    );
    z-index: 1;
}

/* v5: 滚动时头部增强效果 */
body.liquid-glass-mode .modal-header.scrolled {
    box-shadow: 
        0 8px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* v5: 设置模态框头部特殊处理 */
body.liquid-glass-mode #settingsModal .modal-header,
body.liquid-glass-mode #statsModal .modal-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95) 0%, rgba(139, 92, 246, 0.95) 100%) !important;
}

/* v5: 深色主题下的液态玻璃头部 */
body.theme-dark.liquid-glass-mode .modal-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

body.theme-dark.liquid-glass-mode .modal-header::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
}

body.theme-dark.liquid-glass-mode .modal-header .back-btn {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* v5: 深色主题 liquid-glass 模式 - 使用主题渐变 */
body.theme-dark.liquid-glass-mode .modal-header-vocab,
body.theme-dark.liquid-glass-mode .modal-header-listen,
body.theme-dark.liquid-glass-mode .modal-header-speak,
body.theme-dark.liquid-glass-mode .modal-header-read,
body.theme-dark.liquid-glass-mode .modal-header-review,
body.theme-dark.liquid-glass-mode .modal-header-resource,
body.theme-dark.liquid-glass-mode .modal-header-stats {
    background: var(--gradient-primary) !important;
}

/* v5: 模态框整体背景增强 */
body.liquid-glass-mode .modal {
    background: rgba(248, 250, 252, 0.98);
}

body.theme-dark.liquid-glass-mode .modal {
    background: rgba(15, 23, 42, 0.98);
}

/* v5: iOS安全区域适配 */
body.liquid-glass-mode .modal-header {
    padding-top: calc(18px + env(safe-area-inset-top, 0px));
}

@supports (padding-top: env(safe-area-inset-top)) {
    body.liquid-glass-mode .modal-header {
        padding-top: calc(18px + env(safe-area-inset-top));
    }
}

/* ==================== V9: 全局复习模式 UI 样式 ==================== */

/* 复习模式选择器覆盖层 */
.review-mode-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

/* 复习模式选择器卡片 */
.review-mode-selector {
    background: var(--white);
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.review-mode-selector h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: 8px;
}

.review-summary-text {
    text-align: center;
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 20px;
}

.review-summary-text strong {
    color: var(--primary);
}

/* 复习模式选项列表 */
.review-mode-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

/* 单个复习模式选项 */
.review-mode-option {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: var(--gray-50);
    border: 2px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.review-mode-option:hover {
    background: var(--primary-50);
    border-color: var(--primary-light);
    transform: translateX(4px);
}

.review-mode-option.highlight {
    background: linear-gradient(135deg, var(--primary-50), var(--secondary));
    background-size: 200% 200%;
    border-color: var(--primary);
}

.review-mode-option.highlight:hover {
    background-position: right center;
}

.mode-icon {
    font-size: 28px;
    margin-right: 14px;
}

.mode-info {
    flex: 1;
}

.mode-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.mode-count {
    font-size: 13px;
    color: var(--gray-500);
}

/* 批次大小设置 */
.batch-size-setting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: var(--gray-100);
    border-radius: 10px;
    margin-bottom: 16px;
}

.batch-size-setting label {
    font-size: 14px;
    color: var(--gray-700);
}

.batch-size-setting select {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    background: var(--white);
    cursor: pointer;
}

/* 关闭按钮 */
.review-mode-selector .close-btn {
    width: 100%;
    padding: 12px;
    background: var(--gray-200);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: background 0.2s;
}

.review-mode-selector .close-btn:hover {
    background: var(--gray-300);
}

/* 复习进度指示器 */
.review-progress-indicator {
    background: linear-gradient(135deg, var(--primary-50), var(--white));
    border: 1px solid var(--primary-100);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.progress-bar-container {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.progress-percent {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.progress-stats {
    display: flex;
    gap: 12px;
    font-size: 13px;
}

.stat-correct {
    color: var(--success);
    font-weight: 500;
}

.stat-incorrect {
    color: var(--danger);
    font-weight: 500;
}

.stat-accuracy {
    color: var(--primary);
    font-weight: 600;
    margin-left: auto;
}

/* 复习完成对话框 */
.review-complete-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.review-complete-dialog {
    background: var(--white);
    border-radius: 24px;
    padding: 30px 24px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: bounceIn 0.4s ease;
}

.complete-icon {
    font-size: 56px;
    margin-bottom: 12px;
}

.review-complete-dialog h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 20px;
}

/* 完成统计 */
.complete-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.complete-stats .stat-item {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 14px 10px;
}

.complete-stats .stat-label {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.complete-stats .stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

/* 需要加强的单词 */
.incorrect-words {
    background: var(--danger-light);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 20px;
    text-align: left;
}

.incorrect-words h4 {
    font-size: 13px;
    color: var(--danger);
    margin-bottom: 8px;
}

.incorrect-words .word-list {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.6;
}

.incorrect-words .more-text {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 6px;
}

/* 对话框按钮 */
.dialog-buttons {
    display: flex;
    gap: 12px;
}

.dialog-buttons .btn-primary {
    flex: 1;
    padding: 14px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.dialog-buttons .btn-secondary {
    flex: 1;
    padding: 14px;
    background: var(--gray-100);
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: background 0.2s;
}

.dialog-buttons .btn-secondary:hover {
    background: var(--gray-200);
}

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

/* 深色主题适配 */
body.theme-dark .review-mode-selector {
    background: var(--gray-800);
}

body.theme-dark .review-mode-selector h3 {
    color: var(--white);
}

body.theme-dark .review-summary-text {
    color: var(--gray-400);
}

body.theme-dark .review-mode-option {
    background: var(--gray-700);
}

body.theme-dark .review-mode-option:hover {
    background: rgba(99, 102, 241, 0.2);
}

body.theme-dark .mode-title {
    color: var(--white);
}

body.theme-dark .mode-count {
    color: var(--gray-400);
}

body.theme-dark .batch-size-setting {
    background: var(--gray-700);
}

body.theme-dark .batch-size-setting label {
    color: var(--gray-300);
}

body.theme-dark .batch-size-setting select {
    background: var(--gray-600);
    border-color: var(--gray-500);
    color: var(--white);
}

body.theme-dark .review-progress-indicator {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), var(--gray-800));
    border-color: rgba(99, 102, 241, 0.3);
}

body.theme-dark .progress-bar-container {
    background: var(--gray-700);
}

body.theme-dark .progress-count {
    color: var(--white);
}

body.theme-dark .review-complete-dialog {
    background: var(--gray-800);
}

body.theme-dark .review-complete-dialog h3 {
    color: var(--white);
}

body.theme-dark .complete-stats .stat-item {
    background: var(--gray-700);
}

body.theme-dark .complete-stats .stat-label {
    color: var(--gray-400);
}

body.theme-dark .incorrect-words {
    background: rgba(239, 68, 68, 0.15);
}

body.theme-dark .incorrect-words .word-list {
    color: var(--gray-300);
}

/* ==================== 智能问候系统样式 V10 ==================== */

/* V3: 天体实时位置动画 */
.celestial-body {
    position: absolute;
    border-radius: 50%;
    transition: right 60s linear, top 60s linear, transform 0.5s ease, filter 0.5s ease;
    will-change: right, top, transform;
}

/* V4: 天气氛围效果 - 朦胧光晕 */
.celestial-body::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    height: 200%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 220, 150, 0.3) 0%, transparent 70%);
    animation: glow-pulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* 月亮光晕 */
.home-header[data-time-period="evening"] .celestial-body::after,
.home-header[data-time-period="night"] .celestial-body::after {
    background: radial-gradient(circle, rgba(200, 200, 255, 0.2) 0%, transparent 70%);
}

/* V5: 问候语副标题样式 */
.greeting-text h1 {
    position: relative;
}

.greeting-text h1::after {
    content: attr(data-subtitle);
    display: block;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.7;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* V8: 动态背景渐变动画 */
.sky-layer {
    animation: sky-shift 120s ease-in-out infinite;
}

@keyframes sky-shift {
    0%, 100% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(5deg) brightness(1.05); }
}

/* V9: 星星增强 - 更多闪烁效果 */
.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 2s ease-in-out infinite;
}

.star-1 { top: 8%; left: 5%; animation-delay: 0s; }
.star-2 { top: 12%; left: 15%; animation-delay: 0.3s; }
.star-3 { top: 5%; left: 25%; animation-delay: 0.6s; }
.star-4 { top: 18%; left: 35%; animation-delay: 0.9s; }
.star-5 { top: 8%; left: 45%; animation-delay: 1.2s; }
.star-6 { top: 15%; left: 55%; animation-delay: 1.5s; }
.star-7 { top: 6%; left: 65%; animation-delay: 1.8s; }
.star-8 { top: 20%; left: 75%; animation-delay: 2.1s; }
.star-9 { top: 10%; left: 85%; animation-delay: 2.4s; }
.star-10 { top: 14%; left: 92%; animation-delay: 2.7s; }

/* 流星效果 */
.shooting-star {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(-45deg);
    animation: shooting 8s ease-in-out infinite;
    opacity: 0;
}

@keyframes shooting {
    0% { transform: translateX(0) translateY(0) rotate(-45deg); opacity: 0; }
    5% { opacity: 1; }
    15% { transform: translateX(-200px) translateY(200px) rotate(-45deg); opacity: 0; }
    100% { opacity: 0; }
}

.shooting-star-1 { top: 5%; right: 10%; animation-delay: 0s; }
.shooting-star-2 { top: 15%; right: 30%; animation-delay: 4s; }

/* V9: 云朵增强 - 更多层次 */
.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50px;
    animation: float-cloud 25s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
    box-shadow: inherit;
}

.cloud-1 {
    width: 60px;
    height: 20px;
    top: 15%;
    left: -10%;
    animation-duration: 35s;
}

.cloud-1::before { width: 30px; height: 30px; top: -15px; left: 10px; }
.cloud-1::after { width: 25px; height: 25px; top: -10px; left: 35px; }

.cloud-2 {
    width: 80px;
    height: 25px;
    top: 25%;
    left: -15%;
    animation-duration: 45s;
    animation-delay: -15s;
}

.cloud-2::before { width: 40px; height: 40px; top: -20px; left: 15px; }
.cloud-2::after { width: 30px; height: 30px; top: -12px; left: 45px; }

.cloud-3 {
    width: 50px;
    height: 18px;
    top: 35%;
    left: -8%;
    animation-duration: 30s;
    animation-delay: -8s;
    opacity: 0.7;
}

.cloud-3::before { width: 25px; height: 25px; top: -12px; left: 8px; }
.cloud-3::after { width: 20px; height: 20px; top: -8px; left: 28px; }

/* 云朵飘动动画 */
@keyframes float-cloud {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(100vw + 100px)); }
}

/* V10: 智能建议提示样式 */
.greeting-suggestion {
    position: absolute;
    bottom: -25px;
    left: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 10px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    white-space: nowrap;
}

/* 深夜模式特殊提示 */
.home-header[data-time-period="night"] .greeting-suggestion {
    color: #ffd54f;
    background: rgba(255, 213, 79, 0.15);
}

/* 特殊日期闪烁 */
.greeting-text h1.special-day {
    animation: special-glow 2s ease-in-out infinite;
}

@keyframes special-glow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
    50% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.3); }
}

/* 学霸模式高亮 */
.greeting-text h1.study-master {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 50%, #ffd700 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shine 3s ease infinite;
}

@keyframes gradient-shine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 天空装饰响应式 */
@media (max-width: 390px) {
    .cloud { transform: scale(0.7); }
    .star { width: 2px; height: 2px; }
}

/* 深色主题适配 */
body.theme-dark .greeting-text h1::after {
    opacity: 0.6;
}

body.theme-dark .cloud {
    background: rgba(200, 200, 220, 0.15);
}

/* 液态玻璃模式适配 */
body.liquid-glass-enabled .greeting-text h1::after {
    color: rgba(255, 255, 255, 0.8);
}

body.liquid-glass-enabled .celestial-body {
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.4),
        0 0 40px rgba(255, 255, 255, 0.2);
}


/* V9: 额外星星位置 (11-15) */
.star-11 { top: 22%; left: 8%; animation-delay: 0.1s; width: 2px; height: 2px; }
.star-12 { top: 28%; left: 22%; animation-delay: 0.5s; width: 4px; height: 4px; }
.star-13 { top: 16%; left: 40%; animation-delay: 1.0s; width: 2px; height: 2px; }
.star-14 { top: 32%; left: 60%; animation-delay: 1.4s; width: 3px; height: 3px; }
.star-15 { top: 25%; left: 78%; animation-delay: 1.9s; width: 2px; height: 2px; }

/* 星星闪烁动画 */
@keyframes twinkle {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.2);
    }
}

/* 大星星特殊闪烁 */
.star-12 {
    animation: twinkle-bright 3s ease-in-out infinite;
}

@keyframes twinkle-bright {
    0%, 100% { 
        opacity: 0.5; 
        transform: scale(1);
        box-shadow: 0 0 3px #fff;
    }
    50% { 
        opacity: 1; 
        transform: scale(1.4);
        box-shadow: 0 0 8px #fff, 0 0 15px rgba(255,255,255,0.5);
    }
}

/* V10: 智能建议动画 */
.greeting-suggestion {
    animation: suggestion-fade 0.5s ease-out;
}

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

/* 问候语切换动画 */
.greeting-text h1 {
    transition: all 0.3s ease;
}

.greeting-text h1.greeting-change {
    animation: greeting-swap 0.5s ease;
}

@keyframes greeting-swap {
    0% { opacity: 1; transform: translateY(0); }
    50% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}


/* ==================== 首页导航栏互动系统样式 V10 ==================== */

/* V1: 点击波纹效果 */
.interaction-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-expand 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes ripple-expand {
    to {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* V1: 浮动表情 */
.floating-emoji {
    position: fixed;
    font-size: 24px;
    pointer-events: none;
    z-index: 9999;
    animation: float-up 1s ease-out forwards;
}

@keyframes float-up {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translateY(-30px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(1);
    }
}

/* V2: 连续天数庆祝 */
.streak-celebration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: celebration-fadein 0.3s ease;
}

@keyframes celebration-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

.celebration-content {
    text-align: center;
    color: white;
    animation: celebration-bounce 0.5s ease;
}

@keyframes celebration-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.celebration-number {
    font-size: 80px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700, #ff8c00, #ff6347);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    animation: number-glow 1s ease-in-out infinite alternate;
}

@keyframes number-glow {
    from { filter: brightness(1); }
    to { filter: brightness(1.3); }
}

.celebration-text {
    font-size: 20px;
    margin-top: 16px;
    opacity: 0.9;
}

.celebration-fadeout {
    animation: celebration-fadeout 0.5s ease forwards;
}

@keyframes celebration-fadeout {
    to { opacity: 0; transform: scale(0.9); }
}

/* V4: 问候语弹跳动画 */
.greeting-bounce {
    animation: greeting-bounce-anim 0.6s ease;
}

@keyframes greeting-bounce-anim {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-8px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-4px); }
}

/* V5: 太阳光芒效果 */
.sunburst-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,215,0,0.8) 0%, rgba(255,165,0,0.4) 30%, transparent 70%);
    animation: sunburst-pulse 0.8s ease-out forwards;
    pointer-events: none;
}

@keyframes sunburst-pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* V5: 月光效果 */
.moonlight-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, rgba(200,200,255,0.3) 30%, transparent 70%);
    animation: moonlight-pulse 0.8s ease-out forwards;
    pointer-events: none;
}

@keyframes moonlight-pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* V6: 快速统计弹出 */
.quick-stats-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px 32px;
    border-radius: 20px;
    color: white;
    z-index: 10000;
    animation: popup-appear 0.3s ease;
    text-align: center;
}

@keyframes popup-appear {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.quick-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px 28px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 10000;
    animation: popup-appear 0.3s ease;
}

.qs-item {
    font-size: 18px;
    margin: 8px 0;
    color: #333;
}

.qs-item strong {
    color: #f97316;
    font-size: 24px;
}

.qs-tip {
    margin-top: 12px;
    font-size: 14px;
    color: #666;
}

.popup-fadeout {
    animation: popup-fadeout 0.3s ease forwards;
}

@keyframes popup-fadeout {
    to { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

/* V10: 助手气泡 */
.assistant-bubble {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 40px 12px 16px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    animation: bubble-appear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    max-width: 280px;
}

.assistant-bubble::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255, 255, 255, 0.95);
}

@keyframes bubble-appear {
    from { 
        opacity: 0; 
        transform: translateX(-50%) translateY(10px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateX(-50%) translateY(0) scale(1); 
    }
}

.bubble-content {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.bubble-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.bubble-close:hover {
    color: #666;
}

.bubble-fadeout {
    animation: bubble-fadeout 0.3s ease forwards;
}

@keyframes bubble-fadeout {
    to { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* 互动模态框 */
.interaction-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: modal-overlay-in 0.3s ease;
}

@keyframes modal-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.interaction-modal {
    background: white;
    border-radius: 20px;
    padding: 24px;
    max-width: 320px;
    width: 90%;
    animation: modal-content-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-content-in {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 头像模式选择器 */
.avatar-mode-selector h3 {
    text-align: center;
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.mode-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mode-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 14px;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-option:hover {
    background: #e8e8e8;
    transform: translateX(4px);
}

.mode-option:active {
    transform: scale(0.98);
}

.mode-icon {
    font-size: 28px;
}

.mode-name {
    font-size: 16px;
    color: #333;
}

/* 连续学习详情 */
.streak-details-modal h3 {
    text-align: center;
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 16px 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #f97316;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* 天体可点击样式 */
.celestial-body {
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.celestial-body:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.celestial-body:active {
    transform: scale(0.95);
}

/* 深色模式适配 */
body.theme-dark .quick-popup {
    background: rgba(40, 40, 50, 0.95);
    color: white;
}

body.theme-dark .qs-item {
    color: white;
}

body.theme-dark .qs-tip {
    color: rgba(255,255,255,0.7);
}

body.theme-dark .assistant-bubble {
    background: rgba(40, 40, 50, 0.95);
}

body.theme-dark .assistant-bubble::before {
    border-bottom-color: rgba(40, 40, 50, 0.95);
}

body.theme-dark .bubble-content {
    color: white;
}

body.theme-dark .interaction-modal {
    background: #2a2a3a;
}

body.theme-dark .avatar-mode-selector h3,
body.theme-dark .streak-details-modal h3,
body.theme-dark .mode-name {
    color: white;
}

body.theme-dark .mode-option {
    background: rgba(255,255,255,0.1);
}

body.theme-dark .mode-option:hover {
    background: rgba(255,255,255,0.15);
}

body.theme-dark .stat-item {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
}

body.theme-dark .stat-label {
    color: rgba(255,255,255,0.6);
}

/* 液态玻璃模式适配 */
body.liquid-glass-enabled .assistant-bubble {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

body.liquid-glass-enabled .interaction-modal {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

body.liquid-glass-enabled .quick-popup {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 响应式适配 */
@media (max-width: 390px) {
    .assistant-bubble {
        max-width: 250px;
        padding: 10px 36px 10px 14px;
    }
    
    .bubble-content {
        font-size: 13px;
    }
    
    .celebration-number {
        font-size: 60px;
    }
    
    .celebration-text {
        font-size: 16px;
    }
    
    .stat-grid {
        gap: 10px;
    }
    
    .stat-value {
        font-size: 24px;
    }
}


/* ==========================================
   网络稳定性增强 - V1-V5
   Network Stability Enhancement CSS
   ========================================== */

/* V1: 网络状态指示器基础样式 */
.network-indicator {
    position: fixed;
    top: env(safe-area-inset-top, 0);
    left: 0;
    right: 0;
    height: 3px;
    z-index: 10001;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-100%);
}

.network-indicator.active {
    opacity: 1;
    transform: translateY(0);
}

.network-indicator.online {
    background: linear-gradient(90deg, 
        rgba(76, 217, 100, 0) 0%,
        rgba(76, 217, 100, 0.8) 50%,
        rgba(76, 217, 100, 0) 100%);
    animation: networkPulseOnline 2s ease-out forwards;
}

.network-indicator.offline {
    background: linear-gradient(90deg, 
        rgba(255, 59, 48, 0.8) 0%,
        rgba(255, 59, 48, 1) 50%,
        rgba(255, 59, 48, 0.8) 100%);
    animation: networkPulseOffline 1.5s ease-in-out infinite;
}

.network-indicator.reconnecting {
    background: linear-gradient(90deg, 
        rgba(255, 149, 0, 0.6) 0%,
        rgba(255, 149, 0, 1) 50%,
        rgba(255, 149, 0, 0.6) 100%);
    animation: networkReconnecting 1s ease-in-out infinite;
}

@keyframes networkPulseOnline {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-100%); }
}

@keyframes networkPulseOffline {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

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

/* V2: 网络状态提示气泡 */
.network-toast {
    position: fixed;
    top: calc(env(safe-area-inset-top, 20px) + 60px);
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10002;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.network-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.network-toast-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.network-toast.online .network-toast-icon::before {
    content: '✓';
    color: #4cd964;
    font-weight: bold;
}

.network-toast.offline .network-toast-icon::before {
    content: '✕';
    color: #ff3b30;
    font-weight: bold;
}

.network-toast.reconnecting .network-toast-icon::before {
    content: '⟳';
    color: #ff9500;
    animation: toastIconSpin 1s linear infinite;
}

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

/* V3: 离线模式覆盖层 */
.offline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.offline-content {
    text-align: center;
    color: #fff;
    padding: 40px;
    max-width: 320px;
}

.offline-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: offlineIconFloat 3s ease-in-out infinite;
}

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

.offline-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.offline-message {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 24px;
}

.offline-retry-btn {
    background: linear-gradient(135deg, #007aff, #5ac8fa);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.4);
}

.offline-retry-btn:active {
    transform: scale(0.95);
}

.offline-retry-btn.retrying {
    opacity: 0.7;
    pointer-events: none;
}

/* V4: 连接质量指示器 */
.connection-quality {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0) + 80px);
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    pointer-events: none;
}

.connection-quality.show {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.connection-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 18px;
}

.connection-bar {
    width: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.connection-bar:nth-child(1) { height: 6px; }
.connection-bar:nth-child(2) { height: 10px; }
.connection-bar:nth-child(3) { height: 14px; }
.connection-bar:nth-child(4) { height: 18px; }

.connection-quality.excellent .connection-bar { background: #4cd964; }
.connection-quality.good .connection-bar:nth-child(1),
.connection-quality.good .connection-bar:nth-child(2),
.connection-quality.good .connection-bar:nth-child(3) { background: #4cd964; }
.connection-quality.fair .connection-bar:nth-child(1),
.connection-quality.fair .connection-bar:nth-child(2) { background: #ff9500; }
.connection-quality.poor .connection-bar:nth-child(1) { background: #ff3b30; }

/* V5: 请求进度条 */
.request-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 10003;
    background: transparent;
    overflow: hidden;
}

.request-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007aff, #5ac8fa, #007aff);
    background-size: 200% 100%;
    width: 0%;
    transition: width 0.3s ease;
    animation: progressGradient 1.5s linear infinite;
}

.request-progress.active .request-progress-bar {
    width: 100%;
}

@keyframes progressGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* 离线模式下的页面样式调整 */
body.offline-mode .card,
body.offline-mode .module-card {
    opacity: 0.7;
    pointer-events: none;
}

body.offline-mode .card::after,
body.offline-mode .module-card::after {
    content: '离线';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 59, 48, 0.9);
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .network-toast {
        background: rgba(50, 50, 50, 0.95);
    }
    
    .connection-quality {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .connection-bar {
        background: #555;
    }
    
    .offline-overlay {
        background: rgba(0, 0, 0, 0.85);
    }
}

/* 减少动画偏好适配 */
@media (prefers-reduced-motion: reduce) {
    .network-indicator,
    .network-toast,
    .offline-overlay,
    .connection-quality,
    .request-progress-bar {
        animation: none;
        transition: opacity 0.2s ease;
    }
}

/* ==================== UI 全局迭代改进 v6.1-v6.10 ==================== */

/* ==================== v6.1: 微交互动画增强 ==================== */
/* 点击反馈涟漪效果 */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.8s;
}

.ripple-effect:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* 元素进入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

/* 卡片进入动画序列 */
.module-card:nth-child(1) { animation: fadeInUp 0.4s ease-out 0.1s both; }
.module-card:nth-child(2) { animation: fadeInUp 0.4s ease-out 0.15s both; }
.module-card:nth-child(3) { animation: fadeInUp 0.4s ease-out 0.2s both; }
.module-card:nth-child(4) { animation: fadeInUp 0.4s ease-out 0.25s both; }
.module-card:nth-child(5) { animation: fadeInUp 0.4s ease-out 0.3s both; }
.module-card:nth-child(6) { animation: fadeInUp 0.4s ease-out 0.35s both; }

/* 统计卡片进入动画 */
.stat-card-new:nth-child(1) { animation: fadeInScale 0.3s ease-out 0.1s both; }
.stat-card-new:nth-child(2) { animation: fadeInScale 0.3s ease-out 0.15s both; }
.stat-card-new:nth-child(3) { animation: fadeInScale 0.3s ease-out 0.2s both; }
.stat-card-new:nth-child(4) { animation: fadeInScale 0.3s ease-out 0.25s both; }

/* 悬停时的弹性效果 */
.bounce-hover {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* 呼吸灯效果 */
@keyframes breathe {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
}

.breathing-glow {
    animation: breathe 2s ease-in-out infinite;
}

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

.spin-on-hover:hover svg {
    animation: iconSpin 0.6s ease;
}

/* 成功打勾动画 */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.animated-checkmark path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmark 0.6s ease forwards;
}

/* ==================== v6.2: 骨架屏加载效果 ==================== */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 20px;
    margin: 16px 0;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.skeleton-title {
    height: 20px;
    width: 60%;
    margin: 10px 0;
}

.skeleton-text {
    height: 14px;
    width: 100%;
    margin: 8px 0;
}

.skeleton-text.short {
    width: 40%;
}

.skeleton-button {
    height: 44px;
    width: 100%;
    border-radius: var(--radius);
    margin-top: 16px;
}

/* 深色模式骨架屏 */
body.theme-dark .skeleton {
    background: linear-gradient(
        90deg,
        #2a2a3a 25%,
        #3a3a4a 50%,
        #2a2a3a 75%
    );
    background-size: 200% 100%;
}

body.theme-dark .skeleton-card {
    background: rgba(31, 41, 55, 0.9);
}

/* 单词卡片骨架屏 */
.word-card-skeleton {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px 25px;
    text-align: center;
}

.word-card-skeleton .skeleton-word {
    height: 48px;
    width: 180px;
    margin: 0 auto 16px;
}

.word-card-skeleton .skeleton-phonetic {
    height: 24px;
    width: 120px;
    margin: 0 auto 24px;
}

.word-card-skeleton .skeleton-meaning {
    height: 100px;
    width: 100%;
    border-radius: var(--radius-lg);
}

/* 列表项骨架屏 */
.list-skeleton-item {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 16px;
    background: white;
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.list-skeleton-item .skeleton-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.list-skeleton-item .skeleton-content {
    flex: 1;
}

/* ==================== v6.3: 触觉反馈优化 ==================== */
/* 按钮按压效果增强 */
.press-effect {
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.15s ease;
}

.press-effect:active {
    transform: scale(0.96);
}

/* 开关控件按压 */
.toggle-modern:active .toggle-track {
    transform: scale(0.95);
}

/* 卡片按压深度 */
.card-press:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 列表项按压 */
.list-item-press {
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.list-item-press:active {
    background-color: rgba(99, 102, 241, 0.08);
    transform: scale(0.98);
}

/* 按钮长按效果 */
.long-press-btn {
    position: relative;
    overflow: hidden;
}

.long-press-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.8s linear;
}

.long-press-btn:active::before {
    transform: scaleX(1);
}

/* 滑动删除提示 */
.swipe-hint {
    position: relative;
    overflow: hidden;
}

.swipe-hint::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.1));
    animation: swipeHint 2s ease-in-out infinite;
}

@keyframes swipeHint {
    0%, 100% { right: -100%; }
    50% { right: -80%; }
}

/* ==================== v6.4: 卡片3D悬浮效果 ==================== */
.card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-3d-inner {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.card-3d:hover .card-3d-inner {
    transform: rotateX(5deg) rotateY(5deg) translateZ(10px);
}

/* 3D阴影效果 */
.shadow-3d {
    position: relative;
}

.shadow-3d::before {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 10%;
    right: 10%;
    height: 30px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.shadow-3d:hover::before {
    opacity: 1;
}

/* 模块卡片3D升级 */
.module-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.module-card:hover {
    transform: translateY(-12px) rotateX(3deg);
}

/* 统计卡片3D效果 */
.stat-card-new {
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card-new:hover {
    transform: translateY(-8px) rotateX(5deg) rotateY(-2deg);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* 浮动标签效果 */
.floating-label {
    transition: transform 0.3s ease, font-size 0.3s ease;
}

input:focus + .floating-label,
input:not(:placeholder-shown) + .floating-label {
    transform: translateY(-24px) translateZ(10px);
    font-size: 12px;
}

/* ==================== v6.5: 渐进式数字动画 ==================== */
.count-up {
    display: inline-block;
    transition: transform 0.2s ease;
}

.count-up.updating {
    animation: countPulse 0.3s ease;
}

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

/* 进度条填充动画 */
.progress-fill-animated {
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

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

/* 环形进度动画 */
.ring-progress {
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 百分比跳动动画 */
.percentage-bounce {
    animation: percentBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes percentBounce {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* 数字滚动效果 */
.number-scroll {
    display: inline-block;
    position: relative;
    overflow: hidden;
    height: 1.2em;
}

.number-scroll-inner {
    position: absolute;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 连击数字动画 */
@keyframes comboNumber {
    0% { transform: scale(1) translateY(0); }
    25% { transform: scale(1.3) translateY(-5px); color: #f59e0b; }
    50% { transform: scale(1.1) translateY(0); }
    100% { transform: scale(1) translateY(0); }
}

.combo-number {
    animation: comboNumber 0.5s ease;
}

/* ==================== v6.6: 智能主题切换过渡 ==================== */
/* 主题变量过渡 */
body {
    transition: background-color 0.5s ease,
                color 0.3s ease;
}

/* 卡片主题过渡 */
.module-card,
.stat-card,
.word-card,
.settings-card-modern,
.modal-content {
    transition: background-color 0.4s ease,
                border-color 0.4s ease,
                box-shadow 0.4s ease,
                transform 0.3s ease;
}

/* 主题切换时的淡入效果 */
@keyframes themeChange {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

body.theme-transitioning * {
    animation: themeChange 0.3s ease;
}

/* 主题预览卡片动画 */
.theme-option {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease;
}

.theme-option:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.theme-option.selected {
    animation: themeSelected 0.4s ease;
}

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

/* 主题色渐变过渡 */
.gradient-transition {
    background-size: 200% 200%;
    animation: gradientFlow 3s ease infinite;
}

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

/* ==================== v6.7: 滚动视差效果 ==================== */
/* 首页头部视差 */
.home-header {
    will-change: transform;
    transform: translateZ(0);
}

.parallax-bg {
    position: absolute;
    width: 100%;
    height: 120%;
    top: -10%;
    transform: translateZ(-1px) scale(1.5);
}

/* 卡片滚动渐显 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 交错滚动动画 */
.stagger-reveal {
    opacity: 0;
    transform: translateY(40px);
}

.stagger-reveal.visible {
    animation: staggerIn 0.5s ease forwards;
}

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

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

/* 滚动缩放效果 */
.scroll-scale {
    transition: transform 0.3s ease;
}

.scroll-scale.scaled-down {
    transform: scale(0.95);
}

/* 粘性头部阴影 */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s ease;
}

.sticky-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ==================== v6.8: 按钮涟漪效果升级 ==================== */
/* 现代涟漪效果 */
.btn-ripple {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: var(--ripple-y, 50%);
    left: var(--ripple-x, 50%);
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.5s ease-out, height 0.5s ease-out, opacity 0.3s ease;
    pointer-events: none;
}

.btn-ripple:active::before {
    width: 300%;
    height: 300%;
    opacity: 1;
    transition: width 0.1s ease, height 0.1s ease, opacity 0.3s ease 0.1s;
}

/* 彩色涟漪 */
.btn-ripple-primary::before {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
}

.btn-ripple-success::before {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 70%);
}

.btn-ripple-danger::before {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.3) 0%, transparent 70%);
}

/* 按钮发光效果 */
.btn-glow {
    position: relative;
}

.btn-glow::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: inherit;
    border-radius: inherit;
    filter: blur(12px);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-glow:hover::after {
    opacity: 0.5;
}

/* 按钮边框动画 */
.btn-border-anim {
    position: relative;
    background: transparent;
    overflow: hidden;
}

.btn-border-anim::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary)) border-box;
    -webkit-mask: 
        linear-gradient(#fff 0 0) padding-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    background-size: 200% 100%;
    animation: borderFlow 2s linear infinite;
}

@keyframes borderFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ==================== v6.9: 空状态页面美化 ==================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 30px;
    text-align: center;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
    position: relative;
}

.empty-state-icon svg {
    width: 100%;
    height: 100%;
    color: var(--gray-300);
}

.empty-state-icon::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: emptyPulse 3s ease-in-out infinite;
}

@keyframes emptyPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.empty-state-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state-desc {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 24px;
    max-width: 280px;
    line-height: 1.6;
}

.empty-state-action {
    padding: 14px 28px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.empty-state-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* 无网络空状态 */
.empty-state.offline .empty-state-icon svg {
    color: var(--warning);
}

.empty-state.offline .empty-state-icon::before {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
}

/* 无数据空状态 */
.empty-state.no-data .empty-state-icon svg {
    color: var(--gray-400);
}

/* 搜索无结果 */
.empty-state.no-results .empty-state-icon {
    animation: searchShake 0.5s ease-in-out;
}

@keyframes searchShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 加载失败状态 */
.empty-state.error .empty-state-icon svg {
    color: var(--danger);
}

.empty-state.error .empty-state-icon::before {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.1) 0%, transparent 70%);
}

/* 成功完成状态 */
.empty-state.success .empty-state-icon svg {
    color: var(--success);
}

.empty-state.success .empty-state-icon::before {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    animation: successPulse 1.5s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 0.3; }
}

/* ==================== v6.10: 底部导航动效升级 ==================== */
/* 底部导航容器升级 */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    /* border-top: 1px solid rgba(0, 0, 0, 0.05); */ /* v4.9.3: 移除额外横条 */
    padding: 8px 20px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.06);
}

/* 导航项升级 */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 20px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: transparent;
}

.nav-item:active {
    transform: scale(0.9);
}

/* 图标包装器动画 */
.nav-icon-wrapper {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-item:hover .nav-icon-wrapper {
    background: rgba(99, 102, 241, 0.08);
}

.nav-item.active .nav-icon-wrapper {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    transform: translateY(-4px);
}

/* 活跃状态发光 */
.nav-item.active .nav-icon-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    opacity: 0;
    animation: navGlow 1.5s ease-in-out infinite;
}

@keyframes navGlow {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* 导航图标动画 */
.nav-svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.8;
    transition: all 0.3s ease;
}

.nav-item:hover .nav-svg {
    stroke: var(--primary);
}

.nav-item.active .nav-svg {
    stroke: var(--primary);
    transform: scale(1.1);
}

/* 导航标签 */
.nav-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    transition: all 0.3s ease;
}

.nav-item:hover .nav-label {
    color: var(--primary);
}

.nav-item.active .nav-label {
    color: var(--primary);
    font-weight: 700;
}

/* 导航切换动画 */
@keyframes navBounce {
    0% { transform: scale(1); }
    25% { transform: scale(0.9); }
    50% { transform: scale(1.15); }
    75% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.nav-item.switching .nav-icon-wrapper {
    animation: navBounce 0.4s ease;
}

/* 通知徽章 */
.nav-item .nav-badge {
    position: absolute;
    top: 4px;
    right: 12px;
    min-width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: badgePop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badgePop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

/* 深色模式底部导航 */
body.theme-dark .bottom-nav {
    background: rgba(17, 24, 39, 0.95);
    border-top-color: rgba(255, 255, 255, 0.05);
}

body.theme-dark .nav-item:hover .nav-icon-wrapper {
    background: rgba(99, 102, 241, 0.15);
}

body.theme-dark .nav-item.active .nav-icon-wrapper {
    background: rgba(99, 102, 241, 0.2);
}

body.theme-dark .nav-label {
    color: var(--gray-400);
}

body.theme-dark .nav-svg {
    stroke: var(--gray-400);
}

body.theme-dark .nav-item:hover .nav-svg,
body.theme-dark .nav-item.active .nav-svg,
body.theme-dark .nav-item:hover .nav-label,
body.theme-dark .nav-item.active .nav-label {
    color: var(--primary-light);
    stroke: var(--primary-light);
}

/* 液态玻璃模式底部导航 */
body.liquid-glass-mode .bottom-nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.04);
}

body.liquid-glass-mode .nav-item.active .nav-icon-wrapper {
    background: rgba(99, 102, 241, 0.12);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
}

/* ==================== 解压互动系统 v7.1-v7.10 ==================== */

/* ==================== v7.1: 可拖拽漂浮装饰物 ==================== */
.floating-decor {
    position: fixed;
    pointer-events: auto;
    cursor: grab;
    z-index: 50;
    transition: transform 0.1s ease, filter 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
}

.floating-decor:active {
    cursor: grabbing;
    transform: scale(1.2);
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.2));
}

.floating-decor.dragging {
    transition: none;
}

/* 漂浮物样式 */
.float-emoji {
    font-size: 32px;
    animation: floatDrift 6s ease-in-out infinite;
}

.float-emoji:nth-child(2) { animation-delay: -1s; }
.float-emoji:nth-child(3) { animation-delay: -2s; }
.float-emoji:nth-child(4) { animation-delay: -3s; }

@keyframes floatDrift {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    25% { 
        transform: translateY(-15px) rotate(5deg); 
    }
    50% { 
        transform: translateY(-5px) rotate(-3deg); 
    }
    75% { 
        transform: translateY(-20px) rotate(3deg); 
    }
}

/* ==================== v7.2: 点击产生泡泡/爱心效果 ==================== */
.click-effect-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.bubble-effect {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(99, 102, 241, 0.3));
    animation: bubbleRise 1.5s ease-out forwards;
    pointer-events: none;
}

@keyframes bubbleRise {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-50px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-120px) scale(0.5);
    }
}

.heart-effect {
    position: absolute;
    font-size: 24px;
    animation: heartFloat 1.2s ease-out forwards;
    pointer-events: none;
}

@keyframes heartFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0) rotate(-15deg);
    }
    30% {
        opacity: 1;
        transform: translateY(-30px) scale(1.2) rotate(10deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0.8) rotate(-10deg);
    }
}

.star-effect {
    position: absolute;
    font-size: 20px;
    animation: starBurst 0.8s ease-out forwards;
    pointer-events: none;
}

@keyframes starBurst {
    0% {
        opacity: 1;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.5) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(360deg);
    }
}

/* ==================== v7.3: 呼吸引导圆圈 ==================== */
.breathing-guide {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

.breathing-guide:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.3);
}

.breathing-guide.active {
    width: 150px;
    height: 150px;
    bottom: 80px;
    right: calc(50% - 75px);
}

.breathing-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    transition: all 4s ease-in-out;
}

.breathing-guide.active .breathing-circle {
    animation: breatheAnimation 8s ease-in-out infinite;
}

@keyframes breatheAnimation {
    0%, 100% {
        transform: scale(0.6);
        opacity: 0.6;
    }
    25% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
    75% {
        transform: scale(0.6);
        opacity: 0.6;
    }
}

.breathing-text {
    position: absolute;
    bottom: -30px;
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.breathing-guide.active .breathing-text {
    opacity: 1;
    animation: breatheText 8s ease-in-out infinite;
}

@keyframes breatheText {
    0%, 100% { content: '吸气...'; }
    25%, 50% { content: '屏住...'; }
    75% { content: '呼气...'; }
}

/* ==================== v7.4: 触摸涟漪池 ==================== */
.ripple-pool {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    overflow: hidden;
    pointer-events: auto;
    z-index: 5;
}

.ripple-wave {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    animation: rippleExpand 2s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
        margin-top: -150px;
        margin-left: -150px;
    }
}

/* ==================== v7.5: 可揉捏的压力球 ==================== */
.stress-ball {
    position: fixed;
    bottom: 180px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    cursor: pointer;
    z-index: 100;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(255, 107, 107, 0.4),
        inset 0 -5px 15px rgba(0, 0, 0, 0.1),
        inset 0 5px 15px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stress-ball::before {
    content: '😊';
    font-size: 24px;
    transition: all 0.15s ease;
}

.stress-ball:active {
    transform: scale(0.75);
    border-radius: 45%;
}

.stress-ball:active::before {
    content: '😖';
}

.stress-ball.squeezed {
    animation: stressBallBounce 0.3s ease;
}

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

.stress-ball-counter {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--gray-500);
    white-space: nowrap;
}

/* ==================== v7.6: 动态天气粒子效果 ==================== */
.weather-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
}

/* 雨滴 */
.rain-drop {
    position: absolute;
    width: 2px;
    height: 15px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.6));
    animation: rainFall linear infinite;
}

@keyframes rainFall {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(200px);
        opacity: 0;
    }
}

/* 雪花 */
.snowflake {
    position: absolute;
    color: white;
    font-size: 12px;
    animation: snowFall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

@keyframes snowFall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(200px) rotate(360deg);
        opacity: 0;
    }
}

/* 阳光光束 */
.sun-ray {
    position: absolute;
    top: 0;
    width: 3px;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255, 220, 100, 0.4), transparent);
    transform-origin: top center;
    animation: sunRayShine 3s ease-in-out infinite;
}

@keyframes sunRayShine {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* 萤火虫 */
.firefly {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #fef3c7, #fbbf24);
    box-shadow: 0 0 10px #fbbf24, 0 0 20px #fbbf24;
    animation: fireflyFloat 8s ease-in-out infinite;
}

@keyframes fireflyFloat {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translate(50px, -30px);
        opacity: 0.8;
    }
    90% {
        opacity: 0.6;
    }
}

/* ==================== v7.7: 互动式音乐波形 ==================== */
.music-visualizer {
    position: fixed;
    bottom: 100px;
    left: 20px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 40px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.music-visualizer:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.music-bar {
    width: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: height 0.15s ease;
}

.music-visualizer.playing .music-bar:nth-child(1) { animation: musicBounce 0.5s ease infinite; }
.music-visualizer.playing .music-bar:nth-child(2) { animation: musicBounce 0.5s ease 0.1s infinite; }
.music-visualizer.playing .music-bar:nth-child(3) { animation: musicBounce 0.5s ease 0.2s infinite; }
.music-visualizer.playing .music-bar:nth-child(4) { animation: musicBounce 0.5s ease 0.15s infinite; }
.music-visualizer.playing .music-bar:nth-child(5) { animation: musicBounce 0.5s ease 0.25s infinite; }

@keyframes musicBounce {
    0%, 100% { height: 8px; }
    50% { height: 30px; }
}

.music-bar:nth-child(1) { height: 15px; }
.music-bar:nth-child(2) { height: 25px; }
.music-bar:nth-child(3) { height: 18px; }
.music-bar:nth-child(4) { height: 30px; }
.music-bar:nth-child(5) { height: 12px; }

/* ==================== v7.8: 励志弹幕流 ==================== */
.danmaku-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 60;
    overflow: hidden;
}

.danmaku-item {
    position: absolute;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    animation: danmakuFlow linear forwards;
    background: rgba(255, 255, 255, 0.85);
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

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

.danmaku-item.rainbow {
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== v7.9: 成就徽章展示墙 ==================== */
.achievement-showcase {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: none;
    max-width: 350px;
    width: 90%;
}

.achievement-showcase.show {
    display: block;
    animation: achievementPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.achievement-header {
    text-align: center;
    margin-bottom: 24px;
}

.achievement-badge-large {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
    animation: badgeShine 2s ease-in-out infinite;
}

@keyframes badgeShine {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 8px 40px rgba(99, 102, 241, 0.6), 0 0 60px rgba(99, 102, 241, 0.3);
    }
}

.achievement-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.achievement-desc {
    font-size: 14px;
    color: var(--gray-500);
}

.achievement-confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

/* ==================== v7.10: 宠物陪伴系统 ==================== */
.study-pet {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 80px;
    height: 80px;
    z-index: 100;
    cursor: pointer;
    transition: all 0.3s ease;
}

.study-pet:hover {
    transform: scale(1.1);
}

.pet-body {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50% 50% 45% 45%;
    position: relative;
    margin: 10px auto;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
    animation: petIdle 2s ease-in-out infinite;
}

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

/* 宠物眼睛 */
.pet-eyes {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.pet-eye {
    width: 10px;
    height: 10px;
    background: #1f2937;
    border-radius: 50%;
    position: relative;
    animation: petBlink 4s ease-in-out infinite;
}

.pet-eye::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
}

@keyframes petBlink {
    0%, 45%, 55%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.1); }
}

/* 宠物嘴巴 */
.pet-mouth {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 6px;
    border-bottom: 3px solid #1f2937;
    border-radius: 0 0 10px 10px;
}

/* 宠物脸红 */
.pet-blush {
    position: absolute;
    top: 28px;
    width: 8px;
    height: 4px;
    background: #fca5a5;
    border-radius: 50%;
    opacity: 0.7;
}

.pet-blush.left { left: 5px; }
.pet-blush.right { right: 5px; }

/* 宠物开心状态 */
.study-pet.happy .pet-body {
    animation: petHappy 0.5s ease infinite;
}

@keyframes petHappy {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
}

.study-pet.happy .pet-mouth {
    width: 16px;
    height: 8px;
    border-bottom: none;
    background: #1f2937;
    border-radius: 0 0 20px 20px;
}

/* 宠物睡觉状态 */
.study-pet.sleeping .pet-eye {
    transform: scaleY(0.1);
    animation: none;
}

.study-pet.sleeping .pet-body::after {
    content: 'Z';
    position: absolute;
    top: -15px;
    right: -10px;
    font-size: 14px;
    color: var(--gray-400);
    animation: zzz 1s ease-in-out infinite;
}

@keyframes zzz {
    0%, 100% { opacity: 0.5; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-5px); }
}

/* 宠物气泡对话 */
.pet-speech {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--gray-700);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pet-speech::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid white;
}

.study-pet:hover .pet-speech,
.study-pet.talking .pet-speech {
    opacity: 1;
}

/* 深色模式适配 */
body.theme-dark .stress-ball {
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

body.theme-dark .music-visualizer {
    background: rgba(31, 41, 55, 0.9);
}

body.theme-dark .danmaku-item {
    background: rgba(31, 41, 55, 0.85);
    color: var(--primary-light);
}

body.theme-dark .achievement-showcase {
    background: rgba(31, 41, 55, 0.98);
}

body.theme-dark .achievement-title {
    color: var(--gray-100);
}

body.theme-dark .pet-speech {
    background: #374151;
    color: var(--gray-200);
}

body.theme-dark .pet-speech::after {
    border-top-color: #374151;
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    .floating-decor,
    .bubble-effect,
    .heart-effect,
    .star-effect,
    .breathing-circle,
    .rain-drop,
    .snowflake,
    .firefly,
    .music-bar,
    .danmaku-item,
    .pet-body,
    .pet-eye {
        animation: none !important;
    }
}

/* ==================== 解压互动系统 v7.11-v7.20 ==================== */

/* ==================== v7.11: 禅意沙画板 ==================== */
.zen-sandbox {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(to bottom, #f5e6d3, #e8d4b8);
    z-index: 9998;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    touch-action: none;
}

.zen-sandbox.active {
    height: 40vh;
}

.zen-sandbox-canvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.zen-sandbox-toggle {
    position: fixed;
    bottom: 260px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8d4b8, #d4c4a8);
    border: none;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.zen-sandbox-toggle:hover {
    transform: scale(1.1);
}

.zen-sandbox-tools {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sandbox-tool {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.sandbox-tool.active {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* ==================== V8.7: 精简心情调色板 ==================== */
.mood-palette {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 280px;
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mood-palette.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.mood-palette-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    color: var(--gray-500);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mood-palette-close:hover {
    background: var(--gray-200);
}

/* 移除旧的toggle按钮 */
.mood-palette-toggle {
    display: none !important;
}

.mood-colors {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.mood-color {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.mood-color:hover {
    transform: scale(1.15);
}

.mood-color.selected {
    border-color: var(--gray-800);
    transform: scale(1.1);
}

.mood-color::after {
    content: attr(data-mood);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--gray-500);
    white-space: nowrap;
}

.mood-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    -webkit-appearance: none;
    background: linear-gradient(to right, #94a3b8, #6366f1);
}

.mood-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

/* ==================== v7.13: 虚拟泡泡纸 ==================== */
.bubble-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    z-index: 9996;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    padding: 10px;
}

.bubble-wrap.active {
    height: 35vh;
}

.bubble-wrap-toggle {
    position: fixed;
    bottom: 320px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c7d2fe, #a5b4fc);
    border: none;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(165, 180, 252, 0.4);
    transition: all 0.3s ease;
}

.bubble-wrap-toggle:hover {
    transform: scale(1.1);
}

.pop-bubble {
    width: 40px;
    height: 40px;
    margin: 4px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(200, 200, 255, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 
        inset 0 -3px 8px rgba(0, 0, 0, 0.05),
        0 2px 5px rgba(0, 0, 0, 0.1);
}

.pop-bubble:hover:not(.popped) {
    transform: scale(1.1);
}

.pop-bubble.popped {
    transform: scale(0.3);
    opacity: 0.3;
    background: rgba(200, 200, 220, 0.3);
    box-shadow: none;
    cursor: default;
}

.pop-bubble.pop-animation {
    animation: bubblePop 0.15s ease-out;
}

@keyframes bubblePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(0.3); opacity: 0.3; }
}

/* ==================== v7.14: 专注番茄钟 ==================== */
.focus-timer {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-150%);
    background: white;
    border-radius: 20px;
    padding: 20px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    min-width: 200px;
}

.focus-timer.active {
    transform: translateX(-50%) translateY(0);
}

.timer-display {
    font-size: 48px;
    font-weight: 800;
    color: var(--gray-800);
    font-variant-numeric: tabular-nums;
    margin-bottom: 15px;
}

.timer-progress {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 15px;
}

.timer-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 1s linear;
}

.timer-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.timer-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.timer-btn.secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.timer-btn:hover {
    transform: scale(1.05);
}

.focus-timer-mini {
    position: fixed;
    top: 10px;
    right: 10px;
    background: var(--gradient-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    z-index: 101;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    display: none;
}

.focus-timer-mini.visible {
    display: block;
    animation: timerPulse 2s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(99, 102, 241, 0.5); }
}

/* ==================== v7.15: 轻拍节奏游戏 ==================== */
.rhythm-game {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(to top, #1e1b4b, #312e81);
    z-index: 9995;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.rhythm-game.active {
    height: 45vh;
}

.rhythm-lanes {
    display: flex;
    justify-content: center;
    gap: 20px;
    height: 100%;
    padding-top: 20px;
}

.rhythm-lane {
    width: 60px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.rhythm-hit-zone {
    position: absolute;
    bottom: 20px;
    left: 5px;
    right: 5px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
}

.rhythm-note {
    position: absolute;
    left: 5px;
    right: 5px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 8px;
    animation: notefall linear forwards;
}

@keyframes notefall {
    0% { top: -50px; }
    100% { top: calc(100% + 50px); }
}

.rhythm-score {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 24px;
    font-weight: 800;
}

.rhythm-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    font-weight: 800;
    color: #10b981;
    opacity: 0;
    animation: feedbackPop 0.5s ease-out forwards;
}

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

/* ==================== v7.16: 随机奖励刮刮卡 ==================== */
.scratch-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 280px;
    height: 180px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 20px;
    z-index: 10001;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.scratch-card.show {
    transform: translate(-50%, -50%) scale(1);
}

.scratch-card-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.scratch-prize {
    font-size: 48px;
    margin-bottom: 10px;
}

.scratch-text {
    font-size: 18px;
    font-weight: 700;
    color: #78350f;
    text-align: center;
}

.scratch-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.scratch-cover::before {
    content: '👆 刮一刮';
    font-size: 20px;
}

.scratch-card-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
}

/* ==================== v7.17: 幸运转盘 ==================== */
.lucky-wheel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 10002;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lucky-wheel.show {
    transform: translate(-50%, -50%) scale(1);
}

.wheel-container {
    position: relative;
    width: 280px;
    height: 280px;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        #ff6b6b 0deg 45deg,
        #feca57 45deg 90deg,
        #48dbfb 90deg 135deg,
        #ff9ff3 135deg 180deg,
        #1dd1a1 180deg 225deg,
        #5f27cd 225deg 270deg,
        #00d2d3 270deg 315deg,
        #ff9f43 315deg 360deg
    );
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid #1f2937;
    z-index: 10;
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-700);
    cursor: pointer;
}

.wheel-close {
    position: absolute;
    top: -50px;
    right: -20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* ==================== v7.18: 可爱表情反应 ==================== */
.emoji-reactions {
    position: fixed;
    bottom: 380px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

.emoji-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 22px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover {
    transform: scale(1.2);
}

.emoji-btn:active {
    transform: scale(0.9);
}

.emoji-explosion {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    font-size: 30px;
    animation: emojiExplode 1s ease-out forwards;
}

@keyframes emojiExplode {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(0.5) rotate(360deg) translateY(-100px);
        opacity: 0;
    }
}

/* ==================== v7.19: 冥想引导界面 ==================== */
.meditation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    z-index: 10003;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

.meditation-orb {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.8), rgba(139, 92, 246, 0.4));
    box-shadow: 
        0 0 60px rgba(99, 102, 241, 0.5),
        0 0 120px rgba(139, 92, 246, 0.3);
    animation: meditationPulse 4s ease-in-out infinite;
}

@keyframes meditationPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 60px rgba(99, 102, 241, 0.5), 0 0 120px rgba(139, 92, 246, 0.3);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 100px rgba(99, 102, 241, 0.7), 0 0 200px rgba(139, 92, 246, 0.5);
    }
}

.meditation-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 24px;
    font-weight: 300;
    margin-top: 40px;
    text-align: center;
    letter-spacing: 2px;
}

.meditation-timer {
    color: rgba(255, 255, 255, 0.6);
    font-size: 48px;
    font-weight: 200;
    margin-top: 30px;
    font-variant-numeric: tabular-nums;
}

.meditation-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.meditation-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.meditation-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.meditation-star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    animation: starTwinkle 2s ease-in-out infinite;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* ==================== V8.0: 精简版解压控制面板 ==================== */
.stress-relief-panel {
    position: fixed;
    bottom: 140px;
    left: 20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    min-width: 180px;
}

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

/* V8.10: 面板头部 */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.panel-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.panel-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* V8.10: 面板网格布局 */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 12px;
}

.stress-panel-toggle {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

.stress-panel-toggle:hover {
    transform: scale(1.1);
}

.stress-panel-toggle.active {
    background: var(--gray-800);
    transform: rotate(45deg);
}

.panel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 12px 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
    background: var(--gray-50);
}

.panel-item:hover {
    background: var(--gray-100);
    transform: scale(1.05);
}

.panel-item:active {
    transform: scale(0.95);
}

.panel-item-icon {
    font-size: 28px;
}

.panel-item-label {
    font-size: 11px;
    color: var(--gray-600);
    white-space: nowrap;
    font-weight: 500;
}

/* V8.6-V8.9: 关闭按钮样式 */
.zen-sandbox-close,
.bubble-wrap-close,
.focus-timer-close,
.mood-palette-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    color: var(--gray-600);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}

.zen-sandbox-close:hover,
.bubble-wrap-close:hover,
.focus-timer-close:hover,
.mood-palette-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* 移除旧的单独切换按钮 */
.zen-sandbox-toggle,
.bubble-wrap-toggle,
.panel-toggle {
    display: none !important;
}

/* 深色模式适配 V8.0 */
body.theme-dark .zen-sandbox {
    background: linear-gradient(to bottom, #374151, #1f2937);
}

body.theme-dark .mood-palette {
    background: #1f2937;
}

body.theme-dark .bubble-wrap {
    background: linear-gradient(135deg, #312e81, #1e1b4b);
}

body.theme-dark .focus-timer {
    background: #1f2937;
}

body.theme-dark .timer-display {
    color: var(--gray-100);
}

body.theme-dark .stress-relief-panel {
    background: rgba(31, 41, 55, 0.98);
}

body.theme-dark .panel-header {
    background: var(--gradient-primary);
}

body.theme-dark .panel-item {
    background: rgba(255, 255, 255, 0.05);
}

body.theme-dark .panel-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.theme-dark .panel-item-label {
    color: var(--gray-300);
}

body.theme-dark .zen-sandbox-close,
body.theme-dark .bubble-wrap-close,
body.theme-dark .focus-timer-close,
body.theme-dark .mood-palette-close {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray-300);
}

body.theme-dark .emoji-btn {
    background: #374151;
}

/* 减少动画偏好 V8.0 */
@media (prefers-reduced-motion: reduce) {
    .meditation-orb,
    .rhythm-note,
    .emoji-explosion,
    .pop-bubble,
    .wheel,
    .meditation-star {
        animation: none !important;
    }
}

/* ==================== 宠物陪伴系统 v9.1-v9.20 全新升级 ==================== */

/* ==================== v9.1: 宠物选择界面 - 超级可爱版 ==================== */
.pet-selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.3), rgba(147, 112, 219, 0.3));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* v9 新版宠物选择模态框 */
.pet-selection-modal.pet-selection-v9 {
    background: linear-gradient(180deg, #FFFAF0 0%, #FFF5EE 50%, #FFF0F5 100%);
    border-radius: 32px;
    padding: 24px;
    max-width: 420px;
    width: 92%;
    max-height: 88vh;
    overflow-y: auto;
    transform: scale(0.85) translateY(30px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 25px 80px rgba(255, 107, 129, 0.25),
        0 10px 40px rgba(147, 112, 219, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.6);
    position: relative;
}

.pet-selection-overlay.show .pet-selection-modal.pet-selection-v9 {
    transform: scale(1) translateY(0);
}

/* 跳过按钮 */
.pet-skip-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.pet-skip-btn:hover {
    background: rgba(255, 255, 255, 1);
    color: var(--gray-700);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 头部区域 */
.pet-selection-header {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 10px;
}

.pet-selection-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    50% { transform: scale(1) rotate(0deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

.pet-selection-modal.pet-selection-v9 .pet-selection-title {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #FF6B81 0%, #9370DB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.pet-selection-modal.pet-selection-v9 .pet-selection-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin: 0;
}

/* 宠物选项容器 */
.pet-options-container {
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 16px;
    padding-right: 5px;
}

.pet-options-container::-webkit-scrollbar {
    width: 4px;
}

.pet-options-container::-webkit-scrollbar-thumb {
    background: rgba(147, 112, 219, 0.3);
    border-radius: 4px;
}

/* 稀有度分类 */
.pet-rarity-section {
    margin-bottom: 16px;
}

.pet-rarity-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 10px;
    padding-left: 4px;
}

.rarity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.rarity-dot.common { background: #98D8C8; }
.rarity-dot.rare { background: #9370DB; }
.rarity-dot.legendary { background: linear-gradient(135deg, #FFD700, #FF8C00); }

/* 宠物选项网格 */
.pet-selection-modal.pet-selection-v9 .pet-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 0;
}

/* 宠物卡片 - 超可爱设计 */
.pet-card {
    aspect-ratio: auto;
    min-height: 120px;
    border-radius: 20px;
    background: var(--pet-bg, linear-gradient(145deg, #f8fafc, #f1f5f9));
    border: 3px solid transparent;
    cursor: pointer;
    padding: 12px 8px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.pet-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 2;
}

.pet-card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: var(--pet-color, #FFB6C1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.pet-card:hover .pet-card-glow {
    opacity: 0.4;
}

.pet-card.selected .pet-card-glow {
    opacity: 0.6;
}

/* 传说卡片闪光效果 */
.pet-card.legendary .pet-card-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 215, 0, 0.3) 50%,
        transparent 60%
    );
    animation: cardShine 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes cardShine {
    0%, 100% { transform: translateX(-100%) rotate(45deg); }
    50% { transform: translateX(100%) rotate(45deg); }
}

.pet-card-icon {
    font-size: 42px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.pet-card:hover .pet-card-icon {
    transform: scale(1.15) rotate(5deg);
    animation: petWiggle 0.5s ease-in-out;
}

@keyframes petWiggle {
    0%, 100% { transform: scale(1.15) rotate(5deg); }
    25% { transform: scale(1.15) rotate(-5deg); }
    50% { transform: scale(1.2) rotate(5deg); }
    75% { transform: scale(1.15) rotate(-5deg); }
}

.pet-card-info {
    text-align: center;
}

.pet-card-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.pet-card-traits {
    font-size: 10px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pet-card-bonus {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    color: var(--gray-500);
    background: rgba(255, 255, 255, 0.7);
    padding: 3px 8px;
    border-radius: 10px;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s ease;
}

.pet-card:hover .pet-card-bonus,
.pet-card.selected .pet-card-bonus {
    opacity: 1;
    transform: translateY(0);
}

.bonus-icon { font-size: 10px; }

/* 选中状态 */
.pet-card.selected {
    border-color: var(--pet-color, var(--primary));
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.pet-card.legendary.selected {
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4);
}

/* 预览区域 */
.pet-preview-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 16px;
    animation: slideUp 0.3s ease;
}

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

.pet-preview-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pet-preview-avatar {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.pet-preview-info {
    flex: 1;
}

.pet-preview-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.pet-preview-desc {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.pet-preview-ability {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #9370DB;
    background: rgba(147, 112, 219, 0.1);
    padding: 4px 10px;
    border-radius: 10px;
}

.ability-icon { font-size: 12px; }

/* 命名区域 */
.pet-naming-section {
    margin-bottom: 16px;
}

.pet-name-label {
    text-align: center;
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 10px;
}

.pet-name-input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    padding: 4px 12px;
    transition: all 0.2s ease;
}

.pet-name-input-wrapper:focus-within {
    border-color: #FF6B81;
    box-shadow: 0 0 0 4px rgba(255, 107, 129, 0.1);
}

.pet-name-emoji {
    font-size: 18px;
    margin-right: 8px;
}

.pet-selection-modal.pet-selection-v9 .pet-name-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    padding: 10px 0;
    text-align: left;
    margin-bottom: 0;
}

.pet-selection-modal.pet-selection-v9 .pet-name-input:focus {
    outline: none;
    border-color: transparent;
}

.pet-name-count {
    font-size: 12px;
    color: var(--gray-400);
}

/* 操作按钮区域 */
.pet-action-buttons {
    margin-bottom: 12px;
}

.pet-selection-modal.pet-selection-v9 .pet-confirm-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: linear-gradient(135deg, #FF6B81 0%, #FF8E9E 100%);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 129, 0.35);
}

.pet-selection-modal.pet-selection-v9 .pet-confirm-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 129, 0.45);
}

.pet-selection-modal.pet-selection-v9 .pet-confirm-btn:disabled {
    background: linear-gradient(135deg, #ccc 0%, #ddd 100%);
    box-shadow: none;
    cursor: not-allowed;
}

.btn-icon { font-size: 18px; }

/* 提示区域 */
.pet-tips {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gray-400);
}

.tip-icon { font-size: 14px; }

/* 兼容旧版样式 */
.pet-selection-modal {
    background: white;
    border-radius: 24px;
    padding: 30px;
    max-width: 360px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.pet-selection-overlay.show .pet-selection-modal:not(.pet-selection-v9) {
    transform: scale(1);
}

.pet-selection-title {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.pet-selection-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

.pet-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 24px;
}

.pet-option:not(.pet-card) {
    aspect-ratio: 1;
    border-radius: 20px;
    background: var(--gray-50);
    border: 3px solid transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    padding: 12px;
}

.pet-option:not(.pet-card):hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

.pet-option:not(.pet-card).selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.pet-option-icon {
    font-size: 40px;
}

.pet-option-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
}

.pet-name-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    font-size: 16px;
    text-align: center;
    margin-bottom: 20px;
    transition: border-color 0.2s ease;
}

.pet-name-input:focus {
    outline: none;
    border-color: var(--primary);
}

.pet-confirm-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}


.pet-confirm-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

/* ==================== v8.2: 宠物主界面 ==================== */
.virtual-pet-container {
    position: fixed;
    bottom: 70px;
    left: 10px;
    z-index: 150;
    transition: all 0.3s ease;
}

.virtual-pet {
    width: 90px;
    height: 90px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.virtual-pet:hover {
    transform: scale(1.1);
}

.virtual-pet-sprite {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    animation: petBounce 2s ease-in-out infinite;
}

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

/* ==================== v8.3: 宠物状态栏 ==================== */
.pet-status-bar {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.virtual-pet-container:hover .pet-status-bar,
.virtual-pet-container.show-status .pet-status-bar {
    opacity: 1;
    visibility: visible;
}

.pet-name-display {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    text-align: center;
    margin-bottom: 10px;
}

.pet-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.pet-stat:last-child {
    margin-bottom: 0;
}

.pet-stat-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.pet-stat-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.pet-stat-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.pet-stat-fill.hunger {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.pet-stat-fill.happiness {
    background: linear-gradient(90deg, #ec4899, #f472b6);
}

.pet-stat-fill.energy {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.pet-stat-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    width: 30px;
    text-align: right;
}

/* ==================== v8.4: 宠物心情气泡 ==================== */
.pet-mood-bubble {
    position: absolute;
    bottom: 85px;
    left: 70px;
    background: white;
    border-radius: 16px;
    padding: 10px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    font-size: 13px;
    color: var(--gray-700);
    max-width: 180px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 151;
}

.pet-mood-bubble.show {
    opacity: 1;
    transform: translateY(0);
}

.pet-mood-bubble::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 20px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

/* ==================== v8.5: 喂食动画 ==================== */
.pet-food-item {
    position: fixed;
    font-size: 30px;
    z-index: 200;
    pointer-events: none;
    animation: foodFloat 1s ease-out forwards;
}

@keyframes foodFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-30px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.8);
    }
}

.pet-eating {
    animation: petEat 0.5s ease infinite !important;
}

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

/* ==================== v8.6: 互动菜单 ==================== */
.pet-action-menu {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    gap: 10px;
    margin-bottom: 15px;
    z-index: 152;
}

.pet-action-menu.show {
    display: flex;
}

.pet-action-btn {
    width: 55px;
    height: 55px;
    border-radius: 16px;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.pet-action-btn:hover {
    background: var(--primary-light);
    transform: scale(1.1);
}

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

.pet-action-icon {
    font-size: 22px;
}

.pet-action-label {
    font-size: 10px;
    color: var(--gray-600);
    font-weight: 500;
}

/* ==================== v8.7: 宠物等级系统 ==================== */
.pet-level-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 28px;
    height: 28px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: white;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.4);
    border: 2px solid white;
}

.pet-exp-bar {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.pet-exp-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ==================== v8.8: 宠物装扮系统 ==================== */
.pet-accessory {
    position: absolute;
    pointer-events: none;
    z-index: 5;
}

.pet-accessory.hat {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 30px;
}

.pet-accessory.glasses {
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
}

.pet-accessory.bow {
    top: 5px;
    right: -5px;
    font-size: 20px;
}

/* ==================== v8.9: 宠物商店 ==================== */
.pet-shop-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 24px;
    padding: 24px;
    max-width: 340px;
    width: 90%;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 10011;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pet-shop-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.pet-shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pet-shop-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--gray-800);
}

.pet-coins-display {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.pet-shop-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.pet-shop-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: var(--gray-100);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pet-shop-tab.active {
    background: var(--primary);
    color: white;
}

.pet-shop-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.pet-shop-item {
    aspect-ratio: 1;
    border-radius: 16px;
    background: var(--gray-50);
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.pet-shop-item:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.pet-shop-item.owned {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

.pet-shop-item-icon {
    font-size: 28px;
}

.pet-shop-item-price {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 2px;
}

.pet-shop-item-owned {
    font-size: 10px;
    color: #10b981;
    font-weight: 600;
}

/* ==================== v8.10: 宠物成就 ==================== */
.pet-achievement-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    z-index: 10012;
    box-shadow: 0 20px 60px rgba(245, 158, 11, 0.4);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pet-achievement-popup.show {
    transform: translate(-50%, -50%) scale(1);
}

.pet-achievement-icon {
    font-size: 60px;
    margin-bottom: 15px;
    animation: achievementBounce 0.5s ease infinite;
}

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

.pet-achievement-title {
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
}

.pet-achievement-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.pet-achievement-reward {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

/* ==================== v8.11: 宠物动作表情 ==================== */
.virtual-pet.dancing .virtual-pet-sprite {
    animation: petDance 0.4s ease infinite;
}

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

.virtual-pet.sleeping .virtual-pet-sprite {
    animation: petSleep 2s ease-in-out infinite;
    filter: grayscale(30%) drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

@keyframes petSleep {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(3px) scale(0.98); }
}

.virtual-pet.hungry .virtual-pet-sprite {
    animation: petHungry 1s ease-in-out infinite;
}

@keyframes petHungry {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-3px) rotate(-2deg); }
    75% { transform: translateY(-3px) rotate(2deg); }
}

.virtual-pet.excited .virtual-pet-sprite {
    animation: petExcited 0.3s ease infinite;
}

@keyframes petExcited {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

/* ==================== v8.12: 宠物睡眠模式 ==================== */
.pet-sleep-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.pet-zzz {
    position: absolute;
    color: var(--gray-400);
    font-weight: 700;
    animation: zzzFloat 2s ease-in-out infinite;
}

.pet-zzz:nth-child(1) {
    font-size: 12px;
    top: 10px;
    right: 5px;
    animation-delay: 0s;
}

.pet-zzz:nth-child(2) {
    font-size: 16px;
    top: 0;
    right: 15px;
    animation-delay: 0.5s;
}

.pet-zzz:nth-child(3) {
    font-size: 20px;
    top: -15px;
    right: 25px;
    animation-delay: 1s;
}

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

/* ==================== v8.13: 食物类型 ==================== */
.pet-food-menu {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 200px;
    margin-bottom: 15px;
    z-index: 153;
}

.pet-food-menu.show {
    display: flex;
}

.pet-food-option {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    border: 2px solid var(--gray-200);
    background: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.2s ease;
}

.pet-food-option:hover {
    border-color: var(--primary);
    transform: scale(1.1);
}

.pet-food-option:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pet-food-icon {
    font-size: 22px;
}

.pet-food-cost {
    font-size: 9px;
    color: var(--gray-500);
    font-weight: 600;
}

/* ==================== v8.14: 宠物每日任务 ==================== */
.pet-daily-tasks {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 24px;
    padding: 24px;
    max-width: 320px;
    width: 90%;
    z-index: 10011;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    display: none;
}

.pet-daily-tasks.show {
    display: block;
    animation: tasksPop 0.3s ease;
}

@keyframes tasksPop {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.pet-tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pet-tasks-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--gray-800);
}

.pet-tasks-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
    font-size: 18px;
    color: var(--gray-500);
}

.pet-task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--gray-50);
    border-radius: 14px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.pet-task-item.completed {
    background: rgba(16, 185, 129, 0.1);
}

.pet-task-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: transparent;
    transition: all 0.2s ease;
}

.pet-task-item.completed .pet-task-check {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.pet-task-info {
    flex: 1;
}

.pet-task-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.pet-task-progress {
    font-size: 12px;
    color: var(--gray-500);
}

.pet-task-reward {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

/* ==================== v8.15: 宠物互动特效 ==================== */
.pet-heart-burst {
    position: absolute;
    pointer-events: none;
    z-index: 200;
}

.pet-heart {
    position: absolute;
    font-size: 20px;
    animation: heartBurst 1s ease-out forwards;
}

@keyframes heartBurst {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0);
    }
    50% {
        opacity: 1;
        transform: translate(var(--tx), var(--ty)) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--tx) * 1.5), calc(var(--ty) * 1.5)) scale(0.5);
    }
}

.pet-sparkle {
    position: absolute;
    font-size: 16px;
    animation: sparkle 0.8s ease-out forwards;
    pointer-events: none;
}

@keyframes sparkle {
    0% { opacity: 1; transform: scale(0) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.5) rotate(180deg); }
    100% { opacity: 0; transform: scale(0.5) rotate(360deg); }
}

/* ==================== v8.16: 宠物背景环境 ==================== */
.pet-environment {
    position: absolute;
    bottom: 0;
    left: -20px;
    right: -20px;
    height: 30px;
    pointer-events: none;
}

.pet-grass {
    position: absolute;
    bottom: 0;
    font-size: 24px;
    animation: grassSway 3s ease-in-out infinite;
}

.pet-grass:nth-child(1) { left: 0; animation-delay: 0s; }
.pet-grass:nth-child(2) { left: 30px; animation-delay: 0.5s; }
.pet-grass:nth-child(3) { right: 30px; animation-delay: 1s; }
.pet-grass:nth-child(4) { right: 0; animation-delay: 1.5s; }

@keyframes grassSway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* ==================== v8.17: 宠物进化 ==================== */
.pet-evolution-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10015;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.pet-evolution-modal.show {
    opacity: 1;
    visibility: visible;
}

.pet-evolution-content {
    text-align: center;
}

.pet-evolution-before {
    font-size: 80px;
    animation: evolvePulse 1s ease infinite;
}

@keyframes evolvePulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.5); }
}

.pet-evolution-arrow {
    font-size: 40px;
    color: white;
    margin: 20px 0;
    animation: arrowPulse 0.5s ease infinite;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.pet-evolution-after {
    font-size: 100px;
    animation: evolveGlow 1s ease infinite;
}

@keyframes evolveGlow {
    0%, 100% { 
        transform: scale(1); 
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
    }
    50% { 
        transform: scale(1.15); 
        filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.8));
    }
}

.pet-evolution-text {
    color: white;
    font-size: 24px;
    font-weight: 800;
    margin-top: 30px;
}

/* ==================== v8.18: 宠物心情日记 ==================== */
.pet-diary-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 24px;
    padding: 24px;
    max-width: 320px;
    width: 90%;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 10011;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    display: none;
}

.pet-diary-modal.show {
    display: block;
    animation: diaryPop 0.3s ease;
}

@keyframes diaryPop {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.pet-diary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pet-diary-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--gray-800);
}

.pet-diary-entry {
    padding: 14px;
    background: var(--gray-50);
    border-radius: 14px;
    margin-bottom: 10px;
}

.pet-diary-date {
    font-size: 11px;
    color: var(--gray-400);
    margin-bottom: 6px;
}

.pet-diary-content {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.5;
}

.pet-diary-mood {
    display: inline-block;
    margin-top: 8px;
    font-size: 20px;
}

/* ==================== v8.19: 宠物小游戏 ==================== */
.pet-game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 10013;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pet-game-modal.show {
    display: flex;
}

.pet-game-header {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.pet-game-score {
    color: white;
    font-size: 24px;
    font-weight: 800;
}

.pet-game-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.pet-game-area {
    width: 300px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.pet-game-target {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    cursor: pointer;
    transition: transform 0.1s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.pet-game-target:active {
    transform: scale(0.9);
}

/* ==================== v8.20: 宠物统计面板 ==================== */
.pet-stats-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 24px;
    padding: 24px;
    max-width: 320px;
    width: 90%;
    z-index: 10011;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    display: none;
}

.pet-stats-modal.show {
    display: block;
    animation: statsPop 0.3s ease;
}

@keyframes statsPop {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.pet-stats-header {
    text-align: center;
    margin-bottom: 20px;
}

.pet-stats-avatar {
    font-size: 50px;
    margin-bottom: 10px;
}

.pet-stats-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--gray-800);
}

.pet-stats-level {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
}

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

.pet-stats-item {
    background: var(--gray-50);
    border-radius: 14px;
    padding: 14px;
    text-align: center;
}

.pet-stats-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.pet-stats-label {
    font-size: 11px;
    color: var(--gray-500);
}

.pet-stats-achievements {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.pet-stats-badge {
    font-size: 24px;
    padding: 8px;
    background: var(--gray-100);
    border-radius: 12px;
}

/* 深色模式适配 v8.1-v8.20 */
body.theme-dark .pet-selection-modal,
body.theme-dark .pet-shop-modal,
body.theme-dark .pet-daily-tasks,
body.theme-dark .pet-diary-modal,
body.theme-dark .pet-stats-modal {
    background: #1f2937;
}

body.theme-dark .pet-selection-title,
body.theme-dark .pet-shop-title,
body.theme-dark .pet-tasks-title,
body.theme-dark .pet-diary-title,
body.theme-dark .pet-stats-name {
    color: var(--gray-100);
}

body.theme-dark .pet-option,
body.theme-dark .pet-shop-item,
body.theme-dark .pet-task-item,
body.theme-dark .pet-diary-entry,
body.theme-dark .pet-stats-item {
    background: #374151;
}

body.theme-dark .pet-status-bar,
body.theme-dark .pet-mood-bubble,
body.theme-dark .pet-action-menu,
body.theme-dark .pet-food-menu {
    background: #374151;
}

body.theme-dark .pet-name-display {
    color: var(--gray-100);
}

body.theme-dark .pet-mood-bubble::before {
    border-top-color: #374151;
}

/* 减少动画偏好 v8.1-v8.20 */
@media (prefers-reduced-motion: reduce) {
    .virtual-pet-sprite,
    .pet-heart,
    .pet-sparkle,
    .pet-zzz,
    .pet-grass,
    .pet-evolution-before,
    .pet-evolution-after {
        animation: none !important;
    }
}

/* V15-V19: 科学助记系统UI动画增强 */
@keyframes pulse-soft {
    0%, 100% { transform: scale(1); box-shadow: 0 3px 10px rgba(236,72,153,0.35); }
    50% { transform: scale(1.05); box-shadow: 0 4px 14px rgba(236,72,153,0.5); }
}

@keyframes mnemonic-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(139,92,246,0); }
    50% { box-shadow: 0 0 20px rgba(139,92,246,0.3); }
}

@keyframes emoji-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    25% { transform: translateY(-3px) scale(1.1); }
    50% { transform: translateY(0) scale(1); }
    75% { transform: translateY(-2px) scale(1.05); }
}

@keyframes badge-pop {
    0% { transform: scale(0) rotate(-10deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes shimmer-slide {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* 科学助记卡片样式 */
.word-mnemonic-v14 {
    transition: all 0.3s ease;
}

.word-mnemonic-v14:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(168,85,247,0.15), 0 4px 12px rgba(0,0,0,0.05) !important;
}

/* 记忆类型标签动画 */
.mnemonic-type-badge {
    animation: badge-pop 0.4s ease backwards;
    transition: all 0.2s ease;
}

.mnemonic-type-badge:hover {
    transform: translateY(-2px) scale(1.05);
}

/* 功能按钮悬浮效果 */
.word-mnemonic-v14 button {
    transition: all 0.2s ease !important;
}

.word-mnemonic-v14 button:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.08);
}

.word-mnemonic-v14 button:active {
    transform: translateY(0) scale(0.98);
}

/* 情感锚定脉冲动画 */
.emotional-anchor-icon {
    animation: pulse-soft 2s infinite;
}

/* 效果百分比光泽动画 */
.effectiveness-badge {
    background-size: 200% auto;
    animation: shimmer-slide 3s linear infinite;
}

/* 分块标签进入动画 */
.chunk-word-tag {
    animation: badge-pop 0.3s ease backwards;
}

.chunk-word-tag:nth-child(2) { animation-delay: 0.05s; }
.chunk-word-tag:nth-child(3) { animation-delay: 0.1s; }
.chunk-word-tag:nth-child(4) { animation-delay: 0.15s; }
.chunk-word-tag:nth-child(5) { animation-delay: 0.2s; }
.chunk-word-tag:nth-child(6) { animation-delay: 0.25s; }

/* ==================== v8.21-v8.25 宠物系统新功能样式 ==================== */

/* v8.21: 游泳动画（鲨鱼特别版） */
.virtual-pet.swimming .virtual-pet-sprite {
    animation: sharkSwim 0.8s ease-in-out infinite;
}

@keyframes sharkSwim {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25% { transform: translateX(20px) rotate(10deg); }
    50% { transform: translateX(0) rotate(0deg); }
    75% { transform: translateX(-20px) rotate(-10deg); }
}

.pet-water-ripple {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 50%;
    animation: waterRipple 2s ease-out forwards;
    pointer-events: none;
}

@keyframes waterRipple {
    0% { transform: translate(-50%, 0) scale(0); opacity: 1; }
    100% { transform: translate(-50%, -50px) scale(3); opacity: 0; }
}

/* v8.22: 技能面板 */
.pet-skills-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 20px;
    z-index: 10015;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    max-height: 60vh;
    overflow-y: auto;
}

.pet-skills-modal.show {
    transform: translateY(0);
}

.pet-skills-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pet-skills-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
}

.pet-skills-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    font-size: 20px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.pet-skill-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--gray-50);
    border-radius: 16px;
    transition: all 0.2s ease;
}

.pet-skill-item.ready {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.pet-skill-item.cooling {
    opacity: 0.6;
}

.pet-skill-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pet-skill-info {
    flex: 1;
}

.pet-skill-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.pet-skill-status {
    font-size: 12px;
    color: var(--gray-500);
}

.pet-skill-use {
    padding: 8px 16px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pet-skill-use:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.pet-skill-use:not(:disabled):hover {
    transform: scale(1.05);
}

/* 宝藏效果 */
.pet-treasure-item {
    position: absolute;
    font-size: 24px;
    animation: treasureFloat 1.5s ease-out forwards;
    pointer-events: none;
}

@keyframes treasureFloat {
    0% { transform: translate(-50%, 0) scale(0) rotate(0deg); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translate(-50%, -80px) scale(1.2) rotate(360deg); opacity: 0; }
}

/* v8.23: 表情选择器 */
.pet-emoji-picker {
    position: fixed;
    background: white;
    border-radius: 20px;
    padding: 15px;
    z-index: 10016;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0);
    transform-origin: bottom left;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pet-emoji-picker.show {
    transform: scale(1);
}

.pet-emoji-picker-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 10px;
    text-align: center;
}

.pet-emoji-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.pet-emoji-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--gray-50);
    border-radius: 12px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pet-emoji-btn:hover {
    background: var(--gray-100);
    transform: scale(1.15);
}

.pet-emoji-btn:active {
    transform: scale(0.95);
}

/* 飘动表情 */
.pet-floating-emoji {
    position: absolute;
    font-size: 40px;
    animation: emojiFloat 1.5s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes emojiFloat {
    0% { transform: translate(-50%, -50%) scale(0) rotate(-20deg); opacity: 0; }
    30% { opacity: 1; transform: translate(-50%, -50%) scale(1.3) rotate(10deg); }
    100% { transform: translate(-50%, -150%) scale(0.8) rotate(0deg); opacity: 0; }
}

/* v8.24: 天气效果 */
.pet-weather-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.pet-weather-sunshine .pet-sun {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 30px;
    animation: sunShine 2s ease-in-out infinite;
}

@keyframes sunShine {
    0%, 100% { transform: scale(1) rotate(0deg); filter: brightness(1); }
    50% { transform: scale(1.1) rotate(10deg); filter: brightness(1.2); }
}

.pet-weather-rain .pet-raindrop {
    position: absolute;
    font-size: 14px;
    animation: rainFall 1s linear infinite;
}

.pet-weather-rain .pet-raindrop:nth-child(1) { left: 10%; animation-delay: 0s; }
.pet-weather-rain .pet-raindrop:nth-child(2) { left: 20%; animation-delay: 0.1s; }
.pet-weather-rain .pet-raindrop:nth-child(3) { left: 30%; animation-delay: 0.2s; }
.pet-weather-rain .pet-raindrop:nth-child(4) { left: 40%; animation-delay: 0.3s; }
.pet-weather-rain .pet-raindrop:nth-child(5) { left: 50%; animation-delay: 0.4s; }
.pet-weather-rain .pet-raindrop:nth-child(6) { left: 60%; animation-delay: 0.5s; }
.pet-weather-rain .pet-raindrop:nth-child(7) { left: 70%; animation-delay: 0.6s; }
.pet-weather-rain .pet-raindrop:nth-child(8) { left: 80%; animation-delay: 0.7s; }
.pet-weather-rain .pet-raindrop:nth-child(9) { left: 90%; animation-delay: 0.8s; }
.pet-weather-rain .pet-raindrop:nth-child(10) { left: 95%; animation-delay: 0.9s; }

@keyframes rainFall {
    0% { top: -20px; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.pet-weather-snow .pet-snowflake {
    position: absolute;
    font-size: 16px;
    animation: snowFall 3s linear infinite;
}

.pet-weather-snow .pet-snowflake:nth-child(1) { left: 10%; animation-delay: 0s; }
.pet-weather-snow .pet-snowflake:nth-child(2) { left: 25%; animation-delay: 0.5s; }
.pet-weather-snow .pet-snowflake:nth-child(3) { left: 40%; animation-delay: 1s; }
.pet-weather-snow .pet-snowflake:nth-child(4) { left: 55%; animation-delay: 1.5s; }
.pet-weather-snow .pet-snowflake:nth-child(5) { left: 70%; animation-delay: 2s; }
.pet-weather-snow .pet-snowflake:nth-child(6) { left: 85%; animation-delay: 2.5s; }
.pet-weather-snow .pet-snowflake:nth-child(7) { left: 15%; animation-delay: 0.3s; }
.pet-weather-snow .pet-snowflake:nth-child(8) { left: 65%; animation-delay: 1.8s; }

@keyframes snowFall {
    0% { top: -20px; opacity: 0; transform: translateX(0) rotate(0deg); }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; transform: translateX(20px) rotate(360deg); }
}

.pet-weather-clouds .pet-cloud {
    position: absolute;
    top: 10px;
    font-size: 24px;
    animation: cloudFloat 4s ease-in-out infinite;
}

.pet-weather-clouds .pet-cloud:first-child {
    left: 10%;
}

.pet-weather-clouds .pet-cloud:last-child {
    right: 10%;
    animation-delay: 2s;
}

@keyframes cloudFloat {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* v8.25: 冒险系统 */
.pet-adventure-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 20px;
    z-index: 10015;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    max-height: 70vh;
    overflow-y: auto;
}

.pet-adventure-modal.show {
    transform: translateY(0);
}

.pet-adventure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pet-adventure-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
}

.pet-adventure-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    font-size: 20px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pet-adventure-intro {
    font-size: 14px;
    color: var(--gray-600);
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    border-radius: 12px;
}

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

.pet-adventure-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--gray-50);
    border-radius: 16px;
    transition: all 0.2s ease;
}

.pet-adventure-item.special {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.15));
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.pet-adventure-item.locked {
    opacity: 0.5;
    filter: grayscale(50%);
}

.pet-adventure-item-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pet-adventure-item-info {
    flex: 1;
}

.pet-adventure-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.pet-adventure-item-time {
    font-size: 12px;
    color: var(--gray-500);
}

.pet-adventure-item-rewards {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: var(--gray-600);
}

.pet-adventure-start {
    padding: 8px 16px;
    border: none;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pet-adventure-start:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.pet-adventure-start:not(:disabled):hover {
    transform: scale(1.05);
}

/* 冒险进度 */
.pet-adventure-progress {
    text-align: center;
    padding: 20px;
}

.pet-adventure-current {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.pet-adventure-icon {
    font-size: 40px;
    animation: adventureBounce 1s ease-in-out infinite;
}

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

.pet-adventure-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
}

.pet-adventure-bar {
    width: 100%;
    height: 12px;
    background: var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.pet-adventure-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.pet-adventure-time {
    font-size: 14px;
    color: var(--gray-500);
}

/* 暗黑模式适配 */
@media (prefers-color-scheme: dark) {
    .pet-skills-modal,
    .pet-adventure-modal {
        background: var(--gray-900);
    }
    
    .pet-skills-title,
    .pet-adventure-title,
    .pet-skill-name,
    .pet-adventure-item-name,
    .pet-adventure-name {
        color: var(--gray-100);
    }
    
    .pet-skill-item,
    .pet-adventure-item {
        background: var(--gray-800);
    }
    
    .pet-skill-icon,
    .pet-adventure-item-icon {
        background: var(--gray-700);
    }
    
    .pet-emoji-picker {
        background: var(--gray-900);
    }
    
    .pet-emoji-btn {
        background: var(--gray-800);
    }
    
    .pet-emoji-btn:hover {
        background: var(--gray-700);
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    .virtual-pet.swimming .virtual-pet-sprite,
    .pet-water-ripple,
    .pet-treasure-item,
    .pet-floating-emoji,
    .pet-sun,
    .pet-raindrop,
    .pet-snowflake,
    .pet-cloud,
    .pet-adventure-icon {
        animation: none !important;
    }
}

/* ==================== v8.26-v8.30 可爱人性化优化样式 ==================== */

/* v8.26: 宠物设置面板 */
.pet-settings-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 20px;
    z-index: 10015;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    max-height: 80vh;
    overflow-y: auto;
}

.pet-settings-modal.show {
    transform: translateY(0);
}

.pet-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.pet-settings-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
}

.pet-settings-subtitle {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 15px;
}

.pet-settings-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    font-size: 20px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pet-settings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.pet-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: var(--gray-50);
    border-radius: 16px;
}

.pet-setting-info {
    flex: 1;
}

.pet-setting-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.pet-setting-desc {
    font-size: 12px;
    color: var(--gray-500);
}

.pet-setting-options {
    display: flex;
    gap: 6px;
}

.pet-freq-btn,
.pet-pos-btn {
    padding: 6px 12px;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pet-freq-btn.active,
.pet-pos-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* 开关样式 */
.pet-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.pet-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pet-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: 0.3s;
    border-radius: 28px;
}

.pet-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pet-toggle input:checked + .pet-toggle-slider {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.pet-toggle input:checked + .pet-toggle-slider:before {
    transform: translateX(22px);
}

.pet-settings-save {
    width: 100%;
    padding: 14px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pet-settings-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* v8.27: 空闲动作气泡 */
.pet-action-bubble {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 8px 14px;
    border-radius: 16px;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 5;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.pet-action-bubble.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.pet-action-text {
    font-size: 13px;
    color: #92400e;
    font-style: italic;
}

/* 空闲动作动画 */
.virtual-pet.idle-action .virtual-pet-sprite {
    animation: idleWiggle 0.5s ease-in-out;
}

@keyframes idleWiggle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-5deg) scale(1.05); }
    75% { transform: rotate(5deg) scale(1.05); }
}

/* v8.28: 自动隐藏模式 */
.virtual-pet-container.auto-hide-enabled {
    transition: opacity 0.3s ease;
}

.virtual-pet-container.auto-hide-enabled:not(:hover) {
    opacity: 0.3;
}

.virtual-pet-container.auto-hide-enabled:hover {
    opacity: 1;
}

/* v8.29: 温柔提醒气泡 */
.pet-gentle-reminder {
    position: absolute;
    bottom: calc(100% + 20px);
    right: 0;
    background: white;
    border-radius: 16px;
    padding: 12px 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
    max-width: 220px;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s ease;
    z-index: 10;
}

.pet-gentle-reminder.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.pet-gentle-reminder::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.pet-reminder-icon {
    font-size: 24px;
    text-align: center;
}

.pet-reminder-message {
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.5;
    text-align: center;
}

.pet-reminder-close {
    padding: 8px 12px;
    border: none;
    background: linear-gradient(135deg, #a5f3fc, #67e8f9);
    color: #0e7490;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pet-reminder-close:hover {
    transform: scale(1.05);
}

/* v8.30: 可爱互动效果 */
.virtual-pet.special-reaction .virtual-pet-sprite {
    animation: specialReaction 0.5s ease;
}

@keyframes specialReaction {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-10deg); }
    50% { transform: scale(1.3) rotate(10deg); }
    75% { transform: scale(1.2) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* 小爱心效果 */
.pet-little-heart {
    position: fixed;
    font-size: 16px;
    pointer-events: none;
    z-index: 200;
    animation: littleHeartFloat 0.8s ease-out forwards;
}

@keyframes littleHeartFloat {
    0% { opacity: 1; transform: scale(0.5) translateY(0); }
    100% { opacity: 0; transform: scale(1.2) translateY(-30px); }
}

/* 彩花效果 */
.pet-confetti {
    position: fixed;
    top: -20px;
    font-size: 20px;
    pointer-events: none;
    z-index: 200;
    animation: confettiFall 2s ease-out forwards;
}

@keyframes confettiFall {
    0% { top: -20px; opacity: 1; transform: rotate(0deg) translateX(0); }
    100% { top: 100vh; opacity: 0; transform: rotate(360deg) translateX(50px); }
}

/* 宠物选择优化 - 更可爱的卡片 */
.pet-option {
    padding: 18px 15px;
    border-radius: 20px;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pet-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pet-option:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.pet-option:hover::before {
    opacity: 1;
}

.pet-option.selected {
    border-color: var(--primary);
    background: linear-gradient(145deg, #eff6ff, #dbeafe);
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
}

.pet-option-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.pet-option:hover .pet-option-icon {
    transform: scale(1.15) rotate(5deg);
    animation: petBounce 0.6s ease infinite;
}

@keyframes petBounce {
    0%, 100% { transform: scale(1.15) translateY(0) rotate(5deg); }
    50% { transform: scale(1.15) translateY(-5px) rotate(-5deg); }
}

.pet-option-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

/* 宠物容器优化 - 更精致 */
.virtual-pet-container {
    position: fixed;
    bottom: 100px;
    right: 15px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.virtual-pet {
    width: 90px;
    height: 90px;
    background: linear-gradient(145deg, #fef3c7, #fcd34d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    box-shadow: 
        0 8px 25px rgba(251, 191, 36, 0.4),
        0 0 0 4px rgba(255, 255, 255, 0.8),
        inset 0 -3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: petFloat 3s ease-in-out infinite;
}

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

.virtual-pet:hover {
    transform: scale(1.1);
    box-shadow: 
        0 12px 35px rgba(251, 191, 36, 0.5),
        0 0 0 5px rgba(255, 255, 255, 0.9),
        inset 0 -3px 10px rgba(0, 0, 0, 0.1);
}

.virtual-pet:active {
    transform: scale(0.95);
}

.virtual-pet-sprite {
    font-size: 50px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* 等级徽章优化 */
.pet-level-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: white;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

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

/* 状态条优化 */
.pet-status-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 12px 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-width: 160px;
}

.pet-name-display {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-100);
}

.pet-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.pet-stat:last-child {
    margin-bottom: 0;
}

.pet-stat-icon {
    font-size: 14px;
}

.pet-stat-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
}

.pet-stat-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.pet-stat-fill.hunger {
    background: linear-gradient(90deg, #f97316, #fb923c);
}

.pet-stat-fill.happiness {
    background: linear-gradient(90deg, #ec4899, #f472b6);
}

.pet-stat-fill.energy {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

.pet-stat-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    min-width: 32px;
    text-align: right;
}

/* 心情气泡优化 */
.pet-mood-bubble {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    padding: 10px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 14px;
    color: var(--gray-700);
    z-index: 10;
    max-width: 200px;
}

.pet-mood-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.pet-mood-bubble.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 暗黑模式适配 */
@media (prefers-color-scheme: dark) {
    .pet-settings-modal {
        background: var(--gray-900);
    }
    
    .pet-settings-title,
    .pet-setting-name {
        color: var(--gray-100);
    }
    
    .pet-setting-item {
        background: var(--gray-800);
    }
    
    .pet-freq-btn,
    .pet-pos-btn {
        background: var(--gray-700);
        border-color: var(--gray-600);
        color: var(--gray-300);
    }
    
    .pet-action-bubble {
        background: linear-gradient(135deg, #78350f, #92400e);
    }
    
    .pet-action-text {
        color: #fef3c7;
    }
    
    .pet-gentle-reminder {
        background: var(--gray-800);
    }
    
    .pet-gentle-reminder::after {
        border-top-color: var(--gray-800);
    }
    
    .pet-reminder-message {
        color: var(--gray-200);
    }
    
    .pet-status-bar {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .pet-name-display {
        color: var(--gray-100);
        border-bottom-color: var(--gray-700);
    }
    
    .pet-mood-bubble {
        background: var(--gray-800);
        color: var(--gray-200);
    }
    
    .pet-mood-bubble::after {
        border-top-color: var(--gray-800);
    }
    
    .pet-option {
        background: linear-gradient(145deg, var(--gray-800), var(--gray-700));
    }
    
    .pet-option.selected {
        background: linear-gradient(145deg, #1e3a5f, #1e40af);
    }
    
    .pet-option-name {
        color: var(--gray-200);
    }
}






/* V15-V16: 丰富例句和真题标记样式 */
.rich-examples-section {
    animation: fadeInUp 0.3s ease-out;
}

.exam-tags-section {
    animation: fadeInUp 0.3s ease-out;
}

#examTagsBadge {
    transition: all 0.3s ease;
}

#examTagsBadge:hover {
    transform: scale(1.05);
}

#difficultyBadge {
    transition: all 0.3s ease;
}

#difficultyBadge:hover {
    transform: scale(1.05);
}

/* 标签容器响应式布局 */
.word-phonetic-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

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

/* 深色模式适配 */
body.theme-dark .exam-tags-section {
    background: linear-gradient(135deg, #44403c 0%, #3f3f46 100%) !important;
    border-color: #52525b !important;
}

body.theme-dark .exam-tags-section span {
    color: #fafaf9 !important;
}

body.theme-dark .rich-examples-section {
    background: linear-gradient(135deg, #3f3f46 0%, #374151 100%) !important;
    border-color: #52525b !important;
}

/* ==================== 写作模块样式 ==================== */
/* v1.0-v1.5: 写作练习模块 - 5版修复 */

/* V1: module-page 基础样式（关键修复） */
.module-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary, #f8fafc);
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.module-page.hidden {
    display: none !important;
}

/* V2: 写作模块容器 */
#writing-module {
    padding: 0 16px 100px;
    min-height: 100vh;
    background: var(--bg-primary, #f8fafc);
}

/* V3: 模块头部优化 */
#writing-module .module-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    position: sticky;
    top: 0;
    background: var(--bg-primary, #f8fafc);
    z-index: 100;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 16px;
}

/* V4: 返回按钮增强 */
#writing-module .back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--card-bg, white);
    border: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

#writing-module .back-btn:hover {
    background: var(--accent-light, #eff6ff);
    border-color: var(--accent-color, #6366f1);
}

#writing-module .back-btn:active {
    transform: scale(0.95);
}

#writing-module .module-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

/* ===== 写作模块 V10 重设计 ===== */
.writing-header-v10 {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    padding-left: calc(20px + env(safe-area-inset-left, 0px));
    padding-right: calc(20px + env(safe-area-inset-right, 0px));
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-radius: 0 0 28px 28px;
    margin: -16px -16px 20px -16px;
    box-shadow: 0 8px 32px rgba(249, 115, 22, 0.25);
}

.writing-back-v10 {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
}

.writing-back-v10:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.writing-back-v10:active {
    transform: scale(0.95);
}

.writing-title-v10 {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.writing-emoji {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.writing-title-text h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.writing-title-text p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
    margin: 2px 0 0;
}

.writing-main-v10 {
    padding: 0 4px;
}

/* 考试类型横向滚动 */
.writing-exams-v10 {
    margin-bottom: 20px;
}

.section-label-v10 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.exam-scroll-v10 {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 4px 12px;
    margin: 0 -4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.exam-scroll-v10::-webkit-scrollbar {
    display: none;
}

.exam-card-v10 {
    position: relative;
    min-width: 110px;
    padding: 16px 14px;
    border-radius: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.exam-card-v10.toefl {
    background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%);
}

.exam-card-v10.gre {
    background: linear-gradient(145deg, #8b5cf6 0%, #6d28d9 100%);
}

.exam-card-v10.ielts {
    background: linear-gradient(145deg, #10b981 0%, #059669 100%);
}

.exam-card-v10.kaoyan {
    background: linear-gradient(145deg, #f59e0b 0%, #d97706 100%);
}

.exam-card-v10.cet6 {
    background: linear-gradient(145deg, #ec4899 0%, #db2777 100%);
}

.exam-glow-v10 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.exam-card-v10:hover .exam-glow-v10,
.exam-card-v10.selected .exam-glow-v10 {
    opacity: 1;
}

.exam-card-v10:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0,0,0,0.2);
}

.exam-card-v10.selected {
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3), 0 12px 28px rgba(0,0,0,0.2);
    transform: translateY(-4px) scale(1.05);
}

.exam-card-v10:active {
    transform: scale(0.98);
}

.exam-emoji-v10 {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.exam-name-v10 {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.exam-tasks-v10 {
    display: block;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.8);
    margin-top: 3px;
}

/* AI功能亮点 */
.writing-features-v10 {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.feature-pill-v10 {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(234, 88, 12, 0.1) 100%);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #ea580c;
    transition: all 0.2s;
}

.feature-pill-v10:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(234, 88, 12, 0.15) 100%);
    transform: translateY(-1px);
}

.feature-icon-v10 {
    font-size: 0.9rem;
}

/* 题目和历史区块 */
.writing-topics-v10,
.writing-history-v10 {
    margin-bottom: 24px;
}

.topic-list-v10,
.history-list-v10 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 空状态 */
.empty-state-v10 {
    text-align: center;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 2px dashed var(--border-color);
}

.empty-icon-v10 {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state-v10 p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* 题目卡片 V10 样式 */
.topic-card-v10 {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.topic-card-v10::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.topic-card-v10:hover {
    border-color: #f97316;
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.15);
}

.topic-card-v10:hover::before {
    opacity: 1;
}

.topic-card-v10:active {
    transform: scale(0.98);
}

.topic-card-v10 .topic-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.topic-card-v10 .topic-number {
    font-size: 0.75rem;
    color: #f97316;
    font-weight: 600;
}

.topic-card-v10 .topic-type {
    font-size: 0.7rem;
    background: rgba(249, 115, 22, 0.1);
    color: #ea580c;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.topic-card-v10 .topic-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.topic-card-v10 .topic-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* 历史卡片 V10 样式 */
.history-card-v10 {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 14px 16px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 14px;
}

.history-card-v10:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.history-score-v10 {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.history-score-v10.high {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.history-score-v10.medium {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.history-score-v10.low {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

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

.history-info-v10 .history-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-info-v10 .history-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.history-arrow-v10 {
    color: var(--text-tertiary);
    opacity: 0;
    transition: all 0.2s;
}

.history-card-v10:hover .history-arrow-v10 {
    opacity: 1;
    transform: translateX(4px);
}

/* 深色模式适配 */
body.theme-dark .writing-header-v10 {
    background: linear-gradient(135deg, #c2410c 0%, #9a3412 100%);
}

body.theme-dark .feature-pill-v10 {
    background: rgba(249, 115, 22, 0.15);
    border-color: rgba(249, 115, 22, 0.25);
}

body.theme-dark .empty-state-v10 {
    background: var(--card-bg);
    border-color: var(--border-color);
}

/* 考试类型选择 */
.writing-exam-types {
    margin-bottom: 24px;
}

.writing-exam-types h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.exam-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.writing-exam-type {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.writing-exam-type:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.writing-exam-type.selected {
    border-color: var(--accent-color);
    background: var(--accent-light);
}

.writing-exam-type .exam-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.writing-exam-type .exam-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.writing-exam-type .exam-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 题目列表 */
.writing-topics-section,
.writing-history-section {
    margin-bottom: 24px;
}

.writing-topics-section h3,
.writing-history-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

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

.writing-topic-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.writing-topic-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

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

.topic-number {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
}

.topic-type {
    font-size: 0.7rem;
    background: var(--accent-light);
    color: var(--accent-color);
    padding: 2px 8px;
    border-radius: 10px;
}

.topic-difficulty {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

.topic-difficulty.basic {
    background: #dcfce7;
    color: #15803d;
}

.topic-difficulty.intermediate {
    background: #fef3c7;
    color: #b45309;
}

.topic-difficulty.advanced {
    background: #fee2e2;
    color: #dc2626;
}

.topic-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.topic-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.topic-progress {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.topic-progress.completed {
    color: #15803d;
}

.topic-progress .progress-icon {
    margin-right: 4px;
}

/* 写作界面 */
#writing-practice-area {
    padding-bottom: 100px;
}

.writing-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 10;
}

.writing-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--card-bg);
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

.writing-timer.warning {
    background: #fef3c7;
    color: #b45309;
}

.writing-timer.danger {
    background: #fee2e2;
    color: #dc2626;
    animation: pulse 1s infinite;
}

.word-count {
    margin-left: auto;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.word-count.under span {
    color: #b45309;
}

.word-count.over span {
    color: #dc2626;
}

.word-count.good span {
    color: #15803d;
    font-weight: 600;
}

.writing-title {
    margin: 16px 0;
}

.writing-title .type-badge {
    display: inline-block;
    font-size: 0.75rem;
    background: var(--accent-light);
    color: var(--accent-color);
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.writing-title h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

/* 写作材料区 */
.writing-material {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.material-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.material-tab {
    padding: 8px 16px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.material-tab.active {
    background: var(--accent-color);
    color: white;
}

.material-content {
    max-height: 300px;
    overflow-y: auto;
}

.material-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
}

/* 教授问题样式 */
.professor-question {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.professor-avatar {
    width: 48px;
    height: 48px;
    background: var(--accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.professor-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.question-text {
    font-weight: 500;
    color: var(--accent-color);
}

/* 学生回复 */
.student-responses {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.student-response {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.student-avatar {
    width: 36px;
    height: 36px;
    background: var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.student-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

/* 写作要求 */
.writing-prompt {
    background: var(--accent-light);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.writing-prompt h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--accent-color);
}

.writing-prompt p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* 写作编辑器 */
.writing-editor {
    margin-bottom: 16px;
}

.writing-editor textarea {
    width: 100%;
    min-height: 300px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    font-size: 1rem;
    line-height: 1.8;
    resize: vertical;
    font-family: inherit;
    background: var(--card-bg);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.writing-editor textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.writing-editor textarea::placeholder {
    color: var(--text-secondary);
}

/* 写作工具栏 */
.writing-tools {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tool-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-btn:hover {
    border-color: var(--accent-color);
    background: var(--accent-light);
}

/* 写作操作按钮 */
.writing-actions {
    display: flex;
    gap: 12px;
}

.writing-actions .btn-secondary {
    flex: 1;
    padding: 14px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.writing-actions .btn-primary {
    flex: 2;
    padding: 14px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

/* 写作模态框 */
.writing-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.writing-modal {
    background: var(--bg-primary);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.writing-modal .modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.writing-modal .modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.writing-modal .modal-body {
    padding: 20px;
    overflow-y: auto;
}

/* 词汇列表 */
.vocabulary-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vocab-item {
    padding: 8px 16px;
    background: var(--accent-light);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vocab-item:hover {
    background: var(--accent-color);
    color: white;
}

.vocab-hint {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

/* 模板区域 */
.template-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.template-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.template-item {
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.template-item:hover {
    background: var(--accent-light);
}

.transition-words {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transition-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.group-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 50px;
}

.transition-word {
    padding: 4px 12px;
    background: var(--accent-light);
    border-radius: 12px;
    font-size: 0.8rem;
    cursor: pointer;
}

.transition-word:hover {
    background: var(--accent-color);
    color: white;
}

/* 范文参考 */
.sample-response {
    font-size: 0.9rem;
}

.sample-warning {
    background: #fef3c7;
    color: #b45309;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
    text-align: center;
}

.sample-text {
    line-height: 1.8;
    white-space: pre-wrap;
}

.key-points {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.key-points h4 {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.key-points ul {
    margin: 0;
    padding-left: 20px;
}

.key-points li {
    margin-bottom: 6px;
    font-size: 0.85rem;
}

/* 写作结果 */
.writing-result {
    padding: 20px 0;
}

.result-header {
    text-align: center;
    margin-bottom: 24px;
}

.result-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

.result-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.result-score {
    text-align: center;
    margin-bottom: 24px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark, #4a5568));
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 8px;
}

.score-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

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

.score-grade {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-item {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 4px;
}

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

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

.result-feedback {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.result-feedback h4 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.result-feedback ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.result-feedback li {
    padding: 8px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.result-feedback li:last-child {
    border-bottom: none;
}

.result-feedback li.good {
    color: #15803d;
}

.result-feedback li.warning {
    color: #b45309;
}

.result-feedback li.info {
    color: var(--accent-color);
}

.result-content,
.result-sample {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.result-content h4,
.result-sample h4 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.content-text {
    font-size: 0.9rem;
    line-height: 1.8;
    max-height: 200px;
    overflow-y: auto;
}

.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* 写作Toast提示 */
.writing-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1100;
}

.writing-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 历史记录列表 */
.writing-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
}

.history-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 4px;
}

.history-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

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

.history-score .score {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
}

.history-score .label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.text-muted {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* 写作图标颜色 */
.write-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
}

/* 深色模式适配 */
body.theme-dark .writing-exam-type {
    background: var(--card-bg);
}

body.theme-dark .writing-topic-card {
    background: var(--card-bg);
}

body.theme-dark .writing-modal {
    background: var(--bg-primary);
}

body.theme-dark .sample-warning {
    background: #422006;
    color: #fcd34d;
}

/* ==================== 宠物系统 v9 额外样式 ==================== */

/* 宠物升级动画 */
.pet-levelup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pet-levelup-modal.show {
    opacity: 1;
}

.pet-levelup-content {
    text-align: center;
    transform: scale(0.5);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pet-levelup-modal.show .pet-levelup-content {
    transform: scale(1);
}

.levelup-sparkles {
    font-size: 36px;
    animation: sparkleFloat 1s ease-in-out infinite;
}

@keyframes sparkleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 1; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.8; }
}

.levelup-pet {
    font-size: 80px;
    margin: 16px 0;
    animation: levelupBounce 0.8s ease-in-out infinite;
}

@keyframes levelupBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-10deg); }
    50% { transform: scale(1.2) rotate(0deg); }
    75% { transform: scale(1.1) rotate(10deg); }
}

.levelup-text {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.levelup-level {
    font-size: 42px;
    font-weight: 900;
    color: white;
    text-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
}

.levelup-rewards {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.levelup-rewards span {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
}

/* 宠物情绪气泡增强 */
.pet-mood-bubble {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 16px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--gray-700);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-bottom: 8px;
}

.pet-mood-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.pet-mood-bubble.show {
    opacity: 1;
    visibility: visible;
    animation: bubblePop 0.3s ease;
}

@keyframes bubblePop {
    0% { transform: translateX(-50%) scale(0.8); }
    50% { transform: translateX(-50%) scale(1.05); }
    100% { transform: translateX(-50%) scale(1); }
}

.pet-mood-bubble.excited {
    background: linear-gradient(135deg, #FFE4EC, #FFF0F5);
}

.pet-mood-bubble.sad {
    background: linear-gradient(135deg, #E6F3FF, #F0F8FF);
}

.pet-mood-bubble.sleepy {
    background: linear-gradient(135deg, #F3E8FF, #FDF4FF);
}

/* 宠物主容器优化 v9 */
.virtual-pet-container {
    position: fixed;
    bottom: 100px;
    right: 15px;
    z-index: 150;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.virtual-pet-container.minimized {
    transform: scale(0.7);
    opacity: 0.7;
}

.virtual-pet-container.minimized:hover {
    transform: scale(0.85);
    opacity: 1;
}

/* 宠物主体优化 */
.virtual-pet {
    width: 85px;
    height: 85px;
    background: linear-gradient(145deg, #FEF3C7, #FCD34D);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    box-shadow: 
        0 8px 30px rgba(251, 191, 36, 0.4),
        0 0 0 4px rgba(255, 255, 255, 0.9),
        inset 0 -4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: petIdleFloat 4s ease-in-out infinite;
}

@keyframes petIdleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(-2deg); }
    50% { transform: translateY(-8px) rotate(0deg); }
    75% { transform: translateY(-5px) rotate(2deg); }
}

.virtual-pet:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 
        0 15px 40px rgba(251, 191, 36, 0.5),
        0 0 0 5px rgba(255, 255, 255, 1),
        inset 0 -4px 12px rgba(0, 0, 0, 0.08);
}

.virtual-pet:active {
    transform: scale(0.95);
}

/* 宠物状态心情 */
.virtual-pet.sleeping {
    animation: petSleep 3s ease-in-out infinite;
}

@keyframes petSleep {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

.virtual-pet.excited {
    animation: petExcited 0.5s ease-in-out infinite;
}

@keyframes petExcited {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.05) rotate(-5deg); }
    75% { transform: scale(1.05) rotate(5deg); }
}

.virtual-pet.hungry {
    animation: petHungry 2s ease-in-out infinite;
}

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

/* 等级徽章优化 */
.pet-level-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: white;
    border: 3px solid white;
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.5);
    animation: badgeGlow 2s ease-in-out infinite alternate;
}

@keyframes badgeGlow {
    from { box-shadow: 0 3px 12px rgba(245, 158, 11, 0.5); }
    to { box-shadow: 0 3px 20px rgba(245, 158, 11, 0.8); }
}

/* 经验条优化 */
.pet-exp-bar {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.pet-exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #A78BFA, #8B5CF6);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* 宠物环境装饰 */
.pet-environment {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    opacity: 0.6;
}

.pet-grass {
    font-size: 10px;
    animation: grassSway 2s ease-in-out infinite;
}

.pet-grass:nth-child(2) { animation-delay: 0.3s; }
.pet-grass:nth-child(3) { animation-delay: 0.6s; }
.pet-grass:nth-child(4) { animation-delay: 0.9s; }

@keyframes grassSway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* 装饰品样式优化 */
.pet-accessory {
    position: absolute;
    font-size: 20px;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.pet-accessory.hat {
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
}

.pet-accessory.glasses {
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pet-accessory.bow {
    top: 10px;
    right: 5px;
}

.virtual-pet:hover .pet-accessory {
    animation: accessoryBounce 0.3s ease;
}

@keyframes accessoryBounce {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.2); }
}

/* 精灵优化 */
.virtual-pet-sprite {
    font-size: 48px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
}

/* 深色模式适配 */
body.theme-dark .pet-selection-modal.pet-selection-v9 {
    background: linear-gradient(180deg, #1e1e1e 0%, #252525 50%, #2a2a2a 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .pet-skip-btn {
    background: rgba(50, 50, 50, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--gray-400);
}

body.theme-dark .pet-card {
    background: var(--pet-bg, linear-gradient(145deg, #2a2a2a, #333));
}

body.theme-dark .pet-card-name {
    color: var(--gray-200);
}

body.theme-dark .pet-preview-section {
    background: rgba(50, 50, 50, 0.8);
}

body.theme-dark .pet-name-input-wrapper {
    background: #2a2a2a;
    border-color: #444;
}

body.theme-dark .pet-mood-bubble {
    background: #2a2a2a;
    color: var(--gray-200);
}

body.theme-dark .pet-mood-bubble::after {
    border-top-color: #2a2a2a;
}

/* ==================== 宠物系统 v9.6-v9.20 新功能样式 ==================== */

/* v9.6: 学习模式 */
.virtual-pet-container.study-mode {
    opacity: 0.85;
}

.virtual-pet-container.study-mode .virtual-pet {
    animation: studyFloat 4s ease-in-out infinite;
}

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

.virtual-pet.studying::before {
    content: '📚';
    position: absolute;
    top: -15px;
    right: -10px;
    font-size: 18px;
    animation: studyBookFloat 2s ease-in-out infinite;
}

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

/* v9 通用模态框样式 */
.pet-v9-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(180deg, #FFFAF0 0%, #FFF5EE 100%);
    border-radius: 24px;
    padding: 20px;
    max-width: 360px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 10020;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.pet-v9-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* v9.7: 每日任务 */
.pet-tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pet-tasks-title {
    font-size: 18px;
    font-weight: 700;
}

.pet-tasks-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    font-size: 18px;
    cursor: pointer;
}

.pet-tasks-subtitle {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.pet-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pet-task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.pet-task-item.completed {
    opacity: 0.6;
    background: #f0fff0;
}

.pet-task-item.can-complete {
    cursor: pointer;
    border: 2px solid #10B981;
}

.pet-task-item.can-complete:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.pet-task-icon {
    font-size: 24px;
}

.pet-task-info {
    flex: 1;
}

.pet-task-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.pet-task-reward {
    font-size: 12px;
    color: var(--gray-500);
}

.pet-task-status {
    font-size: 14px;
    font-weight: 600;
    color: #10B981;
}

.pet-tasks-progress {
    text-align: center;
    padding-top: 12px;
    font-size: 13px;
    color: var(--gray-500);
}

/* v9.8: 心情日记 */
.pet-diary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pet-diary-title {
    font-size: 18px;
    font-weight: 700;
}

.pet-diary-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
}

.pet-diary-entries {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pet-diary-entry {
    background: white;
    border-radius: 12px;
    padding: 12px;
}

.pet-diary-date {
    font-size: 11px;
    color: var(--gray-400);
    margin-bottom: 4px;
}

.pet-diary-content {
    font-size: 14px;
    color: var(--gray-700);
}

.pet-diary-empty {
    text-align: center;
    padding: 30px;
    color: var(--gray-400);
}

.diary-empty-icon {
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
}

/* v9.9: 表情收集 */
.pet-emoji-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.pet-emoji-title {
    font-size: 18px;
    font-weight: 700;
    flex: 1;
}

.pet-emoji-count {
    font-size: 13px;
    color: var(--gray-500);
}

.pet-emoji-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
}

.pet-emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.pet-emoji-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: white;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.pet-emoji-item.locked {
    background: var(--gray-100);
    opacity: 0.5;
}

.pet-emoji-item.collected:hover {
    transform: scale(1.1);
}

.pet-emoji-tip {
    text-align: center;
    font-size: 12px;
    color: var(--gray-500);
}

/* v9.10: 亲密度面板 */
.pet-intimacy-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 16px;
    position: relative;
}

.pet-intimacy-avatar {
    font-size: 42px;
}

.pet-intimacy-info {
    flex: 1;
}

.pet-intimacy-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
}

.pet-intimacy-relation {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.intimacy-icon {
    font-size: 16px;
}

.intimacy-level {
    font-weight: 600;
}

.pet-intimacy-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}

.pet-intimacy-progress {
    margin-bottom: 16px;
}

.intimacy-bar {
    height: 10px;
    background: var(--gray-100);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 6px;
}

.intimacy-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.intimacy-text {
    font-size: 12px;
    color: var(--gray-500);
    text-align: center;
}

.pet-intimacy-stats {
    display: flex;
    justify-content: space-around;
    padding: 16px 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 16px;
}

.intimacy-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.intimacy-stat .stat-icon {
    font-size: 20px;
}

.intimacy-stat .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
}

.intimacy-stat .stat-label {
    font-size: 11px;
    color: var(--gray-500);
}

.pet-intimacy-tip {
    text-align: center;
    font-size: 13px;
    color: var(--gray-500);
}

/* v9.14: 随机事件弹窗 */
.pet-event-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: linear-gradient(135deg, #FFF9C4, #FFECB3);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    z-index: 10030;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 15px 50px rgba(255, 193, 7, 0.3);
}

.pet-event-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.pet-event-icon {
    font-size: 36px;
    animation: eventSpin 1s ease;
}

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

.pet-event-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 8px 0;
}

.pet-event-message {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.pet-event-rewards {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.pet-event-rewards span {
    background: rgba(255,255,255,0.7);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

/* v9.16: 生日庆祝 */
.pet-birthday-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 10040;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pet-birthday-modal.show {
    opacity: 1;
    visibility: visible;
}

.pet-birthday-content {
    text-align: center;
    animation: birthdayBounce 0.5s ease;
}

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

.birthday-confetti {
    font-size: 36px;
    margin-bottom: 10px;
    animation: confettiFloat 1s ease-in-out infinite;
}

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

.birthday-cake {
    font-size: 60px;
    margin-bottom: 10px;
}

.birthday-pet {
    font-size: 80px;
    margin-bottom: 16px;
    animation: birthdayPetDance 0.5s ease-in-out infinite alternate;
}

@keyframes birthdayPetDance {
    from { transform: rotate(-5deg); }
    to { transform: rotate(5deg); }
}

.birthday-message {
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.birthday-rewards {
    color: #FFD700;
    font-size: 16px;
    margin-bottom: 20px;
}

.birthday-close-btn {
    background: linear-gradient(135deg, #FF6B81, #FF8E9E);
    border: none;
    border-radius: 20px;
    padding: 12px 40px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.birthday-close-btn:hover {
    transform: scale(1.05);
}

/* v9.17: 猜数字游戏 */
.pet-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pet-game-title {
    font-size: 18px;
    font-weight: 700;
}

.pet-game-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
}

.pet-game-content {
    text-align: center;
}

.pet-game-avatar {
    font-size: 50px;
    margin-bottom: 12px;
}

.pet-game-text {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.pet-game-attempts {
    font-size: 18px;
    margin-bottom: 16px;
}

.pet-game-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.pet-game-num {
    aspect-ratio: 1;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pet-game-num:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* v9.18: 皮肤系统 */
.pet-skin-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.pet-skin-title {
    font-size: 18px;
    font-weight: 700;
    flex: 1;
}

.pet-skin-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
}

.pet-skin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.pet-skin-item {
    padding: 16px;
    background: white;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.pet-skin-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.pet-skin-item.equipped {
    border-color: #10B981;
    background: #ECFDF5;
}

.pet-skin-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.pet-skin-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.pet-skin-action {
    font-size: 11px;
    color: var(--gray-500);
}

/* 皮肤效果 */
.virtual-pet.golden-glow {
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.6),
        0 0 60px rgba(255, 215, 0, 0.3);
}

.virtual-pet.rainbow-border {
    border: 4px solid transparent;
    background-image: linear-gradient(145deg, #FEF3C7, #FCD34D), 
                      linear-gradient(90deg, #FF6B6B, #FFE66D, #4ECDC4, #45B7D1, #96E6A1);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.virtual-pet.starry-bg::after {
    content: '⭐✨💫';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    animation: starsFloat 2s ease-in-out infinite;
}

@keyframes starsFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(-10px); opacity: 0.7; }
}

.virtual-pet.heart-aura::before {
    content: '💕';
    position: absolute;
    bottom: -15px;
    right: -10px;
    font-size: 16px;
    animation: heartPulse 1s ease-in-out infinite;
}

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

/* v9.19: 排行榜 */
.pet-leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pet-leaderboard-title {
    font-size: 18px;
    font-weight: 700;
}

.pet-leaderboard-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
}

.pet-leaderboard-myrank {
    text-align: center;
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 16px;
    padding: 8px;
    background: #FEF3C7;
    border-radius: 10px;
}

.pet-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pet-leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.pet-leaderboard-item.is-me {
    background: linear-gradient(135deg, #E0F4FF, #F0F9FF);
    border: 2px solid #60A5FA;
}

.leaderboard-rank {
    font-size: 20px;
    min-width: 30px;
    text-align: center;
}

.leaderboard-avatar {
    font-size: 28px;
}

.leaderboard-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.leaderboard-level {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 600;
}

/* v9.20: 扩展菜单 */
.pet-extended-menu {
    position: absolute;
    bottom: 100px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(10px);
}

.virtual-pet-container:hover .pet-extended-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pet-quick-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pet-quick-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.pet-quick-btn .pet-action-icon {
    font-size: 16px;
}

/* 深色模式适配 v9 */
body.theme-dark .pet-v9-modal {
    background: linear-gradient(180deg, #1e1e1e 0%, #252525 100%);
}

body.theme-dark .pet-task-item,
body.theme-dark .pet-diary-entry,
body.theme-dark .pet-emoji-item,
body.theme-dark .pet-skin-item,
body.theme-dark .pet-leaderboard-item {
    background: #2a2a2a;
}

body.theme-dark .pet-task-name,
body.theme-dark .pet-diary-content,
body.theme-dark .pet-intimacy-name,
body.theme-dark .pet-skin-name,
body.theme-dark .leaderboard-name {
    color: var(--gray-200);
}

/* ==================== V9.28: 统一关闭按钮样式 ==================== */
.unified-close-btn,
.zen-sandbox-close,
.bubble-wrap-close,
.focus-timer-close,
.mood-palette-close,
.panel-close-btn,
.pet-close-btn,
.scratch-card-close,
.wheel-close,
.meditation-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    font-size: 22px;
    font-weight: 300;
    color: #666;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.unified-close-btn:hover,
.zen-sandbox-close:hover,
.bubble-wrap-close:hover,
.focus-timer-close:hover,
.mood-palette-close:hover,
.panel-close-btn:hover,
.pet-close-btn:hover,
.scratch-card-close:hover,
.wheel-close:hover,
.meditation-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
    transform: scale(1.1);
}

.unified-close-btn:active,
.zen-sandbox-close:active,
.bubble-wrap-close:active,
.focus-timer-close:active,
.mood-palette-close:active,
.panel-close-btn:active,
.pet-close-btn:active,
.scratch-card-close:active,
.wheel-close:active,
.meditation-close:active {
    transform: scale(0.95);
}

/* 深色模式关闭按钮 */
body.theme-dark .unified-close-btn,
body.theme-dark .zen-sandbox-close,
body.theme-dark .bubble-wrap-close,
body.theme-dark .focus-timer-close,
body.theme-dark .mood-palette-close,
body.theme-dark .panel-close-btn,
body.theme-dark .pet-close-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
}

body.theme-dark .unified-close-btn:hover,
body.theme-dark .zen-sandbox-close:hover,
body.theme-dark .bubble-wrap-close:hover,
body.theme-dark .focus-timer-close:hover,
body.theme-dark .mood-palette-close:hover,
body.theme-dark .panel-close-btn:hover,
body.theme-dark .pet-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* V9.29: 优化各组件的遮罩层样式 */
.zen-sandbox-overlay,
.bubble-wrap-overlay,
.focus-timer-overlay,
.mood-palette-overlay,
.stress-panel-overlay {
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* ==================== 宠物系统 v10 精简版样式 ==================== */

/* v10.1: 选择界面遮罩 */
.pet-select-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}
.pet-select-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* v10.2: 选择模态框 */
.pet-select-modal {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    max-width: 360px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.2s ease;
    position: relative;
}
.pet-select-overlay.show .pet-select-modal {
    transform: scale(1);
}

/* v10.3: 关闭按钮 */
.pet-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}
.pet-close:hover {
    background: #e0e0e0;
    color: #333;
}

/* v10.4: 标题 */
.pet-select-modal h2 {
    text-align: center;
    font-size: 20px;
    margin: 0 0 8px;
    color: #333;
}
.pet-hint {
    text-align: center;
    font-size: 14px;
    color: #888;
    margin: 0 0 20px;
}

/* v10.5: 宠物网格 - 宠物名字清晰可见 */
.pet-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}
.pet-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 4px;
    background: #f8f8f8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.pet-card:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}
.pet-card.active {
    background: #e8f4ff;
    border-color: #4A90D9;
}
.pet-emoji {
    font-size: 28px;
    margin-bottom: 4px;
}
.pet-name {
    font-size: 11px;
    color: #666;
    text-align: center;
    white-space: nowrap;
}
.pet-card.active .pet-name {
    color: #4A90D9;
    font-weight: 600;
}

/* v10.6: 命名输入 */
.pet-naming {
    margin-bottom: 16px;
}
.pet-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    text-align: center;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.pet-input:focus {
    outline: none;
    border-color: #4A90D9;
}
.pet-input::placeholder {
    color: #aaa;
}

/* v10.7: 操作按钮 */
.pet-actions {
    display: flex;
    gap: 12px;
}
.pet-skip-btn {
    flex: 1;
    padding: 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}
.pet-skip-btn:hover {
    background: #e0e0e0;
}
.pet-confirm-btn {
    flex: 2;
    padding: 12px;
    background: #4A90D9;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}
.pet-confirm-btn:hover:not(:disabled) {
    background: #3a7fc4;
}
.pet-confirm-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* v10.8: 宠物小部件 */
.pet-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9999;
    cursor: pointer;
}
.pet-avatar {
    width: 56px;
    height: 56px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}
.pet-avatar:hover {
    transform: scale(1.1);
}
.pet-avatar:active {
    transform: scale(0.95);
}

/* v10.9: 气泡 */
.pet-bubble {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: #fff;
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    white-space: nowrap;
    animation: bubblePop 0.2s ease;
}
@keyframes bubblePop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* v10.10: 深色模式适配 */
body.theme-dark .pet-select-modal {
    background: #2a2a2a;
}
body.theme-dark .pet-select-modal h2 {
    color: #fff;
}
body.theme-dark .pet-hint {
    color: #999;
}
body.theme-dark .pet-card {
    background: #333;
}
body.theme-dark .pet-card:hover {
    background: #3a3a3a;
}
body.theme-dark .pet-card.active {
    background: #2a3a4a;
}
body.theme-dark .pet-name {
    color: #aaa;
}
body.theme-dark .pet-input {
    background: #333;
    border-color: #444;
    color: #fff;
}
body.theme-dark .pet-close {
    background: #333;
    color: #aaa;
}
body.theme-dark .pet-skip-btn {
    background: #333;
    color: #aaa;
}
body.theme-dark .pet-avatar {
    background: #333;
}
body.theme-dark .pet-bubble {
    background: #333;
    color: #fff;
}

/* ==================== 宠物系统 v12 可爱动物版 ==================== */

/* v12.1: 选择界面 */
.pet-select-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}
.pet-select-overlay.show {
    opacity: 1;
    visibility: visible;
}

.pet-select-modal {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    max-width: 380px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.2s ease;
    position: relative;
}
.pet-select-overlay.show .pet-select-modal {
    transform: scale(1);
}

.pet-select-modal h2 {
    text-align: center;
    font-size: 20px;
    margin: 0 0 8px;
    color: #333;
}
.pet-hint {
    text-align: center;
    font-size: 14px;
    color: #888;
    margin: 0 0 16px;
}

.pet-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

/* v12.2: 宠物卡片网格 */
.pet-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.pet-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    background: #f8f8f8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.pet-card:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}
.pet-card.active {
    background: #e8f4ff;
    border-color: #4A90D9;
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.2);
}

.pet-preview {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}
.pet-preview svg {
    transition: transform 0.2s;
}
.pet-card:hover .pet-preview svg {
    transform: scale(1.1);
}

.pet-name {
    font-size: 11px;
    color: #666;
    text-align: center;
    white-space: nowrap;
}
.pet-card.active .pet-name {
    color: #4A90D9;
    font-weight: 600;
}

/* v12.3: 命名和按钮 */
.pet-naming {
    margin-bottom: 16px;
}
.pet-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    text-align: center;
    box-sizing: border-box;
}
.pet-input:focus {
    outline: none;
    border-color: #4A90D9;
}

.pet-actions {
    display: flex;
    gap: 12px;
}
.pet-skip-btn {
    flex: 1;
    padding: 12px;
    background: #f0f0f0;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}
.pet-confirm-btn {
    flex: 2;
    padding: 12px;
    background: #4A90D9;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
}
.pet-confirm-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* v12.4: 宠物小部件 */
.pet-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9999;
    cursor: pointer;
}

.pet-avatar-svg {
    width: 70px;
    height: 70px;
    background: linear-gradient(180deg, #fff 0%, #f8f8f8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transition: transform 0.2s;
    padding: 5px;
}
.pet-avatar-svg:hover {
    transform: scale(1.08);
}
.pet-avatar-svg:active {
    transform: scale(0.95);
}

/* v12.5: 动画 */
.pet-avatar-svg.bounce {
    animation: petBounce 0.5s ease;
}
@keyframes petBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    30% { transform: translateY(-12px) scale(1.05); }
    50% { transform: translateY(-15px) scale(1.08); }
    70% { transform: translateY(-8px) scale(1.03); }
}

.pet-avatar-svg svg {
    animation: petFloat 3s ease-in-out infinite;
}
@keyframes petFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* v12.6: 气泡和名字标签 */
.pet-bubble {
    position: absolute;
    bottom: 75px;
    right: 0;
    background: #fff;
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    white-space: nowrap;
    animation: bubblePop 0.2s ease;
}
@keyframes bubblePop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.pet-name-tag {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 10px;
    color: #666;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 飘浮爱心 */
.pet-heart-float {
    position: absolute;
    font-size: 16px;
    animation: heartFloat 1s ease-out forwards;
    pointer-events: none;
}
@keyframes heartFloat {
    0% { opacity: 1; transform: translateY(0) scale(0.5); }
    100% { opacity: 0; transform: translateY(-40px) scale(1.2); }
}

/* 深色模式 */
body.theme-dark .pet-select-modal {
    background: #2a2a2a;
}
body.theme-dark .pet-select-modal h2 {
    color: #fff;
}
body.theme-dark .pet-hint {
    color: #999;
}
body.theme-dark .pet-card {
    background: #333;
}
body.theme-dark .pet-card:hover {
    background: #3a3a3a;
}
body.theme-dark .pet-card.active {
    background: #2a3a4a;
}
body.theme-dark .pet-name {
    color: #aaa;
}
body.theme-dark .pet-input {
    background: #333;
    border-color: #444;
    color: #fff;
}
body.theme-dark .pet-avatar-svg {
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
}
body.theme-dark .pet-bubble,
body.theme-dark .pet-name-tag {
    background: #333;
    color: #fff;
}

/* ==================== AI 评分分析样式 ==================== */
.ai-analysis-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.ai-analysis-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-color);
}

.ai-icon {
    font-size: 1.5rem;
}

.ai-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* 维度评分 */
.ai-dimensions {
    margin-bottom: 24px;
}

.ai-dimensions h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

.dimension-item {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 14px;
}

.dim-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.dim-score {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.dim-bar {
    height: 6px;
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.dim-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-light, #60a5fa));
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* 段落分析 */
.ai-paragraphs {
    margin-bottom: 24px;
}

.ai-paragraphs h4 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.para-analysis {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    border-left: 4px solid var(--border-color);
    transition: all 0.3s ease;
}

.para-analysis.score-good {
    border-left-color: #22c55e;
}

.para-analysis.score-warning {
    border-left-color: #f59e0b;
}

.para-analysis.score-error {
    border-left-color: #ef4444;
}

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

.para-name {
    font-weight: 600;
    color: var(--text-primary);
}

.para-score-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    background: rgba(0,0,0,0.1);
}

.para-score-badge.score-good {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.para-score-badge.score-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.para-score-badge.score-error {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.para-words {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: auto;
}

.para-strengths {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.strength-tag {
    font-size: 0.75rem;
    padding: 3px 10px;
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
    border-radius: 12px;
}

.para-issues {
    margin-top: 8px;
}

.para-issue {
    padding: 10px;
    background: rgba(239, 68, 68, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
}

.issue-badge {
    margin-right: 6px;
}

.issue-msg {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.issue-example {
    display: block;
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 4px;
    padding-left: 24px;
    font-style: italic;
}

.issue-tip {
    font-size: 0.8rem;
    color: var(--accent-color);
    margin-top: 6px;
    padding-left: 24px;
}

/* 优先改进 */
.ai-priority {
    margin-bottom: 24px;
}

.ai-priority h4 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.priority-card {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(251, 146, 60, 0.1));
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

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

.priority-icon {
    font-size: 1.2rem;
}

.priority-title {
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.priority-score {
    font-weight: 700;
    color: #ef4444;
}

.priority-issues {
    padding-left: 32px;
}

.priority-issue {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* 优缺点总结 */
.ai-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.summary-col {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 14px;
}

.summary-col h5 {
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-col li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 4px 0;
    padding-left: 12px;
    position: relative;
}

.summary-col li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-secondary);
}

/* 深色模式适配 */
body.theme-dark .ai-analysis-section {
    background: #1e1e1e;
    border-color: #333;
}

body.theme-dark .dimension-item,
body.theme-dark .para-analysis,
body.theme-dark .summary-col {
    background: #2a2a2a;
}

body.theme-dark .para-issue {
    background: rgba(239, 68, 68, 0.1);
}

body.theme-dark .priority-card {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(251, 146, 60, 0.15));
    border-color: rgba(239, 68, 68, 0.3);
}

body.theme-dark .strength-tag {
    background: rgba(34, 197, 94, 0.2);
}

body.theme-dark .para-score-badge.score-good {
    background: rgba(34, 197, 94, 0.2);
}

body.theme-dark .para-score-badge.score-warning {
    background: rgba(245, 158, 11, 0.2);
}

body.theme-dark .para-score-badge.score-error {
    background: rgba(239, 68, 68, 0.2);
}

/* ==================== V11 专业简洁UI样式 ==================== */

/* 首页核心模块网格 - 紧凑双列布局 + v4.9.2: 三行布局 */
.core-modules-v11 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

/* v4.9.2: 复习卡片样式 */
.core-card-v11.review .card-icon-v11 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.core-card-v11.review .card-icon-v11 svg {
    stroke: white;
}

.core-card-v11.review:hover {
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

/* V11 核心卡片 - 简洁专业设计 */
.core-card-v11 {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100px;
}

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

.core-card-v11:active {
    transform: translateY(0);
}

/* 卡片头部 - 水平布局 */
.card-header-minimal {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.card-header-minimal h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
    flex: 1;
}

/* v4.9.1: 卡片展开/收起按钮 */
.card-toggle-v11 {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    font-size: 16px;
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.card-toggle-v11:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.card-toggle-v11:active {
    transform: translateY(-50%) scale(0.95);
}

/* v4.9.1: 卡片展开内容 */
.card-expanded-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
    animation: slideDown 0.3s ease;
}

.card-expanded-content.hidden {
    display: none;
}

.card-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: 13px;
    color: var(--gray-700);
}

.card-detail-item svg {
    color: var(--primary-500);
    flex-shrink: 0;
}

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

/* 独立标题（无进度条的卡片） */
.core-card-v11 > h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

/* 卡片图标 */
.card-icon-v11 {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.card-icon-v11 svg {
    width: 20px;
    height: 20px;
}

/* 极简进度条系统 */
.progress-bar-minimal {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.progress-track {
    height: 6px;
    background: var(--gray-100);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

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

@keyframes shimmer {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.progress-stats {
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 500;
    text-align: right;
}

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

/* 词汇模块 - 紫色 */
.core-card-v11.vocab .card-icon-v11 {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
}
.core-card-v11.vocab .card-icon-v11 svg {
    color: #8b5cf6;
}
.core-card-v11.vocab:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}

/* 写作模块 - 橙色 */
.core-card-v11.writing .card-icon-v11 {
    background: linear-gradient(135deg, #ffedd5, #fed7aa);
}
.core-card-v11.writing .card-icon-v11 svg {
    color: #f97316;
}
.core-card-v11.writing:hover {
    border-color: rgba(249, 115, 22, 0.3);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.15);
}

/* 阅读模块 - 绿色 */
.core-card-v11.reading .card-icon-v11 {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}
.core-card-v11.reading .card-icon-v11 svg {
    color: #22c55e;
}
.core-card-v11.reading:hover {
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.15);
}

/* 听力模块 - 蓝色 */
.core-card-v11.listening .card-icon-v11 {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}
.core-card-v11.listening .card-icon-v11 svg {
    color: #3b82f6;
}
.core-card-v11.listening:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

/* 口语模块 - 粉色 */
.core-card-v11.speaking .card-icon-v11 {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
}
.core-card-v11.speaking .card-icon-v11 svg {
    color: #ec4899;
}
.core-card-v11.speaking:hover {
    border-color: rgba(236, 72, 153, 0.3);
    box-shadow: 0 8px 24px rgba(236, 72, 153, 0.15);
}

/* 辅助模块区域 - v4.9.2: 仅资源卡片 */
.aux-modules-v11 {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.aux-card-v11 {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    background: var(--gray-50);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

/* v4.9.2: 资源卡片全宽 */
.aux-card-v11.resources-wide {
    width: 100%;
}

.aux-card-v11:hover {
    background: white;
    border-color: var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.aux-icon-v11 {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-xs);
}

.aux-icon-v11 svg {
    width: 18px;
    height: 18px;
    color: var(--gray-600);
}

.aux-info-v11 h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0 0 2px 0;
}

.aux-info-v11 p {
    font-size: 11px;
    color: var(--gray-500);
    margin: 0;
}

/* ==================== V11 写作模块样式 ==================== */

/* 写作模块头部 */
.writing-header-v11 {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    padding-left: calc(20px + env(safe-area-inset-left, 0px));
    padding-right: calc(20px + env(safe-area-inset-right, 0px));
    background: white;
    border-bottom: 1px solid var(--gray-100);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* PWA standalone 模式 - 增加顶部安全区域 */
@media all and (display-mode: standalone) {
    .writing-header-v11 {
        padding-top: calc(16px + env(safe-area-inset-top, 50px));
    }
}

.writing-back-v11 {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.writing-back-v11:hover {
    background: var(--gray-100);
}

.writing-back-v11 svg {
    width: 20px;
    height: 20px;
    color: var(--gray-600);
}

.writing-title-v11 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

/* 写作类型选项卡 */
.writing-types-v11 {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--gray-50);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.writing-types-v11::-webkit-scrollbar {
    display: none;
}

.type-tab-v11 {
    padding: 10px 18px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.type-tab-v11:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.type-tab-v11.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* 写作练习界面 */
.writing-practice-v11 {
    padding: 16px;
}

/* 题目卡片 */
.topic-card-v11 {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--gray-100);
}

.topic-header-v11 {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.topic-type-v11 {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-50);
    padding: 4px 10px;
    border-radius: 12px;
}

.topic-time-v11 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-500);
}

.topic-time-v11 svg {
    width: 16px;
    height: 16px;
}

.topic-title-v11 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.topic-desc-v11 {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
}

/* 资源面板 - 词汇/模板/范文 */
.resource-panels-v11 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.resource-btn-v11 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.resource-btn-v11:hover {
    border-color: var(--primary);
    background: var(--primary-50);
}

.resource-btn-v11.active {
    border-color: var(--primary);
    background: var(--primary-50);
}

.resource-btn-v11 svg {
    width: 22px;
    height: 22px;
    color: var(--gray-500);
}

.resource-btn-v11:hover svg,
.resource-btn-v11.active svg {
    color: var(--primary);
}

.resource-btn-v11 span {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-600);
}

.resource-btn-v11:hover span,
.resource-btn-v11.active span {
    color: var(--primary);
}

/* 资源展开面板 */
.resource-panel-v11 {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--gray-100);
    display: none;
}

.resource-panel-v11.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.panel-header-v11 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel-header-v11 h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.panel-close-v11 {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.panel-close-v11 svg {
    width: 16px;
    height: 16px;
    color: var(--gray-500);
}

/* 词汇列表样式 */
.vocab-list-v11 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vocab-item-v11 {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    background: var(--gray-50);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.vocab-item-v11:hover {
    background: var(--primary-50);
}

.vocab-word-v11 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.vocab-meaning-v11 {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* 模板列表样式 */
.template-list-v11 {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.template-category-v11 {
    margin-bottom: 8px;
}

.template-category-v11 h5 {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--gray-100);
}

.template-item-v11 {
    padding: 12px 14px;
    background: var(--gray-50);
    border-radius: 10px;
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 6px;
}

.template-item-v11:hover {
    background: var(--primary-50);
    color: var(--primary-dark);
}

.template-item-v11 code {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
}

/* 范文样式 */
.sample-content-v11 {
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.8;
}

.sample-content-v11 p {
    margin-bottom: 14px;
}

.sample-highlight-v11 {
    background: linear-gradient(120deg, #fef3c7 0%, #fef3c7 100%);
    padding: 2px 0;
}

/* 写作输入区 */
.writing-input-v11 {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--gray-100);
}

.input-header-v11 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.input-header-v11 h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0;
}

.word-counter-v11 {
    font-size: 13px;
    color: var(--gray-500);
}

.word-counter-v11 .count {
    font-weight: 600;
    color: var(--primary);
}

.writing-textarea-v11 {
    width: 100%;
    min-height: 200px;
    padding: 14px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--gray-800);
    resize: vertical;
    transition: all 0.2s ease;
}

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

.writing-textarea-v11::placeholder {
    color: var(--gray-400);
}

/* 操作按钮区 */
.action-buttons-v11 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-save-v11,
.btn-submit-v11 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-save-v11 {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-save-v11:hover {
    background: var(--gray-200);
}

.btn-save-v11 svg,
.btn-submit-v11 svg {
    width: 18px;
    height: 18px;
}

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

.btn-submit-v11:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

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

/* ==================== V11 AI评分结果样式 ==================== */

.ai-result-v11 {
    padding: 16px;
}

/* 总分卡片 */
.score-card-v11 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    color: white;
    text-align: center;
}

.score-title-v11 {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.score-value-v11 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 4px;
}

.score-max-v11 {
    font-size: 14px;
    opacity: 0.8;
}

.score-level-v11 {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 12px;
}

/* 维度评分 */
.dimensions-v11 {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--gray-100);
}

.dimensions-v11 h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 16px 0;
}

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

.dimension-item-v11 {
    padding: 14px;
    background: var(--gray-50);
    border-radius: 12px;
}

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

.dimension-name-v11 {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}

.dimension-score-v11 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.dimension-bar-v11 {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.dimension-fill-v11 {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.dimension-fill-v11.excellent {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.dimension-fill-v11.good {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.dimension-fill-v11.fair {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.dimension-fill-v11.poor {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

/* 段落分析 */
.paragraphs-v11 {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--gray-100);
}

.paragraphs-v11 h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 16px 0;
}

.paragraph-item-v11 {
    padding: 16px;
    background: var(--gray-50);
    border-radius: 12px;
    margin-bottom: 12px;
}

.paragraph-item-v11:last-child {
    margin-bottom: 0;
}

.para-header-v11 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.para-label-v11 {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}

.para-score-v11 {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.para-score-v11.good {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.para-score-v11.fair {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.para-score-v11.poor {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.para-content-v11 {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: white;
    border-radius: 8px;
}

.para-feedback-v11 {
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.5;
}

.para-feedback-v11 strong {
    color: var(--primary);
}

/* 改进建议 */
.suggestions-v11 {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--gray-100);
}

.suggestions-v11 h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 16px 0;
}

.suggestion-item-v11 {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(251, 146, 60, 0.05));
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.suggestion-item-v11:last-child {
    margin-bottom: 0;
}

.suggestion-icon-v11 {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
}

.suggestion-icon-v11 svg {
    width: 18px;
    height: 18px;
    color: #ef4444;
}

.suggestion-text-v11 {
    flex: 1;
}

.suggestion-title-v11 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.suggestion-desc-v11 {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
}

/* 深色模式适配 V11 */
body.theme-dark .core-card-v11 {
    background: #1e1e1e;
    border-color: #333;
}

body.theme-dark .core-card-v11.featured {
    background: linear-gradient(135deg, #2a2518 0%, #352c1a 100%);
}

body.theme-dark .aux-card-v11 {
    background: #1e1e1e;
}

body.theme-dark .aux-card-v11:hover {
    background: #2a2a2a;
    border-color: #444;
}

body.theme-dark .writing-header-v11 {
    background: #1e1e1e;
    border-color: #333;
}

body.theme-dark .writing-types-v11 {
    background: #151515;
}

body.theme-dark .type-tab-v11 {
    background: #2a2a2a;
    border-color: #444;
    color: #aaa;
}

body.theme-dark .type-tab-v11.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

body.theme-dark .topic-card-v11,
body.theme-dark .resource-panel-v11,
body.theme-dark .writing-input-v11,
body.theme-dark .dimensions-v11,
body.theme-dark .paragraphs-v11,
body.theme-dark .suggestions-v11 {
    background: #1e1e1e;
    border-color: #333;
}

body.theme-dark .resource-btn-v11 {
    background: #2a2a2a;
    border-color: #444;
}

body.theme-dark .writing-textarea-v11 {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

body.theme-dark .vocab-item-v11,
body.theme-dark .template-item-v11,
body.theme-dark .dimension-item-v11,
body.theme-dark .paragraph-item-v11 {
    background: #2a2a2a;
}

body.theme-dark .para-content-v11 {
    background: #333;
}

/* ==================== 更新通知样式 ==================== */
.update-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    padding: 12px 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.update-notification.show {
    transform: translateY(0);
}

.update-notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.update-notification-content.updating {
    justify-content: center;
}

.update-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.update-text {
    flex: 1;
    color: white;
}

.update-text strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.update-text span {
    font-size: 12px;
    opacity: 0.9;
}

.update-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    background: white;
    color: #6366f1;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.update-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.update-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.update-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.update-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: updateSpin 0.8s linear infinite;
    margin-right: 8px;
}

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

.update-notification-content.updating span {
    color: white;
    font-size: 14px;
}

/* 适配安全区域 */
@supports (padding-top: env(safe-area-inset-top)) {
    .update-notification {
        padding-top: calc(12px + env(safe-area-inset-top));
    }
}


/* V4.8.12: TTS语音选择器样式 */
.tts-voice-selector-v10 {
    margin: 16px 0;
}

.tts-voice-selector-v10 label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.select-v10 {
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: var(--gray-900);
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-v10:hover {
    border-color: #6366f1;
}

.select-v10:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

body.theme-dark .select-v10 {
    background: var(--gray-800);
    border-color: var(--gray-700);
    color: var(--gray-100);
}

/* V4.9.3: 自定义模态框样式 */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal.active {
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-container {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.custom-modal.active .modal-container {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    overflow-y: auto;
    flex: 1;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

.help-section {
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.help-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* 暗色主题适配 */
body.theme-dark .modal-container {
    background: var(--gray-800);
    color: var(--gray-100);
}

body.theme-dark .modal-header {
    border-bottom-color: var(--gray-700);
}

body.theme-dark .help-section {
    border-bottom-color: var(--gray-700);
}

body.theme-dark .modal-body::-webkit-scrollbar-track {
    background: var(--gray-700);
}

/* 响应式 */
@media (max-width: 768px) {
    .modal-container {
        max-width: 95%;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 20px 24px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
}

/* ==================== PWA 安装功能样式 ==================== */
.pwa-install-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.pwa-install-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.pwa-install-btn:disabled {
    cursor: not-allowed;
}

.pwa-install-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.pwa-install-modal {
    background: white;
    border-radius: 20px;
    max-width: 380px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

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

.pwa-install-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--gradient-primary);
    color: white;
}

.pwa-install-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.pwa-install-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.pwa-install-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.pwa-install-body {
    padding: 24px;
}

.pwa-install-step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.pwa-install-step .step-number {
    width: 28px;
    height: 28px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.pwa-install-step .step-content {
    flex: 1;
}

.pwa-install-step .step-content p {
    margin: 0 0 8px 0;
    color: #374151;
    line-height: 1.5;
}

.pwa-install-step .step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 10px;
    color: #6366f1;
}

.pwa-install-benefits {
    background: #f0fdf4;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.pwa-install-benefits p {
    margin: 0 0 8px 0;
    color: #166534;
    font-size: 14px;
}

.pwa-install-benefits p:last-child {
    margin-bottom: 0;
}

/* 深色主题适配 */
body.theme-dark .pwa-install-modal {
    background: var(--gray-800);
}

body.theme-dark .pwa-install-step .step-content p {
    color: var(--gray-200);
}

body.theme-dark .pwa-install-step .step-icon {
    background: var(--gray-700);
}

body.theme-dark .pwa-install-benefits {
    background: rgba(16, 185, 129, 0.1);
}

body.theme-dark .pwa-install-benefits p {
    color: #6ee7b7;
}
