/* ==================== CSS 变量：腾讯电脑管家风格·深空科幻毛玻璃体系 ==================== */
:root {
    /* 主色系 - 蓝紫渐变（腾讯电脑管家风格） */
    --primary: #4f8cf7;
    --primary-2: #6c5ce7;
    --primary-light: #7aa7f8;
    --primary-glow: rgba(79,140,247,0.3);
    --primary-glow-soft: rgba(79,140,247,0.12);

    /* 强调色 */
    --accent-blue: #4f8cf7;
    --accent-green: #34c759;
    --accent-orange: #ff9500;
    --accent-purple: #af52de;
    --accent-cyan: #5ac8fa;

    /* 深色背景体系 */
    --bg-deep: #080c1a;
    --bg-mid: #0f1a2e;
    --bg-surface: #111828;
    --bg-elevated: #151d30;

    /* 毛玻璃卡片背景 */
    --glass-bg: rgba(255,255,255,0.04);
    --glass-bg-hover: rgba(255,255,255,0.07);
    --glass-bg-active: rgba(79,140,247,0.1);
    --glass-bg-stat-blue: rgba(79,140,247,0.07);
    --glass-bg-stat-green: rgba(52,199,89,0.07);
    --glass-bg-stat-orange: rgba(255,149,0,0.07);
    --glass-bg-stat-purple: rgba(175,82,222,0.07);

    /* 边框 */
    --border-glass: rgba(255,255,255,0.06);
    --border-glass-hover: rgba(255,255,255,0.12);
    --border-glow: rgba(79,140,247,0.15);
    --border-glow-hover: rgba(79,140,247,0.3);

    /* 文字 */
    --text-white: #ffffff;
    --text-primary: #f0f4ff;
    --text-secondary: #8899bb;
    --text-muted: #5a6a8a;
    --text-dim: #3e4d6b;

    /* 阴影 */
    --shadow-card: 0 20px 60px rgba(0,0,0,0.5), 0 0 1px rgba(255,255,255,0.03);
    --shadow-card-hover: 0 28px 80px rgba(0,0,0,0.6), 0 0 2px rgba(79,140,247,0.08);
    --shadow-glow: 0 0 40px rgba(79,140,247,0.06);
    --shadow-modal: 0 32px 100px rgba(0,0,0,0.7);

    /* 圆角 */
    --radius-lg: 20px;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;

    /* 动画 */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* 模糊 */
    --blur-card: 40px;
    --blur-modal: 60px;
    --blur-header: 30px;
}

/* ==================== 基础样式 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Roboto, 'Helvetica Neue', Arial, sans-serif; 
    background: var(--bg-deep);
    color: var(--text-primary); 
    min-height: 100vh; 
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ==================== 水波纹动态背景 Canvas ==================== */
#waterRippleBg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ==================== 背景：深空光晕 + 科技感网格 ==================== */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
    background:
        /* 径向光晕 1 - 左上蓝色 */
        radial-gradient(ellipse 1200px 800px at 15% 20%, rgba(79,140,247,0.07) 0%, transparent 70%),
        /* 径向光晕 2 - 右下紫色 */
        radial-gradient(ellipse 1000px 700px at 80% 70%, rgba(108,92,231,0.06) 0%, transparent 70%),
        /* 径向光晕 3 - 中下青色 */
        radial-gradient(ellipse 800px 500px at 50% 85%, rgba(90,200,250,0.04) 0%, transparent 65%),
        /* 主渐变背景 */
        linear-gradient(165deg, #080c1a 0%, #0c1424 30%, #0f1a2e 60%, #111c30 100%);
}

/* 科技感网格线 */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.03;
    background-image: 
        linear-gradient(rgba(79,140,247,0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79,140,247,0.3) 1px, transparent 1px);
    background-size: 60px 60px;
    background-position: center center;
}

/* ==================== 主布局 ==================== */
#app { 
    display: flex; 
    min-height: 100vh; 
    position: relative; 
    z-index: 1; 
}

/* ==================== 侧边栏 - 深空毛玻璃 ==================== */
.sidebar { 
    width: 240px; 
    min-width: 240px;
    background: linear-gradient(180deg, 
        rgba(8,12,26,0.97) 0%, 
        rgba(15,26,46,0.98) 50%,
        rgba(17,24,40,0.99) 100%);
    backdrop-filter: blur(var(--blur-card));
    -webkit-backdrop-filter: blur(var(--blur-card));
    color: #fff; 
    position: fixed; 
    top: 0;
    left: 0;
    height: 100vh; 
    overflow-y: auto; 
    overflow-x: hidden;
    z-index: 100; 
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-glass);
    box-shadow: 2px 0 40px rgba(0,0,0,0.3);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(79,140,247,0.12) 30%,
        rgba(79,140,247,0.15) 50%,
        rgba(79,140,247,0.12) 70%,
        transparent 100%);
    pointer-events: none;
}

.sidebar .logo { 
    padding: 20px 24px 16px; 
    text-align: center; 
    border-bottom: 1px solid var(--border-glass); 
    position: relative;
}

.sidebar .logo::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 15%;
    width: 70%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79,140,247,0.3), transparent);
}

.sidebar .logo .logo-img {
    width: 100%;
    max-width: 180px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 2px 8px rgba(91, 160, 255, 0.15));
    transition: transform 0.3s ease, filter 0.3s ease;
    mix-blend-mode: screen;
}

.sidebar .logo .logo-img:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 4px 14px rgba(124, 110, 240, 0.25));
}

@keyframes logoShine {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

/* 版本标识 */
.version-badge {
    margin: 12px 16px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xs);
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.version-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xs);
    padding: 1px;
    background: linear-gradient(135deg, rgba(79,140,247,0.2), rgba(108,92,231,0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition);
}

.version-badge:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--border-glass-hover);
    color: var(--text-secondary);
}

.version-badge:hover::before { opacity: 1; }

.version-badge span {
    background: linear-gradient(135deg, var(--accent-blue), var(--primary-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 13px;
}

/* PRO 标签 */
.pro-tag {
    display: inline-block;
    background: linear-gradient(135deg, #4f8cf7, #6c5ce7);
    color: #fff;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
    font-weight: 700;
    vertical-align: middle;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(79,140,247,0.3);
}

/* 侧边栏导航 */
.sidebar nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.sidebar nav ul { list-style: none; }
.sidebar nav ul li { margin: 2px 10px; }
.sidebar nav ul li a { 
    display: flex; 
    align-items: center; 
    padding: 11px 16px; 
    border-radius: var(--radius-xs); 
    color: var(--text-secondary); 
    text-decoration: none; 
    transition: all var(--transition); 
    font-size: 13px;
    gap: 10px;
    position: relative;
    font-weight: 450;
    letter-spacing: 0.3px;
}

.sidebar nav ul li a i { 
    font-size: 15px; 
    font-style: normal; 
    width: 20px; 
    text-align: center; 
    opacity: 0.7;
    transition: opacity var(--transition);
}

.sidebar nav ul li a:hover { 
    background: rgba(255,255,255,0.05); 
    color: var(--text-primary); 
}

.sidebar nav ul li a:hover i { opacity: 1; }

.sidebar nav ul li a.active { 
    background: linear-gradient(135deg, 
        rgba(79,140,247,0.18), 
        rgba(108,92,231,0.14));
    color: var(--text-white);
    font-weight: 550;
    border-left: 2px solid var(--accent-blue);
    box-shadow: 
        inset 0 0 30px rgba(79,140,247,0.06),
        0 0 20px rgba(79,140,247,0.04);
}

.sidebar nav ul li a.active i { opacity: 1; }

.sidebar nav ul li a.active::after {
    content: '';
    position: absolute;
    left: -2px;
    top: 20%;
    height: 60%;
    width: 2px;
    background: var(--accent-blue);
    box-shadow: 0 0 8px var(--primary-glow), 0 0 16px var(--primary-glow);
    border-radius: 1px;
}

.sidebar nav ul li.pro-only a.active {
    background: linear-gradient(135deg, 
        rgba(79,140,247,0.2), 
        rgba(108,92,231,0.18));
    border-left: 2px solid var(--primary-2);
}

.sidebar nav ul li.pro-only a.active::after {
    background: var(--primary-2);
    box-shadow: 0 0 8px rgba(108,92,231,0.3), 0 0 16px rgba(108,92,231,0.15);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-glass);
    margin-top: auto;
}

/* ==================== 主内容区 ==================== */
.main-content { 
    flex: 1; 
    margin-left: 240px; 
    min-height: 100vh; 
    display: flex;
    flex-direction: column;
    background: transparent;
    width: calc(100% - 240px);
    overflow-x: hidden;
}

/* ==================== 顶部栏 - 毛玻璃 ==================== */
.header { 
    background: rgba(8,12,26,0.85);
    backdrop-filter: blur(var(--blur-header));
    -webkit-backdrop-filter: blur(var(--blur-header));
    padding: 14px 32px; 
    border-bottom: 1px solid var(--border-glass);
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 60px;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79,140,247,0.08) 30%, rgba(79,140,247,0.12) 50%, rgba(79,140,247,0.08) 70%, transparent);
    pointer-events: none;
}

.header h2 { 
    font-size: 22px; 
    font-weight: 700; 
    color: var(--text-white);
    letter-spacing: -0.3px;
}

.header .user-info { display: flex; align-items: center; gap: 12px; }

.version-switch-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-label {
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.version-label.free {
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
}

.version-label.pro {
    background: linear-gradient(135deg, rgba(79,140,247,0.18), rgba(108,92,231,0.14));
    color: #5ba0ff;
    border: 1px solid rgba(79,140,247,0.2);
    box-shadow: 0 0 12px rgba(79,140,247,0.08);
}

/* ==================== 页面内容区 ==================== */
.page-content { 
    padding: 28px 32px; 
    flex: 1;
}

/* ==================== 卡片 - 增强毛玻璃 ==================== */
.card { 
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-card));
    -webkit-backdrop-filter: blur(var(--blur-card));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg); 
    padding: 28px; 
    box-shadow: var(--shadow-card); 
    margin-bottom: 24px; 
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

/* 卡片边缘发光描边 */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.04) 0%, 
        rgba(79,140,247,0.08) 40%,
        rgba(108,92,231,0.06) 60%,
        rgba(255,255,255,0.03) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.card:hover { 
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--border-glass-hover);
}

.card:hover::before {
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.06) 0%, 
        rgba(79,140,247,0.12) 40%,
        rgba(108,92,231,0.1) 60%,
        rgba(255,255,255,0.05) 100%);
}

.card-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 24px; 
    padding-bottom: 16px; 
    border-bottom: 1px solid var(--border-glass); 
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, rgba(79,140,247,0.4), transparent);
}

.card-title { 
    font-size: 16px; 
    font-weight: 700; 
    color: var(--text-white);
    letter-spacing: 0.2px;
}

/* ==================== 时间范围选择器 ==================== */
.time-range-selector {
    display: flex;
    gap: 6px;
}
.time-range-btn {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--transition);
}
.time-range-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}
.time-range-btn.active {
    background: var(--glass-bg-active);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    font-weight: 600;
}

/* ==================== 统计卡片网格 ==================== */
.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 20px; 
    margin-bottom: 28px; 
}

/* ==================== 统计卡片 - 玻璃 + 彩色发光 ==================== */
.stat-card { 
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-card));
    -webkit-backdrop-filter: blur(var(--blur-card));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg); 
    padding: 24px 26px; 
    box-shadow: var(--shadow-card); 
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    border-left: 4px solid transparent;
}

/* 统计卡片发光边缘 */
.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* 底部发光渐变 */
.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: inherit;
    opacity: 0;
    transition: opacity var(--transition);
}

.stat-card:hover { 
    transform: translateY(-4px); 
    box-shadow: var(--shadow-card-hover);
    border-color: var(--border-glass-hover);
}

.stat-card:hover::after { opacity: 1; }

.stat-card .stat-value { 
    font-size: 32px; 
    font-weight: 800; 
    color: var(--text-white); 
    margin: 4px 0 6px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.stat-card .stat-label { 
    color: var(--text-muted); 
    font-size: 13px; 
    font-weight: 450;
    letter-spacing: 0.3px;
}

/* 统计卡片颜色变体 */
.stat-card.primary { 
    background: var(--glass-bg-stat-blue);
    border-left-color: var(--accent-blue);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 30px rgba(79,140,247,0.04);
}

.stat-card.primary .stat-value { 
    color: #7aafff;
    text-shadow: 0 0 20px rgba(79,140,247,0.2);
}

.stat-card.primary::after { 
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
}

.stat-card.success { 
    background: var(--glass-bg-stat-green);
    border-left-color: var(--accent-green);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 30px rgba(52,199,89,0.04);
}

.stat-card.success .stat-value { 
    color: #5ddb7a;
    text-shadow: 0 0 20px rgba(52,199,89,0.2);
}

.stat-card.success::after { 
    background: linear-gradient(90deg, transparent, var(--accent-green), transparent);
}

.stat-card.warning { 
    background: var(--glass-bg-stat-orange);
    border-left-color: var(--accent-orange);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 30px rgba(255,149,0,0.04);
}

.stat-card.warning .stat-value { 
    color: #ffaa33;
    text-shadow: 0 0 20px rgba(255,149,0,0.2);
}

.stat-card.warning::after { 
    background: linear-gradient(90deg, transparent, var(--accent-orange), transparent);
}

.stat-card.info { 
    background: var(--glass-bg-stat-purple);
    border-left-color: var(--accent-purple);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 30px rgba(175,82,222,0.04);
}

.stat-card.info .stat-value { 
    color: #c87dff;
    text-shadow: 0 0 20px rgba(175,82,222,0.2);
}

.stat-card.info::after { 
    background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
}

/* ==================== 匿名用户数据丢失提醒横幅 ==================== */
.anonymous-warning-banner {
    background: linear-gradient(135deg, rgba(255,149,0,0.12), rgba(255,87,34,0.08));
    border: 1px solid rgba(255,149,0,0.3);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 20px;
    animation: slideDown 0.4s ease;
}
.anonymous-warning-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.anonymous-warning-icon {
    font-size: 18px;
}
.anonymous-warning-text {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
    min-width: 200px;
}
.anonymous-warning-btn {
    white-space: nowrap;
    background: var(--accent-orange) !important;
    color: #fff !important;
}
.anonymous-warning-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color var(--transition);
}
.anonymous-warning-close:hover {
    color: var(--text-primary);
}

/* ==================== 新用户快速体验引导 ==================== */
.new-user-guide {
    background: linear-gradient(135deg, rgba(79,140,247,0.10), rgba(108,92,231,0.08));
    border: 1px solid rgba(79,140,247,0.25);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 24px;
    animation: slideDown 0.5s ease;
}
.new-user-guide-header h3 {
    color: var(--text-white);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
}
.new-user-guide-steps {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.guide-step {
    flex: 1;
    min-width: 200px;
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 14px;
}
.guide-step:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    background: var(--glass-bg-active);
    box-shadow: 0 8px 30px rgba(79,140,247,0.1);
}
.guide-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.guide-step-content {
    flex: 1;
}
.guide-step-title {
    color: var(--text-white);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}
.guide-step-desc {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
}
.guide-step-arrow {
    color: var(--text-muted);
    font-size: 18px;
    flex-shrink: 0;
}
.new-user-guide-footer {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
}

/* ==================== API 快速接入入口 ==================== */
.api-quick-entry {
    background: linear-gradient(135deg, rgba(52,199,89,0.08), rgba(79,140,247,0.06));
    border: 1px solid rgba(52,199,89,0.2);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    margin-bottom: 24px;
    cursor: default;
    transition: all var(--transition);
}
.api-quick-entry:hover {
    border-color: rgba(52,199,89,0.35);
    box-shadow: 0 4px 20px rgba(52,199,89,0.08);
}
.api-quick-entry-content {
    display: flex;
    align-items: center;
    gap: 16px;
}
.api-quick-entry-icon {
    font-size: 28px;
    flex-shrink: 0;
}
.api-quick-entry-text {
    flex: 1;
}
.api-quick-entry-title {
    color: var(--text-white);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 3px;
}
.api-quick-entry-desc {
    color: var(--text-secondary);
    font-size: 12px;
}
.api-quick-entry-btn {
    white-space: nowrap;
    background: var(--accent-green) !important;
    color: #fff !important;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== 侧边栏PRO升级入口 ==================== */
.sidebar-pro-upgrade {
    background: linear-gradient(135deg, rgba(79,140,247,0.15), rgba(108,92,231,0.12));
    border: 1px solid rgba(79,140,247,0.25);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 12px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--accent-blue);
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
    display: none;
}
.sidebar-pro-upgrade:hover {
    background: linear-gradient(135deg, rgba(79,140,247,0.25), rgba(108,92,231,0.2));
    transform: translateY(-1px);
}

/* ==================== 模型比价工具栏 ==================== */
.model-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.model-toolbar-left {
    display: flex;
    align-items: center;
    gap: 4px;
}
.model-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==================== 按钮 ==================== */
.btn { 
    padding: 8px 20px; 
    border-radius: var(--radius-xs); 
    border: none; 
    cursor: pointer; 
    font-size: 13px; 
    font-weight: 550;
    transition: all var(--transition); 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.4;
    white-space: nowrap;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-primary { 
    background: linear-gradient(135deg, #4f8cf7 0%, #6c5ce7 100%); 
    color: #fff;
    box-shadow: 0 4px 20px rgba(79,140,247,0.35), 0 0 0 1px rgba(79,140,247,0.1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}

.btn-primary:hover { 
    box-shadow: 0 6px 28px rgba(79,140,247,0.5), 0 0 0 1px rgba(79,140,247,0.2);
    transform: translateY(-2px);
}

.btn-primary:hover::before { left: 100%; }

.btn-success { 
    background: linear-gradient(135deg, #2d8a4e 0%, #34c759 100%); 
    color: #fff; 
    box-shadow: 0 4px 20px rgba(52,199,89,0.3);
}

.btn-success:hover { 
    box-shadow: 0 6px 28px rgba(52,199,89,0.45); 
    transform: translateY(-2px); 
}

.btn-danger { 
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%); 
    color: #fff;
    box-shadow: 0 4px 16px rgba(231,76,60,0.25);
}

.btn-danger:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-warning { 
    background: linear-gradient(135deg, #e08600 0%, #ff9500 100%); 
    color: #fff;
    box-shadow: 0 4px 16px rgba(255,149,0,0.25);
}

.btn-warning:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-outline { 
    background: transparent; 
    border: 1.5px solid var(--border-glass); 
    color: var(--text-secondary); 
}

.btn-outline:hover { 
    background: rgba(255,255,255,0.05); 
    border-color: var(--border-glass-hover);
    color: var(--text-white);
    box-shadow: 0 0 16px rgba(79,140,247,0.06);
}

.btn-sm { padding: 4px 12px; font-size: 11px; border-radius: 6px; }
.btn-lg { padding: 14px 32px; font-size: 16px; font-weight: 650; border-radius: var(--radius-xs); }
.btn:disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }

/* 使用强度按钮 */
.intensity-btn {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: var(--radius-xs);
    text-align: center;
    min-width: 80px;
    line-height: 1.5;
    transition: all var(--transition-fast);
    cursor: pointer;
}
.intensity-btn.active {
    background: rgba(79,140,247,0.15);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    box-shadow: 0 0 16px rgba(79,140,247,0.12);
}
.intensity-btn:hover {
    border-color: var(--border-glass-hover);
}

/* ==================== 表单 ==================== */
.form-group { margin-bottom: 18px; }
.form-group label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 500; 
    font-size: 13px; 
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.form-group input, 
.form-group select, 
.form-group textarea { 
    width: 100%; 
    padding: 10px 16px; 
    border: 1.5px solid var(--border-glass); 
    border-radius: var(--radius-xs); 
    font-size: 13px; 
    transition: all var(--transition); 
    background: rgba(255,255,255,0.03);
    color: var(--text-white);
    letter-spacing: 0.2px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-dim);
}

.form-group select {
    color: var(--text-white);
    cursor: pointer;
}

.form-group select option {
    background: var(--bg-elevated);
    color: var(--text-white);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--border-glass-hover);
    background: rgba(255,255,255,0.05);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus { 
    outline: none; 
    border-color: var(--accent-blue); 
    box-shadow: 0 0 0 3px rgba(79,140,247,0.12), 0 0 20px rgba(79,140,247,0.05);
    background: rgba(255,255,255,0.06);
}

.form-row { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 18px; 
}

/* ==================== 表格 ==================== */
.table { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 13px;
}

.table th, .table td { 
    padding: 12px 16px; 
    text-align: left; 
    border-bottom: 1px solid var(--border-glass); 
}

.table th { 
    background: rgba(255,255,255,0.02); 
    font-weight: 600; 
    color: var(--text-muted); 
    white-space: nowrap;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table tr:hover { background: rgba(255,255,255,0.025); }
.table tr:last-child td { border-bottom: none; }
.table td { color: var(--text-secondary); }

/* ==================== 标签 ==================== */
.badge { 
    padding: 4px 12px; 
    border-radius: 16px; 
    font-size: 11px; 
    font-weight: 550;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.3px;
}

.badge-success { background: rgba(52,199,89,0.12); color: #5ddb7a; border: 1px solid rgba(52,199,89,0.15); }
.badge-warning { background: rgba(255,149,0,0.12); color: #ffaa33; border: 1px solid rgba(255,149,0,0.15); }
.badge-info { background: rgba(79,140,247,0.12); color: #7aafff; border: 1px solid rgba(79,140,247,0.15); }
.badge-danger { background: rgba(231,76,60,0.12); color: #f07070; border: 1px solid rgba(231,76,60,0.15); }
.badge-primary { background: rgba(79,140,247,0.12); color: #7aafff; border: 1px solid rgba(79,140,247,0.15); }
.badge-pro { 
    background: linear-gradient(135deg, var(--accent-blue), var(--primary-2)); 
    color: #fff; 
    box-shadow: 0 2px 8px rgba(79,140,247,0.3);
}

/* ==================== 图表容器 ==================== */
.chart-container { height: 360px; width: 100%; }

/* ==================== 模态框 - 强化毛玻璃 ==================== */
.modal-overlay { 
    position: fixed; 
    top: 0; left: 0; right: 0; bottom: 0; 
    background: rgba(0,0,0,0.65); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none; 
    justify-content: center; 
    align-items: center; 
    z-index: 1000; 
}

.modal-overlay.show { display: flex; }

.modal { 
    background: rgba(17,24,40,0.96);
    backdrop-filter: blur(var(--blur-modal));
    -webkit-backdrop-filter: blur(var(--blur-modal));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg); 
    width: 90%; 
    max-width: 450px; 
    overflow: hidden; 
    box-shadow: var(--shadow-modal);
    animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.modal::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.04), 
        rgba(79,140,247,0.1) 30%,
        rgba(108,92,231,0.08) 70%,
        rgba(255,255,255,0.03));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header { 
    padding: 20px 28px; 
    border-bottom: 1px solid var(--border-glass); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: rgba(255,255,255,0.015);
}

.modal-header h3 { 
    font-size: 16px; 
    font-weight: 700; 
    color: var(--text-white);
    letter-spacing: 0.3px;
}

.modal-header .close { 
    cursor: pointer; 
    font-size: 24px; 
    color: var(--text-muted); 
    background: none; 
    border: none; 
    padding: 0 4px;
    line-height: 1;
    transition: all var(--transition);
    border-radius: 4px;
}

.modal-header .close:hover { 
    color: var(--text-white);
    background: rgba(255,255,255,0.05);
}

.modal-body { padding: 28px; }

.modal-footer { 
    padding: 16px 28px; 
    border-top: 1px solid var(--border-glass); 
    display: flex; 
    justify-content: flex-end; 
    gap: 12px; 
    background: rgba(255,255,255,0.015);
}

/* ==================== 认证标签切换 ==================== */
.auth-tab {
    flex: 1;
    text-align: center;
    background: rgba(255,255,255,0.02);
    border: 1.5px solid var(--border-glass);
    color: var(--text-secondary);
    border-radius: var(--radius-xs);
    padding: 8px;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 13px;
}

.auth-tab:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--border-glass-hover);
}

.auth-tab.active {
    background: linear-gradient(135deg, var(--accent-blue), var(--primary-2));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(79,140,247,0.3);
}

/* ==================== 滑动条 ==================== */
.slider-container { margin: 20px 0; }
.slider { 
    width: 100%; 
    height: 6px; 
    background: rgba(255,255,255,0.08); 
    border-radius: 3px; 
    -webkit-appearance: none; 
    appearance: none; 
    outline: none;
}

.slider::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    appearance: none; 
    width: 22px; 
    height: 22px; 
    background: linear-gradient(135deg, var(--accent-blue), var(--primary-2)); 
    border-radius: 50%; 
    cursor: pointer; 
    box-shadow: 0 2px 12px rgba(79,140,247,0.5), 0 0 0 4px rgba(79,140,247,0.1);
    transition: all var(--transition);
}

.slider::-webkit-slider-thumb:hover { 
    transform: scale(1.15); 
    box-shadow: 0 4px 16px rgba(79,140,247,0.6), 0 0 0 6px rgba(79,140,247,0.12);
}

.slider-value { 
    text-align: center; 
    margin-top: 12px; 
    font-weight: 600; 
    color: var(--accent-blue); 
    font-size: 14px;
}

/* ==================== 复制按钮 ==================== */
.copy-btn { padding: 4px 10px; font-size: 12px; margin-left: 8px; white-space: nowrap; }

/* ==================== 底部信息 ==================== */
.footer { 
    padding: 20px 32px; 
    text-align: center; 
    color: var(--text-dim); 
    font-size: 12px; 
    border-top: 1px solid var(--border-glass);
    margin-top: auto;
    background: rgba(255,255,255,0.01);
}

.footer a { color: var(--text-dim); text-decoration: none; transition: color var(--transition); }
.footer a:hover { color: var(--accent-blue); }
.footer .icp { margin-right: 5px; }
.footer .brand-name { 
    cursor: pointer; 
    color: var(--accent-blue); 
    font-weight: 550; 
    margin-left: 15px;
    transition: opacity var(--transition);
}

.footer .brand-name:hover { opacity: 0.6; }

/* ==================== 加载动画 ==================== */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2.5px solid var(--accent-blue);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-left: 12px;
    vertical-align: middle;
    box-shadow: 0 0 16px var(--primary-glow-soft);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== 示例数据标记 ==================== */
.sample-tag { 
    background: rgba(255,149,0,0.12); 
    padding: 2px 8px; 
    border-radius: 4px; 
    font-size: 11px; 
    color: var(--accent-orange); 
    font-weight: 500;
    border: 1px solid rgba(255,149,0,0.15);
}

/* ==================== 预算进度条 ==================== */
.budget-progress {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
}

.budget-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.budget-progress-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 40%;
    background: rgba(255,255,255,0.2);
    border-radius: 4px 4px 0 0;
}

.budget-progress-bar.safe { background: var(--accent-green); box-shadow: 0 0 8px rgba(52,199,89,0.3); }
.budget-progress-bar.warning { background: var(--accent-orange); box-shadow: 0 0 8px rgba(255,149,0,0.3); }
.budget-progress-bar.danger { background: #e74c3c; box-shadow: 0 0 8px rgba(231,76,60,0.3); }

/* ==================== 优化建议卡片 ==================== */
.optimization-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    transition: all var(--transition);
    backdrop-filter: blur(var(--blur-card));
    -webkit-backdrop-filter: blur(var(--blur-card));
}

.optimization-card:hover { 
    box-shadow: var(--shadow-card-hover);
    border-color: var(--border-glass-hover);
    transform: translateY(-2px);
}

.optimization-card .savings {
    color: var(--accent-green);
    font-weight: 700;
    font-size: 16px;
    text-shadow: 0 0 12px rgba(52,199,89,0.2);
}

/* ==================== 版本对比表 ==================== */
.version-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.version-compare .version-card {
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-glass);
    cursor: pointer;
    transition: all var(--transition);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-card));
    -webkit-backdrop-filter: blur(var(--blur-card));
    position: relative;
}

.version-compare .version-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.version-compare .version-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--border-glass-hover);
}

.version-compare .version-card.current {
    border-color: rgba(79,140,247,0.3);
    background: rgba(79,140,247,0.06);
    box-shadow: 0 0 40px rgba(79,140,247,0.08);
}

.version-compare .version-card.current::before {
    background: linear-gradient(135deg, rgba(79,140,247,0.2), rgba(108,92,231,0.15));
}

.version-compare .version-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-white);
}

.version-compare .version-card .price {
    font-size: 28px;
    font-weight: 800;
    margin: 12px 0;
    color: var(--accent-blue);
    text-shadow: 0 0 20px rgba(79,140,247,0.2);
}

.version-compare .version-card ul {
    list-style: none;
    padding: 0;
    text-align: left;
    font-size: 13px;
    color: var(--text-secondary);
}

.version-compare .version-card ul li {
    padding: 6px 0;
}

/* ==================== 绑定账号按钮 ==================== */
#bindAccountBtn {
    border-color: rgba(108,92,231,0.3);
    color: var(--primary-2);
    transition: all var(--transition);
}

#bindAccountBtn:hover {
    background: rgba(108,92,231,0.1);
    border-color: rgba(108,92,231,0.4);
    color: var(--primary-2);
    box-shadow: 0 0 16px rgba(108,92,231,0.1);
}

/* ==================== 用户昵称可编辑 ==================== */
#userBadge[title] {
    position: relative;
    cursor: pointer;
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
}

#userBadge:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-white);
    transition: all var(--transition);
}

/* ==================== 欢迎页加载 ==================== */
#page-welcome .loading {
    width: 44px;
    height: 44px;
    border: 3px solid var(--accent-blue);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
    box-shadow: 0 0 20px var(--primary-glow-soft);
}

/* ==================== 支付方式选中样式 ==================== */
.payment-method-selected {
    border-color: var(--accent-blue) !important;
    background: rgba(79,140,247,0.1) !important;
    box-shadow: 0 0 16px rgba(79,140,247,0.12);
}

/* ==================== PRO 菜单隐藏 ==================== */
.pro-only.hidden {
    display: none !important;
}

/* ==================== 代理菜单隐藏 ==================== */
.agent-only.hidden {
    display: none !important;
}

/* ==================== Toast 提示 ==================== */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: rgba(17,24,40,0.97);
    backdrop-filter: blur(var(--blur-modal));
    -webkit-backdrop-filter: blur(var(--blur-modal));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xs);
    padding: 14px 22px;
    color: var(--text-white);
    font-size: 13px;
    box-shadow: var(--shadow-modal);
    z-index: 2000;
    animation: toastIn 0.3s ease;
    letter-spacing: 0.2px;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    .sidebar { 
        width: 100%; 
        min-width: unset;
        height: auto; 
        position: relative; 
        top: auto;
        left: auto;
    }
    .main-content { 
        margin-left: 0; 
        width: 100%;
    }
    .sidebar nav ul { display: flex; flex-wrap: wrap; padding: 6px; }
    .sidebar nav ul li { flex: 1; min-width: 90px; margin: 2px 3px; }
    .sidebar nav ul li a { 
        justify-content: center; 
        font-size: 11px; 
        padding: 9px 6px; 
        gap: 4px;
    }
    .sidebar nav ul li a i { margin-right: 2px; font-size: 13px; }
    .sidebar nav ul li a.active { border-left: none; border-bottom: 2px solid var(--accent-blue); }
    .sidebar nav ul li a.active::after { display: none; }
    
    .header { 
        flex-direction: column; 
        gap: 10px; 
        padding: 12px 20px;
    }
    .header h2 { font-size: 18px; }
    
    .page-content { padding: 20px; }
    
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    
    .card { padding: 20px; }
    .stat-card { padding: 18px; }
    .stat-card .stat-value { font-size: 26px; }
    
    .version-badge { margin: 8px 10px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .version-compare { grid-template-columns: 1fr; }
}
.model-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-card));
    -webkit-backdrop-filter: blur(var(--blur-card));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.model-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.04) 0%,
        rgba(79,140,247,0.08) 40%,
        rgba(108,92,231,0.06) 60%,
        rgba(255,255,255,0.03) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.model-card[open] {
    box-shadow: var(--shadow-card-hover);
}

/* 折叠摘要行 */
.model-card-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background var(--transition);
}

.model-card-summary::-webkit-details-marker {
    display: none;
}

.model-card-summary:hover {
    background: rgba(255,255,255,0.03);
}

.model-card-summary-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.model-card-summary-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.model-card-icon {
    font-size: 20px;
}

.model-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 0.2px;
}

.model-count-badge {
    background: rgba(79,140,247,0.12);
    color: #7aafff;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 550;
    border: 1px solid rgba(79,140,247,0.15);
}

.model-card-arrow {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform var(--transition);
}

.model-card[open] .model-card-arrow {
    transform: rotate(180deg);
}

/* 卡片展开内容区 */
.model-card-body {
    padding: 0 28px 24px;
    border-top: 1px solid var(--border-glass);
    padding-top: 20px;
}

/* 搜索框 */
.model-search-wrap {
    margin-bottom: 16px;
}

.model-search-wrap input {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid var(--border-glass);
    border-radius: var(--radius-xs);
    font-size: 13px;
    background: rgba(255,255,255,0.03);
    color: var(--text-white);
    transition: all var(--transition);
    letter-spacing: 0.2px;
}

.model-search-wrap input::placeholder {
    color: var(--text-dim);
}

.model-search-wrap input:hover {
    border-color: var(--border-glass-hover);
    background: rgba(255,255,255,0.05);
}

.model-search-wrap input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(79,140,247,0.12), 0 0 20px rgba(79,140,247,0.05);
    background: rgba(255,255,255,0.06);
}

/* 底部信息栏 */
.model-card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 12px;
    flex-wrap: wrap;
}

.model-card-footer strong {
    color: var(--text-secondary);
    font-weight: 700;
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .header h2 { font-size: 16px; }
    .card { padding: 16px; }
    .card-title { font-size: 14px; }
    .btn-lg { padding: 12px 24px; font-size: 14px; }
    .page-content { padding: 14px; }
    .stat-card .stat-value { font-size: 24px; }
}

/* ==================== 提示词优化模块 ==================== */
.prompt-optimizer-card {
    border: 1px solid rgba(79,140,247,0.08);
}

.prompt-optimizer-card textarea {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', 'Microsoft YaHei', monospace;
    font-size: 13px;
    line-height: 1.7;
    transition: all var(--transition-fast);
}

.prompt-optimizer-card textarea:focus {
    border-color: rgba(79,140,247,0.3);
    box-shadow: 0 0 20px rgba(79,140,247,0.06);
}

.prompt-optimizer-card .table tfoot td {
    background: rgba(52,199,89,0.04);
    border-top: 1px solid rgba(52,199,89,0.12);
}

#promptCompareSection {
    animation: fadeSlideIn 0.4s ease-out;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 代理系统样式 ==================== */

/* 代理状态区域 */
.agent-status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

/* 代理申请区域 */
.agent-apply-card {
    background: linear-gradient(135deg, rgba(79,140,247,0.06), rgba(108,92,231,0.05));
    border: 1px solid rgba(79,140,247,0.12);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
}

.agent-apply-card h3 {
    font-size: 18px;
    color: var(--text-white);
    margin-bottom: 8px;
}

.agent-apply-card p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* 代理审核中提示 */
.agent-pending-card {
    background: linear-gradient(135deg, rgba(255,149,0,0.06), rgba(255,149,0,0.03));
    border: 1px solid rgba(255,149,0,0.12);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
}

.agent-pending-card .pending-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.agent-pending-card h3 {
    font-size: 18px;
    color: #ffaa33;
    margin-bottom: 8px;
}

/* 代理看板统计 */
.agent-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.agent-stat-item {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-card));
    -webkit-backdrop-filter: blur(var(--blur-card));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 18px;
    text-align: center;
    transition: all var(--transition);
}

.agent-stat-item:hover {
    border-color: var(--border-glass-hover);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.agent-stat-item .agent-stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-white);
    margin: 4px 0;
}

.agent-stat-item .agent-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.agent-stat-item.primary .agent-stat-value { color: #7aafff; text-shadow: 0 0 16px rgba(79,140,247,0.2); }
.agent-stat-item.success .agent-stat-value { color: #5ddb7a; text-shadow: 0 0 16px rgba(52,199,89,0.2); }
.agent-stat-item.warning .agent-stat-value { color: #ffaa33; text-shadow: 0 0 16px rgba(255,149,0,0.2); }
.agent-stat-item.info .agent-stat-value { color: #c87dff; text-shadow: 0 0 16px rgba(175,82,222,0.2); }

/* 推广链接区域 */
.referral-layout {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.referral-layout .qr-section {
    text-align: center;
    flex-shrink: 0;
}

.referral-layout .link-section {
    flex: 1;
    min-width: 250px;
}

/* 代理申请弹窗 */
.agent-apply-modal .form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* 佣金比例输入框 */
.commission-rate-input {
    width: 60px;
    padding: 4px 8px;
    border: 1.5px solid var(--border-glass);
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    color: var(--text-white);
    font-size: 13px;
    text-align: center;
    transition: all var(--transition);
}

.commission-rate-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(79,140,247,0.12);
}

/* ============================================================
   Excel 导出按钮样式
   ============================================================ */

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
}

.export-btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.table-toolbar .table-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #e5e7eb);
    margin: 0;
}

/* ============================================================
   移动端适配 - 全面响应式（方案 B）
   支持：手机（≤768px）、平板（768-1024px）、桌面（≥1024px）
   ============================================================ */

/* ---------- 汉堡菜单按钮（默认桌面隐藏） ---------- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 4px 8px;
    background: transparent;
    border: none;
    z-index: 100;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: #e5e7eb;
    border-radius: 2px;
    transition: 0.25s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}


/* ============================================================
   平板适配（768px - 1024px）
   ============================================================ */
@media screen and (max-width: 1024px) {
    .page-container {
        padding: 16px 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card .stat-value {
        font-size: 24px;
    }
}


/* ============================================================
   手机适配（≤ 768px）
   ============================================================ */
@media screen and (max-width: 768px) {
    /* ---------- 全局 ---------- */
    body {
        font-size: 14px;
    }

    /* 主布局改为纵向堆叠 */
    #app {
        flex-direction: column;
    }

    .page-container {
        padding: 12px 14px;
    }

    .page-title {
        font-size: 20px;
    }

    /* ---------- 侧边栏导航 ---------- */
    .sidebar {
        width: 100%;
        padding: 10px 14px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        z-index: 50;
        overflow: visible;
        background: rgba(17, 24, 39, 0.92);
        backdrop-filter: blur(12px);
    }

    .sidebar .logo {
        font-size: 18px;
        font-weight: 700;
        flex-shrink: 0;
    }

    .sidebar .version-badge {
        display: none;
    }

    /* 移动端 logo 紧凑样式 */
    .sidebar .logo {
        padding: 4px 0;
        border-bottom: none;
        margin: 0;
    }

    .sidebar .logo .logo-img {
        max-width: 100px;
        height: auto;
    }

    /* 显示汉堡菜单 */
    .hamburger {
        display: flex !important;
    }

    /* 导航菜单 - 默认隐藏，点击展开 */
    .nav-menu {
        display: none !important;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: 70vh;
        overflow-y: auto;
        background: rgba(17, 24, 39, 0.97);
        backdrop-filter: blur(12px);
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        z-index: 49;
        width: 100vw;
    }

    .nav-menu.open {
        display: flex !important;
    }

    .sidebar .nav-menu ul,
    .nav-menu ul {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .sidebar .nav-menu ul li,
    .nav-menu ul li {
        flex: none !important;
        min-width: auto !important;
        margin: 0 !important;
    }

    .nav-menu li {
        list-style: none;
    }

    .nav-menu a,
    .nav-menu .menu-item {
        display: block;
        padding: 12px 20px;
        font-size: 15px;
        color: #e5e7eb;
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        transition: background 0.15s;
    }

    .nav-menu a:active,
    .nav-menu .menu-item:active {
        background: rgba(255, 255, 255, 0.06);
    }

    .nav-menu a:last-child,
    .nav-menu .menu-item:last-child {
        border-bottom: none;
    }

    .nav-menu .nav-submenu {
        background: rgba(0, 0, 0, 0.2);
        padding-left: 12px;
    }

    .nav-menu .nav-submenu a {
        font-size: 14px;
    }

    /* 移动端菜单中的 PRO 升级入口 */
    .nav-menu .sidebar-pro-upgrade {
        display: block;
        margin: 8px 16px;
        padding: 12px 16px;
        font-size: 14px;
        color: #e5e7eb;
        text-align: center;
        cursor: pointer;
        border-radius: 8px;
        background: linear-gradient(135deg, rgba(79,140,247,0.2), rgba(108,92,231,0.15));
        border: 1px solid rgba(79,140,247,0.3);
    }

    /* 移动端菜单中的联系我们 */
    .nav-menu .sidebar-footer {
        display: block;
        padding: 12px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .nav-menu .sidebar-footer .btn {
        width: 100%;
        font-size: 14px;
        padding: 10px;
    }

    /* 移动端用户信息 - 默认隐藏，菜单展开时显示 */
    .mobile-user-info {
        display: none;
        padding: 12px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        margin-top: 8px;
    }

    .nav-menu.open .mobile-user-info {
        display: block;
    }

    .mobile-user-info .user-info-line {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 4px 0;
    }

    .mobile-user-info .version-badge {
        display: inline-block !important;
        font-size: 13px;
        color: #e5e7eb;
        background: rgba(255, 255, 255, 0.08);
        padding: 2px 12px;
        border-radius: 12px;
    }

    .mobile-user-info .version-switch-btn,
    .mobile-user-info .logout-btn-mobile {
        font-size: 13px;
        color: #9ca3af;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 4px 8px;
    }

    .mobile-user-info .logout-btn-mobile {
        color: #ef4444;
    }

    .mobile-user-info .username {
        font-size: 13px;
        color: #9ca3af;
    }

    /* 主内容区域 */
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }

    /* ---------- 统计卡片 ---------- */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 14px 12px;
        border-radius: 10px;
    }

    .stat-card .stat-value {
        font-size: 20px;
        font-weight: 700;
    }

    .stat-card .stat-label {
        font-size: 11px;
        opacity: 0.7;
    }

    .stat-card .stat-icon {
        font-size: 20px;
    }

    /* ---------- 图表容器 ---------- */
    .chart-container {
        height: 220px;
        padding: 10px 0;
    }

    /* ---------- 表格 ---------- */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -4px;
        padding: 0 4px;
    }

    .table-wrapper table {
        font-size: 12px;
        min-width: 520px;
        width: 100%;
    }

    .table-wrapper th,
    .table-wrapper td {
        padding: 8px 10px;
        white-space: nowrap;
    }

    .table-wrapper th {
        font-size: 11px;
    }

    /* 兼容非 .table-wrapper 包裹的表格（如项目列表） */
    table.table {
        font-size: 12px;
        min-width: 520px;
        width: 100%;
    }

    table.table th,
    table.table td {
        padding: 8px 10px;
        word-break: break-word;
        word-wrap: break-word;
        max-width: 180px;
        overflow-wrap: break-word;
    }

    table.table th {
        font-size: 11px;
        white-space: nowrap;
    }

    /* ---------- 工具栏（含导出按钮） ---------- */
    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .table-toolbar .table-title {
        font-size: 14px;
    }

    .export-btn {
        padding: 6px 14px;
        font-size: 12px;
        justify-content: center;
    }

    /* ---------- 模型比价 ---------- */
    .model-toolbar {
        flex-direction: column;
        gap: 8px;
    }

    .model-toolbar select,
    .model-toolbar input,
    .model-toolbar .search-input {
        width: 100%;
        font-size: 13px;
        padding: 8px 12px;
    }

    .model-toolbar .filter-group {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }

    /* ---------- 分页 ---------- */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        font-size: 13px;
    }

    .pagination button {
        padding: 4px 12px;
        font-size: 12px;
    }

    /* ---------- 按钮通用 ---------- */
    .btn,
    button[class*="btn"],
    .action-btn {
        padding: 6px 14px;
        font-size: 13px;
        min-height: 36px;
    }

    /* ---------- 输入框 ---------- */
    input[type="text"],
    input[type="number"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px !important;
        padding: 8px 12px;
        /* 防止 iOS 自动缩放 */
    }

    /* ---------- 卡片/面板 ---------- */
    .card,
    .panel,
    .section-card {
        padding: 14px;
        border-radius: 10px;
    }

    /* ---------- 页面头部 ---------- */
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 0;
    }

    .header h2 {
        font-size: 18px;
    }

    /* 隐藏主内容区头部的用户信息和版本切换（移动端） */
    .header .user-info,
    .header .version-switch-header {
        display: none !important;
    }

    /* ---------- 底部 Footer ---------- */
    .footer {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 16px 14px;
        text-align: center;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        margin-top: 20px;
    }

    .footer .brand-name {
        font-size: 14px;
        font-weight: 600;
    }

    .footer .beian {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 6px 12px;
        font-size: 10px;
        color: #9ca3af;
    }

    .footer .beian a {
        color: #9ca3af;
        text-decoration: none;
        transition: color 0.15s;
        font-size: 10px;
        white-space: nowrap;
    }

    .footer .beian a:active {
        color: #e5e7eb;
    }

    .footer .beian img {
        width: 14px;
        height: 14px;
        vertical-align: middle;
    }

    .footer .beian span {
        font-size: 10px;
    }

    /* ---------- 提示横幅 ---------- */
    .anonymous-warning {
        padding: 10px 14px;
        font-size: 13px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .anonymous-warning .warning-actions {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
    }

    /* ---------- 新用户引导 ---------- */
    .new-user-guide {
        padding: 14px;
        gap: 10px;
    }

    .new-user-guide-step {
        padding: 10px 12px;
        font-size: 13px;
    }

    /* ---------- API 快捷入口 ---------- */
    .api-quick-access {
        padding: 12px 14px;
        font-size: 13px;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* ---------- 弹窗/模态框 ---------- */
    .modal-content,
    .modal {
        width: 92%;
        max-width: 400px;
        margin: 20px auto;
        padding: 20px 16px;
        border-radius: 14px;
    }

    .modal-content .modal-title,
    .modal .modal-header h3 {
        font-size: 18px;
    }

    .modal-content .modal-body {
        font-size: 14px;
    }
}


/* ============================================================
   超小屏手机（≤ 420px）
   ============================================================ */
@media screen and (max-width: 420px) {
    .page-container {
        padding: 8px 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .stat-card {
        padding: 10px 8px;
    }

    .stat-card .stat-value {
        font-size: 17px;
    }

    .stat-card .stat-label {
        font-size: 10px;
    }

    .sidebar {
        padding: 8px 10px;
    }

    .sidebar .logo {
        font-size: 16px;
    }

    .hamburger span {
        width: 22px;
        height: 2px;
    }

    .nav-menu a,
    .nav-menu .menu-item {
        padding: 10px 16px;
        font-size: 14px;
    }

    .footer {
        padding: 12px 8px;
        font-size: 9px;
    }

    .footer .beian a {
        font-size: 9px;
    }

    .table-wrapper table {
        font-size: 11px;
        min-width: 400px;
    }

    .table-wrapper th,
    .table-wrapper td {
        padding: 6px 8px;
    }

    .export-btn {
        font-size: 11px;
        padding: 5px 10px;
    }

    .modal-content,
    .modal {
        width: 96%;
        padding: 16px 12px;
    }
}


/* ============================================================
   平板横屏（768px - 1024px）补充
   ============================================================ */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 14px;
    }

    .page-container {
        padding: 20px 24px;
    }
}
