/* ============================================================
   NextAvatar V0.1.0 UI 设计系统
   理念：她才是主角。所有页面围绕"与她的关系"展开，
   数字人形象沉浸式占满视口，功能与信息退到光影之后。
   ============================================================ */

:root {
  /* 底色：深夜的房间 */
  --bg: #0a0a10;
  --bg-soft: #12121a;
  /* 表面：浮在暗处的玻璃 */
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.08);
  /* 文字 */
  --text: #f5f3ef;
  --text-mid: rgba(245, 243, 239, 0.68);
  --text-dim: rgba(245, 243, 239, 0.42);
  /* 主题色：黄昏时她房间里的光 */
  --accent: #ffb3c7;
  --accent-deep: #e88aa8;
  --violet: #c9a7ff;
  --gold: #ffd98e;
  --ok: #9fe0bd;
  /* 圆角与呼吸 */
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }

html, body {
  background: #050508;
  color: var(--text);
  font-family: -apple-system, 'PingFang SC', 'HarmonyOS Sans SC', 'Source Han Sans SC', 'Microsoft YaHei', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 手机画布：桌面看是居中的"机身"，手机上全屏 */
.phone {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  background:
    radial-gradient(120% 50% at 50% -5%, rgba(255, 179, 199, 0.09), transparent 60%),
    radial-gradient(90% 40% at 90% 110%, rgba(201, 167, 255, 0.07), transparent 65%),
    var(--bg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 30px 80px rgba(0, 0, 0, 0.6);
  overflow-x: hidden;
}
@media (min-width: 500px) {
  body { padding: 32px 0; }
  .phone { border-radius: 44px; min-height: calc(100dvh - 64px); }
}

/* ---------- 顶部页头 ---------- */
.page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 20px 12px;
}
.page-title { font-size: 24px; font-weight: 800; letter-spacing: 0.5px; }
.page-sub { font-size: 12px; color: var(--text-dim); }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(430px, 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 10px 8px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(5, 5, 8, 0.92) 40%);
  backdrop-filter: blur(18px);
  z-index: 50;
}
.tabbar a {
  text-align: center;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
}
.tabbar .ico { font-size: 21px; line-height: 1; filter: grayscale(0.5) opacity(0.75); }
.tabbar a.on { color: var(--accent); }
.tabbar a.on .ico { filter: none; }

/* ---------- 通用组件 ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px);
}
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line);
  color: var(--text-mid); font-size: 12px; white-space: nowrap;
}
.chip.on { background: rgba(255, 179, 199, 0.16); border-color: rgba(255, 179, 199, 0.45); color: var(--accent); }
.badge-gold {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 217, 142, 0.22), rgba(255, 179, 199, 0.18));
  border: 1px solid rgba(255, 217, 142, 0.4);
  color: var(--gold); font-size: 11px; font-weight: 600;
}
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px;
  border-radius: 18px; border: none;
  font-size: 16px; font-weight: 700; letter-spacing: 1px;
  cursor: pointer; color: #241019;
  background: linear-gradient(120deg, var(--accent), var(--violet));
  box-shadow: 0 8px 28px rgba(232, 138, 168, 0.28);
}
.btn.ghost {
  background: var(--glass); color: var(--text);
  border: 1px solid var(--line); box-shadow: none; font-weight: 600;
}
.hairline { height: 1px; background: var(--line); margin: 14px 0; }
.dim { color: var(--text-dim); font-size: 12.5px; }

/* 形象图上的名字浮层 */
.plate {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 60px 22px 22px;
  background: linear-gradient(180deg, transparent, rgba(6, 6, 11, 0.88) 72%);
}
.plate .name { font-size: 27px; font-weight: 800; letter-spacing: 1px; }
.plate .tag { font-size: 13px; color: var(--text-mid); margin-top: 3px; }

/* 呼吸光斑装饰 */
.glow {
  position: absolute; border-radius: 50%;
  filter: blur(60px); pointer-events: none;
  animation: drift 9s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translateY(-8px) scale(1); } to { transform: translateY(10px) scale(1.08); } }

/* 设计稿标注角标（仅设计稿使用，标注场景号） */
.spec-tag {
  position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 12px; z-index: 99;
  font-size: 10px; color: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 3px 9px; border-radius: 999px;
  text-decoration: none;
  background: rgba(5, 5, 8, 0.4);
}
