/*
 * BAILU CODE - 页面样式（2026-07-12）
 * 品牌色对齐官网按钮：#0056d2 / #0044a8
 * 设计参考：白底、细边框、克制阴影、紧凑排版、大量留白
 * 性能原则：
 *   - 系统字体栈 + 内联 SVG 雪碧图（助手/模拟器按需加载 FA）
 *   - overflow-x: clip 取代 hidden，保证 sticky 顶栏正常工作
 *   - 无 filter:blur 装饰、下屏区域 content-visibility、移动端降载
 *   - 动画只用 transform/opacity，支持 prefers-reduced-motion
 */

/* ==================== 设计变量 ==================== */
:root {
    --primary-color: #0056d2;
    --primary-hover-color: #0044a8;
    --primary-dark: #0044a8;
    --accent-color: #00c6fb;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --background-color: #f8fafc;
    --card-background-color: #ffffff;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --subtle-text-color: #64748b;
    --heading-color: #0f172a;
    --text-color: #1e293b;

    --border-color: #e2e8f0;
    --border-hover: rgba(0, 86, 210, 0.35);

    --gradient-primary: linear-gradient(135deg, #0056d2 0%, #0044a8 100%);

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.07);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);

    --header-height: 64px;
    --section-pad: clamp(56px, 9vw, 96px);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

/* clip 不会创建滚动容器，sticky 顶栏可正常工作（hidden 会令 sticky 失效） */
html,
body {
    overflow-x: clip;
}

@supports not (overflow: clip) {
    html,
    body {
        overflow-x: hidden;
    }
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
}

button {
    font-family: inherit;
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ==================== SVG 图标 ==================== */
.icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    vertical-align: -0.125em;
    pointer-events: none;
}

/* ==================== 背景装饰（无 filter，纯渐变，低成本） ==================== */
.bg-decoration {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 86, 210, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 86, 210, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.5;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 60%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 60%);
}

/* 软边径向渐变替代 filter: blur(80px)，视觉相近、渲染成本大幅降低 */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
}

.gradient-orb-1 {
    width: 720px;
    height: 720px;
    background: radial-gradient(circle, rgba(0, 86, 210, 0.10) 0%, rgba(0, 86, 210, 0.04) 40%, transparent 68%);
    top: -280px;
    left: -220px;
}

.gradient-orb-2 {
    width: 860px;
    height: 860px;
    background: radial-gradient(circle, rgba(0, 198, 251, 0.08) 0%, rgba(0, 198, 251, 0.03) 40%, transparent 68%);
    top: 42%;
    right: -320px;
}

.gradient-orb-3 {
    width: 640px;
    height: 640px;
    background: radial-gradient(circle, rgba(71, 255, 209, 0.07) 0%, transparent 62%);
    bottom: -240px;
    left: 26%;
}

@media (min-width: 769px) {
    .gradient-orb {
        will-change: transform;
    }

    .gradient-orb-1 { animation: orbFloat 26s ease-in-out infinite; }
    .gradient-orb-2 { animation: orbFloat 26s ease-in-out -9s infinite; }
    .gradient-orb-3 { animation: orbFloat 26s ease-in-out -17s infinite; }
}

@keyframes orbFloat {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(24px, -24px, 0); }
}

/* 移动端：静态渐变即可，省电省渲染 */
@media (max-width: 768px) {
    .gradient-orb-3 {
        display: none;
    }
}

/* ==================== 容器 ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

main {
    position: relative;
    z-index: 1;
}

/* ==================== 顶栏 ==================== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border-color);
    /* 刘海屏安全区 */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    gap: 16px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.85;
}

.logo .logo-code-icon {
    color: var(--primary-color);
    font-size: 1.1em;
    margin-right: 7px;
}

.logo-text {
    color: var(--text-primary);
}

.logo-highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-left: 4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:not(.nav-login-btn):hover {
    color: var(--primary-color);
}

.nav-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    background: var(--primary-color);
    color: #fff !important;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.nav-login-btn:hover {
    background: var(--primary-hover-color);
}

/* --- 移动端：汉堡按钮 + 下拉面板 --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle:active {
    background: rgba(15, 23, 42, 0.06);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: calc(var(--header-height) + 8px);
    left: 50%;
    width: min(400px, calc(100vw - 24px));
    max-height: calc(100dvh - var(--header-height) - 28px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14);
    padding: 8px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(-50%, -8px, 0);
    transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.2s;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(-50%, 0, 0);
}

.mobile-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background-color 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav a .icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.mobile-nav a:hover,
.mobile-nav a:active {
    background: rgba(0, 86, 210, 0.06);
    color: var(--primary-color);
}

.mobile-nav .mobile-nav-cta {
    justify-content: center;
    margin-top: 6px;
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.mobile-nav .mobile-nav-cta .icon {
    color: #fff;
}

.mobile-nav .mobile-nav-cta:hover,
.mobile-nav .mobile-nav-cta:active {
    background: var(--primary-hover-color);
    color: #fff;
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.32);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
}

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    /* 移动端顶栏：实底白色，避免 backdrop-filter 滚动持续重绘 */
    header {
        background: rgba(255, 255, 255, 0.96);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .nav-toggle {
        display: flex;
        /* 视觉右对齐补偿按钮内边距 */
        margin-right: -10px;
    }

    .mobile-nav,
    .mobile-nav-overlay {
        display: block;
    }

    .mobile-nav-overlay:not(.active) {
        pointer-events: none;
    }

    header .nav-links {
        display: none;
    }

    .logo {
        font-size: 1.16rem;
    }
}

/* ==================== Hero ==================== */
.hero {
    padding: clamp(44px, 8vw, 104px) 0 clamp(24px, 5vw, 48px);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content {
    max-width: 860px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(0, 86, 210, 0.07);
    border: 1px solid rgba(0, 86, 210, 0.18);
    border-radius: 999px;
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 22px;
}

.hero-badge .badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: badgePulse 2.4s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(1.25); }
}

.hero-title {
    font-size: clamp(2.1rem, 5.4vw, 3.6rem);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -0.03em;
    color: var(--heading-color);
    margin-bottom: 18px;
    text-wrap: balance;
}

.hero-title .title-accent {
    background: linear-gradient(120deg, #0056d2 0%, #00c6fb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-description {
    font-size: clamp(0.98rem, 1.6vw, 1.15rem);
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 680px;
    margin: 0 auto 32px;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    box-shadow: 0 4px 14px rgba(0, 86, 210, 0.18);
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.cta-button:hover {
    background: var(--primary-hover-color);
    box-shadow: 0 8px 24px rgba(0, 86, 210, 0.28);
}

.cta-button:active {
    background: var(--primary-dark);
    box-shadow: 0 3px 10px rgba(0, 86, 210, 0.2);
}

.cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: #fff;
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.cta-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 86, 210, 0.03);
}

/* ==================== 模型轮播 ==================== */
.model-carousel-wrapper {
    margin-top: clamp(24px, 4vw, 40px);
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    min-height: 52px;
}

.model-carousel {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: carouselScroll 36s linear infinite;
}

.model-carousel:hover,
.model-carousel.mc-paused,
.model-carousel.mc-offscreen {
    animation-play-state: paused;
}

@keyframes carouselScroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

.mc-card {
    flex-shrink: 0;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    min-width: 140px;
    max-width: 200px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mc-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.mc-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 模型卡片悬浮详情 */
.mc-tooltip {
    position: fixed;
    z-index: 1100;
    display: none;
    width: 260px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    pointer-events: none;
}

.mc-tip-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.mc-tip-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.mc-tip-owner {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.mc-tip-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.mc-tip-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.mc-tip-stat-label {
    font-size: 11px;
    color: var(--text-muted);
}

.mc-tip-stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.mc-tip-desc {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .mc-tooltip {
        width: calc(100vw - 32px);
        max-width: 320px;
        left: 50% !important;
        transform: translateX(-50%);
        pointer-events: auto;
    }
}

/* ==================== 任务输入区 ==================== */
#task-input {
    scroll-margin-top: var(--header-height);
}

.task-input-container {
    max-width: 800px;
    margin: 0 auto;
    padding: clamp(16px, 3vw, 24px) 0 clamp(40px, 6vw, 64px);
    position: relative;
}

.task-intro-text {
    text-align: center;
    margin-bottom: 24px;
}

.task-intro-text p {
    font-size: 1.02rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.task-input-wrapper {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: visible;
}

.task-input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 210, 0.1);
}

.task-input-wrapper.plan-mode {
    border-color: #10b981;
}

.task-input-wrapper.plan-mode:focus-within {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.input-section {
    position: relative;
    padding: 16px;
}

#task-input-field {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    /* 16px 防止 iOS 聚焦自动缩放 */
    font-size: 16px;
    font-family: inherit;
    line-height: 1.5;
    resize: none;
    min-height: 56px;
    max-height: 200px;
    padding: 0 52px 0 0;
}

#task-input-field::placeholder {
    color: var(--text-muted);
}

.task-send-btn {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.task-send-btn:hover {
    background: var(--primary-hover-color);
}

.task-send-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
}

.task-send-btn .icon {
    font-size: 15px;
}

/* 发送中的 CSS spinner（替代 FA fa-spinner） */
.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin 0.7s linear infinite;
}

.task-send-btn:disabled .btn-spinner {
    border-color: rgba(148, 163, 184, 0.3);
    border-top-color: var(--text-muted);
}

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

.hint-text {
    color: var(--text-muted);
    font-size: 13px;
    padding: 0 16px 10px;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.action-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    line-height: 1;
    transition: color 0.2s ease, background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.action-icon-btn:hover {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.05);
}

.action-right {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.mode-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mode-btn:hover {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.05);
}

.mode-btn.active {
    background: var(--text-primary);
    color: #fff;
    font-weight: 600;
}

.mode-btn.plan-mode.active {
    background: #10b981;
    color: #fff;
}

/* Slash 命令菜单 */
.slash-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px 0;
    margin-bottom: 6px;
    box-shadow: var(--shadow-md);
    z-index: 50;
    max-height: 260px;
    overflow-y: auto;
}

.slash-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.slash-item:hover {
    background: rgba(0, 86, 210, 0.05);
}

.slash-cmd {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.slash-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* 模型选择下拉 */
.model-select-row {
    position: relative;
    display: inline-flex;
    min-width: 0;
}

.model-select-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.model-select-btn:hover {
    border-color: var(--primary-color);
}

.model-select-btn .icon-chevron {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.5;
}

.model-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 300px;
    max-width: calc(100vw - 48px);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 60;
    overflow: hidden;
}

.model-dd-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 13px;
}

.model-dd-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-secondary);
    min-width: 0;
}

#model-dd-list {
    max-height: 280px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.model-option {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    transition: background-color 0.12s ease;
}

.model-option:hover,
.model-option.active {
    background: rgba(0, 86, 210, 0.05);
}

.model-option small {
    color: var(--text-muted);
    font-size: 12px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mtag {
    display: inline-block;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 4px;
    vertical-align: middle;
}

.mtag.free {
    background: #dcfce7;
    color: #16a34a;
}

.mtag.discount {
    background: #fef3c7;
    color: #d97706;
}

.model-dd-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.model-install-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
}

.model-install-link:hover {
    text-decoration: underline;
}

/* ==================== 通用 Section ==================== */
.section-title {
    text-align: center;
    font-size: clamp(1.55rem, 3.6vw, 2.3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 18px;
    color: var(--text-primary);
    text-wrap: balance;
}

/* 简洁的品牌短线，替代原两侧装饰条 */
.section-title::after {
    content: '';
    display: block;
    width: 44px;
    height: 3px;
    border-radius: 2px;
    background: var(--gradient-primary);
    margin: 14px auto 0;
}

.text-accent {
    color: var(--primary-color);
}

.section-lead {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 680px;
    margin: 0 auto 40px;
}

/* ==================== 上下文可视化 ==================== */
.context-viz-section {
    padding: var(--section-pad) 0 clamp(32px, 5vw, 56px);
}

.context-viz-section .section-title {
    margin-bottom: 16px;
}

#context-viz-canvas {
    width: 100%;
    height: 400px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    overflow: hidden;
}

/* ==================== 功能特性 ==================== */
.features-section {
    padding: var(--section-pad) 0;
    content-visibility: auto;
    contain-intrinsic-size: auto 900px;
}

.features-section .section-title,
.benefits-section .section-title,
.research-section .section-title,
.pricing-section .section-title {
    margin-bottom: clamp(32px, 6vw, 52px);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px 28px;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.feature-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 86, 210, 0.08);
    color: var(--primary-color);
    border: 1px solid rgba(0, 86, 210, 0.14);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 22px;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
    color: var(--heading-color);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 0.94rem;
}

/* ==================== 扩展功能展示 ==================== */
.extended-features-section {
    padding: 0 0 var(--section-pad);
    content-visibility: auto;
    contain-intrinsic-size: auto 520px;
}

.main-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.main-feature-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-xs);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.main-feature-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.feature-image-container {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.feature-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 灰度→彩色的悬停效果只在真正支持 hover 的设备启用，触屏直接显示彩色 */
@media (hover: hover) and (pointer: fine) {
    .feature-image-container img {
        filter: grayscale(100%);
        transition: transform 0.35s ease, filter 0.35s ease;
    }

    .main-feature-card:hover .feature-image-container img {
        transform: scale(1.04);
        filter: grayscale(0%);
    }
}

.feature-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 22px;
    padding-top: 72px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.85) 52%, transparent 100%);
    z-index: 2;
}

.feature-overlay h3 {
    color: var(--heading-color);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.feature-overlay p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* MCP 全宽卡片：纯 CSS 渐变 + 集成徽标，零图片请求 */
.mcp-feature-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 86, 210, 0.14);
    background:
        radial-gradient(ellipse at 85% 20%, rgba(0, 198, 251, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 10% 90%, rgba(0, 86, 210, 0.08) 0%, transparent 50%),
        var(--bg-card);
    padding: 26px 28px;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.mcp-feature-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.mcp-feature-text h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--heading-color);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.mcp-feature-text h3 .icon {
    color: var(--primary-color);
}

.mcp-feature-text p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

.mcp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    max-width: 420px;
}

.mcp-chip {
    padding: 6px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    white-space: nowrap;
}

.mcp-chip:last-child {
    background: rgba(0, 86, 210, 0.08);
    border-color: rgba(0, 86, 210, 0.2);
    color: var(--primary-color);
}

/* ==================== 优势区域 ==================== */
.benefits-section {
    padding: 0 0 var(--section-pad);
    content-visibility: auto;
    contain-intrinsic-size: auto 560px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.benefit-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px 28px;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.benefit-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.benefit-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: rgba(0, 86, 210, 0.18);
    margin-bottom: 16px;
    font-family: var(--font-mono);
    line-height: 1;
    transition: color 0.25s ease;
}

.benefit-card:hover .benefit-number {
    color: var(--primary-color);
}

.benefit-card h3 {
    font-size: 1.18rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--heading-color);
}

.benefit-card p {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 0.94rem;
}

/* ==================== 科研区域 ==================== */
.research-section {
    padding: 0 0 var(--section-pad);
    content-visibility: auto;
    contain-intrinsic-size: auto 620px;
}

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

.research-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 26px 22px;
    text-align: center;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.research-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.research-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--primary-color);
    font-size: 26px;
}

.research-card h3 {
    font-size: 1.06rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

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

.research-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.research-flow-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(0, 86, 210, 0.05);
    border: 1px solid rgba(0, 86, 210, 0.12);
    border-radius: 10px;
}

.rfs-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rfs-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.rfs-arrow {
    display: inline-flex;
    color: var(--text-muted);
    font-size: 13px;
}

/* ==================== 价格区域 ==================== */
.pricing-section {
    padding: 0 0 clamp(40px, 6vw, 64px);
    content-visibility: auto;
    contain-intrinsic-size: auto 780px;
}

.pricing-intro {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 860px;
    margin: -16px auto 44px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.pricing-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.pricing-header {
    text-align: center;
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-color);
}

.pricing-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pricing-badge.free {
    background: #dcfce7;
    color: #15803d;
}

.pricing-badge.pro {
    background: rgba(0, 86, 210, 0.1);
    color: var(--primary-color);
}

.pricing-badge.enterprise {
    background: #ede9fe;
    color: #7c3aed;
}

.pricing-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 10px;
}

.pricing-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-mono);
}

.pricing-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pricing-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border-radius: 10px;
}

.pricing-feature-item .icon {
    color: var(--primary-color);
    font-size: 1.05rem;
    flex-shrink: 0;
}

.pricing-feature-item span {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.94rem;
}

.enterprise-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 24px auto 0;
    max-width: 1000px;
    padding: 14px 24px;
    background: rgba(0, 86, 210, 0.04);
    border: 1px solid rgba(0, 86, 210, 0.1);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

.enterprise-cta .icon {
    color: var(--primary-color);
    font-size: 16px;
    flex-shrink: 0;
}

/* ==================== TODO 面板（任务规划结果） ==================== */
.code-todo-panel {
    max-width: 640px;
    margin: 0 auto 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.code-todo-panel.show {
    opacity: 1;
    transform: translateY(0);
}

.code-todo-panel.fade-out {
    opacity: 0;
    transform: translateY(-8px);
}

.code-todo-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.code-todo-header .icon {
    color: var(--primary-color);
}

.code-todo-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.code-todo-close:hover {
    color: var(--text-primary);
}

.code-todo-question {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
    line-height: 1.5;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.code-todo-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.code-todo-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    animation: todoItemIn 0.3s ease forwards;
    opacity: 0;
}

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

.code-todo-item.done .code-todo-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.code-todo-item.done .code-todo-checkbox {
    color: var(--primary-color);
}

.code-todo-checkbox {
    flex-shrink: 0;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 15px;
    padding-top: 1px;
    transition: color 0.15s ease;
}

.code-todo-checkbox:hover {
    color: var(--primary-color);
}

.code-todo-text {
    flex: 1;
    min-width: 0;
}

.code-todo-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    padding: 11px 20px;
    background: var(--primary-color);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.code-todo-download:hover {
    background: var(--primary-hover-color);
}

/* ==================== 安装模态框 ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    overflow: auto;
    background: rgba(10, 14, 26, 0.55);
    animation: fadeIn 0.25s ease;
}

.modal-content {
    background: #fff;
    border: 1px solid var(--border-color);
    margin: 12vh auto;
    padding: 40px;
    width: 90%;
    max-width: 560px;
    border-radius: var(--radius-lg);
    position: relative;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
    animation: slideIn 0.3s ease;
}

.modal-content h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.6rem;
}

.close-button {
    position: absolute;
    top: 14px;
    right: 18px;
    color: var(--text-muted);
    font-size: 30px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-button:hover {
    color: var(--text-primary);
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 13px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    background: var(--primary-hover-color);
    box-shadow: 0 8px 20px rgba(0, 86, 210, 0.25);
}

/* ==================== 动画 ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.hero-badge,
.hero-title,
.hero-description,
.hero-actions {
    animation: fadeInUp 0.55s ease-out backwards;
}

.hero-description { animation-delay: 0.08s; }
.hero-actions { animation-delay: 0.16s; }

/* ==================== 页脚移动端降载（覆盖共享 footer.css，仅本页生效） ==================== */
@media (max-width: 768px) {
    footer .footer-orb {
        animation: none !important;
        filter: none !important;
        opacity: 0.06 !important;
    }

    footer .footer-grid-overlay {
        animation: none !important;
    }
}

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

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 440px;
    }
}

@media (max-width: 768px) {
    .features-grid,
    .main-features-grid,
    .benefits-grid,
    .research-grid {
        grid-template-columns: 1fr;
    }

    .benefits-grid {
        max-width: 500px;
    }

    .features-grid,
    .main-features-grid {
        gap: 14px;
    }

    #context-viz-canvas {
        height: 280px;
    }

    .feature-image-container {
        height: 220px;
    }

    .mcp-feature-card {
        padding: 22px 20px;
    }

    .mcp-chips {
        justify-content: flex-start;
        max-width: none;
    }

    /* 悬停位移动画在触屏上无意义，关闭以省渲染 */
    .feature-card:hover,
    .benefit-card:hover,
    .pricing-card:hover {
        transform: none;
        box-shadow: var(--shadow-xs);
    }

    /* 键盘提示在触屏上无意义 */
    .hint-kbd {
        display: none;
    }

    .section-lead {
        font-size: 0.95rem;
        margin-bottom: 32px;
    }
}

@media (max-width: 640px) {
    .research-flow {
        flex-direction: column;
        gap: 6px;
    }

    .rfs-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-badge {
        font-size: 0.76rem;
        padding: 5px 14px;
        margin-bottom: 18px;
    }

    .hero-description {
        line-height: 1.75;
        margin-bottom: 28px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .cta-button,
    .cta-secondary {
        width: 100%;
        justify-content: center;
        padding: 13px 24px;
    }

    .feature-card,
    .benefit-card,
    .research-card {
        padding: 24px 20px;
    }

    .feature-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
        margin-bottom: 14px;
    }

    .pricing-card {
        padding: 24px 20px;
    }

    .pricing-grid {
        max-width: 100%;
    }

    .input-section {
        padding: 14px;
    }

    #task-input-field {
        min-height: 48px;
        padding-right: 48px;
    }

    .hint-text {
        font-size: 12px;
        padding: 0 14px 8px;
    }

    .action-bar {
        padding: 8px 10px;
        gap: 6px;
    }

    .mode-btn {
        padding: 8px 12px;
    }

    .model-select-btn {
        max-width: 150px;
    }

    .modal-content {
        padding: 32px 22px;
        margin: 16vh auto;
        width: calc(100% - 32px);
    }

    .enterprise-cta {
        font-size: 13px;
        padding: 12px 16px;
    }
}

/* ==================== 减少动态效果偏好 ==================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .model-carousel {
        animation: none;
    }
}
