/* ============================================================
   SYHLA · 日本专用二次元 UI  (6.0 PRO)
   作用域：[data-theme="anime"] —— 全面重写视觉，复用全部类名
   风格：粉蓝马卡龙 + 玻璃拟态 + 圆体 + 樱花/气泡
   素材策略：仅用现有品牌元素 + CSS 手绘装饰，不引用任何生成图
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;500;700;800&family=Zen+Maru+Gothic:wght@400;500;700&family=Hachi+Maru+Pop&display=swap');

[data-theme="anime"] {
  /* —— 颜色：梦幻深紫底 + 粉/青/薰衣草霓虹 —— */
  --ink:        #140f20;
  --ink-1:      rgba(46,32,72,0.62);
  --ink-2:      rgba(64,46,98,0.5);
  --line:       rgba(255,255,255,0.14);
  --line-2:     rgba(255,255,255,0.26);
  --bone:       #fdeef8;
  --bone-dim:   #e3d2f2;
  --bone-mute:  #a78fc4;
  --bone-quiet: #6e5c8c;
  --gold:       #ff8fc7;
  --gold-deep:  #ff6fb0;
  --gold-soft:  rgba(255,143,199,0.18);
  --slate:      #8fe3ff;

  /* —— 圆体 + 圆润字形 —— */
  --f-display: "M PLUS Rounded 1c", "Zen Maru Gothic", "PingFang SC", system-ui, -apple-system, sans-serif;
  --f-body:    "Zen Maru Gothic", "M PLUS Rounded 1c", "PingFang SC", system-ui, "Segoe UI", sans-serif;
  --f-mono:    "JetBrains Mono", "SF Mono", Consolas, monospace;

  /* —— 更大的圆角，软化科技感 —— */
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-pill: 999px;
}

/* ===== 全局圆角软化 ===== */
[data-theme="anime"] .card,
[data-theme="anime"] .game-card,
[data-theme="anime"] .game-cover,
[data-theme="anime"] .reserve-banner,
[data-theme="anime"] .info-row,
[data-theme="anime"] .timeline-content,
[data-theme="anime"] .faq-item,
[data-theme="anime"] .dash-card,
[data-theme="anime"] .featured-game,
[data-theme="anime"] .process-step,
[data-theme="anime"] .device-card,
[data-theme="anime"] .feedback-item,
[data-theme="anime"] .person,
[data-theme="anime"] .stat,
[data-theme="anime"] .news-item,
[data-theme="anime"] .changelog-card,
[data-theme="anime"] .changelog-version,
[data-theme="anime"] .tag,
[data-theme="anime"] .stage,
[data-theme="anime"] .version-badge {
  border-radius: var(--r-md);
}
[data-theme="anime"] .btn,
[data-theme="anime"] .form-row input,
[data-theme="anime"] .form-row textarea,
[data-theme="anime"] .form-row select,
[data-theme="anime"] .brand-mark,
[data-theme="anime"] .logo {
  border-radius: var(--r-pill);
}
[data-theme="anime"] .hero,
[data-theme="anime"] .site-foot { border-radius: 0; }

/* ===== 背景：梦幻渐变 + 漂浮气泡（仅 anime） ===== */
[data-theme="anime"] body {
  background:
    radial-gradient(1200px 800px at 12% 8%,  rgba(255,143,199,0.16), transparent 60%),
    radial-gradient(1000px 760px at 88% 18%, rgba(143,227,255,0.14), transparent 60%),
    radial-gradient(900px 900px at 50% 100%, rgba(184,164,255,0.16), transparent 60%),
    linear-gradient(160deg, #1a1230 0%, #140f20 55%, #1c1430 100%);
  color: var(--bone);
}
[data-theme="anime"] body::before {
  background:
    radial-gradient(ellipse 520px 380px at 18% 22%, rgba(255,143,199,.10), transparent 70%),
    radial-gradient(ellipse 460px 460px at 82% 78%, rgba(143,227,255,.08), transparent 70%);
  animation: bgDrift 26s ease-in-out infinite alternate;
}
/* 漂浮气泡层 */
[data-theme="anime"] body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.10) 0 6px, transparent 7px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.07) 0 10px, transparent 11px),
    radial-gradient(circle at 45% 80%, rgba(255,255,255,.06) 0 5px, transparent 6px),
    radial-gradient(circle at 85% 25%, rgba(255,255,255,.08) 0 8px, transparent 9px),
    radial-gradient(circle at 33% 55%, rgba(255,255,255,.05) 0 4px, transparent 5px);
  background-size: 100% 100%;
  animation: bubbleFloat 18s ease-in-out infinite;
  opacity: .9;
}
@keyframes bubbleFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-22px); }
}

/* ===== 导航：玻璃 + 粉色光晕 ===== */
[data-theme="anime"] .nav {
  background: rgba(30,20,50,0.55);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid rgba(255,143,199,0.22);
}
[data-theme="anime"] .nav.scrolled {
  background: rgba(26,18,42,0.82);
  box-shadow: 0 8px 36px -12px rgba(255,143,199,0.35);
}
[data-theme="anime"] .brand-mark,
[data-theme="anime"] .logo {
  background: linear-gradient(135deg, #ff8fc7, #ff6fb0);
  color: #fff;
  box-shadow: 0 4px 16px -4px rgba(255,143,199,.6);
}
[data-theme="anime"] .nav-links a.active { color: var(--gold); }
[data-theme="anime"] .nav-links a.active::after { background: var(--gold); }
[data-theme="anime"] .nav-links a:not(.nav-cta):hover { color: #fff; }
[data-theme="anime"] a:hover { color: var(--gold); }

/* ===== 按钮：粉青渐变药丸 ===== */
[data-theme="anime"] .btn--primary {
  background: linear-gradient(120deg, #ff8fc7, #ff6fb0 60%, #ffa6d4);
  color: #2a0f22;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 10px 30px -10px rgba(255,143,199,.6);
}
[data-theme="anime"] .btn--primary:hover {
  background: linear-gradient(120deg, #ffa6d4, #ff8fc7 60%, #ff6fb0);
  color: #2a0f22;
}
[data-theme="anime"] .btn--ghost {
  background: rgba(255,255,255,0.05);
  color: var(--bone);
  border-color: rgba(255,143,199,0.45);
}
[data-theme="anime"] .btn--ghost:hover {
  border-color: var(--gold);
  background: rgba(255,143,199,0.12);
  color: #fff;
}
[data-theme="anime"] .btn--link { color: var(--gold); }
[data-theme="anime"] .btn--link:hover { color: #ffd0ea; }
[data-theme="anime"] .btn-primary:hover,
[data-theme="anime"] .btn-gold:hover { box-shadow: 0 12px 32px -6px rgba(255,143,199,.65); }

/* ===== 渐变文字（粉→青） ===== */
[data-theme="anime"] .gradient-text {
  background: linear-gradient(110deg, #ff8fc7, #ffd1ec 30%, #8fe3ff 65%, #b8a4ff 100%);
  background-size: 250% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 6s ease infinite;
}
[data-theme="anime"] h1 em,
[data-theme="anime"] .hero h1 em,
[data-theme="anime"] .section-head h2 em { color: var(--gold); font-style: normal; }

/* ===== 卡片：玻璃拟态 + 悬浮 ===== */
[data-theme="anime"] .card {
  background: linear-gradient(160deg, rgba(60,42,96,0.55), rgba(40,28,64,0.4));
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px -18px rgba(0,0,0,.5);
}
[data-theme="anime"] .card:hover {
  border-color: rgba(255,143,199,0.6);
  box-shadow: 0 22px 60px -18px rgba(255,143,199,0.4), 0 0 0 1px rgba(255,143,199,0.1);
  transform: translateY(-8px) scale(1.012);
}
[data-theme="anime"] .card .tag,
[data-theme="anime"] .tag {
  background: rgba(255,143,199,0.16);
  color: #ffc6e6;
  border: 1px solid rgba(255,143,199,0.35);
}
[data-theme="anime"] .card .num { color: var(--bone-mute); }
[data-theme="anime"] .eyebrow { color: var(--gold); }

/* ===== Hero ===== */
[data-theme="anime"] .hero {
  border-bottom: 1px solid rgba(255,143,199,0.18);
  overflow: hidden;
}
[data-theme="anime"] .hero__art {
  opacity: 0.7;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(255,143,199,0.22) 0%, transparent 60%),
    radial-gradient(ellipse at 30% 80%, rgba(143,227,255,0.16) 0%, transparent 60%);
}
[data-theme="anime"] .badge {
  border-color: rgba(255,143,199,0.4);
  background: rgba(255,143,199,0.1);
  color: #ffd0ea;
}
[data-theme="anime"] .badge .dot { background: var(--gold); animation: dotPulse 2.2s ease-in-out infinite; }
[data-theme="anime"] h1,
[data-theme="anime"] h2,
[data-theme="anime"] h3 { color: #fff; letter-spacing: -0.01em; }

/* ===== 统计 / 数据点 ===== */
[data-theme="anime"] .stat b,
[data-theme="anime"] .stat:hover b { color: #fff; }
[data-theme="anime"] .stat span { color: var(--bone-mute); }
[data-theme="anime"] .dash-num { color: var(--gold); }

/* ===== 游戏卡 ===== */
[data-theme="anime"] .game-cover {
  background:
    linear-gradient(180deg, rgba(255,143,199,0.12) 0%, transparent 50%),
    linear-gradient(180deg, rgba(64,46,98,0.6) 0%, rgba(40,28,64,0.5) 100%);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--r-md);
}
[data-theme="anime"] .game-cover__label { color: var(--bone-mute); }
[data-theme="anime"] .featured-game {
  background: linear-gradient(160deg, rgba(60,42,96,0.5), rgba(40,28,64,0.4));
  border: 1px solid rgba(255,255,255,0.16);
}
[data-theme="anime"] .featured-game:hover { border-color: rgba(255,143,199,0.6); }
[data-theme="anime"] .featured-game h4 { color: #fff; }

/* ===== 时间线 ===== */
[data-theme="anime"] .timeline::before { background: rgba(255,143,199,0.3); }
[data-theme="anime"] .timeline-item::before { background: #140f20; border: 1px solid var(--gold); }
[data-theme="anime"] .timeline-item .yr { color: var(--gold); }
[data-theme="anime"] .timeline-dot { background: #2a1c44; border: 3px solid var(--gold); }
[data-theme="anime"] .timeline-content { background: rgba(46,32,72,0.6); border: 1px solid rgba(255,255,255,0.16); }
[data-theme="anime"] .timeline-date { color: var(--gold); }

/* ===== 阶段 ===== */
[data-theme="anime"] .stage { color: var(--bone-mute); border-color: rgba(255,255,255,0.16); }
[data-theme="anime"] .stage.on { background: rgba(255,143,199,0.16); color: #ffc6e6; border-color: rgba(255,143,199,0.5); }
[data-theme="anime"] .stage.cur { background: linear-gradient(120deg,#ff8fc7,#ff6fb0); color: #2a0f22; border-color: transparent; }

/* ===== 表单 ===== */
[data-theme="anime"] .form-row input,
[data-theme="anime"] .form-row textarea,
[data-theme="anime"] .form-row select {
  border-bottom: 1px solid rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.04);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  padding: var(--s-3) var(--s-3);
  color: #fff;
}
[data-theme="anime"] .form-row input:focus,
[data-theme="anime"] .form-row textarea:focus,
[data-theme="anime"] .form-row select:focus { border-bottom-color: var(--gold); }
[data-theme="anime"] .form-row label { color: var(--bone-mute); }
[data-theme="anime"] .feedback-group select,
[data-theme="anime"] .feedback-group textarea,
[data-theme="anime"] .feedback-group input {
  background: rgba(46,32,72,0.6); border: 1px solid rgba(255,255,255,0.18); border-radius: var(--r-sm);
}
[data-theme="anime"] .feedback-group select:focus,
[data-theme="anime"] .feedback-group textarea:focus,
[data-theme="anime"] .feedback-group input:focus { border-color: var(--gold); }

/* ===== 页脚 ===== */
[data-theme="anime"] .site-foot {
  background: linear-gradient(180deg, rgba(30,20,50,0.4), rgba(20,15,32,0.85));
  border-top: 1px solid rgba(255,143,199,0.22);
}
[data-theme="anime"] .foot-grid h6 { color: var(--gold); }
[data-theme="anime"] .foot-grid ul a:hover { color: #fff; transform: translateX(5px); }
[data-theme="anime"] .back-to-top { background: linear-gradient(135deg,#ff8fc7,#ff6fb0); color:#2a0f22; box-shadow:0 4px 20px rgba(255,143,199,.4); }

/* ===== 版本徽章 / 标签 ===== */
[data-theme="anime"] .version-badge { background: rgba(255,143,199,0.14); border-color: var(--gold); color: #ffd0ea; }
[data-theme="anime"] .version-badge .pulse { background: var(--gold); }
[data-theme="anime"] .changelog-version.current { background: linear-gradient(135deg,#ff8fc7,#ff6fb0); color:#2a0f22; border-color: transparent; }

/* ===== 预约横幅 ===== */
[data-theme="anime"] .reserve-banner {
  background: linear-gradient(160deg, rgba(60,42,96,0.55), rgba(40,28,64,0.42));
  border: 1px solid rgba(255,143,199,0.3);
}
[data-theme="anime"] .reserve-banner:hover { border-color: rgba(255,143,199,0.6); box-shadow: 0 22px 60px -18px rgba(255,143,199,0.4); }

/* ===== 语言切换器（anime 专属样式） ===== */
[data-theme="anime"] .lang-switcher {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,143,199,0.35);
  border-radius: var(--r-pill);
  padding: 3px;
}
[data-theme="anime"] .lang-switcher button {
  border-radius: var(--r-pill);
  color: var(--bone-mute);
}
[data-theme="anime"] .lang-switcher button.is-active {
  background: linear-gradient(135deg,#ff8fc7,#ff6fb0);
  color: #2a0f22;
  font-weight: 700;
}

/* ============================================================
   樱花飘落（CSS 手绘，无图片依赖）
   由 anime-ui.js 注入 .sakura-petal 元素；此处定义样式与动画
   ============================================================ */
.sakura-petal {
  position: fixed;
  top: -24px;
  width: 12px; height: 12px;
  background: radial-gradient(circle at 30% 30%, #ffd1ec 0%, #ff9ec7 60%, #ff7eb6 100%);
  border-radius: 12px 1px 12px 1px;
  opacity: 0.85;
  pointer-events: none;
  z-index: 50;
  will-change: transform;
  animation: petalFall linear infinite;
  box-shadow: 0 0 8px rgba(255,158,199,0.5);
}
@keyframes petalFall {
  0%   { transform: translateY(-10vh) translateX(0) rotate(0deg); }
  100% { transform: translateY(110vh) translateX(60px) rotate(420deg); }
}

/* 光标光晕（anime 主题下启用，由 motion.js 控制 .cursor-glow） */
[data-theme="anime"] .cursor-glow {
  position: fixed; top: 0; left: 0; width: 26px; height: 26px;
  border-radius: 50%; pointer-events: none; z-index: 9998;
  background: radial-gradient(circle, rgba(255,143,199,0.6), rgba(143,227,255,0.25) 50%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity .25s ease; mix-blend-mode: screen;
}

/* 卡片 3D 悬浮（anime 主题，由 motion.js 加 .tilt） */
[data-theme="anime"] .card.tilt {
  transform-style: preserve-3d;
  transition: transform .15s ease-out, box-shadow .35s ease;
}

/* ============================================================
   角色立绘（anime 主题专属 · 受 site-guard.js 保护）
   由 anime-ui.js 注入 <img class="anime-char">，仅 anime 主题可见
   ============================================================ */
[data-theme="anime"] .anime-char {
  position: fixed;
  right: clamp(0px, 2vw, 36px);
  bottom: 0;
  height: clamp(260px, 60vh, 600px);
  width: auto;
  max-width: 40vw;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0;
  animation: animeCharIn .8s cubic-bezier(.2,.8,.2,1) forwards, animeCharFloat 7s ease-in-out 1s infinite;
  filter: drop-shadow(0 14px 34px rgba(255,143,199,.40)) drop-shadow(0 2px 10px rgba(143,227,255,.25));
}
@keyframes animeCharIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: .96; transform: translateY(0); }
}
@keyframes animeCharFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-14px); }
}
@media (max-width: 720px) {
  [data-theme="anime"] .anime-char {
    height: clamp(200px, 38vh, 320px);
    max-width: 60vw;
    opacity: .9;
  }
}
/* 樱花容器不拦截点击 */
[data-theme="anime"] #anime-petals {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
