/* ============================================================
   UMeanUs — main.css  v2.0  Doodle Dark Theme
   BG:#201b18  Card:#080706  Yellow:#FFE65D  Blue:#7284E6
   ============================================================ */

@font-face {
  font-family: 'UMU';
  src: url('../font/font1.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --bg:        #201b18;
  --card:      #080706;
  --yellow:    #FFE65D;
  --blue:      #7284E6;
  --white:     #ffffff;
  --text:      #ffffff;
  --dim:       rgba(255,255,255,.9);
  --mute:      rgba(255,255,255,.52);
  --border:    rgba(255,255,255,.14);

  /* UMU 用于标题和按钮；KaiTi 用于正文和副标题，同时作为 UMU 加载前的全局兜底 */
  --font:     'UMU', 'Times New Roman','KaiTi', 'STKaiti', '华文楷体', '楷体', 'DFKai-SB', serif;
  --font-kai: 'Times New Roman', 'KaiTi', 'STKaiti', '华文楷体', '楷体', 'DFKai-SB', 'AR PL UKai CN', serif;

  --r-sm:   10px;
  --r-md:   16px;
  --r-lg:   24px;
  --r-xl:   32px;
  --r-pill: 100px;

  --shadow: 0 6px 32px rgba(0,0,0,.6);
  --t: .2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-kai);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); }
ul, ol { list-style: none; }

/* ── Typography ─────────────────────────────────────────────── */
h1 { font-family: var(--font); font-size: clamp(2.2rem,6vw,4rem); line-height: 1.15; letter-spacing: .04em; font-weight: 800; }
h2 { font-family: var(--font); font-size: clamp(1.4rem,3vw,2rem); line-height: 1.25; font-weight: 700; }
h3 { font-family: var(--font); font-size: 1.2rem; line-height: 1.3; font-weight: 700; }
h4 { font-family: var(--font); font-size: 1rem; font-weight: 700; }
p  { font-family: var(--font-kai); color: var(--dim); line-height: 1.8; font-size: 1rem; }

/* ── Star canvas (injected by JS) ───────────────────────────── */
#star-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; width: 100%; height: 100%;
}

/* ── Stacking context ───────────────────────────────────────── */
.navbar, .page-body, section, main, footer,
.overlay, .bottom-sheet, #toast-container {
  position: relative; z-index: 1;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(32,27,24,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.navbar-inner {
  display: flex; align-items: center; gap: 12px;
  max-width: 1160px; margin: 0 auto;
  padding: 14px 24px;
}
.navbar-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.35rem; letter-spacing: .02em;
  flex-shrink: 0;
}
.navbar-logo img { height: 34px; width: auto; }
.navbar-spacer { flex: 1; }
.nav-link {
  font-size: .9rem; color: var(--dim);
  padding: 6px 10px; border-radius: var(--r-sm);
  transition: var(--t);
  font-family: var(--font);
}
.nav-link:hover { color: var(--yellow); }
/* wiggly line sits right below navbar-inner */
.nav-wiggle-canvas {
  display: block; width: 100%; height: 8px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: .98rem; font-weight: 700;
  padding: 10px 26px; border-radius: var(--r-pill);
  white-space: nowrap; cursor: pointer; border: none;
  transition: var(--t); user-select: none;
}
/* Back button */
.btn-back { background: var(--blue); color: var(--yellow) !important; font-weight: 700; }
/* Primary: blue bg, yellow text */
.btn-primary { background: var(--blue); color: var(--yellow); }
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(114,132,230,.4); }
/* Yellow: yellow bg, blue text */
.btn-yellow { background: var(--yellow); color: var(--blue); font-size: 1.05rem; }
.btn-yellow:hover { filter: brightness(1.06); transform: translateY(-2px); }
/* Outline yellow */
.btn-outline-yellow {
  background: transparent; border: 2px solid var(--yellow); color: var(--yellow);
}
.btn-outline-yellow:hover { background: rgba(255,230,93,.1); }
/* Outline white */
.btn-outline-white {
  background: transparent; border: 2px solid rgba(255,255,255,.45); color: var(--white);
}
.btn-outline-white:hover { border-color: white; }
/* Ghost */
.btn-ghost { color: var(--dim); }
.btn-ghost:hover { color: var(--white); }
/* Sizes */
.btn-sm { padding: 6px 16px; font-size: .85rem; }
.btn-lg { padding: 14px 40px; font-size: 1.1rem; }
.btn-xl { padding: 18px 56px; font-size: 1.3rem; }
.btn-icon { padding: 8px; border-radius: 50%; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 20px;
}
.card-lg { border-radius: var(--r-xl); padding: 28px; }
.card-outline {
  background: transparent;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
}
.card-yellow-outline {
  background: transparent;
  border: 2px solid var(--yellow);
  border-radius: var(--r-lg);
  padding: 20px;
}

/* ── Tags ────────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center;
  background: var(--yellow); color: var(--blue);
  border-radius: var(--r-pill);
  padding: 4px 14px; font-size: 1rem;
}
.tag-blue { background: var(--blue); color: var(--white); }
.tag-outline-yellow {
  background: transparent; border: 1.5px solid var(--yellow);
  color: var(--yellow); border-radius: var(--r-pill); padding: 4px 13px; font-size: 1rem;
}
.tag-outline-white {
  background: transparent; border: 1.5px solid rgba(255,255,255,.4);
  color: var(--white); border-radius: var(--r-pill); padding: 4px 13px; font-size: 1rem;
}

/* ── Chip selectable ─────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center;
  padding: 8px 18px; background: rgba(255,255,255,.06);
  border: 1.5px solid var(--border); border-radius: var(--r-pill);
  font-size: 1rem; color: var(--dim);
  cursor: pointer; transition: var(--t);
}
.chip:hover { border-color: var(--blue); color: var(--white); }
.chip.active { background: var(--blue); border-color: var(--blue); color: var(--yellow); }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 1rem; color: var(--dim); font-weight: 600; }
.form-input {
  width: 100%; padding: 12px 16px;
  background: rgba(255,255,255,.05);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text); font-size: 1rem; font-family: var(--font);
  outline: none; transition: var(--t);
}
.form-input:focus { border-color: var(--blue); background: rgba(114,132,230,.08); }
.form-input::placeholder { color: var(--mute); }
.form-select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,.4)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 40px;
}
.form-select option { background: #201b18; }
.form-hint { font-size: 1rem; color: var(--mute); }

/* Checkbox */
.check-label {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer; font-size: 1rem; color: var(--dim); line-height: 1.6;
}
.check-label input { display: none; }
.check-box {
  flex-shrink: 0; width: 18px; height: 18px;
  border: 1.5px solid var(--border); border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px; transition: var(--t);
}
.check-label input:checked + .check-box { background: var(--blue); border-color: var(--blue); }
.check-label input:checked + .check-box::after {
  content: ''; width: 10px; height: 6px;
  border-left: 2px solid var(--yellow); border-bottom: 2px solid var(--yellow);
  transform: rotate(-45deg) translate(0,-1px); display: block;
}

/* Scale buttons */
.scale-wrap { display: flex; flex-direction: column; gap: 8px; }
.scale-labels { display: flex; justify-content: space-between; font-size: 1rem; color: var(--mute); }
.scale-track { display: flex; gap: 6px; }
.scale-btn {
  flex: 1; aspect-ratio: 1; max-width: 48px;
  background: rgba(255,255,255,.05); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); color: var(--dim);
  font-family: var(--font); font-size: 1rem;
  cursor: pointer; transition: var(--t);
}
.scale-btn:hover, .scale-btn.active { background: var(--blue); border-color: var(--blue); color: var(--yellow); }

/* Option list */
.opt-list { display: flex; flex-direction: column; gap: 10px; }
.opt-item {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.04); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 13px 16px;
  cursor: pointer; transition: var(--t); font-size: 1rem;
}
.opt-item:hover { border-color: rgba(114,132,230,.5); }
.opt-item.active { border-color: var(--blue); background: rgba(114,132,230,.12); }
.opt-radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; transition: var(--t);
}
.opt-item.active .opt-radio { background: var(--blue); border-color: var(--blue); }
.opt-item.active .opt-radio::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow);
}

/* ── Progress bar ────────────────────────────────────────────── */
.prog-bar { height: 4px; background: rgba(255,255,255,.1); border-radius: 100px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--yellow); border-radius: 100px; transition: width .4s ease; }

/* ── Avatar ──────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%; background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--yellow); flex-shrink: 0;
  overflow: hidden; width: 40px; height: 40px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.av-sm { width: 32px; height: 32px; font-size: .82rem; }
.av-md { width: 48px; height: 48px; font-size: 1.1rem; }
.av-lg { width: 60px; height: 60px; font-size: 1.4rem; }

/* Planet avatar (ring orbit style) */
.planet-av {
  width: 56px; height: 56px;
  border: 2.5px solid rgba(255,255,255,.8);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative; flex-shrink: 0;
  overflow: visible;
}
.planet-av::after {
  content: '';
  position: absolute;
  width: 80px; height: 16px;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) rotate(-18deg);
  pointer-events: none;
}
.planet-av img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }

/* ── Overlay ─────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: #0e0c0a; border: 1px solid var(--border);
  border-radius: var(--r-xl); width: 92%; max-width: 400px;
  max-height: 90vh; overflow-y: auto; padding: 28px;
  transform: scale(.96) translateY(8px); transition: transform .25s;
  position: relative;
}
.overlay.active .modal { transform: scale(1) translateY(0); }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.08); color: var(--dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer; transition: var(--t);
}
.modal-close:hover { background: rgba(255,255,255,.15); color: var(--white); }
.modal-tabs {
  display: flex; background: rgba(255,255,255,.06);
  border-radius: var(--r-pill); padding: 4px; margin-bottom: 22px;
}
.modal-tab {
  flex: 1; text-align: center; padding: 8px;
  border-radius: var(--r-pill); font-size: 1rem;
  color: var(--dim); transition: var(--t); cursor: pointer;
}
.modal-tab.active { background: var(--blue); color: var(--yellow); }
.step-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px; }
.step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.2); transition: var(--t);
}
.step-dot.active { background: var(--yellow); width: 20px; border-radius: 100px; }
.step-dot.done   { background: var(--blue); }

/* ── Bottom Sheet ────────────────────────────────────────────── */
.bottom-sheet {
  position: fixed; bottom: 0; z-index: 310;
  left: 50%; transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: 480px;
  background: #0e0c0a; border-top: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  padding: 0 20px 48px;
  max-height: 88vh; overflow-y: auto;
  transition: transform .38s cubic-bezier(.32,0,.15,1);
  will-change: transform;
}
.bottom-sheet.active { transform: translateX(-50%) translateY(0); }
.bottom-sheet.dragging { transition: none; }
.sheet-handle {
  width: 44px; height: 5px;
  background: rgba(255,255,255,.2); border-radius: 100px;
  margin: 14px auto 20px; cursor: grab; touch-action: none;
}
.sheet-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; text-align: center; }

/* Sheet overlay — frosted glass backdrop */
#sheet-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(10,8,6,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none; opacity: 0;
  transition: opacity .35s ease;
  cursor: pointer;
}
#sheet-overlay.active { opacity: 1; }

/* ── Toast ───────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast {
  background: #1a1612; border: 1px solid var(--border);
  border-radius: 100px; padding: 10px 22px;
  font-size: .88rem; color: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,.6);
  animation: toast-in .3s ease forwards;
  white-space: nowrap;
}
@keyframes toast-in { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ── Layout ──────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.page-body { padding-top: 72px; }
.section { padding: 64px 0; }
@media (max-width:640px) { .section { padding: 48px 0; } }

/* ── Section row ─────────────────────────────────────────────── */
.sec-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.sec-title { font-size: 1.05rem; }

/* ── Horizontal scroll ───────────────────────────────────────── */
.h-scroll { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }

/* ── Grid ────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
@media(max-width:768px){ .grid-3{grid-template-columns:1fr 1fr} }
@media(max-width:480px){ .grid-2,.grid-3{grid-template-columns:1fr} }

/* ── Countdown ───────────────────────────────────────────────── */
.countdown { display: flex; gap: 6px; align-items: center; justify-content: center; }
.cd-block { background: rgba(255,255,255,.07); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 14px; text-align: center; min-width: 54px; }
.cd-num   { font-size: 1.6rem; color: var(--yellow); line-height: 1; }
.cd-label { font-size: 1rem; color: var(--mute); }
.cd-sep   { font-size: 1.3rem; color: var(--mute); align-self: flex-start; margin-top: 6px; }

/* ── Footer ──────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 36px 20px; text-align: center; position: relative; z-index: 1; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 12px; flex-wrap: wrap; }
.footer-links a { font-size: 1rem; color: var(--mute); transition: var(--t); }
.footer-links a:hover { color: var(--white); }
.footer-icp { font-size: 1rem; color: var(--mute); }

/* ── Utilities ───────────────────────────────────────────────── */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.text-yellow { color: var(--yellow) !important; }
.text-blue   { color: var(--blue) !important; }
.text-dim    { color: var(--dim); }
.text-mute   { color: var(--mute); }
.w-full { width: 100%; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mt-2{margin-top:8px} .mt-3{margin-top:12px} .mt-4{margin-top:16px} .mt-6{margin-top:24px}
.mb-2{margin-bottom:8px} .mb-4{margin-bottom:16px} .mb-6{margin-bottom:24px}
.p-0{padding:0} .rounded-full{border-radius:100px}

/* ── Q page ──────────────────────────────────────────────────── */
.q-card { background: var(--card); border-radius: var(--r-lg); padding: 24px; }
.q-num  { font-size: 1rem; color: var(--blue); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; font-weight: 700; }
.q-text { font-size: 1.1rem; margin-bottom: 18px; line-height: 1.65; font-weight: 700; }
.q-imp  {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 1rem; color: var(--mute); cursor: pointer;
  padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--r-pill);
  margin-top: 12px; transition: var(--t);
}
.q-imp.active { color: var(--yellow); border-color: rgba(255,230,93,.4); }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes float {
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-10px)}
}
@keyframes fade-up {
  from{opacity:0;transform:translateY(20px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes blink {
  0%,100%{opacity:1} 50%{opacity:.3}
}
@keyframes spin { to{transform:rotate(360deg)} }
.animate-float { animation: float 4s ease-in-out infinite; }
.animate-fade-up { animation: fade-up .5s ease forwards; }

/* ── Points log ──────────────────────────────────────────────── */
.log-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 1rem; }
.log-item:last-child { border-bottom: none; }
.log-plus  { color: var(--yellow); font-weight: 700; }
.log-minus { color: #ff6b6b; font-weight: 700; }

/* ── Notif item ──────────────────────────────────────────────── */
.notif-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: none; }
.notif-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); flex-shrink: 0; }
.notif-dot.read { background: var(--mute); }
.notif-title { font-size: 1rem; font-weight: 700; }
.notif-time  { font-size: 1rem; color: var(--mute); margin-left: auto; }
.notif-body  { font-size: 1rem; color: var(--dim); padding-left: 15px; line-height: 1.6; }
.notif-body.collapsed { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }

/* ── Doc pages ───────────────────────────────────────────────── */
.doc-wrap { max-width: 720px; margin: 0 auto; padding: 80px 20px 60px; }
.doc-wrap h2 { font-size: 1.15rem; margin: 32px 0 10px; color: var(--text); }
.doc-wrap h3 { font-size: 1rem; margin: 20px 0 8px; color: var(--dim); }
.doc-wrap p  { font-size: 1rem; line-height: 1.85; margin-bottom: 10px; }
.doc-wrap ul { padding-left: 18px; margin-bottom: 10px; }
.doc-wrap li { font-size: 1rem; color: var(--dim); line-height: 1.85; list-style: disc; }
.doc-wrap a  { color: var(--blue); }
.doc-highlight { background: rgba(114,132,230,.1); border-left: 3px solid var(--blue); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 14px 18px; margin: 18px 0; }
