:root {
    /* 背景：暖米白 */
    --bg-paper: #F7F5F0;
    /* 强调色：酒红 */
    --wine-dark: #722f37;
    --wine-light: #8a3a44;
    /* 文字颜色 */
    --text-main: #3D3D3D;
    --text-sub: #787878;

    /* 画布底色 */
    --img-bg: #EAE8E3;
    /* 大方块：冷青灰 */
    --shape-big-color: #CBD0CC;
    /* 小方块：脏粉/灰褐 */
    --shape-small-color: #DCCFCB;
}

/* ===== 基础设置 ===== */
body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-paper);
    color: var(--text-main);
    font-family: "LXGW WenKai Screen", serif;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 自定义文本选中效果 */
::selection {
    background-color: rgba(210, 145, 120, 0.4);
}

h1,
h2,
h3,
.logo {
    font-weight: normal;
}

/* ===== 导航栏 ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(247, 245, 240, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    color: var(--wine-dark);
    font-weight: bold;
    letter-spacing: 1px;
    text-decoration: none;
}


.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 1rem;
}

.nav-menu a:hover {
    color: var(--wine-dark);
    text-decoration: underline;
}

/* ===== 通用容器 ===== */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

/* ===== Hero 区域 ===== */
.hero-section {
    padding-top: 120px;
    padding-bottom: 60px;
}

.hero-text-center {
    text-align: left;
    max-width: 600px;
    margin: 0 0 60px 0;
}

.hero-text-center h1 {
    font-size: 1.8rem;
    line-height: 1.5;
    margin-bottom: 32px;
    color: var(--text-main);
    font-weight: normal;
}

.hero-text-center p {
    font-size: 1.1rem;
    color: var(--text-sub);
    line-height: 1.8;
    margin-bottom: 32px;
}

.btn-elegant {
    display: inline-block;
    padding: 14px 32px;
    border: 1px solid var(--wine-dark);
    color: var(--wine-dark);
    background-color: transparent;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;

}

.btn-elegant:hover {
    background-color: var(--wine-dark);
    color: #fff;
}

/* 产品展示区 */
.product-showcase {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background-image: url('assets/hero-bg.webp');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.showcase-frame {
    min-height: 660px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.reset-position-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.reset-position-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.reset-position-btn svg {
    width: 18px;
    height: 18px;
}

/* 浏览器窗口外壳 */
.browser-window {
    width: 100%;
    max-width: 1000px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    cursor: default;
}

.browser-titlebar {
    background: var(--bg-paper);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e0e0e0;
    cursor: grab;
}

.browser-titlebar:active {
    cursor: grabbing;
}

.browser-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.browser-dot.red {
    background: #ff5f57;
}

.browser-dot.yellow {
    background: #febc2e;
}

.browser-dot.green {
    background: #28c840;
}

/* 模拟对话框 */
.chat-demo {
    display: flex;
    width: 100%;
    height: 560px;
    background: var(--bg-paper);
    user-select: none;
}

/* 侧边栏 */
.chat-sidebar {
    width: 160px;
    background: #F4F2EC;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    padding: 12px 8px;
}

.sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 4px;
}

.sidebar-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 8px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.sidebar-section-title:first-child {
    margin-top: 0;
}

.sidebar-section-title svg {
    width: 14px;
    height: 14px;
}

.sidebar-item {
    padding: 10px 12px;
    font-size: 14px;
    color: #666;
    border-radius: 6px;
    margin-bottom: 2px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.sidebar-item.active {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-size: 14px;
    color: #333;
}

.user-plan {
    font-size: 12px;
    color: #888;
}

/* 主对话区 */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-paper);
    overflow-y: scroll;
}

.chat-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-paper);
}

.chat-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.chat-title:hover {
    background: rgba(0, 0, 0, 0.05);
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.export-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.export-btn svg {
    width: 16px;
    height: 16px;
}

.chat-messages {
    flex: 1;
    padding: 24px;
}

.chat-content {
    max-width: 600px;
    margin: 0 auto;
}

.message {
    margin-bottom: 20px;
}

.message.user {
    display: flex;
    justify-content: flex-end;
}

.message.user .message-bubble {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    padding: 12px 16px;
    border-radius: 6px;
    max-width: 80%;
    line-height: 1.5;
}

.message.ai .message-bubble {
    color: #333;
    padding: 12px 0;
    max-width: 100%;
    line-height: 1.6;
}

.message.ai .message-bubble p {
    margin: 0 0 12px 0;
}

.message.ai .message-bubble p:last-child {
    margin-bottom: 0;
}

.message.ai .message-bubble a {
    color: var(--wine-dark);
}

/* ===== 代码块样式 ===== */
.code-block {
    background: #F4F2EC;
    color: #383A42;
    padding: 14px 18px;
    border-radius: 6px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    margin: 12px 0;
    text-align: left;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.03); /* 轻微内阴影增加质感 */
}

.code-block code {
    white-space: pre;
    font-family: inherit;
    display: block;
}

/* 语法高亮 */
.code-block .keyword { color: #A626A4; } /* 紫红色 */
.code-block .string { color: #50A14F; }  /* 橄榄绿 */
.code-block .builtin { color: #C18401; } /* 姜黄色 */
.code-block .number { color: #986801; }  /* 棕黄色 */
.code-block .comment { color: #A0A1A7; font-style: italic; } /* 浅灰色 */

/* 底部输入区 */
.chat-input-area {
    position: sticky;
    bottom: 0;
    padding: 0 24px 24px;
    display: flex;
    justify-content: center;
}

.chat-input-area::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100% - 16px);
    background: var(--bg-paper);
    z-index: -1;
}

.chat-input-box {
    width: 100%;
    max-width: 600px;
    background: #FDFCFA;
    border: 1px solid #e0e2e7;
    border-radius: 16px;
    padding: 0 14px 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: text;
}

.input-editor {
    width: 100%;
    flex: 1;
}

.chat-input-box input {
    width: 100%;
    min-height: 32px;
    padding: 10px 0 0;
    border: none;
    font-size: 14px;
    outline: none;
    background: transparent;
    line-height: 1.5;
}

.chat-input-box input::placeholder {
    color: #999;
}

.input-toolbar {
    display: flex;
    justify-content: flex-end;
}

.send-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: var(--wine-light);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn svg {
    width: 16px;
    height: 16px;
}

/* ===== 内容区 ===== */
.content-section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-main);
    position: relative;
}

.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--wine-dark);
    margin: 20px auto 0;
}

.grid-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    font-family: "LXGW WenKai Screen", serif;
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--wine-dark);
}

.feature-item p {
    color: var(--text-main);
    line-height: 1.6;
}

/* ===== 价值观区域 ===== */
.values-section {
    padding: 60px 0 60px;
    margin: 0 0 60px 0;
}

.divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(114, 47, 55, 0.3) 50%, transparent 100%);
    margin-bottom: 5rem;
}

.values-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

.values-tagline {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    margin: 0;
    max-width: 20ch;
}

.values-description p {
    color: var(--text-main);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

.values-description p:first-child {
    margin-top: 0;
}

.values-description p:last-child {
    margin-bottom: 0;
}

/* ===== CTA 区域 ===== */
.cta-section {
    padding: 10px 0 130px;
    text-align: center;
}

.cta-title {
    font-size: 3.5rem;
    color: var(--text-main);
    margin-bottom: 32px;
}

/* ===== 底部栏样式 ===== */
.simple-footer {
    padding: 2rem 0;
    margin-top: auto;
    font-family: "LXGW WenKai Screen", serif;
}

/* 底部内容布局 */
.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    color: var(--text-sub);
    font-size: 0.9rem;
    user-select: none;
}

/* 底部链接样式 */
.footer-content a {
    color: var(--text-sub);
    text-decoration: none;
}

/* 底部链接悬停效果 */
.footer-content a:hover {
    color: var(--wine-dark);
    text-decoration: underline;
}

/* ===== 法律页面样式（服务条款、隐私政策） ===== */
.legal-section {
    flex: 1;
    padding-top: 120px;
    padding-bottom: 80px;
}

/* 返回链接 */
.back-link {
    display: block;
    max-width: 750px;
    margin: 0 auto 40px;
    color: var(--text-sub);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--wine-dark);
}

/* 法律页面头部 */
.legal-header {
    max-width: 750px;
    margin: 0 auto 60px;
    text-align: center;
}

.legal-header h1 {
    font-size: 2.5rem;
    color: var(--wine-dark);
    margin-bottom: 16px;
}

.legal-date {
    color: var(--text-sub);
    font-size: 0.95rem;
    font-family: "LXGW WenKai Screen", serif;
}

/* 法律页面内容 */
.legal-content {
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.8;
    font-family: "LXGW WenKai Screen", serif;
}

.legal-content h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-top: 48px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(114, 47, 55, 0.1);
}

.legal-content h3 {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-top: 32px;
    margin-bottom: 16px;
}

.legal-content p {
    color: var(--text-main);
    margin-bottom: 16px;
}

.legal-content ul {
    margin: 16px 0;
    padding-left: 24px;
}

.legal-content li {
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.7;
}

.legal-content a {
    color: var(--wine-dark);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.legal-content a:hover {
    border-bottom-color: var(--wine-dark);
}

.legal-content strong {
    color: var(--text-main);
    font-weight: 600;
}

/* ===== 响应式适配 ===== */

/* ===== 平板端 (768px ~ 1200px) ===== */
@media (max-width: 1200px) {

    /* 容器添加内边距 */
    .container {
        padding: 0 48px;
    }

    nav .container {
        padding: 20px 48px;
    }

    /* 产品展示区 */
    .product-showcase {
        margin: 0 48px;
        max-width: calc(100% - 96px);
    }

    .showcase-frame {
        min-height: 580px;
        padding: 32px;
    }

    .browser-window {
        max-width: 900px;
    }

    .chat-demo {
        height: 500px;
    }

    /* Hero 区域 */
    .hero-text-center h1 {
        font-size: 1.6rem;
    }

    /* 内容区 */
    .section-title {
        font-size: 2.2rem;
    }

    .grid-features {
        gap: 32px;
    }

    /* 价值观区域 */
    .values-content {
        gap: 1.5rem;
    }

    /* CTA 区域 */
    .cta-title {
        font-size: 3rem;
    }
}

/* ===== 小平板/大手机端 (max-width: 992px) ===== */
@media (max-width: 992px) {

    /* 特性网格：3列 → 1列 */
    .grid-features {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    /* 产品展示区 */
    .showcase-frame {
        min-height: 520px;
        padding: 24px;
    }

    .chat-demo {
        height: 440px;
    }

    .chat-sidebar {
        width: 140px;
        padding: 10px 6px;
    }

    .sidebar-item {
        padding: 8px 10px;
        font-size: 13px;
    }

    /* 价值观区域 */
    .values-content {
        grid-template-columns: 1fr 1.5fr;
    }

    .values-tagline {
        font-size: 1.3rem;
    }

    .values-description p {
        font-size: 1rem;
    }

    .content-section {
        padding: 50px 0;
    }

    .values-section {
        padding: 40px 0;
        margin: 0 0 40px 0;
    }

    .cta-section {
        padding: 10px 0 80px;
    }
}

/* ===== 移动端 (<768px) ===== */
@media (max-width: 768px) {

    /* 增加容器内边距，让内容更居中 */
    .container {
        padding: 0 36px;
    }

    /* 导航栏 */
    nav .container {
        padding: 16px 36px;
    }

    .logo {
        font-size: 1.4rem;
    }

    .nav-menu {
        gap: 24px;
    }

    .nav-menu a {
        font-size: 0.9rem;
    }

    /* Hero 区域 */
    .hero-section {
        padding-top: 100px;
        padding-bottom: 40px;
    }

    .hero-text-center {
        margin-bottom: 40px;
    }

    .hero-text-center h1 {
        font-size: 1.4rem;
        margin-bottom: 24px;
    }

    .hero-text-center p {
        font-size: 1rem;
    }

    .btn-elegant {
        padding: 12px 28px;
        font-size: 0.85rem;
    }

    /* 产品展示区 */
    .product-showcase {
        margin: 0 20px;
        max-width: calc(100% - 40px);
        border-radius: 8px;
    }

    .showcase-frame {
        min-height: 420px;
        padding: 16px;
    }

    .browser-window {
        max-width: 100%;
        border-radius: 8px;
    }

    .browser-titlebar {
        padding: 10px 14px;
    }

    .browser-dot {
        width: 10px;
        height: 10px;
    }

    /* 隐藏侧边栏，只保留主对话区 */
    .chat-sidebar {
        display: none;
    }

    .chat-demo {
        height: 360px;
    }

    .chat-header {
        padding: 12px 16px;
    }

    .chat-title {
        font-size: 13px;
        padding: 6px 10px;
    }

    .export-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .chat-messages {
        padding: 16px;
    }

    .chat-content {
        max-width: 100%;
    }

    .message.user .message-bubble,
    .message.ai .message-bubble {
        font-size: 14px;
    }

    .chat-input-area {
        padding: 0 16px 16px;
    }

    .chat-input-box {
        border-radius: 12px;
        padding: 0 12px 12px;
    }

    .chat-input-box input {
        font-size: 13px;
    }

    .reset-position-btn {
        width: 32px;
        height: 32px;
        bottom: 12px;
        right: 12px;
    }

    .content-section {
        padding: 32px 0;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 32px;
    }

    .section-title::after {
        width: 50px;
        margin: 16px auto 0;
    }

    /* 特性网格：2列 → 1列 */
    .grid-features {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .feature-item h3 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    .feature-item p {
        font-size: 0.95rem;
    }

    .values-section {
        padding: 24px 0;
        margin: 0 0 24px 0;
    }

    .divider {
        margin-bottom: 3rem;
    }

    /* 改为单列布局 */
    .values-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100%;
    }

    .values-tagline {
        font-size: 1.25rem;
        max-width: none;
    }

    .values-description p {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 1.2rem;
    }

    .cta-section {
        padding: 10px 0 60px;
    }

    .cta-title {
        font-size: 2rem;
        margin-bottom: 24px;
    }

    /* 页脚 */
    .simple-footer {
        padding: 1.5rem 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.6rem;
        font-size: 0.85rem;
        text-align: center;
    }

    /* 隐藏分隔符 */
    .footer-content>span:not(:first-child):not(:last-child) {
        display: none;
    }

    .footer-content span:first-child {
        margin-bottom: 0.3rem;
    }

    /* 法律页面 */
    .legal-section {
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .back-link {
        margin-bottom: 32px;
    }

    .legal-header {
        margin-bottom: 40px;
    }

    .legal-header h1 {
        font-size: 2rem;
    }

    .legal-content h2 {
        font-size: 1.3rem;
        margin-top: 36px;
    }

    .legal-content h3 {
        font-size: 1.1rem;
    }

    .legal-content p,
    .legal-content li {
        font-size: 0.95rem;
    }
}

/* ===== 超小屏幕 (<480px) ===== */
@media (max-width: 480px) {

    /* 保持足够的边距 */
    .container {
        padding: 0 32px;
    }

    nav .container {
        padding: 14px 32px;
    }

    .logo {
        font-size: 1.3rem;
    }

    .nav-menu {
        gap: 16px;
    }

    .nav-menu a {
        font-size: 0.85rem;
    }

    .hero-text-center h1 {
        font-size: 1.25rem;
        line-height: 1.6;
    }

    .hero-text-center p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .product-showcase {
        margin: 0 16px;
        max-width: calc(100% - 32px);
    }

    .showcase-frame {
        min-height: 380px;
        padding: 12px;
    }

    .chat-demo {
        height: 320px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .cta-title {
        font-size: 1.6rem;
    }

    .values-tagline {
        font-size: 1.15rem;
    }

    .footer-content {
        font-size: 0.8rem;
    }
}
