/* ============================================
   奶蛙 Milky Frog — Design System
   本地复刻，基于 milkyfrog.com 公开样式
   ============================================ */

:root {
  --frog-yellow: #FFD83D;
  --frog-yellow-deep: #F5C518;
  --frog-yellow-soft: #FFF1B8;
  --milk: #FFFCF2;
  --milk-warm: #F8F3E4;
  --ink: #1A1612;
  --ink-soft: #4D453B;
  --ink-mute: #948876;
  --tongue: #FF4D4D;
  --line: #E8DFC9;
  --line-strong: #1A1612;

  --f-display: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --f-sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --f-mono: ui-monospace, "Cascadia Mono", monospace;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  --shadow-card: 0 2px 0 var(--line-strong);
  --shadow-card-lg: 0 6px 0 var(--line-strong);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--milk);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; min-height: 100vh; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--frog-yellow); color: var(--ink); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wrap { padding: 0 20px; } }

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 252, 242, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em;
}
.nav-logo .logo-mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--frog-yellow); border: 2px solid var(--ink);
  display: grid; place-items: center; overflow: hidden; transition: transform 0.15s;
}
.nav-logo .logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.nav-logo:hover .logo-mark { transform: rotate(-8deg) scale(1.05); }
@media (max-width: 720px) { .nav-inner { height: 60px; } }

.hero { padding: 56px 0 100px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px; background: var(--milk);
  border: 1.5px solid var(--ink); border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 28px;
}
.hero-eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--tongue);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-family: var(--f-display); font-weight: 800;
  font-size: clamp(48px, 7.6vw, 104px); line-height: 0.95;
  letter-spacing: -0.035em; color: var(--ink);
}
.hero-title .accent { display: inline-block; position: relative; color: var(--ink); }
.hero-title .accent::before {
  content: ""; position: absolute; inset: -2% -6% -6% -6%;
  background: var(--frog-yellow); border-radius: 12px; z-index: -1; transform: rotate(-1.5deg);
}
.hero-sub {
  margin-top: 28px; font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55; color: var(--ink-soft); max-width: 460px;
}
.hero-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 26px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 15px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  border: 2px solid var(--ink); white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--milk); box-shadow: var(--shadow-card-lg); }
.btn-primary:hover { transform: translate(0, 2px); box-shadow: 0 4px 0 var(--line-strong); }
.btn-primary:active { transform: translate(0, 6px); box-shadow: 0 0 0 var(--line-strong); }
.btn .arrow { transition: transform 0.15s; }
.btn:hover .arrow { transform: translateX(3px); }

.hero-stats {
  display: flex; gap: 36px; margin-top: 48px; padding-top: 32px;
  border-top: 1px dashed var(--line);
}
.hero-stat .num {
  font-family: var(--f-display); font-weight: 800; font-size: 28px;
  line-height: 1; letter-spacing: -0.02em;
}
.hero-stat .label {
  margin-top: 6px; font-size: 12px; color: var(--ink-mute);
  letter-spacing: 0.04em; text-transform: uppercase;
}

.hero-phone-wrap { position: relative; display: grid; place-items: center; }
.phone {
  position: relative; width: min(360px, 84%); aspect-ratio: 9 / 19.5;
  background: var(--ink); border-radius: 48px; padding: 10px;
  box-shadow: 0 30px 60px -20px rgba(26, 22, 18, 0.45), 0 0 0 4px var(--ink);
}
.phone::before {
  content: ""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 28px; background: #000; border-radius: 999px; z-index: 3;
}
.phone-screen {
  position: relative; width: 100%; height: 100%; background: #fff;
  border-radius: 38px; overflow: hidden; cursor: pointer; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.frog-stage {
  position: absolute; inset: 0; background: #fff;
  display: grid; place-items: center; overflow: hidden;
}
.frog-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #fff; pointer-events: none; user-select: none;
  transform: translateY(-6%) scale(1.20); transform-origin: center center;
}
.video-shield { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

.phone-controls {
  position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%);
  z-index: 4; display: flex; gap: 10px; justify-content: center; flex-wrap: nowrap;
}
.pc-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px;
  border: 1.5px solid var(--ink); border-radius: var(--r-pill); background: var(--milk);
  color: var(--ink); font-weight: 600; font-size: 13px; box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.12s, box-shadow 0.12s, background 0.15s; white-space: nowrap;
}
.pc-btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.pc-btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.pc-icon { font-size: 16px; line-height: 1; }
.pc-stop { width: 40px; padding: 0; justify-content: center; font-size: 17px; }
.pc-loop.is-looping { background: var(--ink); color: var(--milk); }

.haha {
  position: absolute; font-family: var(--f-display); font-weight: 800; font-size: 32px;
  letter-spacing: -0.04em; color: var(--ink); opacity: 0; pointer-events: none; white-space: nowrap;
}
.phone-screen.hahaing .haha { animation: hahaFloat 1.4s ease-out infinite; }
.haha:nth-child(1) { left: 12%; top: 30%; animation-delay: 0s; transform: rotate(-12deg); }
.haha:nth-child(2) { right: 12%; top: 26%; animation-delay: 0.4s; transform: rotate(8deg); color: var(--tongue); }
.haha:nth-child(3) { left: 18%; top: 55%; animation-delay: 0.8s; font-size: 24px; }
.haha:nth-child(4) { right: 16%; top: 50%; animation-delay: 0.2s; transform: rotate(-6deg); font-size: 26px; }
@keyframes hahaFloat {
  0% { opacity: 0; transform: translateY(20px) scale(0.5); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-60px) scale(1.2); }
}

.hero-deco { position: absolute; pointer-events: none; }
.hero-deco.d1 {
  top: -10px; left: -40px; font-family: var(--f-display); font-weight: 800;
  font-size: 100px; color: var(--frog-yellow); z-index: -1; opacity: 0.6; transform: rotate(-12deg);
}
.hero-deco.d2 {
  bottom: 40px; right: -30px; font-family: var(--f-display); font-weight: 800;
  font-size: 64px; color: var(--frog-yellow); z-index: -1; opacity: 0.5; transform: rotate(8deg);
}
@media (max-width: 960px) {
  .hero-deco { display: none; }
  .phone { width: min(300px, 80%); }
}

.ticker {
  background: var(--ink); color: var(--frog-yellow);
  border-block: 2px solid var(--ink); overflow: hidden; padding: 18px 0;
}
.ticker-track {
  display: flex; gap: 48px; width: max-content;
  animation: scroll 30s linear infinite;
  font-family: var(--f-display); font-weight: 800; font-size: 36px;
  letter-spacing: -0.02em; white-space: nowrap;
}
.ticker-track span { display: inline-flex; align-items: center; gap: 48px; }
.ticker-track span::after { content: "★"; color: var(--tongue); font-size: 28px; }
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.footer { background: var(--milk); padding: 28px 0 32px; border-top: 2px solid var(--ink); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--ink-mute);
}
.footer-bottom a:hover { color: var(--ink); }

.phone-screen.hahaing .haha { animation: hahaFloat 1.4s ease-out infinite; }
.frog-loading {
  position: absolute; left: 50%; top: 50%; z-index: 4;
  display: none; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 50%; background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 12px rgba(26, 22, 18, .18); pointer-events: none;
}
.frog-loading::after {
  content: ""; position: absolute; inset: 13px;
  border: 3px solid rgba(26, 22, 18, .18); border-top-color: var(--ink);
  border-radius: 50%; animation: frogSpin .8s linear infinite;
}
.phone-screen.is-loading .frog-loading { display: block; }
@keyframes frogSpin { to { transform: rotate(360deg); } }

.site-tabs { display: flex; gap: 26px; font-size: 15px; font-weight: 600; }
.site-tabs a { position: relative; padding: 4px 0; color: var(--ink-mute); }
.site-tabs a.active { color: var(--ink); }
.site-tabs a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px;
  height: 2px; border-radius: 2px; background: var(--ink);
}
@media (max-width: 420px) { .site-tabs { gap: 16px; font-size: 14px; } }
[data-page][hidden] { display: none !important; }

.page-section { padding: 48px 0 88px; min-height: 62vh; }
.page-title {
  font-family: var(--f-display); font-weight: 800; font-size: 34px;
  letter-spacing: -0.02em; margin: 0 0 24px;
}
.page-sub { font-size: 18px; font-weight: 700; margin: 36px 0 14px; }
.page-lead { color: var(--ink-soft); font-size: 14px; line-height: 1.6; margin: -12px 0 20px; max-width: 560px; }
.page-lead.page-lead-small { font-size: 12px; color: var(--ink-mute); margin-top: -14px; }
.page-note { margin-top: 22px; color: var(--ink-mute); font-size: 14px; text-align: center; }
.card {
  display: flex; align-items: center; gap: 14px; background: #fff;
  border: 1.5px solid var(--ink); border-radius: 20px; box-shadow: 0 3px 0 var(--ink);
  padding: 16px 18px; color: var(--ink); transition: transform .12s, box-shadow .12s;
}
.card:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.card-list { display: grid; gap: 14px; max-width: 560px; grid-template-columns: minmax(0, 1fr); }
.card-name { font-size: 18px; font-weight: 700; white-space: nowrap; }
.card-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.card-sub { font-size: 13px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-games { padding: 56px 0 24px; }
.card[hidden] { display: none; }
.btn-all {
  display: block; max-width: 560px; margin-top: 16px; padding: 14px 0; text-align: center;
  border-radius: 999px; background: var(--ink); color: var(--milk); font-weight: 700; font-size: 15px;
}
.btn-all:active { opacity: .8; }
a.card .card-text { min-width: 0; flex: 1; }
a.card .card-name { display: block; overflow: hidden; }
.name-text { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
a.card .card-name:has(.tag-new) .name-text { max-width: calc(100% - 50px); }
.card-actions { margin-left: auto; flex-shrink: 0; width: 84px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.card-actions .card-go { margin-left: 0; }
.copy-link { padding: 2px 8px; font-size: 12px; color: var(--ink-mute); white-space: nowrap; }
.copy-link::before { content: "🔗 "; font-size: 10px; }
.copy-link.copied { color: var(--ink); font-weight: 600; }
.copy-link.copied::before { content: "✓ "; font-size: 12px; }
.copy-link:active { opacity: .6; }
.games-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 560px; }
.games-head .page-title { margin-bottom: 24px; }
.copy-all {
  flex-shrink: 0; margin-bottom: 24px; padding: 8px 14px;
  border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 700; box-shadow: 0 2px 0 var(--ink); cursor: pointer;
}
.copy-all:active { transform: translateY(2px); box-shadow: 0 0 0 var(--ink); }
.copy-all.copied { background: var(--ink); color: var(--milk); }
.land-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 560px; margin: 0 0 22px; padding: 16px 18px; border-radius: 18px;
  background: var(--ink); color: var(--milk); font-weight: 700; font-size: 17px;
}
.land-banner[hidden] { display: none; }
.land-go { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; background: var(--milk); color: var(--ink); font-size: 14px; }
.card.is-down { opacity: .5; }
.card.is-down .card-sub::after { content: " · 暂时打不开"; color: var(--tongue); }
.card.is-down .plays { display: none; }
.card.spotlight { animation: spotlight 1.2s ease 2; }
@keyframes spotlight {
  0%, 100% { box-shadow: 0 3px 0 var(--ink); }
  50% { box-shadow: 0 0 0 4px var(--tongue), 0 3px 0 var(--ink); }
}
.copy-toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%); z-index: 70;
  padding: 10px 18px; border-radius: 999px; background: rgba(26,22,18,.88); color: #fff;
  font-size: 14px; white-space: nowrap; pointer-events: none; transition: opacity .2s;
}
.game-shot {
  width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex-shrink: 0;
  border: 1px solid rgba(26,22,18,.08); background: var(--milk-warm);
}
.card-go { padding: 7px 13px !important; }
@media (max-width: 400px) {
  .card { gap: 10px; padding: 14px 14px; }
  .card-name { font-size: 16px; }
  .game-shot { width: 52px; height: 52px; border-radius: 13px; }
  .card-actions { width: 74px; }
  .copy-link { font-size: 11px; padding: 2px 4px; }
  .card-go { padding: 7px 11px !important; font-size: 13px; }
}
.tag-new {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: var(--tongue); color: #fff; font-size: 11px; font-weight: 700; vertical-align: 2px;
}
.card-go {
  margin-left: auto; flex-shrink: 0; background: var(--ink); color: var(--milk);
  border-radius: 999px; padding: 7px 16px; font-size: 14px; font-weight: 600;
}
.app-icon { width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0; border: 1px solid rgba(26,22,18,.08); }
.about-bio { font-size: 17px; line-height: 1.7; margin: 0 0 10px; max-width: 560px; }
.surprise-text { margin: 28px 0 12px; }
.surprise-img { display: block; width: 100%; max-width: 560px; height: auto; border-radius: 16px; }
.about-meta { color: var(--ink-soft); font-size: 15px; margin: 0; }

.store-tip {
  position: fixed; inset: 0; z-index: 60; background: rgba(26, 22, 18, .55);
  display: flex; align-items: flex-start; justify-content: center; padding: 72px 20px 0;
}
.store-tip[hidden] { display: none; }
.store-tip [hidden] { display: none !important; }
.store-tip-arrow { position: absolute; top: 6px; right: 22px; color: #fff; font-size: 44px; font-weight: 800; line-height: 1; }
.store-tip-card {
  width: 100%; max-width: 360px; background: var(--milk); border: 2px solid var(--ink);
  border-radius: 22px; box-shadow: 0 4px 0 var(--ink); padding: 20px 20px 16px;
  color: var(--ink); font-size: 15px; line-height: 1.6;
}
.store-tip-card p { margin: 0 0 8px; }
.store-tip-title { font-size: 17px; font-weight: 800; }
.store-tip-sub { color: var(--ink-soft); font-size: 13px; }
.store-tip-btn {
  display: block; width: 100%; height: 44px; margin-top: 10px;
  border: 1.5px solid var(--ink); border-radius: 999px; background: var(--ink);
  color: var(--milk); font-size: 15px; font-weight: 700;
}
.store-tip-ok { background: transparent; color: var(--ink); }

.local-note {
  max-width: 560px; margin: 0 0 18px; padding: 10px 14px;
  border: 1px dashed var(--line); border-radius: 12px;
  color: var(--ink-mute); font-size: 12px; line-height: 1.5;
}
