/* =========================================================
   DUMP MONEY CRYPTO Academy — Design tokens
   High-end private-wealth aesthetic: deep charcoal + gold
   ========================================================= */

:root {
  /* --- Base surfaces — pure monochrome --- */
  --bg: #000000;             /* pure black */
  --bg-2: #0a0a0a;           /* near-black */
  --bg-3: #121212;           /* card */
  --bg-4: #1a1a1a;           /* elevated */
  --navy: #181818;
  --navy-2: #0f0f0f;

  /* --- Text — pure whites --- */
  --ink: #ffffff;            /* primary text pure white */
  --ink-2: #d4d4d4;
  --ink-3: #8a8a8a;          /* muted */
  --ink-4: #4a4a4a;          /* very muted */
  --hair: rgba(255, 255, 255, 0.08);
  --hair-strong: rgba(255, 255, 255, 0.18);

  /* --- Accent — monochrome silver --- */
  --accent: #ffffff;         /* white highlight */
  --accent-2: #bfbfbf;       /* grey */
  --accent-3: #6a6a6a;       /* deep grey */
  --accent-soft: rgba(255, 255, 255, 0.10);
  --accent-glow: rgba(255, 255, 255, 0.30);
  --accent-gradient: linear-gradient(135deg, #6a6a6a 0%, #8f8f8f 30%, #ffffff 55%, #bfbfbf 80%, #6a6a6a 100%);

  /* --- Market signal colors --- */
  --up: #3FB27F;
  --down: #E2524A;

  /* --- Type --- */
  /* Apple-style: SF Pro for latin + 蘋方 for CN，fallback Inter/Noto */
  --ff-serif: "Playfair Display", "Noto Serif TC", ui-serif, Georgia, serif;
  --ff-sans:  -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang TC", "Inter", "Noto Sans TC", system-ui, sans-serif;
  --ff-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang TC", "Inter", "Noto Sans TC", system-ui, sans-serif;
  --ff-mono:  "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* --- Radii + spacing rhythm --- */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-xl: 16px;

  /* --- Shadows --- */
  --shadow-card: 0 1px 0 rgba(255,255,255,0.02) inset, 0 20px 60px rgba(0,0,0,0.45);
  --shadow-lift: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px var(--hair);
}

/* Accent palette swaps (Tweaks) */
[data-accent="silver"] {
  --accent: #D9D6CE;
  --accent-2: #B8B4AA;
  --accent-3: #5E5A52;
  --accent-soft: rgba(217, 214, 206, 0.12);
  --accent-glow: rgba(217, 214, 206, 0.35);
}
[data-accent="green"] {
  --accent: #3FB27F;
  --accent-2: #2E8C63;
  --accent-3: #1A5540;
  --accent-soft: rgba(63, 178, 127, 0.12);
  --accent-glow: rgba(63, 178, 127, 0.35);
}

/* =========================================================
   Resets + base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt" 1, "ss01" 1;
  overflow-x: hidden;
  max-width: 100vw;
}
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -100px, rgba(255, 255, 255, 0.04), transparent 70%),
    radial-gradient(800px 400px at 100% 100%, rgba(255, 255, 255, 0.03), transparent 70%),
    var(--bg);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Apple-style display type — sans not serif, very tight tracking, elegant thin weights */
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
}
h1 { font-weight: 700; letter-spacing: -0.035em; }
h2 { font-weight: 600; letter-spacing: -0.03em; }
h3 { font-weight: 600; letter-spacing: -0.02em; }
h4 { font-weight: 500; letter-spacing: -0.015em; }
/* body text rendering */
body {
  font-feature-settings: "cv11", "ss01", "palt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Utility */
.container {
  width: min(1280px, 92vw);
  margin-inline: auto;
}

/* Apple-style: generous vertical rhythm on top-level sections */
body > main > section,
main section[data-screen-label] {
  padding-block: 140px;
}
@media (max-width: 900px) {
  body > main > section,
  main section[data-screen-label] {
    padding-block: 80px;
  }
}
.eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.hair { height: 1px; background: var(--hair); width: 100%; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-family: var(--ff-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  transition: background-color 0.25s cubic-bezier(.4,0,.2,1),
              border-color 0.25s cubic-bezier(.4,0,.2,1),
              color 0.25s cubic-bezier(.4,0,.2,1),
              transform 0.25s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
}
.btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  transform: translateY(-1px);
}
.btn-primary {
  background: #fff;
  color: #000;
  border-color: #fff;
  font-weight: 600;
}
.btn-primary:hover {
  background: #e5e5e5;
  border-color: #e5e5e5;
  color: #000;
}
.btn-ghost { border-color: rgba(255,255,255,0.15); color: var(--ink-2); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.4); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* =========================================================
   Top nav
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(10, 10, 15, 0.72);
  border-bottom: 1px solid var(--hair);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ff-serif);
  font-size: 20px;
  letter-spacing: 0.02em;
}
.logo-mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #000 url('../uploads/dumb-money-round.png') center/cover no-repeat;
  border: 1px solid var(--accent-2);
  display: block;
  position: relative;
  flex-shrink: 0;
  font-size: 0;           /* hide any stray text content */
  color: transparent;
  text-indent: -9999px;
  overflow: hidden;
}
.logo-cn { font-weight: 500; }
.logo-en {
  font-family: var(--ff-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--ink-3);
  margin-top: 2px;
}
.logo-stack { display: flex; flex-direction: column; line-height: 1; }

.nav-links {
  display: flex;
  gap: 38px;
  font-size: 14px;
  color: var(--ink-2);
}
.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--accent);
}

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-login {
  font-size: 13px;
  color: var(--ink-2);
  transition: color 0.2s;
}
.nav-login:hover { color: var(--accent); }

/* ===== Topbar partner badge (OKX) ===== */
.partner-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 14px;
  border: 1px solid var(--hair-strong);
  background: linear-gradient(135deg, rgba(231,183,83,0.04), rgba(127,65,40,0.08));
  font-family: var(--ff-mono);
  margin-left: 6px;
  position: relative;
  transition: border-color 0.25s, background 0.25s;
}
.partner-badge::before {
  content: "";
  position: absolute; top: -1px; left: -1px;
  width: 6px; height: 6px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}
.partner-badge::after {
  content: "";
  position: absolute; bottom: -1px; right: -1px;
  width: 6px; height: 6px;
  border-bottom: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}
.partner-badge:hover {
  border-color: var(--accent-2);
  background: linear-gradient(135deg, rgba(231,183,83,0.08), rgba(127,65,40,0.14));
}
.partner-label {
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
}
.partner-divider {
  width: 1px; height: 14px;
  background: var(--hair-strong);
}
.partner-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}
.partner-logo b {
  font-family: var(--ff-sans);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--ink);
}
@media (max-width: 1100px) {
  .partner-badge .partner-label { display: none; }
  .partner-badge .partner-divider { display: none; }
}
@media (max-width: 900px) {
  .partner-badge { display: none; }
  .nav-cta .auth-username { display: none; }
  .nav-cta .auth-avatar-mini { display: inline-flex !important; }
  .nav-cta { gap: 6px; }
  .nav-cta .btn-sm { padding: 4px 10px; font-size: 11px; }
  .nav-cta .auth-tier-tag { font-size: 9px; padding: 2px 6px; }
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  margin-top: 120px;
  padding-top: 80px;
  border-top: 1px solid var(--hair);
  background: linear-gradient(to bottom, var(--bg), var(--bg-2));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
}
.footer h4 {
  font-family: var(--ff-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 22px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer a { color: var(--ink-2); font-size: 14px; transition: color 0.2s; }
.footer a:hover { color: var(--accent); }
.footer-brand p {
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.7;
  margin: 16px 0 0;
  max-width: 320px;
}
.footer-bottom {
  border-top: 1px solid var(--hair);
  padding: 28px 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-4);
  font-family: var(--ff-mono);
}
.footer-risk {
  padding: 20px 0;
  border-top: 1px solid var(--hair);
  font-size: 11px;
  color: var(--ink-4);
  line-height: 1.7;
}
.socials { display: flex; gap: 14px; }
.socials a {
  width: 34px; height: 34px;
  border: 1px solid var(--hair);
  display: grid; place-items: center;
  color: var(--ink-3);
  transition: border-color 0.2s, color 0.2s;
}
.socials a:hover { border-color: var(--accent); color: var(--accent); }

/* =========================================================
   Floating LINE button
   ========================================================= */
.fab-line {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 40;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #06C755;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 40px rgba(6, 199, 85, 0.4);
  transition: transform 0.3s ease;
  cursor: pointer;
}
.fab-line:hover { transform: scale(1.08); }
.fab-line::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid #06C755;
  opacity: 0.5;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.4); opacity: 0; }
}
@keyframes eta-spin { to { transform: rotate(360deg); } }

/* =========================================================
   Section headers
   ========================================================= */
.section-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
  margin-bottom: 60px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hair);
}
.section-header .eyebrow { margin-bottom: 20px; }
.section-header h2 {
  font-size: clamp(36px, 5vw, 56px);
  max-width: 780px;
}
.section-header .lede {
  font-size: 16px;
  color: var(--ink-3);
  max-width: 480px;
  line-height: 1.7;
  margin: 0;
  text-align: right;
}

section { padding: 100px 0; position: relative; }

/* =========================================================
   Cards
   ========================================================= */
.card {
  background: var(--bg-3);
  border: 1px solid var(--hair);
  padding: 32px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}
.card:hover { border-color: var(--hair-strong); }

.tag {
  display: inline-block;
  padding: 4px 10px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--hair-strong);
}
.tag-hot { color: var(--down); border-color: var(--down); }

/* =========================================================
   Stat rows
   ========================================================= */
.stat-num {
  font-family: var(--ff-serif);
  font-weight: 500;
  color: var(--ink);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-num .plus, .stat-num .pct, .stat-num .unit {
  color: var(--accent);
  font-size: 0.6em;
  margin-left: 4px;
}
.stat-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  margin-top: 12px;
}

/* =========================================================
   Skeleton loaders — shared by all list pages.
   Compose: <div class="sk sk-card"><div class="sk-thumb"></div>
            <div class="sk-line w70"></div><div class="sk-line w40"></div></div>
   ========================================================= */
.sk {
  position: relative;
  overflow: hidden;
  background: var(--bg-3, #16161A);
  border: 1px solid var(--border, #1F1F23);
  border-radius: 14px;
}
.sk::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(255, 255, 255, 0.04) 40%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 60%,
    transparent 80%
  );
  background-size: 240% 100%;
  animation: sk-shimmer 1.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sk-shimmer {
  0%   { background-position: 120% 0; }
  100% { background-position: -20% 0; }
}
.sk-card { padding: 0; display: flex; flex-direction: column; }
.sk-thumb {
  width: 100%; aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border, #1F1F23);
}
.sk-thumb.square { aspect-ratio: 1 / 1; }
.sk-thumb.portrait { aspect-ratio: 320 / 460; border-bottom: 0; }
.sk-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.sk-line {
  height: 12px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}
.sk-line.lg { height: 18px; }
.sk-line.sm { height: 10px; }
.sk-line.w90 { width: 90%; } .sk-line.w80 { width: 80%; }
.sk-line.w70 { width: 70%; } .sk-line.w60 { width: 60%; }
.sk-line.w50 { width: 50%; } .sk-line.w40 { width: 40%; }
.sk-line.w30 { width: 30%; }
.sk-row {
  display: flex; gap: 16px; align-items: center;
  padding: 20px 22px;
}
.sk-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.05); flex-shrink: 0;
}
/* Standalone pulsing line for use outside .sk wrappers (e.g. table cells). */
.sk-pulse {
  animation: sk-pulse 1.6s ease-in-out infinite;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}
@keyframes sk-pulse {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 0.85; }
}
@media (prefers-reduced-motion: reduce) {
  .sk::after { animation: none; opacity: 0.5; }
  .sk-pulse  { animation: none; opacity: 0.5; }
}

/* =========================================================
   Page + list entrance animations.
   - body fade: subtle whole-page reveal on first paint
   - .list-stagger > *: cards/items in a grid stagger in (also re-runs
     on every JS innerHTML swap, so skeleton → real content also fades)
   ========================================================= */
body { animation: page-fade-in .4s ease both; }
@keyframes page-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.list-stagger > * {
  animation: list-stagger-in .45s cubic-bezier(.22, .61, .36, 1) both;
}
.list-stagger > *:nth-child(1) { animation-delay: 0ms; }
.list-stagger > *:nth-child(2) { animation-delay: 50ms; }
.list-stagger > *:nth-child(3) { animation-delay: 100ms; }
.list-stagger > *:nth-child(4) { animation-delay: 140ms; }
.list-stagger > *:nth-child(5) { animation-delay: 170ms; }
.list-stagger > *:nth-child(n+6) { animation-delay: 200ms; }
@keyframes list-stagger-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  body, .list-stagger > * { animation: none !important; }
}

/* =========================================================
   Newsletter popup
   ========================================================= */
.newsletter-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.newsletter-backdrop.show { opacity: 1; pointer-events: auto; }
.newsletter-modal {
  background: linear-gradient(145deg, var(--bg-3), var(--bg-4));
  border: 1px solid var(--hair-strong);
  padding: 56px;
  max-width: 540px;
  width: 92vw;
  position: relative;
  box-shadow: var(--shadow-lift);
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.newsletter-backdrop.show .newsletter-modal { transform: translateY(0); }
.newsletter-modal::before {
  content: "";
  position: absolute; inset: 0;
  border: 1px solid var(--accent);
  opacity: 0.15;
  pointer-events: none;
}
.newsletter-close {
  position: absolute;
  top: 18px; right: 18px;
  color: var(--ink-3);
  font-size: 18px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
}
.newsletter-close:hover { color: var(--accent); }

/* =========================================================
   Auth modal (shared)
   ========================================================= */
.auth-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(8px);
  z-index: 90;
  /* Flex + margin:auto on the modal centers it when it fits and top-aligns +
     scrolls when it's taller than the viewport (mobile signup has many fields).
     A grid place-items:center backdrop would clip the overflow, hiding the
     submit button below the fold with no way to reach it. */
  display: flex;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.auth-backdrop.show { opacity: 1; pointer-events: auto; }
.auth-modal {
  background: linear-gradient(145deg, var(--bg-3), var(--bg-4));
  border: 1px solid var(--hair-strong);
  width: min(440px, 92vw);
  margin: auto;            /* center when room; top-align + scroll when overflowing */
  padding: 48px 44px;
  position: relative;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), opacity 0.3s ease;
}
.auth-backdrop.show .auth-modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.auth-modal h3 {
  font-size: 28px;
  margin-bottom: 8px;
}
.auth-modal .lede { color: var(--ink-3); font-size: 14px; margin-bottom: 32px; }
.auth-field { margin-bottom: 18px; }
.auth-field label {
  display: block;
  font-family: var(--ff-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.auth-field input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair-strong);
  padding: 10px 0;
  color: var(--ink);
  font-size: 15px;
  font-family: var(--ff-sans);
  transition: border-color 0.2s;
}
.auth-field input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.auth-oauth {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}
.auth-oauth button {
  padding: 12px;
  border: 1px solid var(--hair-strong);
  font-size: 12px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: border-color 0.2s;
}
.auth-oauth button:hover { border-color: var(--accent); color: var(--accent); }
.auth-divider {
  display: flex; align-items: center; gap: 16px;
  color: var(--ink-4);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  margin: 24px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--hair);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .section-header { grid-template-columns: 1fr; }
  .section-header .lede { text-align: left; }
}

/* Auth modal on phones: the desktop 48/44px padding crams inputs into a narrow
   column and makes the (already tall) signup form overflow. Tighten spacing so
   it fits — combined with the scrollable backdrop above, every field + the
   submit button stays reachable. */
@media (max-width: 600px) {
  .auth-modal { padding: 32px 22px; }
  .auth-modal h3 { font-size: 23px; }
  .auth-modal .lede { margin-bottom: 22px; }
  .auth-field { margin-bottom: 14px; }
  .newsletter-close { top: 12px; right: 12px; }
}
