/* ===================== Design Tokens ===================== */
:root {
  --accent: #8ceb51;
  --accent-ink: #0f3d00;
  --text: #111;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 16px;
  --shadow: 0 6px 18px rgba(17, 17, 17, .06);

  /* Layout */
  --phone-width: 375px;
  --page-pad: 14px;

  /* Sticky CTA height reserve (approx) */
  --cta-reserve: 112px;
}

/* ===================== Base Reset ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: #fff;
}

/* Prevent horizontal scroll on mobile */
body {
  overflow-x: clip; /* modern; fallback below */
}
@supports not (overflow: clip) {
  body { overflow-x: hidden; }
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Media elements */
img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Scroll lock for lightbox */
html.no-scroll,
html.no-scroll body {
  overflow: hidden;
}

/* ===================== Container ===================== */
/* Mobile: full width. Desktop: fixed phone canvas centered */
.container {
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: #fff;

  /* Important: avoid horizontal overflow */
  overflow-x: clip;
  padding-bottom: calc(var(--cta-reserve) + env(safe-area-inset-bottom, 0));
}

/* Desktop phone canvas */
@media (min-width: 768px) {
  .container {
    width: var(--phone-width);
    box-shadow: 0 0 20px rgba(0, 0, 0, .08);
  }
}

/* ===================== Header ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0);
}

.site-header .brand {
  height: 56px;
  padding: 0 var(--page-pad);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 18px;
}

/* Make header content align: brand left, lang switch right */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(141, 235, 81, .35);
}

/* Language switch */
.lang-switch {
  margin-right: var(--page-pad);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  color: #111;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.lang-btn:hover {
  transform: translateY(-1px);
}

.lang-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 16px rgba(141, 235, 81, .20);
}

/* ===================== Hero ===================== */
.hero {
  padding: 10px 5px;
  position: relative;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ===================== Buttons ===================== */
.btn {
  appearance: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font-weight: 900;
  letter-spacing: .2px;
  text-align: center;

  --pulse: 1;
  transform: scale(var(--pulse)) translateZ(0);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  will-change: transform;
}

.btn:hover,
.btn:focus-visible {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.btn:active {
  transform: scale(.97);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 16px rgba(141, 235, 81, .25);
}

/* Breathing animation for main buttons */
@property --pulse {
  syntax: '<number>';
  inherits: false;
  initial-value: 1;
}

@keyframes btn-breathe {
  0%, 100% {
    --pulse: .95;
    box-shadow: 0 6px 16px rgba(141, 235, 81, .18);
  }
  50% {
    --pulse: 1.03;
    box-shadow: 0 10px 22px rgba(141, 235, 81, .28);
  }
}

.btn.btn-primary {
  animation: btn-breathe 1.6s ease-in-out infinite;
}

.btn.btn-primary:hover,
.btn.btn-primary:focus-visible,
.btn.btn-primary:active {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .btn.btn-primary { animation: none; }
}

/* ===================== Tutorials (Accordion) ===================== */
.tutorials {
  padding: 10px var(--page-pad) 16px;
}

.tutorials-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 900;
}

.accordion {
  display: grid;
  gap: 10px;
}

.acc-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.acc-btn {
  width: 100%;
  border: 0;
  background: #fff;
  cursor: pointer;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  transition: background .15s ease, transform .15s ease;
}

.acc-btn:hover {
  background: #fcfdfb;
}

.acc-btn:active {
  transform: scale(.995);
}

.acc-title {
  font-weight: 900;
  font-size: 14px;
}

.acc-icon {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: rgba(141, 235, 81, .18);
  color: var(--accent-ink);
  flex: 0 0 auto;
}

.acc-panel {
  padding: 0 14px 14px;
}

.acc-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 10px;
}

.steps {
  display: grid;
  gap: 12px;
}

.step {
  margin: 0;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

.step img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

.step-cap {
  padding: 10px 10px 12px;
  font-size: 14px;
  line-height: 1.35;
  color: #111;
  opacity: .92;
}

/* ===================== Trust ===================== */
.trust {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px var(--page-pad) 14px;
  opacity: .95;
}

.trust-img {
  width: 100%;
  padding: 12px;
}

/* ===================== Footer ===================== */
footer {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 16px 0 calc(24px + var(--cta-reserve));
}

/* ===================== Sticky CTA (Fixed, never hidden) ===================== */
.sticky {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 60;

  width: min(100vw, var(--phone-width));
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(6px);

  padding: 10px var(--page-pad) calc(12px + env(safe-area-inset-bottom, 0));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;

  box-shadow: 0 -10px 24px rgba(0,0,0,.06);
}

/* On small screens, ensure no side overflow */
@media (max-width: 767px) {
  .sticky {
    width: 100vw;
  }
}

/* ===================== Lightbox ===================== */
.lightbox[hidden] {
  display: none !important;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .8);
  display: grid;
  place-items: center;
  z-index: 99999;
  padding: 18px;
}

.lightbox img {
  max-width: 96vw;
  max-height: 76vh;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
}

.lb-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .5);
  background: transparent;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

#lbCaption {
  margin-top: 10px;
  color: #fff;
  font-size: 14px;
  text-align: center;
  max-width: 90vw;
  opacity: .9;
}

/* ===================== Utilities ===================== */
.muted {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 6px 0 12px;
}

.acc-title-wrap{
  display:flex;
  align-items:center;
  flex:1;
  min-width:0;
}

/* 标题占左边 */
.acc-title{
  font-weight:900;
  font-size:14px;
}

/* 关键：让 badge 自动推到右侧 */
.acc-badge{
  margin-left:auto;   /* ⭐ 核心 */
  font-size:11px;
  font-weight:900;
  padding:4px 8px;
  border-radius:999px;
  background: var(--accent);
  color: var(--accent-ink);
  white-space:nowrap;
  box-shadow: 0 4px 10px rgba(141,235,81,.25);
}

/* 奖励标签 */
.acc-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(141,235,81,.25);
}

/* Reward（绿色） */
.acc-badge--reward{
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 4px 10px rgba(141,235,81,.25);
}

/* Game（黄色） */
.acc-badge--game{
  background: #facc15;        /* 柔和黄 */
  color: #5a3d00;             /* 深棕字 */
  box-shadow: 0 4px 10px rgba(250,204,21,.25);
}

/* 可选：轻微呼吸动画（比按钮弱很多） */
@keyframes badge-pulse {
  0%,100% { transform: scale(.96); }
  50% { transform: scale(1.03); }
}

.acc-badge {
  animation: badge-pulse 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .acc-badge { animation: none; }
}
