/* ==========================================================================
   风流浪子对话 · Casanova —— 公共样式
   风格：午夜酒红丝绒（深酒红近黑暗底 + 酒红 #8b1e2d + 香槟金 #d4af6a 点缀，
         丝绒暗调、微光泽、暗色玫瑰花纹；优雅、性感、电影感，非霓虹发光）。
   布局：全屏沉浸 hero —— 首屏一整块沉浸暗色大 hero（大标题 + 浪子输入卡），
         向下滚动依次露出 场景 / 擅长 / FAQ / 页脚，有层次电影感。
   与其它项目（午夜紫霓虹 / 电光青蓝赛博 / 手账 / 宫格 …）刻意彻底区分。
   ========================================================================== */

/* ------------------------------ 设计变量 ------------------------------ */
:root {
  --bg: #1c060a;          /* 近黑酒红 */
  --bg-2: #2a0a0e;
  --bg-3: #3b0d12;

  --wine: #8b1e2d;
  --wine-soft: #a83345;
  --wine-deep: #6a1522;

  --gold: #d4af6a;        /* 香槟金 */
  --gold-soft: #e8cf9a;
  --gold-deep: #b8945180;

  --ink: #f6ece9;         /* 暖白正文 */
  --ink-2: #cdb0ad;       /* 柔和 */
  --ink-3: #9a7d7c;       /* 更弱 */

  --panel: rgba(48, 14, 21, .72);   /* 丝绒面板 */
  --panel-2: rgba(60, 18, 27, .60);
  --line: rgba(212, 175, 106, .20); /* 金色发丝线 */
  --line-strong: rgba(212, 175, 106, .40);

  --grad-wine: linear-gradient(135deg, #a83345 0%, #8b1e2d 52%, #6a1522 100%);
  --grad-velvet: linear-gradient(160deg, #3b0d12 0%, #2a0a0e 46%, #1c060a 100%);

  --r-lg: 22px;
  --r-md: 15px;
  --r-sm: 10px;
  --r-pill: 999px;

  --shadow-sm: 0 8px 22px rgba(0, 0, 0, .38);
  --shadow: 0 20px 46px rgba(0, 0, 0, .48);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, .58);
  --glow-gold: 0 0 0 1px var(--line-strong), 0 14px 40px rgba(0, 0, 0, .5);

  --maxw: 1000px;

  --font: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* 标题用衬线，营造复古电影 / 高级质感 */
  --font-title: 'Songti SC', 'STSong', 'Noto Serif SC', Georgia, 'Times New Roman', serif;
}

/* ------------------------------ 基础 ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  font-family: var(--font);
  font-size: 15px; line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.mode-landing { overflow-y: auto; }              /* 落地页整页可滚动，逐层露出场景/擅长/FAQ/页脚 */
body.mode-chat { height: 100vh; height: 100dvh; overflow: hidden; }  /* 对话页锁定视口，仅消息列滚动 */
body.mode-chat .site-footer { display: none; }

a { color: var(--gold-soft); }
h1, h2, h3 { font-family: var(--font-title); font-weight: 700; letter-spacing: .4px; }

/* ------------------------------ 丝绒背景 ------------------------------ */
.velvetbg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(120% 90% at 78% -6%, rgba(139, 30, 45, .55), transparent 55%),
    radial-gradient(90% 70% at 8% 108%, rgba(106, 21, 34, .45), transparent 58%),
    var(--grad-velvet);
}
/* 细腻丝绒斜纹光泽 */
.velvetbg::before { content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,.020) 0 2px, transparent 2px 7px);
  opacity: .5;
}
/* 极淡金色微粒纹 */
.velvetbg::after { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(212,175,106,.10) 1px, transparent 1.3px);
  background-size: 34px 34px; opacity: .28;
}
.velvetbg .glow { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }
.velvetbg .glow-wine { top: -12%; right: -8%; width: 46vw; height: 46vw; background: radial-gradient(circle, rgba(168,51,69,.5), transparent 68%); }
.velvetbg .glow-gold { bottom: -14%; left: -6%; width: 38vw; height: 38vw; background: radial-gradient(circle, rgba(212,175,106,.22), transparent 70%); }
.velvetbg .rose { position: absolute; color: rgba(212,175,106,.14); font-size: 120px; line-height: 1; }
.velvetbg .rose-1 { top: 14%; left: 6%; transform: rotate(-12deg); }
.velvetbg .rose-2 { bottom: 12%; right: 8%; font-size: 150px; transform: rotate(8deg); }

/* ------------------------------ 顶栏 ------------------------------ */
.topbar {
  position: relative; z-index: 4; flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px clamp(16px, 5vw, 44px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.brand-mark {
  display: grid; place-items: center; width: 44px; height: 44px; font-size: 22px;
  border-radius: 50%; background: var(--grad-wine);
  border: 1px solid var(--line-strong); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 8px 20px rgba(0,0,0,.4);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-title); font-size: 19px; color: var(--ink); letter-spacing: 1px; }
.brand-text em { font-style: normal; font-size: 10.5px; letter-spacing: 4px; color: var(--gold); text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 9px; }
.nav-btn {
  appearance: none; border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); color: var(--ink);
  font-family: inherit; font-weight: 600; font-size: 13px; padding: 8px 16px; border-radius: var(--r-pill);
  text-decoration: none; cursor: pointer; transition: transform .16s, border-color .16s, background .16s, color .16s;
}
.nav-btn:hover { transform: translateY(-1px); border-color: var(--gold); color: var(--gold-soft); background: rgba(212,175,106,.08); }

/* ------------------------------ 舞台 ------------------------------ */
.stage { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; width: 100%; }
body.mode-chat .stage { display: flex; }
.landing { width: 100%; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 5vw, 40px); }

/* ------------------------------ HERO（全屏沉浸首屏） ------------------------------ */
.hero {
  position: relative;
  min-height: calc(100vh - 76px); min-height: calc(100dvh - 76px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 26px clamp(16px, 5vw, 40px) 84px; text-align: center;
}
.hero-inner { width: 100%; max-width: 760px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 22px; padding: 6px 16px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 2px; color: var(--gold-soft);
  background: rgba(212,175,106,.06); border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  backdrop-filter: blur(4px);
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px rgba(212,175,106,.9); }
.hero-title {
  margin: 0 auto 20px; max-width: 14em; font-size: clamp(34px, 7vw, 66px); line-height: 1.16; color: var(--ink);
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
}
.hero-title b { color: var(--gold-soft); font-weight: 700; position: relative; white-space: nowrap;
  background: linear-gradient(180deg, #f0d9a6, #d4af6a 60%, #b98a4c);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { margin: 0 auto 30px; max-width: 30em; color: var(--ink-2); font-size: clamp(14px, 1.6vw, 16px); }

/* 向下滚动提示 */
.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--ink-3); font-size: 11.5px; letter-spacing: 1.5px; }
.scroll-cue:hover { color: var(--gold-soft); }
.scroll-cue-arrow { font-size: 22px; line-height: 1; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: .7; } 50% { transform: translateY(5px); opacity: 1; } }

/* ------------------------------ 浪子输入卡（丝绒面板） ------------------------------ */
.composer-slot { margin: 0 auto; max-width: 620px; }
.hero .composer-slot { margin-top: 4px; }
.composer { width: 100%; }
.composer-card {
  position: relative; overflow: hidden;
  padding: 20px 20px 15px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}
/* 顶部一道丝绒高光 */
.composer-card .composer-sheen { position: absolute; inset: 0 0 auto 0; height: 40%;
  background: linear-gradient(180deg, rgba(255,255,255,.06), transparent); pointer-events: none; }
.composer-card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .7; }
.composer-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; position: relative; }
.composer-sticker { display: grid; place-items: center; width: 30px; height: 30px; font-size: 17px;
  background: var(--grad-wine); border: 1px solid var(--line-strong); border-radius: 50%; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.composer-label { font-family: var(--font-title); font-weight: 700; color: var(--ink); font-size: 15.5px; letter-spacing: .5px; }
.composer-input {
  position: relative; display: block; width: 100%; padding: 8px 4px; resize: none; border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 15px; line-height: 1.7; color: var(--ink); max-height: 160px;
}
.composer-input::placeholder { color: var(--ink-3); }
.composer-foot { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px;
  border-top: 1px solid var(--line); padding-top: 12px; }
.composer-stage { font-size: 12.5px; color: var(--ink-2); padding: 5px 13px; background: rgba(212,175,106,.07); border: 1px solid var(--line); border-radius: var(--r-pill); }
.composer-stage b { color: var(--gold-soft); }
.composer-actions { display: flex; align-items: center; gap: 10px; }
.stop-btn {
  appearance: none; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 13px; color: var(--ink-2);
  background: rgba(255,255,255,.04); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 8px 15px; transition: transform .14s, color .14s, border-color .14s;
}
.stop-btn:hover { transform: translateY(-1px); color: var(--gold-soft); border-color: var(--gold); }
.send-btn {
  appearance: none; cursor: pointer; font-family: var(--font-title); font-weight: 700; font-size: 15px; letter-spacing: 1px; color: #fff4e6;
  background: var(--grad-wine); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 10px 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 8px 22px rgba(106,21,34,.5); transition: transform .16s, box-shadow .16s;
}
.send-btn:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 12px 30px rgba(139,30,45,.6); }
.send-btn:active { transform: translateY(0); }
.send-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.composer-tip { margin: 12px 4px 0; font-size: 12px; color: var(--ink-3); text-align: center; }

/* ------------------------------ 关系阶段 ------------------------------ */
.stage-bar { margin-top: 26px; text-align: center; }
.stage-bar-title { display: block; font-family: var(--font-title); font-weight: 700; color: var(--ink-2); font-size: 13.5px; letter-spacing: 1px; margin-bottom: 12px; }
.stage-bar-title b { color: var(--gold-soft); }
.state-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.state-chip {
  appearance: none; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 13px; color: var(--ink-2);
  background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 7px 16px;
  transition: transform .14s, color .14s, background .14s, border-color .14s, box-shadow .14s;
}
.state-chip:hover { transform: translateY(-2px); color: var(--gold-soft); border-color: var(--line-strong); }
.state-chip.is-active { color: #fff4e6; background: var(--grad-wine); border-color: var(--gold); box-shadow: 0 6px 18px rgba(139,30,45,.45); }

/* ------------------------------ 分节标题 ------------------------------ */
.scenes { padding: clamp(56px, 9vw, 96px) 0 0; }
.feats { padding: clamp(48px, 8vw, 84px) 0 0; }
.faq { padding: clamp(48px, 8vw, 84px) 0 clamp(40px, 7vw, 72px); }
.sec-eyebrow { text-align: center; margin: 0 0 8px; font-size: 12px; letter-spacing: 5px; color: var(--gold); font-weight: 600; }
.sec-title { text-align: center; margin: 0 0 8px; font-size: clamp(23px, 4vw, 34px); color: var(--ink); }
.sec-sub { text-align: center; margin: 0 0 26px; color: var(--ink-3); font-size: 13.5px; }

/* ------------------------------ 撩人场景（丝绒卡） ------------------------------ */
.cat-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-bottom: 26px; }
.cat-tab {
  appearance: none; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 13px; color: var(--ink-2);
  background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 7px 17px; transition: transform .14s, color .14s, border-color .14s, background .14s;
}
.cat-tab:hover { transform: translateY(-2px); color: var(--gold-soft); }
.cat-tab.is-active { color: #fff4e6; background: rgba(212,175,106,.12); border-color: var(--gold); }

.starters { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.starter {
  position: relative; display: block; width: 100%; text-align: left; cursor: pointer; font-family: inherit; color: var(--ink);
  padding: 20px 18px 18px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.starter::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad-wine); opacity: .8; }
.starter:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.starter-tag {
  display: inline-block; margin-bottom: 12px; padding: 4px 13px; font-size: 11.5px; font-weight: 700; letter-spacing: .5px; color: var(--gold-soft);
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: rgba(212,175,106,.08);
}
.starter strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.55; color: var(--ink); font-family: var(--font-title); letter-spacing: .3px; }

/* ------------------------------ 浪子擅长 ------------------------------ */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feat {
  display: flex; align-items: flex-start; gap: 14px; padding: 20px 18px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
}
.feat-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; font-size: 22px;
  background: rgba(139,30,45,.28); border: 1px solid var(--line-strong); border-radius: 13px; }
.feat-body strong { display: block; font-size: 16px; color: var(--gold-soft); margin-bottom: 4px; font-family: var(--font-title); letter-spacing: .5px; }
.feat-body p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; }

/* ------------------------------ FAQ ------------------------------ */
.faq-item { max-width: 720px; margin: 0 auto 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px;
  cursor: pointer; appearance: none; border: none; background: transparent; font-family: var(--font-title); font-weight: 700; font-size: 15px; color: var(--ink); text-align: left; letter-spacing: .4px;
}
.faq-arrow { flex: none; display: grid; place-items: center; width: 26px; height: 26px; font-weight: 700; color: var(--gold-soft); background: rgba(212,175,106,.10); border: 1px solid var(--line-strong); border-radius: 8px; transition: transform .22s; }
.faq-item.is-open .faq-arrow { transform: rotate(135deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-item.is-open .faq-a { max-height: 340px; }
.faq-a p { margin: 0; padding: 0 18px 16px; font-size: 13.5px; color: var(--ink-2); }

/* ------------------------------ 对话视图 ------------------------------ */
.chatview { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 32px); }
body.mode-chat .chatview { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.chatview-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 0 12px; border-bottom: 1px solid var(--line); }
.chatview-back, .chatview-clear {
  appearance: none; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 13px; color: var(--ink);
  background: rgba(255,255,255,.03); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 7px 15px; transition: transform .14s, border-color .14s, color .14s;
}
.chatview-back:hover, .chatview-clear:hover { transform: translateY(-1px); border-color: var(--gold); color: var(--gold-soft); }
.chatview-state { font-size: 13px; color: var(--ink-2); }
.chatview-state b { color: var(--gold-soft); }
.chat-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 2px; display: flex; flex-direction: column; gap: 18px; }

/* 气泡 */
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg-user { flex-direction: row-reverse; }
.msg-avatar { flex: none; display: grid; place-items: center; width: 42px; height: 42px; font-size: 20px;
  background: var(--grad-wine); border: 1px solid var(--line-strong); border-radius: 50%; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.msg-user .msg-avatar { background: rgba(255,255,255,.05); }
.msg-body { max-width: min(80%, 580px); }
.msg-user .msg-body { text-align: right; }
.msg-name { font-family: var(--font-title); font-size: 12px; color: var(--gold); margin: 2px 8px 5px; letter-spacing: .8px; }
.msg-text { display: inline-block; text-align: left; padding: 13px 16px; border-radius: 4px 16px 16px 16px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink); }
.msg-user .msg-text { border-radius: 16px 4px 16px 16px; background: linear-gradient(135deg, rgba(139,30,45,.5), rgba(106,21,34,.42)); border-color: var(--line-strong); }
.msg-text p { margin: 0 0 8px; } .msg-text p:last-child { margin-bottom: 0; }
.msg-text ul { margin: 6px 0; padding-left: 20px; } .msg-text li { margin: 3px 0; }
.msg-text strong { color: var(--gold-soft); }
.msg-note { color: var(--ink-3); font-size: 12.5px; }
.msg-error { color: #ff9aa9; }
.typing { display: inline-flex; gap: 5px; padding: 3px 0; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: typing 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%,60%,100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }
body.mode-chat .composer-slot#slotChat { flex: none; padding: 8px 0 16px; }

/* ------------------------------ 页脚 ------------------------------ */
.site-footer {
  flex: none; position: relative; z-index: 1; margin-top: auto;
  padding: 30px clamp(16px, 4vw, 44px) 34px; text-align: center;
  background: rgba(20, 5, 8, .72); border-top: 1px solid var(--line);
}
.footer-tagline { margin: 0 0 8px; font-weight: 600; color: var(--ink-2); font-size: 13.5px; font-family: var(--font-title); letter-spacing: .5px; }
.footer-company { margin: 0 0 10px; color: var(--gold-soft); font-size: 13.5px; }
.footer-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-bottom: 10px; font-size: 12.5px; color: var(--ink-2); }
.footer-contact a { color: var(--ink-2); text-decoration: none; } .footer-contact a:hover { color: var(--gold-soft); }
.footer-beian { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 12px; }
.footer-beian a { color: var(--ink-3); text-decoration: none; } .footer-beian a:hover { color: var(--gold-soft); text-decoration: underline; }

/* ------------------------------ Toast ------------------------------ */
.toast-wrap { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 11px 20px; font-size: 13.5px; font-weight: 600; color: #fff4e6; background: var(--grad-wine); border: 1px solid var(--gold); border-radius: var(--r-pill); box-shadow: var(--shadow); animation: toastIn .3s ease; }
.toast.out { animation: toastOut .5s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(12px); } }

/* ------------------------------ 关于页顶栏（about.html 复用） ------------------------------ */
.site-header {
  position: relative; z-index: 4; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px clamp(16px, 4vw, 44px); border-bottom: 1px solid var(--line); background: rgba(20,5,8,.55);
}

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 560px) {
  .starters { grid-template-columns: 1fr; }
  .brand-text em { display: none; }
  .msg-body { max-width: 86%; }
  .velvetbg .rose-2 { display: none; }
}

/* ------------------------------ 无障碍：减少动效 ------------------------------ */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
