/* base.css — 温暖明亮主题 · 全局样式 */

/* ── CSS Variables ── */
:root {
  --bg: #faf7f2;
  --bg-warm: #f5efe5;
  --card-bg: #fffefb;
  --card-bg-alt: #fdf9f4;
  --card-border: rgba(180, 150, 110, 0.14);
  --card-border-hover: rgba(190, 150, 100, 0.3);
  --text: #3d352a;
  --text-secondary: #8c8070;
  --text-accent: #b8863e;
  --text-accent-soft: #c49650;
  --btn-primary: #c49650;
  --btn-primary-hover: #d4a860;
  --btn-text: #fffef9;
  --btn-shadow: rgba(190, 140, 70, 0.25);
  --safe-green: #7a9e7a;
  --oh-card-bg: rgba(180, 150, 110, 0.07);
  --oh-card-selected: #c49650;
  --glow-warm: rgba(210, 170, 120, 0.12);
  --glow-warm-strong: rgba(200, 150, 80, 0.2);
  --glow-top: rgba(230, 200, 160, 0.18);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.05), 0 12px 32px rgba(0, 0, 0, 0.05);
  --radius-card: 18px;
  --radius-btn: 26px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --font-stack: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-stack);
  background:
    radial-gradient(ellipse 55% 35% at 50% -5%, var(--glow-top) 0%, transparent 60%),
    radial-gradient(ellipse 35% 30% at 85% 40%, rgba(210, 180, 140, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 40% 25% at 15% 70%, rgba(200, 170, 130, 0.05) 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1 { font-size: 1.2rem; font-weight: 600; letter-spacing: .5px; color: var(--text); }
h2 { font-size: 1.05rem; font-weight: 600; color: var(--text); }
p  { font-size: .92rem; color: var(--text-secondary); line-height: 1.85; }
.text-small  { font-size: .72rem; }
.text-accent { color: var(--text-accent); }

/* ── Layout ── */
#app {
  position: relative; z-index: 1;
  flex: 1; display: flex; flex-direction: column;
  max-width: 520px; width: 100%; margin: 0 auto;
}
.page {
  flex: 1; padding: 20px 16px 40px;
  animation: pageIn .4s ease-out;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ── Header ── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0 18px;
}
.back-btn, .page-header .back-btn {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  font-size: .84rem; cursor: pointer;
  padding: 8px 18px;
  transition: all .25s ease;
  font-family: var(--font-stack);
  letter-spacing: .3px;
  box-shadow: var(--shadow-sm);
}
.back-btn:active, .page-header .back-btn:active {
  background: var(--bg-warm);
  border-color: var(--card-border-hover);
  color: var(--text-accent);
  transform: scale(.96);
}
.page-header .brand {
  font-size: .85rem; color: var(--text-secondary); letter-spacing: 1px;
}

/* ── Brand Title ── */
.brand-title {
  text-align: center; padding: 20px 0 8px;
}
.brand-title .name {
  font-size: 3.2rem; font-weight: 200; color: var(--text);
  letter-spacing: 12px;
}
.brand-title .tagline {
  font-size: 1.05rem; color: var(--text-accent); margin-top: 12px;
  letter-spacing: 2px; font-weight: 400;
}

/* ── Floating Decorative Orbs ── */
#app::before {
  content: '';
  position: fixed; pointer-events: none; z-index: 0;
  top: 8%; left: -15%;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(210,180,140,.08) 0%, transparent 70%);
  animation: floatOrb 20s ease-in-out infinite;
}
#app::after {
  content: '';
  position: fixed; pointer-events: none; z-index: 0;
  bottom: 15%; right: -10%;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,160,120,.06) 0%, transparent 70%);
  animation: floatOrb 24s ease-in-out infinite reverse;
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(20px, -30px) scale(1.1); }
  50% { transform: translate(-10px, -15px) scale(.95); }
  75% { transform: translate(-25px, 10px) scale(1.05); }
}

/* ── Grain Overlay ── */
body::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
