﻿/* ============================================================
   ♾️ 无限AI · 双主题系统
   Day  = 白天版（干净、暖白、樱色）
   Night= 夜间版（深色樱 + 微恐层）
   组件同名、同位置，只换设计语言，不做结构差异
   ============================================================ */

/* ---------------- 白天版 tokens ---------------- */
[data-theme="light"] {
  --bg: #fdfcfd;
  --bg-soft: #f8f5f8;
  --surface: #ffffff;
  --surface-2: #f6f2f6;
  --line: #ece6ec;
  --line-strong: #dcd3dd;
  --text: #1a141c;
  --muted: #5f5765;
  --muted-2: #7b7183;
  --sakura: #e2366f;
  --sakura-soft: #c22a5d;
  --violet: #7c5cf0;
  --success: #128a4d;
}

/* ---------------- 白天：背景与容器 ---------------- */
[data-theme="light"] body { background: var(--bg); color: var(--text); }
[data-theme="light"] .glow {
  opacity: .75;
  background:
    radial-gradient(760px 380px at 16% -12%, rgba(226, 54, 111, .10), transparent 62%),
    radial-gradient(640px 360px at 92% -6%, rgba(124, 92, 240, .07), transparent 64%);
}
[data-theme="light"] .grid-bg {
  opacity: .6;
  background-image:
    linear-gradient(rgba(26, 20, 28, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 20, 28, .045) 1px, transparent 1px);
}
[data-theme="light"] #petals { opacity: .3; }

[data-theme="light"] .site-header {
  background: rgba(253, 252, 253, .84);
  border-bottom-color: var(--line);
}
[data-theme="light"] .nav a:hover { background: var(--surface-2); color: var(--text); }

[data-theme="light"] .model-card,
[data-theme="light"] .plan,
[data-theme="light"] .feature,
[data-theme="light"] details.item,
[data-theme="light"] .cta-band,
[data-theme="light"] .hero-visual .badge-float,
[data-theme="light"] .table-wrap {
  box-shadow: 0 1px 2px rgba(26, 20, 28, .04), 0 8px 24px rgba(26, 20, 28, .04);
}
[data-theme="light"] .model-card { background: var(--surface); border-color: var(--line); }
[data-theme="light"] .model-card:hover { border-color: var(--line-strong); background: var(--surface); }
[data-theme="light"] .feature { background: var(--surface); }
[data-theme="light"] .feature:hover { border-color: var(--line-strong); }
[data-theme="light"] .plan { background: var(--surface); }
[data-theme="light"] .plan:hover { border-color: var(--line-strong); }
[data-theme="light"] .plan.featured {
  background: linear-gradient(180deg, rgba(226, 54, 111, .055), rgba(255, 255, 255, .6));
  border-color: rgba(226, 54, 111, .4);
  box-shadow: 0 10px 30px rgba(226, 54, 111, .10);
}
[data-theme="light"] details.item { background: var(--surface); border-color: var(--line); }
[data-theme="light"] details.item:hover { border-color: var(--line-strong); }
[data-theme="light"] .cta-band {
  background:
    radial-gradient(560px 240px at 12% 0%, rgba(226, 54, 111, .08), transparent 62%),
    radial-gradient(560px 240px at 88% 100%, rgba(124, 92, 240, .07), transparent 62%),
    var(--surface);
  border-color: var(--line-strong);
}
[data-theme="light"] .badge,
[data-theme="light"] .kicker { background: var(--surface); border-color: var(--line-strong); color: var(--muted); }
[data-theme="light"] .chip { background: transparent; border-color: var(--line); color: var(--muted); }
[data-theme="light"] .chip:hover { border-color: var(--line-strong); color: var(--text); }
[data-theme="light"] .chip.active { background: rgba(226, 54, 111, .08); color: var(--sakura); border-color: rgba(226, 54, 111, .35); }

/* 白天：表格 */
[data-theme="light"] .table-wrap { background: var(--surface); }
[data-theme="light"] table.price-table thead th { background: var(--bg-soft); color: var(--muted-2); }
[data-theme="light"] table.price-table tbody tr:hover td { background: var(--bg-soft); }
[data-theme="light"] table.price-table .m-num { color: var(--muted); }

/* 白天：代码 */
[data-theme="light"] .code-box { background: #f7f4f8; border-color: var(--line); }
[data-theme="light"] .code-tabs { border-bottom-color: var(--line); }
[data-theme="light"] .code-tabs button { color: var(--muted-2); }
[data-theme="light"] .code-tabs button.active { background: var(--surface); color: var(--text); }
[data-theme="light"] .code-body pre { color: #2a2230; }
[data-theme="light"] .copy-btn { background: var(--surface); border-color: var(--line-strong); color: var(--muted); }
[data-theme="light"] .inline-code { background: var(--surface-2); color: var(--sakura); }

/* 白天：人物与装饰 */
[data-theme="light"] .bg-char {
  opacity: .16;
  mix-blend-mode: multiply;
  filter: saturate(1.06) contrast(1.02);
}
[data-theme="light"] .hero-visual .branch { opacity: .5; }
[data-theme="light"] .hero-visual .torii { opacity: .55; }
[data-theme="light"] .hero-visual .badge-float { background: var(--surface); color: var(--muted); }

/* 白天：其它 */
[data-theme="light"] .trust-list span { background: var(--surface); border-color: var(--line); color: var(--muted); }
[data-theme="light"] .footer-cols { border-bottom-color: var(--line); }
[data-theme="light"] .footer-cols a { color: var(--muted); }
[data-theme="light"] .site-footer { border-top-color: var(--line); }
[data-theme="light"] .theme-toggle { border-color: var(--line-strong); color: var(--muted); }
[data-theme="light"] .btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
[data-theme="light"] .btn-ghost:hover { background: var(--surface-2); border-color: #c9bccb; }
[data-theme="light"] .btn-primary { background: var(--sakura); color: #fff; }
[data-theme="light"] .btn-primary:hover { background: #cc2d63; }

/* ============================================================
   夜间版：深色樱 + 微恐层
   ============================================================ */

/* 暗角：缓慢呼吸 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .6s ease;
}
[data-theme="dark"] body::after {
  background:
    radial-gradient(circle at 50% 38%, transparent 42%, rgba(0, 0, 0, .55) 100%),
    radial-gradient(circle at 78% 18%, rgba(255, 92, 147, .05), transparent 32%);
  animation: veilBreathe 14s ease-in-out infinite;
}
@keyframes veilBreathe {
  0%, 100% { opacity: .78; }
  46% { opacity: .92; }
  52% { opacity: .82; }
  58% { opacity: .95; }
}

/* 人物：偶尔“掉一帧” */
[data-theme="dark"] .bg-char img { animation: charFlicker 17s steps(1) infinite; }
@keyframes charFlicker {
  0%, 92.6%, 100% { filter: saturate(.9) brightness(1); }
  93% { filter: saturate(.5) brightness(.72) contrast(1.12); transform: translateX(-1.5px); }
  93.6% { filter: saturate(.9) brightness(.9); transform: translateX(1px); }
  94.2% { filter: saturate(.9) brightness(1); transform: none; }
}

/* 人物上方，一双很淡的眼睛 */
[data-theme="dark"] .hero-visual::before {
  content: "";
  position: absolute;
  top: 16%;
  left: 50%;
  width: 190px;
  height: 70px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 30% 50%, rgba(255, 60, 90, .55) 0 3px, transparent 5px),
    radial-gradient(circle at 70% 50%, rgba(255, 60, 90, .55) 0 3px, transparent 5px),
    radial-gradient(circle at 30% 50%, rgba(255, 60, 90, .16) 0 14px, transparent 22px),
    radial-gradient(circle at 70% 50%, rgba(255, 60, 90, .16) 0 14px, transparent 22px);
  filter: blur(.4px);
  opacity: 0;
  animation: eyesBlink 19s ease-in-out infinite;
  pointer-events: none;
  z-index: 3;
}
@keyframes eyesBlink {
  0%, 84%, 100% { opacity: 0; }
  85% { opacity: .9; }
  86.4% { opacity: .18; }
  87.2% { opacity: .85; }
  88.6% { opacity: 0; }
  93% { opacity: 0; }
  93.4% { opacity: .5; }
  94% { opacity: 0; }
}

/* 标题：偶发字符错位（由 JS 替换单个字符） */
[data-theme="dark"] .hero h1 .glitch-char {
  color: #b3123f;
  text-shadow: 1px 0 rgba(53, 230, 255, .5), -1px 0 rgba(255, 92, 147, .6);
  animation: glyphJitter .18s steps(2) 2;
}
@keyframes glyphJitter {
  0% { transform: translate(0, 0) skewX(0); }
  50% { transform: translate(-1.5px, 1px) skewX(-6deg); }
  100% { transform: translate(1px, -1px) skewX(4deg); }
}

/* 卡片：夜间 hover 边缘渗红 */
[data-theme="dark"] .model-card:hover,
[data-theme="dark"] .feature:hover,
[data-theme="dark"] .plan:hover {
  border-color: rgba(179, 18, 63, .55);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45), 0 0 0 1px rgba(179, 18, 63, .18);
}
[data-theme="dark"] .plan.featured {
  border-color: rgba(255, 92, 147, .5);
  box-shadow: 0 0 0 1px rgba(179, 18, 63, .16), 0 22px 50px rgba(0, 0, 0, .4);
}
[data-theme="dark"] .btn-primary:hover {
  background: #f0437c;
  box-shadow: 0 0 0 1px rgba(255, 92, 147, .5), 0 10px 28px rgba(179, 18, 63, .35);
}

/* 页脚：夜间才出现的一行小字 */
[data-theme="dark"] .site-footer::before {
  content: "// 有些东西你记不清，不代表它没发生过";
  display: block;
  max-width: var(--max);
  margin: 0 auto 18px;
  padding: 0 24px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: rgba(255, 92, 147, .32);
}

/* 减少动效：关掉恐怖层 */
@media (prefers-reduced-motion: reduce) {
  [data-theme="dark"] body::after,
  [data-theme="dark"] .bg-char img,
  [data-theme="dark"] .hero-visual::before { animation: none !important; }
  [data-theme="dark"] body::after { opacity: .8; }
  [data-theme="dark"] .hero-visual::before { display: none; }
}

/* ============================================================
   共用组件（两版同位置同结构）
   ============================================================ */

.announce {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 9px 16px; font-size: 12.5px; color: var(--muted);
  border-bottom: 1px solid var(--line); background: var(--bg-soft);
}
.announce b { color: var(--sakura); font-weight: 600; }
.announce a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 48px; align-items: center;
}
.hero-visual { position: relative; min-height: 340px; display: grid; place-items: center; }
.hero-visual .branch { position: absolute; inset: auto -40px 0 auto; width: 420px; opacity: .55; transform: rotate(-6deg); }
.hero-visual .torii { width: 132px; opacity: .9; }
.hero-visual .badge-float {
  position: absolute; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 12px; color: var(--muted);
}
.hero-visual .badge-float.a { top: 26px; left: 0; }
.hero-visual .badge-float.b { bottom: 34px; right: 18px; }
.hero-visual .badge-float i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); display: inline-block; }

.trust { margin-top: 56px; }
.trust-label { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px; }
.trust-list { display: flex; flex-wrap: wrap; gap: 8px; }
.trust-list span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; color: var(--muted); background: var(--surface); }

.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.table-scroll { overflow-x: auto; }
table.price-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
table.price-table thead th {
  text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-2); font-weight: 500;
  padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft); white-space: nowrap;
}
table.price-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--text); white-space: nowrap; }
table.price-table tbody tr:last-child td { border-bottom: 0; }
table.price-table tbody tr:hover td { background: var(--surface-2); }
table.price-table .m-name { font-weight: 600; }
table.price-table .m-vendor { color: var(--muted); font-size: 12.5px; }
table.price-table .m-num { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.footer-cols {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px;
  padding-bottom: 36px; border-bottom: 1px solid var(--line); margin-bottom: 24px;
}
.footer-cols h4 { font-size: 12px; font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 12px; font-weight: 500; }
.footer-cols a { display: block; padding: 5px 0; color: var(--muted); font-size: 13px; }
.footer-cols a:hover { color: var(--text); }
.footer-brand p { color: var(--muted-2); font-size: 12.5px; margin-top: 10px; max-width: 260px; }

.theme-toggle {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: transparent; color: var(--muted); font-size: 14px;
}
.theme-toggle:hover { color: var(--text); background: var(--surface-2); }

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 11.5px; color: var(--muted); margin-bottom: 16px;
}
.kicker i { width: 5px; height: 5px; border-radius: 50%; background: var(--sakura); display: inline-block; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-visual { min-height: 220px; order: -1; }
  .hero-visual .branch { width: 300px; inset: auto -20px -10px auto; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr; gap: 22px; }
  .hero-visual .badge-float.a { left: 4px; }
}

/* 夜间：花瓣整体偏血色 */
[data-theme="dark"] #petals {
  filter: hue-rotate(-16deg) saturate(1.3) brightness(.92);
}