/**
 * main.css — 灵魂余温 (Soul Embers) 全局样式
 * 组织: 变量 → 重置 → 导航 → 首页 → 测试页 → 组件 → 响应式
 */

/* ============================================================
   1. CSS 变量 (Design Tokens)
   ============================================================ */
:root {
    --dawn-gold: #FDF5E6;
    --amber-orange: #FFBF00;
    --sand-grey: #D3D3D3;
    --text-color: #4A4A4A;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--dawn-gold);
    color: var(--text-color);
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ============================================================
   2. 全局重置
   ============================================================ */

/* ============================================================
   3. 导航栏 (Navbar)
   桌面端：Logo + 水平链接
   手机端：首页图标 + Logo + 汉堡按钮 → 侧滑菜单 + 遮罩
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(253, 245, 230, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 14px 20px;
    position: relative;
    gap: 20px;
}
.nav-container .logo {
    flex-shrink: 0;
}
.nav-container .nav-menu {
    margin-left: auto;
}

/* --- 首页图标 (手机端显示，桌面隐藏) --- */
.nav-home-icon {
    display: none;
    color: #333;
    text-decoration: none;
    line-height: 0;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.2s;
}

.nav-home-icon:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* --- Logo --- */
.logo {
    font-family: "Source Han Serif SC", serif;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
}

/* --- 汉堡按钮 (手机端显示，桌面隐藏) --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    border-radius: 6px;
    transition: background 0.2s;
}

.nav-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 1.5px;
    background: #333;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

/* 汉堡 → X 动画 */
.nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* --- 桌面端导航链接 --- */
.nav-menu {
    display: flex;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 28px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.95rem;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--amber-orange);
}

.nav-links a.nav-test-btn {
    background: var(--amber-orange);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: bold;
    transition: transform 0.3s, background 0.3s;
}

.nav-links a.nav-test-btn:hover {
    background: #e6ac00;
    transform: scale(1.05);
}

.nav-links a.active,
.nav-links a.active-test {
    color: #8B4513;
    font-weight: bold;
}

/* --- 遮罩层 --- */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.nav-open .nav-overlay {
    opacity: 1;
}

/* ============================================================
   导航栏 — 中等屏幕 (≤900px) 防重叠
   ============================================================ */
@media (max-width: 900px) {
    .nav-container {
        padding: 12px 16px;
        gap: 8px;
    }

    .logo {
        font-size: 1rem;
        flex-shrink: 0;
    }

    .nav-links {
        gap: 14px;
    }

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

    .user-menu {
        margin-right: 4px;
    }

    .user-name-text {
        max-width: 60px;
    }
}

/* ============================================================
   导航栏 — 手机端 (≤768px)
   ============================================================ */
@media (max-width: 768px) {
    .nav-container {
        padding: 10px 16px;
    }

    .nav-home-icon {
        display: flex;
    }

    .logo {
        font-size: 1rem;
        margin: 0 auto 0 8px;
    }

    .nav-toggle {
        display: flex;
    }

    /* 菜单面板 — 从右侧滑入 */
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        max-width: 80vw;
        height: 100vh;
        height: 100dvh;
        background: #FFF;
        z-index: 999;
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 30px 40px;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
        overflow-y: auto;
    }

    .nav-open .nav-menu {
        transform: translateX(0);
    }

    /* 遮罩显示 — 仅菜单打开时出现 */
    .nav-open .nav-overlay {
        display: block;
    }

    .nav-links {
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }

    .nav-links li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-links a {
        display: block;
        padding: 14px 8px;
        font-size: 1.05rem;
        color: #333;
    }

    .nav-links a.nav-test-btn {
        display: inline-block;
        text-align: center;
        margin-top: 12px;
        padding: 12px 28px;
        font-size: 1rem;
    }

    .nav-links a.active,
    .nav-links a.active-test {
        color: #8B4513;
    }

    /* 菜单打开时禁用页面滚动 */
    body:has(.nav-open) {
        overflow: hidden;
    }
}

/* --- 小屏微调 --- */
@media (max-width: 480px) {
    .nav-container {
        padding: 8px 12px;
    }

    .logo {
        font-size: 0.9rem;
    }

    .nav-menu {
        width: 100vw;
        max-width: 100vw;
    }
}

/* ============================================================
   4. 体验测试页 (Test Experience)
   ============================================================ */
.test-container {
    max-width: 900px;
    margin: 120px auto 60px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

.test-header {
    text-align: center;
    margin-bottom: 40px;
}

.test-header h1 {
    font-family: "Source Han Serif SC", serif;
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 10px;
}

.test-header p {
    color: #888;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 12px;
    color: #444;
    font-size: 1.05rem;
}

.input-row {
    display: flex;
    gap: 20px;
}

.input-row select, .input-row input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    outline: none;
    font-size: 1rem;
    background: #FFF;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.upload-box {
    border: 2px dashed #DDD;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #FAFAFA;
}

.upload-box:hover {
    border-color: var(--amber-orange);
    background: #FFFBF0;
}

.upload-box i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.upload-box p {
    font-size: 0.85rem;
    color: #777;
}

.voice-cloning-section {
    background: #FFFBF0;
    border: 1px solid #FFE5B4;
    padding: 25px;
    border-radius: 15px;
    margin-top: 20px;
}

.voice-cloning-section h4 {
    color: #B8860B;
    margin-bottom: 10px;
}

.counselor-guidance {
    background: rgba(255, 191, 0, 0.05);
    border: 1px dashed rgba(255, 191, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.guidance-title {
    font-size: 0.85rem;
    color: #8B4513;
    margin-bottom: 10px;
    font-weight: bold;
}

.guidance-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.guide-tag {
    background: #FFF;
    border: 1px solid #FFE5B4;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #4A4A4A;
    cursor: pointer;
    transition: all 0.2s;
}

.guide-tag:hover {
    background: var(--amber-orange);
    color: white;
    border-color: var(--amber-orange);
}

.textarea-field {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    resize: none;
    outline: none;
    font-size: 1rem;
}

.start-btn {
    width: 100%;
    padding: 18px;
    background: var(--amber-orange);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s;
}

.start-btn:hover {
    background: #e6ac00;
}

#result-area {
    margin-top: 40px;
    padding: 30px;
    background: #FFF;
    border-radius: 20px;
    display: none;
    border-left: 5px solid var(--amber-orange);
}

#result-area h3 {
    font-family: "Source Han Serif SC", serif;
    margin-bottom: 15px;
}

.loading-dots {
    display: inline-block;
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

/* ============================================================
   5. 首页 — Hero & 动画
   ============================================================ */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 20px 20px; /* Offset for nav */
    text-align: center;
    position: relative;
    overflow: hidden;
}
/* Hero 背景氛围图 — 暖金余温光晕 */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/assets/generated/gen_2a418126_1024x1536.webp') center/cover no-repeat;
    opacity: 0.20;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

.silhouette-container {
    position: relative;
    width: 320px;
    height: 320px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.silhouette {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 191, 0, 0.5) 0%, rgba(255, 245, 230, 0) 70%);
    border-radius: 50%;
    filter: blur(20px);
    animation: breathe 5s ease-in-out infinite;
    box-shadow: 0 0 50px rgba(255, 191, 0, 0.2);
}

.silhouette-inner {
    position: absolute;
    width: 120px;
    height: 180px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 191, 0, 0.2));
    border-radius: 50% 50% 45% 45%;
    filter: blur(8px);
    z-index: 2;
    animation: pulse 5s ease-in-out infinite alternate;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5);
}

/* 增加一个核心亮点 */
.silhouette::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    filter: blur(2px);
    box-shadow: 0 0 15px 5px white;
    opacity: 0.6;
    animation: core-flicker 3s infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(0.9); opacity: 0.3; filter: blur(25px); }
    50% { transform: scale(1.2); opacity: 0.8; filter: blur(15px); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(1.1); opacity: 0.6; }
}

@keyframes core-flicker {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.2); }
}

.headline-container {
    height: 120px; /* 为动画预留固定高度 */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
}

.headline {
    font-size: 3rem;
    font-family: "Source Han Serif SC", serif;
    color: #333;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(5px); /* 仅轻微向上漂浮感 */
    transition: all 2s ease-in-out; /* 2秒的超长慢速过渡，打造温润感 */
    white-space: nowrap;
}

.headline.active {
    opacity: 1;
    transform: translateY(0);
}

.subheadline {
    font-size: 1.2rem;
    color: #666;
    margin: 0 auto 40px;
    max-width: 600px;
}

/* ============================================================
   6. 首页 — Demo 演示框
   ============================================================ */
.demo-box {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.role-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.role-tag {
    font-size: 0.85rem;
    padding: 5px 15px;
    border-radius: 15px;
    background: rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s;
}

.role-tag.active {
    background: var(--amber-orange);
    color: white;
}

.dialogue-display {
    min-height: 60px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #555;
    transition: opacity 0.5s ease;
}

.input-area {
    display: flex;
    gap: 10px;
}

.input-area input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #EEE;
    border-radius: 25px;
    outline: none;
    font-size: 1rem;
}

.input-area button {
    padding: 10px 25px;
    background-color: var(--amber-orange);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s;
}

.input-area button:hover {
    transform: scale(1.05);
}

.status-text {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #AAA;
    font-style: italic;
}

/* ============================================================
   7. 愿景 & 行动 (Vision & Action)
   ============================================================ */
.vision-section, .action-section {
    padding: 100px 20px;
    background: #FFF;
    text-align: center;
}

.action-section {
    background: rgba(255, 191, 0, 0.05);
}

.content-container {
    max-width: 1000px;
    margin: 0 auto;
}

.section-badge {
    color: var(--amber-orange);
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.vision-section h2, .action-section h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    font-family: "Source Han Serif SC", serif;
    text-align: center;
}

.vision-section > .content-container > p, .action-section > .content-container > p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 50px;
    line-height: 1.8;
}

.vision-grid, .action-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.vision-card, .action-item {
    background: #FFF;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: transform 0.3s;
}

.action-item {
    background: transparent;
}

.vision-card:hover {
    transform: translateY(-5px);
}

.vision-card h3, .action-item h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.action-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: block;
}

.vision-card p, .action-item p {
    font-size: 0.95rem;
    color: #777;
    line-height: 1.6;
}

/* 行动卡片网格（覆盖 index.html 中的行内样式） */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.action-card {
    text-align: center;
    background: #FFF;
    padding: 25px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid rgba(255, 191, 0, 0.1);
}

.action-card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.action-card h4 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #333;
}

.action-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 功能剧场介绍文字 */
.theater-intro-text {
    max-width: 800px;
    margin: 0 auto;
    color: #666;
    font-size: 1.15rem;
    line-height: 1.8;
}

/* 场景描述文字 */
.scenario-desc {
    color: #777;
}

/* 行动区标题 */
.action-section-title {
    text-align: center;
    margin-bottom: 60px;
}

/* ============================================================
   8. 功能剧场 — 场景展示 (Function Theater)
   ============================================================ */
.function-theater {
    padding: 100px 20px;
    background: #FFF;
}

.scenario {
    max-width: 1100px;
    margin: 0 auto 80px;
    display: flex;
    align-items: flex-start;
    gap: 50px;
}

.scenario.reverse {
    flex-direction: row-reverse;
}

.role-label {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--amber-orange);
    margin-bottom: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* ============================================================
   9. 对话气泡 (Chat Threads)
   ============================================================ */
.chat-thread {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    width: 100%;
}

.chat-bubble {
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 1rem;
    line-height: 1.5;
    position: relative;
    font-family: "Source Han Serif SC", serif;
}

.chat-bubble.echo {
    align-self: flex-start;
    background: rgba(255, 191, 0, 0.12);
    color: #4A4A4A;
    border-bottom-left-radius: 2px;
    border-left: 3px solid var(--amber-orange);
}

.chat-bubble.user {
    align-self: flex-end;
    background: #FFF;
    color: #666;
    border-bottom-right-radius: 2px;
    border: 1px solid #EEE;
    font-style: italic;
}

.echo-name {
    font-size: 0.75rem;
    color: var(--amber-orange);
    margin-bottom: 4px;
    display: block;
    font-weight: bold;
    font-family: sans-serif;
}

.user-name {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 4px;
    display: block;
    text-align: right;
    font-family: sans-serif;
}

.scenario-text h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
    font-family: "Source Han Serif SC", serif;
}

.scenario-visual {
    flex: 0 0 320px;
    display: flex;
    justify-content: center;
}

.scenario-text {
    flex: 1;
}

.image-wrapper {
    position: relative;
    width: 100%;
}

.family-img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    display: block;
}

.placeholder-img {
    display: none;
}

.phone-mockup {
    position: absolute;
    bottom: -30px;
    right: -20px;
    width: 180px;
    height: 360px;
    background: #333;
    border-radius: 25px;
    padding: 10px;
    border: 6px solid #444;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.notification {
    background: rgba(255,255,255,0.9);
    padding: 12px;
    border-radius: 10px;
    margin-top: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    animation: float 3s ease-in-out infinite;
    font-size: 0.85rem;
}

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

.notification strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* ============================================================
   10. 加入计划 & 页脚 (Join Us & Footer)
   ============================================================ */
.join-us {
    padding: 100px 20px;
    text-align: center;
    background-color: var(--dawn-gold);
}

.join-us h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    background-color: var(--amber-orange);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(255, 191, 0, 0.3);
}

.footer {
    padding: 40px;
    text-align: center;
    font-size: 0.9rem;
    color: #999;
    border-top: 1px solid #EEE;
}

/* ============================================================
   11. 织就回响页 (Guarantee Page)
   ============================================================ */
.guarantee-page-container {
    max-width: 1100px;
    margin: 120px auto 60px;
    padding: 40px 40px;
}

.guarantee-title {
    font-family: "Source Han Serif SC", serif;
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 15px;
}

.guarantee-subtitle {
    color: #888;
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.guarantee-content {
    margin-top: 60px;
}

/* 行级布局：图文并排 */
.guarantee-row {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 80px;
}

.guarantee-row.reverse {
    flex-direction: row-reverse;
}

.guarantee-col-text {
    flex: 1;
    min-width: 0;
}

.guarantee-col-text h2 {
    font-family: "Source Han Serif SC", serif;
    font-size: 1.6rem;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
}

.guarantee-col-text p {
    color: #666;
    font-size: 1rem;
    line-height: 1.9;
    margin-bottom: 15px;
}

.guarantee-col-visual {
    flex: 0 0 380px;
    max-width: 380px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.guarantee-col-visual img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    display: block;
    object-fit: contain;
}

/* 守护承诺框 */
.guard-box {
    background: rgba(255, 191, 0, 0.04);
    border: 1px solid rgba(255, 191, 0, 0.2);
    border-radius: 15px;
    padding: 20px 25px;
    margin-top: 20px;
}

.guard-title {
    color: #B8860B;
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.guard-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guard-box li {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.7;
    padding: 5px 0 5px 22px;
    position: relative;
}

.guard-box li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--amber-orange);
    font-weight: bold;
    font-size: 0.85rem;
}

/* 安全与隐私面板 */
.security-privacy-box {
    background: #FFF;
    border: 1px solid #EEE;
    border-radius: 20px;
    padding: 40px;
    margin-top: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.security-privacy-box h2 {
    text-align: center;
    font-family: "Source Han Serif SC", serif;
    color: #333;
    margin-bottom: 35px;
    font-size: 1.5rem;
}

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

.security-item {
    text-align: center;
    padding: 20px 15px;
}

.security-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
}

.security-item h4 {
    font-size: 1.05rem;
    color: #333;
    margin-bottom: 10px;
}

.security-item p {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.6;
}

/* 页面底部操作区 */
.guarantee-footer {
    text-align: center;
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid #EEE;
}

.footer-quote {
    font-style: italic;
    color: #888;
    margin-bottom: 30px;
    font-size: 1rem;
}

.footer-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.back-home-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    color: var(--amber-orange);
    background: white;
    border: 2px solid var(--amber-orange);
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 30px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.back-home-btn:hover {
    background: #FFFBF0;
    transform: scale(1.03);
}

/* ============================================================
   12. 响应式设计 (Responsive)
   ============================================================ */

/* --- 平板端 (≤1024px) --- */
@media (max-width: 1024px) {
    .headline {
        font-size: 2.2rem;
        white-space: normal;
        line-height: 1.4;
        padding: 0 10px;
    }

    .headline-container {
        height: auto;
        min-height: 80px;
    }

    .scenario {
        flex-direction: column !important;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .scenario-visual {
        flex: 0 0 auto;
        width: 100%;
        max-width: 65%;
        margin: 0 auto;
    }

    .scenario-text h3 {
        font-size: 1.5rem;
    }

    .guarantee-row {
        flex-direction: column !important;
        gap: 30px;
        text-align: center;
    }

    .guarantee-col-visual {
        flex: 0 0 auto;
        max-width: 75%;
        width: 100%;
        order: -1;
        margin: 0 auto;
    }

    .guarantee-col-visual img {
        max-width: 100%;
    }

    .guard-box li {
        text-align: left;
    }

    .security-privacy-box {
        padding: 30px 20px;
    }

    .vision-section h2, .action-section h2, .join-us h2 {
        font-size: 2rem;
    }
}

/* --- 手机端 (≤768px) --- */
@media (max-width: 768px) {
    /* Hero */
    .hero {
        padding: 100px 15px 30px;
        height: auto;
        min-height: 100vh;
    }

    .headline {
        font-size: 1.6rem;
        white-space: normal;
        line-height: 1.4;
        padding: 0;
    }

    .headline-container {
        height: auto;
        min-height: 60px;
        margin-bottom: 15px;
    }

    .subheadline {
        font-size: 0.95rem;
        max-width: 100%;
        padding: 0 10px;
        margin-bottom: 25px;
    }

    .silhouette-container {
        width: 200px;
        height: 200px;
    }

    /* CTA 按钮 */
    .cta-btn {
        padding: 12px 30px;
        font-size: 1rem;
        margin-top: 20px;
    }

    .back-home-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    /* 场景区 */
    .function-theater {
        padding: 60px 15px;
    }

    .scenario {
        margin: 0 auto 50px;
        gap: 20px;
    }

    .scenario-visual {
        max-width: 80%;
        margin: 0 auto;
    }

    .scenario-text h3 {
        font-size: 1.3rem;
    }

    .chat-bubble {
        font-size: 0.9rem;
    }

    /* 愿景与行动 */
    .vision-section, .action-section {
        padding: 60px 15px;
    }

    .vision-section h2, .action-section h2 {
        font-size: 1.6rem;
    }

    .vision-grid, .action-logos, .action-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .vision-card, .action-item, .action-card {
        padding: 25px 20px;
    }

    .action-card-icon {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .theater-intro-text {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    /* 织就回响页 */
    .guarantee-page-container {
        margin: 100px auto 40px;
        padding: 25px 18px;
    }

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

    .guarantee-subtitle {
        font-size: 0.9rem;
    }

    .guarantee-content {
        margin-top: 40px;
    }

    .guarantee-row {
        margin-bottom: 50px;
        gap: 20px;
        flex-direction: column !important;
    }

    .guarantee-col-visual {
        max-width: 75%;
        margin: 0 auto;
        order: -1;
    }

    .guarantee-col-visual img {
        max-width: 100%;
    }

    .guarantee-col-text h2 {
        font-size: 1.2rem;
        text-align: center;
    }

    .guarantee-col-text p {
        font-size: 0.9rem;
        text-align: left;
    }

    .security-privacy-box {
        padding: 20px 15px;
    }

    .security-privacy-box h2 {
        font-size: 1.2rem;
    }

    .security-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .guarantee-footer {
        margin-top: 50px;
    }

    .footer-quote {
        font-size: 0.9rem;
    }

    .footer-btns {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    /* 体验测试页 */
    .test-container {
        margin: 100px 10px 40px;
        padding: 25px 18px;
        border-radius: 20px;
    }

    .test-header h1 {
        font-size: 1.5rem;
    }

    .test-header p {
        font-size: 0.9rem;
    }

    .input-row {
        flex-direction: column;
        gap: 10px;
    }

    .upload-grid {
        grid-template-columns: 1fr 1fr;
    }

    .upload-box {
        padding: 15px;
    }

    .upload-box p {
        font-size: 0.75rem;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    /* 加入计划 */
    .join-us {
        padding: 60px 15px;
    }

    .join-us h2 {
        font-size: 1.6rem;
    }

    /* 页脚 */
    .footer {
        padding: 30px 15px;
        font-size: 0.8rem;
    }
}

/* --- 小屏手机 (≤480px) --- */
@media (max-width: 480px) {
    .headline {
        font-size: 1.3rem;
    }

    .headline-container {
        min-height: 50px;
    }

    .subheadline {
        font-size: 0.85rem;
    }

    .silhouette-container {
        width: 160px;
        height: 160px;
    }

    .cta-btn, .back-home-btn {
        width: 100%;
        text-align: center;
    }

    .guarantee-page-container {
        padding: 20px 12px;
        margin-top: 90px;
    }

    .guarantee-col-visual {
        max-width: 85%;
    }

    .guarantee-title {
        font-size: 1.3rem;
    }

    .test-container {
        padding: 20px 12px;
        margin: 90px 5px 30px;
    }

    .upload-grid {
        grid-template-columns: 1fr;
    }

    .section-badge {
        font-size: 0.75rem;
    }

    .scenario-text h3 {
        font-size: 1.1rem;
    }

    .guarantee-col-text h2 {
        font-size: 1.1rem;
    }

    .security-privacy-box h2 {
        font-size: 1.1rem;
    }
}

/* ============================================================
   13. 对话页 (Chat Page)
   ============================================================ */
.chat-page-container {
    display: flex;
    max-width: 1100px;
    margin: 90px auto 0;
    min-height: calc(100vh - 90px);
}

/* --- 侧边栏：人格信息卡 --- */
.chat-sidebar {
    width: 260px;
    flex-shrink: 0;
    padding: 30px 20px;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
}

.chat-persona-card {
    text-align: center;
    position: sticky;
    top: 100px;
}

.chat-persona-avatar {
    font-size: 3.5rem;
    margin-bottom: 12px;
    line-height: 1;
}

.chat-persona-card h2 {
    font-family: "Source Han Serif SC", serif;
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 6px;
}

.chat-persona-card > p {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 18px;
}

.chat-persona-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 24px;
}

.chat-trait-tag {
    display: inline-block;
    background: rgba(255, 191, 0, 0.1);
    color: #8B6914;
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 191, 0, 0.15);
}

.chat-end-btn {
    padding: 8px 24px;
    font-size: 0.85rem;
    color: #999;
    background: none;
    border: 1px solid #DDD;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.chat-end-btn:hover {
    color: #e88;
    border-color: #e88;
    background: rgba(238, 136, 136, 0.05);
}

/* --- 主对话区 --- */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-messages {
    flex: 1;
    padding: 30px 30px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.chat-empty-state {
    text-align: center;
    color: #999;
    margin: auto;
    line-height: 2;
}

.chat-empty-state a {
    color: var(--amber-orange);
}

/* --- 消息气泡 --- */
.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    animation: msgFadeIn 0.3s ease;
}

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

.chat-msg-user {
    align-self: flex-end;
}

.chat-msg-assistant {
    align-self: flex-start;
}

.chat-bubble-body {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.6;
    word-break: break-word;
}

.chat-msg-user .chat-bubble-body {
    background: var(--amber-orange);
    color: #FFF;
    border-bottom-right-radius: 4px;
}

.chat-msg-assistant .chat-bubble-body {
    background: #FFF;
    color: #4A4A4A;
    border: 1px solid #EEE;
    border-bottom-left-radius: 4px;
}

/* 动作/情绪文本：显示在气泡上方 */
.chat-action-text {
    font-size: 0.72rem;
    color: #B0A090;
    padding: 0 16px 1px;
    font-style: italic;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.chat-msg-user .chat-action-text {
    text-align: right;
    color: #C0A870;
}

.chat-bubble-time {
    font-size: 0.7rem;
    color: #BBB;
    margin-top: 4px;
    padding: 0 8px;
}

.chat-msg-user .chat-bubble-time {
    text-align: right;
}

/* --- 打字指示器 --- */
.chat-typing-indicator .chat-bubble-body {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
}

.chat-typing-indicator .chat-bubble-body span {
    width: 6px;
    height: 6px;
    background: #CCC;
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
}

.chat-typing-indicator .chat-bubble-body span:nth-child(1) { animation-delay: 0s; }
.chat-typing-indicator .chat-bubble-body span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-indicator .chat-bubble-body span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

/* --- 输入区 --- */
.chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.6);
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 20px;
    outline: none;
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    background: #FFF;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--amber-orange);
}

.chat-send-btn {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--amber-orange);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.chat-send-btn:hover {
    background: #e6ac00;
    transform: scale(1.05);
}

.chat-send-btn:disabled {
    background: #DDD;
    cursor: not-allowed;
    transform: none;
}

.chat-voice-btn {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #FFF;
    color: #999;
    border: 1px solid #E0E0E0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.chat-voice-btn:hover { color: var(--amber-orange); border-color: var(--amber-orange); }
.chat-voice-btn.listening { background: #d44; color: #fff; border-color: #d44; animation: pulseMic 1.2s infinite; }
@keyframes pulseMic { 0%,100%{box-shadow:0 0 0 0 rgba(221,68,68,0.4)} 50%{box-shadow:0 0 0 10px rgba(221,68,68,0)} }

/* --- 免责声明 --- */
.chat-disclaimer {
    text-align: center;
    font-size: 0.7rem;
    color: #BBB;
    padding: 8px 20px 12px;
    line-height: 1.5;
}

/* --- 对话页响应式 --- */
@media (max-width: 768px) {
    .chat-page-container {
        flex-direction: column;
        margin-top: 56px;
        min-height: calc(100vh - 56px);
    }

    .chat-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        padding: 16px 20px;
        flex-direction: row;
        align-items: center;
        gap: 14px;
    }

    .chat-persona-card {
        position: static;
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
        width: 100%;
    }

    .chat-persona-avatar {
        font-size: 2.2rem;
        margin-bottom: 0;
    }

    .chat-persona-card h2 {
        font-size: 1.1rem;
        margin-bottom: 2px;
    }

    .chat-persona-card > p {
        font-size: 0.72rem;
        margin-bottom: 0;
    }

    .chat-persona-traits {
        display: none;
    }

    .chat-end-btn {
        margin-left: auto;
        flex-shrink: 0;
        font-size: 0.75rem;
        padding: 6px 14px;
    }

    .chat-messages {
        padding: 20px 14px;
    }

    .chat-message {
        max-width: 88%;
    }

    .chat-input-area {
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {
    .chat-messages {
        padding: 16px 10px;
    }

    .chat-message {
        max-width: 92%;
    }

    .chat-bubble-body {
        font-size: 0.9rem;
        padding: 10px 14px;
    }

    .chat-sidebar {
        padding: 12px 14px;
    }

    .chat-persona-avatar {
        font-size: 1.8rem;
    }

    .chat-persona-card h2 {
        font-size: 1rem;
    }
}

/* ============================================================
   14. 用户菜单 (User Menu)
   ============================================================ */
.user-menu {
    position: relative;
    flex-shrink: 0;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 24px;
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    font-family: inherit;
}

.user-menu-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--amber-orange);
    color: #FFF;
    font-weight: bold;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-name-text {
    font-size: 0.85rem;
    color: #333;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-arrow {
    color: #999;
    flex-shrink: 0;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #FFF;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    z-index: 1010;
    animation: dropdownIn 0.2s ease;
}

.user-dropdown.open {
    display: block;
}

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

.user-dropdown-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #F0F0F0;
}

.user-dropdown-header span {
    display: block;
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
}

.user-dropdown-header small {
    color: #999;
    font-size: 0.72rem;
}

.user-dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    background: none;
    border: none;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
    font-family: inherit;
}

.user-dropdown-item:hover {
    background: #FAFAFA;
}

.user-logout-btn {
    color: #c88;
    border-top: 1px solid #F5F5F5;
}

.user-logout-btn:hover {
    background: #FFF5F5;
    color: #d44;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .user-menu {
        margin-right: 4px;
    }

    .user-name-text {
        display: none;
    }

    .user-arrow {
        display: none;
    }

    .user-menu-btn {
        padding: 6px;
        min-width: 42px;
        min-height: 42px;
    }

    .user-avatar {
        width: 34px;
        height: 34px;
    }

    .user-dropdown {
        right: 0;
        min-width: 160px;
    }
}

@media (max-width: 480px) {
    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .user-menu-btn {
        padding: 6px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* ============================================================
   15. 登录遮罩 (Auth Overlay)
   ============================================================ */
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(253, 245, 230, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-card {
    background: #FFF;
    border-radius: 24px;
    padding: 50px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    animation: authFadeIn 0.5s ease;
}

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

.auth-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.auth-card h2 {
    font-family: "Source Han Serif SC", serif;
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
}

.auth-desc {
    color: #888;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-field input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.auth-field input:focus {
    border-color: var(--amber-orange);
}

.auth-error {
    color: #d44;
    font-size: 0.82rem;
    min-height: 20px;
    text-align: center;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--amber-orange);
    color: #FFF;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-submit-btn:hover {
    background: #e6ac00;
}

.auth-hint {
    color: #BBB;
    font-size: 0.75rem;
    margin-top: 24px;
    line-height: 1.5;
}

/* 密码可见性切换 */
.auth-pw-wrapper {
    position: relative;
}

.auth-pw-wrapper input {
    padding-right: 44px;
}

.auth-pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.auth-pw-toggle:hover {
    color: #555;
    background: rgba(0,0,0,0.04);
}

/* 模式切换链接 */
.auth-switch {
    margin-top: 20px;
    font-size: 0.82rem;
    color: #999;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.auth-switch a {
    color: var(--amber-orange);
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.auth-switch a:hover {
    color: #e6ac00;
}

.auth-reset-link {
    font-size: 0.82rem;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px;
    }

    .auth-card h2 {
        font-size: 1.2rem;
    }
}
