/* ==================== 
   毒舌产品经理 - 苹果官网风格
   剪影与背景有机融合设计
   ==================== */

:root {
    --color-bg: #000000;
    --color-surface: rgba(255, 255, 255, 0.05);
    --color-surface-elevated: rgba(255, 255, 255, 0.08);
    --color-border: rgba(255, 255, 255, 0.1);
    --color-text: #ffffff;
    --color-text-secondary: rgba(255, 255, 255, 0.6);
    --color-text-tertiary: rgba(255, 255, 255, 0.4);
    
    --pm-primary: #667eea;
    --pm-secondary: #764ba2;
    --user-primary: #4facfe;
    --user-secondary: #00f2fe;
    
    --transition-fast: 0.2s ease;
    --transition-base: 0.4s ease;
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==================== 背景系统 ==================== */
body {
    transition: background-color var(--transition-slow);
}

/* 对话进度背景渐变 - 越聊越亮 */
body[data-progress="0"] { --color-bg: #000000; }
body[data-progress="1"] { --color-bg: #0a0a0a; }
body[data-progress="2"] { --color-bg: #111111; }
body[data-progress="3"] { --color-bg: #1a1a1a; }
body[data-progress="4"] { --color-bg: #222222; }
body[data-progress="5"] { --color-bg: #2a2a2a; }

/* 达到min_rounds后 - 最亮 + 绿色调 */
body.chat-ready {
    --color-bg: #1a2e1a !important;
}

/* 绿色流动边框效果 */
.glow-border {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.glow-border.active {
    opacity: 1;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-radius: 0;
    background: linear-gradient(90deg, 
        #22c55e, #10b981, #059669, #10b981, #22c55e
    ) border-box;
    -webkit-mask: 
        linear-gradient(#fff 0 0) padding-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderFlow 3s linear infinite;
}

.glow-border::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(34, 197, 94, 0.3), 
        rgba(16, 185, 129, 0.5),
        rgba(34, 197, 94, 0.3),
        transparent
    );
    filter: blur(20px);
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes borderFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 完成提示横幅 */
.ready-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: linear-gradient(90deg, #22c55e, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: white;
    font-weight: 600;
    font-size: 15px;
    z-index: 10000;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.ready-banner.active {
    transform: translateY(0);
}

.ready-banner svg {
    width: 20px;
    height: 20px;
}

.ready-banner-close {
    position: absolute;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.ready-banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ready-banner-close svg {
    width: 14px;
    height: 14px;
}

/* 等级背景变化 */
body.level-mortal {
    --color-bg: #0f172a; /* 深蓝紫色 */
    --pm-primary: #818cf8;
    --pm-secondary: #c084fc;
}

body.level-rationalist {
    --color-bg: #000000; /* 标准黑 */
    --pm-primary: #667eea;
    --pm-secondary: #764ba2;
}

body.level-troll {
    --color-bg: #050505; /* 极黑 */
    --pm-primary: #ef4444; /* 红色警告 */
    --pm-secondary: #7f1d1d;
}

.bg-animation {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity var(--transition-slow);
}

/* 杠精模式下背景更暗，流星感 */
body.level-troll .gradient-orb {
    opacity: 0.15;
    filter: blur(150px);
}

body.level-mortal .orb-1 { background: radial-gradient(circle, #818cf8 0%, transparent 70%); }
body.level-mortal .orb-2 { background: radial-gradient(circle, #c084fc 0%, transparent 70%); }

body.level-troll .orb-1 { background: radial-gradient(circle, #ef4444 0%, transparent 70%); }
body.level-troll .orb-2 { background: radial-gradient(circle, #7f1d1d 0%, transparent 70%); }

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
    will-change: transform;
    transition: all var(--transition-slow);
}

.orb-1 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--pm-primary) 0%, transparent 70%);
    top: -300px;
    right: -200px;
    animation: orbFloat1 12s ease-in-out infinite;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--pm-secondary) 0%, transparent 70%);
    bottom: -200px;
    left: -100px;
    animation: orbFloat2 15s ease-in-out infinite;
}

.orb-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--user-primary) 0%, transparent 70%);
    top: 40%;
    left: 30%;
    animation: orbFloat3 10s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0.3; }
    33% { transform: translate(-150px, 120px) scale(1.3) rotate(120deg); opacity: 0.5; }
    66% { transform: translate(100px, -80px) scale(0.8) rotate(240deg); opacity: 0.4; }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0.3; }
    50% { transform: translate(180px, -140px) scale(1.4) rotate(-180deg); opacity: 0.6; }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.2; }
    50% { transform: translate(-120px, 100px) scale(1.2); opacity: 0.5; }
}

/* ==================== 主容器 ==================== */
.container {
    position: relative;
    z-index: 1;
}

.section {
    display: none;
    min-height: 100vh;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.section.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

/* ==================== 欢迎页面 ==================== */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 60px 24px 40px;
    text-align: center;
    position: relative;
    overflow-y: auto;
}

/* 居中布局 - 输入框为核心 */
.hero-centered {
    justify-content: center;
    padding: 40px 24px;
    gap: 24px;
}

/* 品牌区域 - 紧凑版 */
.brand-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Title Logo 图片样式 - 已弃用，改用代码实现 */
.title-logo {
    display: none;
}

/* ==================== 超级标题 - 产品抬杠大师 ==================== */
.mega-title {
    position: relative;
    font-family: 'Zhi Mang Xing', 'Liu Jian Mao Cao', 'Long Cang', cursive;
    font-size: clamp(3.5rem, 15vw, 8rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.02em;
    margin: 0;
    padding: 20px 0;
    color: #a78bfa;
    text-shadow: 
        3px 3px 0 #4c1d95,
        6px 6px 0 rgba(0,0,0,0.3),
        0 0 60px rgba(139, 92, 246, 0.5),
        0 0 120px rgba(102, 126, 234, 0.3);
    cursor: default;
    user-select: none;
    /* 彻底隐藏，防止闪烁和干扰 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-300px) scale(1.3);
    filter: blur(10px);
    pointer-events: none;
}

/* 准备动画状态 */
.mega-title.slam-ready {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-300px) scale(1.3);
    filter: blur(10px);
}

/* 带 slam-animate 类时播放动画 */
.mega-title.slam-animate {
    visibility: visible;
    pointer-events: none;
    animation: megaSlam 0.8s cubic-bezier(0.22, 0.68, 0.32, 1.2) forwards;
}

/* 动画结束后的正常状态 */
.mega-title.slam-done {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    filter: blur(0);
    pointer-events: auto;
}

/* 动画进行中禁用 hover */
.mega-title.slam-animate .char {
    pointer-events: none;
}

/* 整体砸下 - 非线性重力感 */
@keyframes megaSlam {
    0% {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-300px) scale(1.3);
        filter: blur(10px);
    }
    1% {
        visibility: visible;
    }
    45% {
        opacity: 1;
        transform: translateY(25px) scale(0.92);
        filter: blur(0);
    }
    65% {
        transform: translateY(-12px) scale(1.05);
    }
    80% {
        transform: translateY(6px) scale(0.98);
    }
    90% {
        transform: translateY(-3px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        visibility: visible;
    }
}

/* 每个字符的独立样式 */
.mega-title .char {
    display: inline-block;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom center;
}

/* 产品 - 稍小 */
.mega-title .char:nth-child(1),
.mega-title .char:nth-child(2) {
    font-size: 0.75em;
    vertical-align: middle;
}
.mega-title .char:nth-child(1) { transform: rotate(-2deg); }
.mega-title .char:nth-child(2) { transform: rotate(1deg) translateY(3px); }

/* 抬杠 - 大字突出 */
.mega-title .char:nth-child(3),
.mega-title .char:nth-child(4) {
    font-size: 1.35em;
    color: #f093fb;
    text-shadow: 
        4px 4px 0 #7c3aed,
        8px 8px 0 rgba(0,0,0,0.3),
        0 0 80px rgba(240, 147, 251, 0.6),
        0 0 150px rgba(240, 147, 251, 0.3);
}
.mega-title .char:nth-child(3) { transform: rotate(-2deg) translateY(-2px); }
.mega-title .char:nth-child(4) { transform: rotate(2deg) translateY(5px); }

/* 大师 - 稍小 */
.mega-title .char:nth-child(5),
.mega-title .char:nth-child(6) {
    font-size: 0.75em;
    vertical-align: middle;
}
.mega-title .char:nth-child(5) { transform: rotate(-1deg) translateY(-3px); }
.mega-title .char:nth-child(6) { transform: rotate(2deg) translateY(2px); }

/* 动画结束后才能 hover */
.mega-title.slam-done .char:hover {
    transform: translateY(-20px) scale(1.2) rotate(-5deg) !important;
    color: #fff;
    text-shadow: 
        0 0 20px #667eea,
        0 0 40px #764ba2,
        0 0 80px #667eea;
}

/* ==================== 砸地效果 ==================== */
/* 尘埃容器 - 默认隐藏 */
.slam-dust {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 60px;
    pointer-events: none;
    opacity: 0;
}

/* 只有动画时才显示 */
.mega-title.slam-animate .slam-dust {
    animation: dustBurst 1s ease-out 0.45s forwards;
}

@keyframes dustBurst {
    0% {
        opacity: 0;
        transform: translateX(-50%) scaleX(0.3) scaleY(0.1);
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) scaleX(1.2) scaleY(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) scaleX(2) scaleY(0.5) translateY(20px);
    }
}

/* 尘埃粒子 - 默认无动画 */
.dust-particle {
    position: absolute;
    bottom: 0;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.6) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(3px);
    opacity: 0;
}

.dust-particle:nth-child(1) { left: 10%; width: 80px; height: 40px; }
.dust-particle:nth-child(2) { left: 30%; width: 60px; height: 30px; }
.dust-particle:nth-child(3) { left: 50%; width: 100px; height: 50px; }
.dust-particle:nth-child(4) { left: 70%; width: 70px; height: 35px; }
.dust-particle:nth-child(5) { left: 85%; width: 50px; height: 25px; }

/* 动画时才有粒子效果 */
.mega-title.slam-animate .dust-particle:nth-child(1) { animation: dustFloat 1s ease-out 0.45s forwards; }
.mega-title.slam-animate .dust-particle:nth-child(2) { animation: dustFloat 0.9s ease-out 0.5s forwards; }
.mega-title.slam-animate .dust-particle:nth-child(3) { animation: dustFloat 1.1s ease-out 0.45s forwards; }
.mega-title.slam-animate .dust-particle:nth-child(4) { animation: dustFloat 0.95s ease-out 0.48s forwards; }
.mega-title.slam-animate .dust-particle:nth-child(5) { animation: dustFloat 1s ease-out 0.52s forwards; }

@keyframes dustFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    30% {
        opacity: 0.8;
        transform: translateY(-20px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(1.5);
    }
}

/* 震动波 - 默认隐藏 */
.shock-wave {
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 200%;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(240, 147, 251, 0.8), transparent);
    transform: translateX(-50%) scaleX(0);
    filter: blur(2px);
    opacity: 0;
}

/* 动画时才显示震动波 */
.mega-title.slam-animate .shock-wave {
    animation: shockExpand 0.6s ease-out 0.45s forwards;
}

@keyframes shockExpand {
    0% {
        transform: translateX(-50%) scaleX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) scaleX(1);
        opacity: 0;
    }
}

/* 地面震动 */
@keyframes groundShake {
    0%, 100% { transform: translateY(0) translateX(0); }
    10% { transform: translateY(4px) translateX(-3px); }
    20% { transform: translateY(-3px) translateX(4px); }
    30% { transform: translateY(3px) translateX(-2px); }
    40% { transform: translateY(-2px) translateX(3px); }
    50% { transform: translateY(2px) translateX(-1px); }
    60% { transform: translateY(-1px) translateX(1px); }
    70% { transform: translateY(1px); }
}

/* 只有带 slam-animate 类才震动 */
.brand-area.slam-animate {
    animation: groundShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) 0.45s;
}

/* 笔墨飞溅装饰 */
.ink-splash {
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 30px;
    color: rgba(167, 139, 250, 0.5);
    pointer-events: none;
}

.ink-splash .splash-1 {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawSplash 2s ease forwards 0.5s;
}

.ink-splash .splash-2 {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawSplash 1.5s ease forwards 1s;
}

@keyframes drawSplash {
    to { stroke-dashoffset: 0; }
}

/* 整体悬停 - 抖动 (已移至上面 mega-title.slam-done 逻辑中控制) */
/* .mega-title:hover {
    animation: titleShake 0.15s ease infinite;
} */

@keyframes titleShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px) rotate(-0.5deg); }
    75% { transform: translateX(4px) rotate(0.5deg); }
}

/* ==================== 隐藏旧的样式 ==================== */
.epic-title,
.title-particles,
.title-side,
.title-char,
.title-clash,
.clash-vs,
.clash-explosion,
.clash-ring,
.clash-sparks,
.spark,
.master-subtitle,
.master-text {
    display: none !important;
}

.logo-container {
    position: relative;
    margin-bottom: 24px;
    flex-shrink: 0;
}

.logo-container.logo-small {
    margin-bottom: 8px;
}

.logo-container.logo-small .logo-icon {
    width: 56px;
    height: 56px;
    font-size: 28px;
    border-radius: 14px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 60px -10px rgba(102, 126, 234, 0.5);
}

.logo-glow {
    position: absolute;
    inset: -30px;
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
    border-radius: 40px;
    filter: blur(50px);
    opacity: 0.4;
    animation: logoGlow 4s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    line-height: 1.1;
    flex-shrink: 0;
}

.title-compact {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 4px;
}

.title-line { display: block; }

.gradient-text {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #667eea 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 480px;
    margin-bottom: 32px;
    font-weight: 400;
    flex-shrink: 0;
}

.subtitle-compact {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* 副品牌标语 */
.sub-brand {
    font-size: 1.4rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.2em;
    font-weight: 500;
    margin-top: 12px;
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 特性卡片 - 原版 */
.features {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    justify-content: center;
    flex-shrink: 0;
}

/* ==================== 全局统计 ==================== */
.global-stats {
    margin-top: 32px;
    text-align: center;
}

.stats-text {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

.stats-number {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== 我的项目区域 ==================== */
.my-projects {
    width: 100%;
    max-width: 800px;
    margin-top: 40px;
    display: none; /* 默认隐藏，有项目时显示 */
}

.my-projects.has-projects {
    display: block;
}

.projects-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.projects-title::before {
    content: '📁';
}

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

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* 项目卡片 */
.project-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.project-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card-idea {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.project-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.project-card-rounds {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-card-rounds::before {
    content: '🔥';
    font-size: 0.75rem;
}

/* 第6个卡片 - Pro提示 */
.project-card.pro-hint {
    background: linear-gradient(135deg, rgba(30, 30, 35, 0.8), rgba(40, 40, 50, 0.6));
    border: 1px dashed rgba(139, 92, 246, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    backdrop-filter: blur(20px);
    cursor: default;
}

.project-card.pro-hint::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(99, 102, 241, 0.05));
    pointer-events: none;
}

.project-card.pro-hint:hover {
    transform: none;
    box-shadow: none;
}

.pro-hint-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    filter: grayscale(0.3);
}

.pro-hint-text {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.pro-hint-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #a78bfa, #818cf8);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    margin-top: 8px;
}

/* 新建项目卡片 - 当项目为空时显示 */
.project-card.new-project {
    border: 2px dashed rgba(139, 92, 246, 0.3);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.project-card.new-project:hover {
    border-color: rgba(139, 92, 246, 0.6);
    background: rgba(139, 92, 246, 0.05);
}

.new-project-icon {
    font-size: 2rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.new-project-text {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* 特性卡片 - 底部迷你版 */
.features-bottom {
    margin-bottom: 0;
    margin-top: auto;
    gap: 12px;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    background: var(--color-surface-elevated);
    border-color: rgba(255, 255, 255, 0.2);
}

.feature-card.feature-mini {
    padding: 8px 14px;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.feature-card.feature-mini .feature-icon {
    font-size: 1rem;
}

.feature-icon { font-size: 1.5rem; }
.feature-text h3 { font-size: 0.875rem; font-weight: 600; }
.feature-text p { font-size: 0.75rem; color: var(--color-text-secondary); }

.input-container {
    width: 100%;
    max-width: 600px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 核心输入区 - 放大突出 */
.input-container.input-hero {
    max-width: 720px;
}

/* 主输入框容器 - 类似聊天输入框样式 */
.input-wrapper-main {
    position: relative;
    display: flex;
    align-items: flex-end;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 4px 4px 4px 16px;
    transition: all var(--transition-base);
    width: 100%; /* 确保撑满容器宽度 */
}

/* 放大版输入框 */
.input-wrapper-main.input-large {
    border-radius: 24px;
    padding: 8px 8px 8px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 20px 60px -20px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.input-wrapper-main.input-large textarea {
    font-size: 1.1rem;
    min-height: 120px;
    padding: 16px 0;
}

.input-wrapper-main:focus-within {
    border-color: var(--pm-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.input-wrapper-main.input-large:focus-within {
    border-color: var(--pm-primary);
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.2),
        0 20px 60px -20px rgba(102, 126, 234, 0.4);
}

.input-wrapper-main textarea {
    flex: 1;
    padding: 12px 0;
    background: transparent;
    border: none;
    color: var(--color-text);
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    min-height: 80px;
    max-height: 200px;
}

.input-wrapper-main textarea:focus {
    outline: none;
}

.input-wrapper-main textarea::placeholder { color: var(--color-text-tertiary); }

/* 输入框右侧操作按钮组 */
.input-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
}

.btn-action {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

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

/* 上传按钮 */
.btn-action.upload-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-secondary);
}

.btn-action.upload-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.btn-action.upload-btn.has-file {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

/* 发送按钮 */
.btn-action.send-btn {
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
    color: white;
    box-shadow: 0 8px 24px -8px rgba(102, 126, 234, 0.5);
}

.btn-action.send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 32px -8px rgba(102, 126, 234, 0.6);
}

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

.input-wrapper-main .input-glow {
    position: absolute;
    bottom: -30px;
    left: 10%;
    right: 10%;
    height: 60px;
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
    filter: blur(40px);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.input-wrapper-main:focus-within .input-glow { opacity: 0.25; }

/* ==================== 功能开关区域 ==================== */
.research-toggles {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

/* 抬杠等级选择器 */
.level-selector-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    margin-bottom: 16px; /* 改为底部间距，因为现在在上方 */
    width: fit-content;
}

.level-label-main {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.level-options {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 3px;
    border-radius: 100px;
}

.level-option {
    position: relative;
    cursor: pointer;
}

.level-option input {
    display: none;
}

.level-btn {
    display: block;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-tertiary);
    border-radius: 100px;
    transition: all var(--transition-fast);
}

.level-btn:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.05);
}

.level-option input:checked + .level-btn {
    background: var(--pm-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 杠精选项特殊样式 */
.level-option:last-child input:checked + .level-btn {
    background: #ef4444;
}

.toggle-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-base);
    user-select: none;
}

.toggle-item:hover {
    background: var(--color-surface-elevated);
    border-color: rgba(255, 255, 255, 0.2);
}

.toggle-checkbox {
    display: none;
}

/* 开关样式 */
.toggle-switch {
    position: relative;
    width: 36px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transition: all var(--transition-base);
}

.toggle-checkbox:checked + .toggle-switch {
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
}

.toggle-checkbox:checked + .toggle-switch::after {
    left: 18px;
    background: white;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
}

.toggle-label svg {
    width: 16px;
    height: 16px;
    color: var(--color-text-secondary);
}

.toggle-checkbox:checked ~ .toggle-label svg {
    color: var(--pm-primary);
}

.toggle-hint {
    font-size: 0.7rem;
    color: var(--color-text-tertiary);
    display: none;
}

.toggle-checkbox:checked ~ .toggle-hint {
    display: block;
    color: var(--pm-primary);
}

/* PRO 标签样式 */
.pro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    margin-left: 6px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    color: #1a1a1a;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.4);
    animation: proBadgeShine 3s ease-in-out infinite;
}

@keyframes proBadgeShine {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 165, 0, 0.4);
    }
    50% {
        box-shadow: 0 2px 16px rgba(255, 165, 0, 0.7);
    }
}

/* 开启状态的toggle-item */
.toggle-item:has(.toggle-checkbox:checked) {
    border-color: var(--pm-primary);
    background: rgba(102, 126, 234, 0.1);
}

/* ==================== 搜索进度展示区域 ==================== */
.research-progress {
    width: 100%;
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

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

.research-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.research-progress-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--pm-primary);
}

.spinner-icon {
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.btn-collapse {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.btn-collapse:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.btn-collapse.collapsed svg {
    transform: rotate(180deg);
}

.research-progress-body {
    max-height: 300px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.research-progress-body.collapsed {
    max-height: 0;
}

.research-log {
    padding: 12px 16px;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    max-height: 100px;
    overflow-y: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.research-log-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
    animation: fadeIn 0.2s ease;
}

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

.research-log-item .log-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.research-log-item.searching .log-icon {
    color: var(--pm-primary);
}

.research-log-item.found .log-icon {
    color: #4ade80;
}

.research-log-item.error .log-icon {
    color: #ef4444;
}

.research-log-item .log-text {
    flex: 1;
    line-height: 1.4;
}

.research-log-item .log-query {
    color: var(--pm-primary);
    font-weight: 500;
}

.research-results {
    padding: 12px 16px;
    max-height: 180px;
    overflow-y: auto;
}

.research-results-title {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.result-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all var(--transition-fast);
    animation: slideIn 0.3s ease;
}

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

.result-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.result-item-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.result-item-icon svg {
    width: 16px;
    height: 16px;
    color: white;
}

.result-item-icon.market {
    background: linear-gradient(135deg, var(--user-primary), var(--user-secondary));
}

.result-item-content {
    flex: 1;
    min-width: 0;
}

.result-item-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-item-title a {
    color: inherit;
    text-decoration: none;
}

.result-item-title a:hover {
    color: var(--pm-primary);
}

.result-item-snippet {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-item-url {
    font-size: 0.7rem;
    color: var(--color-text-tertiary);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 搜索完成状态 */
.research-progress.completed .spinner-icon {
    animation: none;
}

.research-progress.completed .research-progress-title svg {
    color: #4ade80;
}

.research-progress.completed .research-progress-title {
    color: #4ade80;
}

/* 完成图标替换 */
.research-progress.completed .spinner-icon {
    display: none;
}

.research-progress.completed .research-progress-title::before {
    content: '';
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234ade80' stroke-width='2'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: contain;
    display: inline-block;
    margin-right: 10px;
}

/* 竞品/市场标签 */
.result-stage-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    margin-left: 8px;
}

.result-stage-badge.competitor {
    background: rgba(102, 126, 234, 0.2);
    color: var(--pm-primary);
}

.result-stage-badge.market {
    background: rgba(79, 172, 254, 0.2);
    color: var(--user-primary);
}

/* 上传成功状态条 */
.upload-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    margin-top: 12px;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 10px;
    color: #4ade80;
    font-size: 0.875rem;
}

.upload-status .check-icon {
    width: 16px;
    height: 16px;
}

.btn-remove-file {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all var(--transition-fast);
    margin-left: auto;
}

.btn-remove-file:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* ==================== 对话页面 - 沉浸式剪影 ==================== */
#chat-section {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.chat-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%);
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-info h2 { font-size: 1rem; font-weight: 600; }

.round-indicator {
    font-size: 0.75rem;
    color: var(--pm-primary);
}

.header-right { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn-icon {
    width: 40px;
    height: 40px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-icon:hover { background: var(--color-surface-elevated); }
.btn-icon svg { width: 18px; height: 18px; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover:not(:disabled) { background: var(--color-surface-elevated); }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-secondary svg { width: 14px; height: 14px; }

.btn-secondary.pulse {
    animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(102, 126, 234, 0); }
}

/* 生成PRD按钮激活状态 */
.btn-secondary.ready {
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
    border-color: transparent;
    color: white;
    transform: scale(1.05);
}

.btn-secondary.ready:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

/* ==================== 沉浸式剪影舞台 ==================== */
.silhouette-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.stage-backdrop {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 80%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 80% 50% at 80% 80%, rgba(79, 172, 254, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 100% 80% at 50% 100%, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
    pointer-events: none;
}

/* ==================== 剪影 - 融入背景 ==================== */
.silhouette {
    position: absolute;
    bottom: 0;
    width: 42vw;
    max-width: 550px;
    min-width: 250px;
    height: 90vh;
    max-height: 900px;
    pointer-events: none;
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
    transform-origin: bottom center;
}

.silhouette-pm { 
    left: -5%; 
}

.silhouette-user { 
    right: -5%; 
    transform: scaleX(-1); 
}

/* 剪影图片容器 */
.silhouette-image-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.silhouette-image-wrapper img,
.silhouette-image-wrapper svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    opacity: 0.5;
    filter: brightness(0.7);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    mask-image: linear-gradient(to top, black 0%, black 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, black 0%, black 70%, transparent 100%);
}

/* 剪影发光层 - 融入背景 */
.silhouette-glow-layer {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    height: 80%;
    opacity: 0;
    filter: blur(100px);
    transition: all 1s ease;
    pointer-events: none;
}

.silhouette-pm .silhouette-glow-layer {
    background: radial-gradient(ellipse at center bottom, var(--pm-primary) 0%, var(--pm-secondary) 30%, transparent 70%);
}

.silhouette-user .silhouette-glow-layer {
    background: radial-gradient(ellipse at center bottom, var(--user-primary) 0%, var(--user-secondary) 30%, transparent 70%);
}

/* 光晕粒子效果 */
.silhouette-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0;
}

/* 说话状态 - 气势压制，变大 */
.silhouette.speaking {
    transform-origin: bottom center;
    transform: scale(1.15);
    z-index: 10;
}

.silhouette.speaking.silhouette-user {
    transform: scaleX(-1) scale(1.15);
}

.silhouette.speaking .silhouette-image-wrapper img,
.silhouette.speaking .silhouette-image-wrapper svg {
    opacity: 1;
    filter: brightness(1.2) contrast(1.1);
}

.silhouette.speaking .silhouette-glow-layer {
    opacity: 0.7;
    animation: glowBreath 2s ease-in-out infinite;
}

.silhouette.speaking .silhouette-particles {
    opacity: 1;
}

@keyframes glowBreath {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.8; transform: translateX(-50%) scale(1.15); }
}

/* 非活跃状态 - 被压制，缩小退让 */
.silhouette.inactive {
    transform-origin: bottom center;
    transform: scale(0.75);
    z-index: 3;
}

.silhouette.inactive.silhouette-user {
    transform: scaleX(-1) scale(0.75);
}

.silhouette.inactive .silhouette-image-wrapper img,
.silhouette.inactive .silhouette-image-wrapper svg {
    opacity: 0.2;
    filter: brightness(0.4) grayscale(0.7) blur(1px);
}

.silhouette.inactive .silhouette-glow-layer {
    opacity: 0;
}

/* 剪影标签 */
.silhouette-label {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
    transition: opacity var(--transition-base);
}

.silhouette-user .silhouette-label {
    transform: translateX(-50%) scaleX(-1);
}

.silhouette.speaking .silhouette-label {
    opacity: 1;
    color: var(--color-text);
}

/* 说话波纹 */
.speaking-waves {
    position: absolute;
    bottom: 35%;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.silhouette.speaking .speaking-waves {
    opacity: 1;
}

.wave-ring {
    position: absolute;
    inset: 0;
    border: 2px solid currentColor;
    border-radius: 50%;
    opacity: 0;
}

.silhouette-pm .wave-ring { color: var(--pm-primary); }
.silhouette-user .wave-ring { color: var(--user-primary); }

.silhouette.speaking .wave-ring {
    animation: waveExpand 2s ease-out infinite;
}

.silhouette.speaking .wave-ring:nth-child(2) { animation-delay: 0.4s; }
.silhouette.speaking .wave-ring:nth-child(3) { animation-delay: 0.8s; }

@keyframes waveExpand {
    0% { transform: scale(0.5); opacity: 0.8; }
    100% { transform: scale(2); opacity: 0; }
}

/* ==================== 对话内容区域 ==================== */
.conversation-scroll {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    z-index: 10;
}

.conversation-scroll::-webkit-scrollbar { display: none; }

.conversation-track {
    display: flex;
    flex-direction: column;
}

/* 每一轮对话 */
.conversation-scene {
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 160px;
    position: relative;
}

/* 对话内容卡片 - 毛玻璃效果 */
.scene-content {
    max-width: 640px;
    width: 100%;
    position: relative;
    z-index: 20;
}

.scene-speaker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.scene-speaker.pm { color: var(--pm-primary); }
.scene-speaker.user { color: var(--user-primary); }

.scene-speaker::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: dotPulse 1.5s ease-in-out infinite;
}

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

.scene-message {
    padding: 28px 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    backdrop-filter: blur(40px);
    font-size: 1.125rem;
    line-height: 1.8;
    animation: messageAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.scene-message::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.scene-message.pm {
    border-left: 3px solid var(--pm-primary);
    box-shadow: 
        0 20px 60px -20px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.scene-message.user {
    border-left: 3px solid var(--user-primary);
    box-shadow: 
        0 20px 60px -20px rgba(79, 172, 254, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 系统消息/搜索场景样式 */
.scene-message.system {
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.02);
    max-height: 300px;
    overflow-y: auto;
}

.scene-speaker.system {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner-icon-inline {
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* 搜索链接列表 */
.research-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.research-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    animation: linkAppear 0.3s ease;
}

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

.research-link-item .link-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.research-link-item .link-icon svg {
    width: 14px;
    height: 14px;
}

.research-link-item .link-icon.competitor {
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
    color: white;
}

.research-link-item .link-icon.market {
    background: linear-gradient(135deg, var(--user-primary), var(--user-secondary));
    color: white;
}

.research-link-item .link-icon.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.research-link-item .link-text {
    flex: 1;
    font-size: 0.8125rem;
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.research-link-item a.link-text:hover {
    color: var(--pm-primary);
}

.research-link-item .link-site {
    font-size: 0.7rem;
    color: var(--color-text-tertiary);
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

/* 搜索场景完成状态 */
.research-scene.completed .scene-speaker.system {
    color: #4ade80;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* 轮次导航点 */
.round-dots {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 50;
}

.round-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.round-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid transparent;
    border-radius: 50%;
    transition: all var(--transition-base);
}

.round-dot.active {
    background: var(--pm-primary);
    transform: scale(1.4);
}

.round-dot.active::after {
    border-color: var(--pm-primary);
    animation: dotRing 1.5s ease-out infinite;
}

.round-dot.user-round.active {
    background: var(--user-primary);
}

.round-dot.user-round.active::after {
    border-color: var(--user-primary);
}

@keyframes dotRing {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

.round-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.2);
}

/* 打字指示器 - 底部优雅提示条 */
.typing-bubble {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 50px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
    box-shadow: 
        0 4px 24px rgba(102, 126, 234, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.typing-bubble.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.typing-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.typing-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    animation: avatarPulse 2s ease-in-out infinite;
}

.typing-avatar svg {
    width: 18px;
    height: 18px;
    color: white;
}

@keyframes avatarPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(102, 126, 234, 0);
        transform: scale(1.05);
    }
}

.typing-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.typing-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1;
}

.typing-status {
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1;
    display: flex;
    align-items: center;
}

.typing-dots {
    display: inline-flex;
    margin-left: 2px;
}

.typing-dots span {
    animation: dotFade 1.4s infinite;
    opacity: 0.3;
}

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

@keyframes dotFade {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

/* ==================== 输入区域 ==================== */
.chat-input-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 24px 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 50%, transparent 100%);
    z-index: 100;
}

.chat-input-wrapper {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input-wrapper textarea {
    flex: 1;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--color-text);
    font-size: 1rem;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    transition: all var(--transition-base);
}

.chat-input-wrapper textarea:focus {
    outline: none;
    border-color: var(--pm-primary);
    background: rgba(255, 255, 255, 0.08);
}

.chat-input-wrapper textarea::placeholder { color: var(--color-text-tertiary); }

/* 聊天操作按钮组 */
.chat-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

/* 统一的图标按钮样式 */
.btn-icon {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

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

/* 按钮hover文字提示 */
.btn-icon::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.98), rgba(20, 20, 30, 0.98));
    color: #fff;
    font-size: 1.175rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    letter-spacing: 0.02em;
}

.btn-icon::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(30, 30, 40, 0.98);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 100;
}

.btn-icon:hover::after,
.btn-icon:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.btn-icon:hover::before {
    transform: translateX(-50%);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-text);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* 发送按钮 - 突出主色 */
.btn-icon.btn-send {
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-icon.btn-send:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* 语音按钮激活状态 */
.btn-icon.active {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    animation: voicePulse 1.5s ease-in-out infinite;
}

@keyframes voicePulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 4px 24px rgba(239, 68, 68, 0.6), 0 0 0 6px rgba(239, 68, 68, 0.1); }
}

/* 生成PRD就绪状态 - 绿色 */
.btn-icon.btn-ready {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
    animation: readyPulse 2s ease-in-out infinite;
}

.btn-icon.btn-ready:hover {
    background: rgba(34, 197, 94, 0.25);
    border-color: rgba(34, 197, 94, 0.5);
}

@keyframes readyPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* 语音波形动画 */
.voice-icon-wave .wave-bar {
    stroke-linecap: round;
    transform-origin: center;
}

.btn-icon.active .wave-bar-1 { animation: waveBar1 0.5s ease-in-out infinite; }
.btn-icon.active .wave-bar-2 { animation: waveBar2 0.5s ease-in-out infinite 0.1s; }
.btn-icon.active .wave-bar-3 { animation: waveBar3 0.5s ease-in-out infinite 0.2s; }
.btn-icon.active .wave-bar-4 { animation: waveBar4 0.5s ease-in-out infinite 0.1s; }
.btn-icon.active .wave-bar-5 { animation: waveBar5 0.5s ease-in-out infinite; }

@keyframes waveBar1 {
    0%, 100% { d: path("M4 12v0"); }
    50% { d: path("M4 10v4"); }
}
@keyframes waveBar2 {
    0%, 100% { d: path("M8 8v8"); }
    50% { d: path("M8 6v12"); }
}
@keyframes waveBar3 {
    0%, 100% { d: path("M12 5v14"); }
    50% { d: path("M12 3v18"); }
}
@keyframes waveBar4 {
    0%, 100% { d: path("M16 8v8"); }
    50% { d: path("M16 6v12"); }
}
@keyframes waveBar5 {
    0%, 100% { d: path("M20 12v0"); }
    50% { d: path("M20 10v4"); }
}

/* 对话气泡（隐藏，用scene-message代替） */
.dialogue-bubble { display: none; }
.speaking-indicator { display: none; }

/* ==================== PRD页面 ==================== */
#prd-section.active { 
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.prd-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
}

.prd-status {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.prd-container {
    flex: 1;
    padding: 40px 24px;
    overflow-y: auto;
}

.prd-content {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 48px;
}

/* PRD操作按钮区域 */
.prd-actions {
    max-width: 800px;
    margin: 32px auto 0;
    padding: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    text-align: center;
}

.prd-actions-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 24px;
}

.prd-actions-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.prd-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.prd-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 金色炫彩按钮 - 腾讯云AI实现 */
.prd-action-btn.btn-ai-implement {
    background: linear-gradient(135deg, #f59e0b, #d97706, #b45309);
    color: white;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    position: relative;
    overflow: hidden;
}

.prd-action-btn.btn-ai-implement::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.prd-action-btn.btn-ai-implement:hover {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.5);
}

/* 全屏醒目提示 */
.big-notice-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

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

.big-notice-content {
    text-align: center;
    padding: 60px 80px;
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.95), rgba(20, 20, 20, 0.98));
    border: 2px solid rgba(245, 158, 11, 0.5);
    border-radius: 24px;
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.3), 0 0 120px rgba(245, 158, 11, 0.1);
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.big-notice-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 15px 50px rgba(16, 185, 129, 0.6); }
}

.big-notice-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.big-notice-desc {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
    line-height: 1.6;
}

.big-notice-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.countdown-number {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    animation: countPulse 1s infinite;
}

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

.countdown-text {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.6);
}

.big-notice-btn {
    padding: 16px 48px;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

.big-notice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.6);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

/* PRD Loading Animation */
.prd-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
}

.prd-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--color-border);
    border-top-color: var(--pm-primary);
    border-radius: 50%;
    animation: prdSpin 1s linear infinite;
    margin-bottom: 24px;
}

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

.prd-loading-quote {
    font-size: 1.1rem;
    color: var(--pm-primary);
    font-weight: 500;
    margin-bottom: 12px;
    max-width: 400px;
    line-height: 1.6;
    transition: opacity 0.3s ease;
}

.prd-loading-sub {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.btn-primary-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
    color: white;
    font-size: 0.8125rem;
    font-weight: 500;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary-small:hover { transform: scale(1.02); }
.btn-primary-small svg { width: 14px; height: 14px; }

/* Markdown */
.markdown-body { color: var(--color-text); line-height: 1.8; }
.markdown-body h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.markdown-body h2 { font-size: 1.5rem; margin-top: 40px; margin-bottom: 20px; }
.markdown-body h3 { font-size: 1.125rem; margin-top: 32px; margin-bottom: 16px; color: var(--color-text-secondary); }
.markdown-body p { margin-bottom: 16px; }
.markdown-body ul, .markdown-body ol { margin-bottom: 16px; padding-left: 24px; }
.markdown-body li { margin-bottom: 8px; }
.markdown-body code { background: var(--color-surface-elevated); padding: 2px 6px; border-radius: 4px; font-size: 0.875em; }
.markdown-body pre { background: var(--color-surface-elevated); padding: 16px; border-radius: 12px; overflow-x: auto; margin-bottom: 16px; }
.markdown-body blockquote { border-left: 3px solid var(--pm-primary); padding-left: 16px; color: var(--color-text-secondary); margin-bottom: 16px; }
.markdown-body table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.markdown-body th, .markdown-body td { border: 1px solid var(--color-border); padding: 10px 14px; text-align: left; }
.markdown-body th { background: var(--color-surface); }

/* ==================== Toast & Loading ==================== */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-surface-elevated);
    color: var(--color-text);
    padding: 14px 28px;
    border-radius: 100px;
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: all var(--transition-spring);
    z-index: 1000;
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay.active { display: flex; }

.loading-spinner {
    width: 60px;
    height: 60px;
    position: relative;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    animation: spinnerRotate 1.2s linear infinite;
}

.spinner-ring:nth-child(1) { border-top-color: var(--pm-primary); }
.spinner-ring:nth-child(2) { 
    inset: 8px; 
    border-right-color: var(--pm-secondary); 
    animation-delay: 0.15s;
    animation-direction: reverse;
}
.spinner-ring:nth-child(3) { 
    inset: 16px; 
    border-bottom-color: var(--user-primary); 
    animation-delay: 0.3s;
}

@keyframes spinnerRotate {
    100% { transform: rotate(360deg); }
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .silhouette {
        width: 50vw;
        min-width: 150px;
        height: 60vh;
    }
    
    .silhouette-pm { left: -10%; }
    .silhouette-user { right: -10%; }
    
    .silhouette.speaking {
        transform: scale(1.1);
    }
    
    .silhouette.speaking.silhouette-user {
        transform: scaleX(-1) scale(1.1);
    }
    
    .silhouette.inactive {
        transform: scale(0.65);
    }
    
    .silhouette.inactive.silhouette-user {
        transform: scaleX(-1) scale(0.65);
    }
    
    .scene-message {
        padding: 20px 24px;
        font-size: 1rem;
    }
    
    .round-dots {
        right: 12px;
    }
    
    .prd-content { padding: 24px; }
}

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

::selection { background: rgba(102, 126, 234, 0.4); }
