/* ==========================================================================
   浪漫情话 · LoveVerse —— 公共样式
   风格：午夜紫霓虹暗黑（近黑底 + 紫罗兰/樱花粉霓虹辉光 + 毛玻璃）
   布局：情话卡片瀑布流画廊（顶部输入条 + 下方发光卡片瀑布流）。
   与「情场高手」暗紫玫瑰霞光、「撩妹/相亲」亮色系刻意彻底区分。
   ========================================================================== */

/* ------------------------------ 设计变量 ------------------------------ */
:root {
  /* 暗底 */
  --bg-0: #0d0a14;
  --bg-1: #141021;
  --panel: rgba(28, 21, 48, .62);   /* 毛玻璃面板 */
  --panel-solid: #1a1428;

  /* 霓虹主色 */
  --violet: #a855f7;
  --violet-2: #c084fc;
  --pink: #ec4899;
  --grad: linear-gradient(120deg, #c084fc 0%, #a855f7 45%, #ec4899 100%);
  --grad-dim: linear-gradient(120deg, rgba(168,85,247,.22), rgba(236,72,153,.18));

  /* 文字（暗底浅字） */
  --ink: #ece7f5;
  --ink-2: #b9adcf;
  --ink-3: #8579a0;

  /* 描边 / 分隔 */
  --line: rgba(168, 130, 240, .16);
  --line-strong: rgba(192, 132, 252, .38);

  /* 辉光 */
  --glow-violet: 0 0 0 1px rgba(168,85,247,.28), 0 14px 40px rgba(124, 58, 237, .28);
  --glow-pink: 0 10px 34px rgba(236, 72, 153, .30);

  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 11px;
  --r-pill: 999px;

  --shadow: 0 18px 44px rgba(0, 0, 0, .5);

  --maxw: 1080px;

  --font: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
          system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-title: 'Songti SC', 'Source Han Serif SC', 'Noto Serif SC', var(--font);
}

/* ------------------------------ 基础 ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }

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-0);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.mode-chat { height: 100vh; height: 100dvh; overflow: hidden; }
body.mode-chat .site-footer { display: none; }

a { color: var(--violet-2); }
h1, h2, h3 { font-family: var(--font-title); font-weight: 700; letter-spacing: .5px; }
::selection { background: rgba(192,132,252,.35); color: #fff; }

/* ------------------------------ 夜色背景 ------------------------------ */
.nightbg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(1100px 640px at 78% -8%, rgba(168,85,247,.28), transparent 60%),
    radial-gradient(900px 560px at 8% 108%, rgba(236,72,153,.22), transparent 60%),
    linear-gradient(180deg, #0d0a14 0%, #100b1c 60%, #0b0812 100%);
}
.nightbg .orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.nightbg .orb-1 { width: 360px; height: 360px; right: 6%; top: 4%; background: #7c3aed; }
.nightbg .orb-2 { width: 320px; height: 320px; left: 2%; bottom: 6%; background: #db2777; opacity: .4; }
/* 星点 */
.nightbg .stars { position: absolute; inset: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 20% 30%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.2px 1.2px at 65% 18%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.6px 1.6px at 82% 44%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.2px 1.2px at 38% 62%, rgba(255,255,255,.45), transparent),
    radial-gradient(1.3px 1.3px at 52% 82%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.1px 1.1px at 90% 76%, rgba(255,255,255,.4), transparent);
  opacity: .7;
}

/* ------------------------------ 顶栏 ------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 5; flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px clamp(16px, 4vw, 36px);
  background: rgba(13, 10, 20, .66);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px; font-size: 21px;
  border-radius: 13px; background: var(--grad); color: #fff;
  box-shadow: 0 0 22px rgba(192,132,252,.5);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-title); font-size: 19px; color: #fff; letter-spacing: 1px; }
.brand-text em { font-style: normal; font-size: 11px; letter-spacing: 4px; color: var(--violet-2); 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,.04); color: var(--violet-2);
  font-family: inherit; font-weight: 600; font-size: 13.5px; padding: 8px 16px; border-radius: var(--r-pill);
  text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.nav-btn:hover { transform: translateY(-1px); background: rgba(168,85,247,.16); color: #fff; box-shadow: 0 0 18px rgba(168,85,247,.35); }

/* ------------------------------ 舞台 ------------------------------ */
.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: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 32px) 52px; }

/* ------------------------------ HERO ------------------------------ */
.hero { text-align: center; padding: clamp(8px, 3vw, 26px) 0 6px; }
.empty-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 5px 15px;
  font-size: 12.5px; font-weight: 600; color: var(--violet-2);
  background: rgba(168,85,247,.12); border: 1px solid var(--line-strong); border-radius: var(--r-pill);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 10px var(--pink); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(236,72,153,.6); } 100% { box-shadow: 0 0 0 11px rgba(236,72,153,0); } }
.empty-title {
  margin: 0 auto 14px; max-width: 18em;
  font-size: clamp(28px, 5.6vw, 48px); line-height: 1.2; color: #fff;
  text-shadow: 0 0 30px rgba(168,85,247,.35);
}
.empty-title b {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.empty-sub { margin: 0 auto; max-width: 40em; color: var(--ink-2); font-size: 15.5px; }

/* ------------------------------ 关系阶段（发光药丸） ------------------------------ */
.stage-bar { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.stage-bar-hint { font-size: 12.5px; color: var(--ink-3); }
.stage-bar-hint b { color: var(--violet-2); }
.state-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.state-chip {
  appearance: none; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 13.5px; color: var(--ink-2);
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 16px;
  transition: color .16s, background .16s, border-color .16s, box-shadow .16s, transform .16s;
}
.state-chip:hover { color: #fff; border-color: var(--line-strong); transform: translateY(-1px); }
.state-chip.is-active { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 0 20px rgba(192,132,252,.5); }

/* ------------------------------ 输入条（发光毛玻璃） ------------------------------ */
.composer-slot { margin-top: 22px; }
.composer { width: 100%; max-width: 760px; margin: 0 auto; }
.composer-bar {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 12px 12px 12px 16px;
  background: var(--panel);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--glow-violet);
}
.composer-ava {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; font-size: 20px;
  background: var(--grad-dim); border: 1px solid var(--line-strong); border-radius: 11px; align-self: center;
}
.composer-input {
  flex: 1 1 auto; min-width: 0; resize: none; border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 15px; line-height: 1.6; color: var(--ink); max-height: 160px; padding: 9px 2px;
}
.composer-input::placeholder { color: var(--ink-3); }
.composer-stage-mini { align-self: center; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.composer-stage-mini b { color: var(--violet-2); }
.stop-btn {
  align-self: center; appearance: none; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 13px; color: var(--violet-2);
  background: rgba(255,255,255,.05); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 8px 13px; transition: background .15s;
}
.stop-btn:hover { background: rgba(168,85,247,.16); }
.send-btn {
  flex: none; align-self: center; appearance: none; cursor: pointer; display: grid; place-items: center;
  width: 44px; height: 44px; font-size: 18px; color: #fff; background: var(--grad); border: none; border-radius: 50%;
  box-shadow: 0 0 22px rgba(192,132,252,.55); transition: transform .15s, filter .15s;
}
.send-btn:hover { transform: translateY(-2px) scale(1.04); filter: brightness(1.08); }
.send-btn:active { transform: translateY(0); }
.send-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.composer-tip { margin: 10px 4px 0; font-size: 12px; color: var(--ink-3); text-align: center; }

/* ------------------------------ 情话卡片瀑布流画廊 ------------------------------ */
.gallery { margin-top: 46px; }
.gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.sec-title { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: clamp(19px, 3vw, 24px); color: #fff; }
.sec-title::before { content: ""; width: 18px; height: 18px; border-radius: 6px; background: var(--grad); box-shadow: 0 0 14px rgba(192,132,252,.6); }
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-tab {
  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); border-radius: var(--r-pill); padding: 6px 14px; transition: color .16s, background .16s, border-color .16s;
}
.cat-tab:hover { color: #fff; border-color: var(--line-strong); }
.cat-tab.is-active { color: #fff; background: var(--grad-dim); border-color: var(--line-strong); }

/* 瀑布流：CSS 多列 */
.starters { columns: 3 250px; column-gap: 16px; }
.starter {
  display: block; width: 100%; text-align: left; break-inside: avoid; margin-bottom: 16px;
  padding: 18px 18px 16px; cursor: pointer; font-family: inherit; color: var(--ink); position: relative;
  background: var(--panel);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: var(--r-md);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.starter::after { content: "❞"; position: absolute; right: 14px; bottom: 8px; font-size: 26px; color: rgba(192,132,252,.22); line-height: 1; }
.starter:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--glow-violet); }
.starter-tag {
  display: inline-block; margin-bottom: 10px; padding: 3px 11px; font-size: 11.5px; font-weight: 700; color: #fff;
  background: var(--grad); border-radius: var(--r-pill); box-shadow: 0 0 14px rgba(192,132,252,.4);
}
.starter strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.55; color: #f3eefb; }
.starter-eg { display: block; margin-top: 10px; font-family: var(--font-title); font-style: normal; font-size: 13px; color: var(--ink-3); line-height: 1.6; }

/* ------------------------------ 亮点（诗人擅长，发光小卡一行） ------------------------------ */
.feats { margin-top: 48px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 16px; }
.feat {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); transition: transform .16s, box-shadow .16s, border-color .16s;
}
.feat:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--glow-violet); }
.feat-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; font-size: 22px; background: var(--grad-dim); border: 1px solid var(--line-strong); border-radius: 11px; }
.feat-body strong { display: block; font-size: 15px; color: #fff; margin-bottom: 3px; }
.feat-body p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }

/* ------------------------------ FAQ ------------------------------ */
.faq { margin-top: 48px; }
.faq .sec-title { margin-bottom: 16px; }
.faq-item { margin-bottom: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: border-color .18s, box-shadow .18s; }
.faq-item.is-open { border-color: var(--line-strong); box-shadow: var(--glow-violet); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px;
  cursor: pointer; appearance: none; border: none; background: transparent; font-family: var(--font-title); font-weight: 700; font-size: 14.5px; color: #f0eafb; text-align: left;
}
.faq-arrow { flex: none; display: grid; place-items: center; width: 24px; height: 24px; font-weight: 900; color: var(--violet-2); background: rgba(168,85,247,.14); border-radius: 7px; 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: 320px; }
.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(14px, 4vw, 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: 16px 2px 10px; }
.chatview-back, .chatview-clear {
  appearance: none; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 13px; color: var(--violet-2);
  background: rgba(255,255,255,.04); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 7px 14px; transition: transform .15s, box-shadow .15s, background .15s;
}
.chatview-back:hover, .chatview-clear:hover { transform: translateY(-1px); background: rgba(168,85,247,.16); }
.chatview-state { font-size: 13px; color: var(--ink-3); }
.chatview-state b { color: var(--violet-2); }
.chat-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 2px 18px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 11px; align-items: flex-start; }
.msg-user { flex-direction: row-reverse; }
.msg-avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; font-size: 20px; background: var(--grad-dim); border: 1px solid var(--line-strong); border-radius: 12px; }
.msg-body { max-width: min(80%, 620px); }
.msg-user .msg-body { text-align: right; }
.msg-name { font-size: 11.5px; color: var(--ink-3); margin: 2px 6px 4px; }
.msg-text { display: inline-block; text-align: left; padding: 12px 15px; border-radius: 4px 16px 16px 16px; background: var(--panel-solid); border: 1px solid var(--line); color: var(--ink); }
.msg-user .msg-text { border-radius: 16px 4px 16px 16px; background: linear-gradient(120deg, rgba(168,85,247,.28), rgba(236,72,153,.22)); border-color: var(--line-strong); color: #fff; }
.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(--violet-2); }
.msg-note { color: var(--ink-3); font-size: 12.5px; } .msg-error { color: #fb7185; }
.typing { display: inline-flex; gap: 5px; padding: 2px 0; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 8px var(--violet); 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: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
body.mode-chat .composer-slot#slotChat { flex: none; padding: 8px 0 14px; background: linear-gradient(0deg, var(--bg-0), transparent); }

/* ------------------------------ 页脚 ------------------------------ */
.site-footer {
  flex: none; position: relative; z-index: 1; padding: 26px clamp(16px, 4vw, 36px) 32px; text-align: center;
  background: rgba(9, 7, 15, .7); border-top: 1px solid var(--line);
}
.footer-tagline { margin: 0 0 6px; font-weight: 600; color: var(--ink); font-size: 13.5px; }
.footer-company { margin: 0 0 10px; color: var(--ink-2); font-size: 13px; }
.footer-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; 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(--violet-2); }
.footer-beian { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 12px; }
.footer-beian a { color: var(--ink-3); text-decoration: none; } .footer-beian a:hover { color: var(--violet-2); text-decoration: underline; }

/* ------------------------------ Toast ------------------------------ */
.toast-wrap { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 18px; font-size: 13.5px; font-weight: 600; color: #fff; background: var(--grad); border-radius: var(--r-pill); box-shadow: 0 0 26px rgba(192,132,252,.55); 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: 3; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px clamp(16px, 4vw, 36px); background: rgba(13, 10, 20, .66);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 720px) { .starters { columns: 2 180px; } }
@media (max-width: 520px) {
  .starters { columns: 1; }
  .brand-text em { display: none; }
  .msg-body { max-width: 86%; }
  .composer-stage-mini { display: none; }
}

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