/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --accent: #e9198a;
  --accent-orange: #f7a629;
  --text: #eaeaea;
  --text-muted: #9a9ab0;
  --radius: 16px;
  --max: 1140px;
  --grad: linear-gradient(135deg, #f7a629 0%, #e9198a 100%);
}

body {
  font-family: 'Nunito', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== SITE HEADER ===== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  max-width: var(--max);
  margin: 0 auto;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo { height: 40px; width: auto; display: block; border-radius: 8px; }
.site-brand-name {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.site-nav .nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
}
.site-nav .nav-cta:hover { background: #c4156f; color: #fff; }

/* ===== HERO ===== */
.hero {
  max-width: var(--max);
  margin: 40px auto 32px;
  padding: 0 24px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 16px;
  line-height: 1.15;
}
.hero h1 em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(233,25,138,0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
  z-index: 999;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover { box-shadow: 0 6px 22px rgba(233,25,138,0.6); }


.page-toc {
  max-width: var(--max);
  margin: 0 auto 48px;
  padding: 20px 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.page-toc a {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.page-toc a:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
  text-decoration: none;
}

/* ===== STAT STRIP ===== */
.stat-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin: 28px auto 0;
  max-width: 560px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 28px;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.stat-item:last-child { border-right: none; }
.stat-val {
  font-size: 1.4rem;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; text-transform: uppercase; letter-spacing: 1px; }

/* ===== GAME EMBED ===== */
.game-section {
  max-width: 920px;
  margin: 0 auto 64px;
  padding: 0 16px;
}
.game-frame-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  background: #0f0f1a;
}
.game-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 780px;
  border: none;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
  max-width: var(--max);
  margin: 0 auto 56px;
  padding: 0 24px;
}
.content-section h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text);
}
.content-section h2 span {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== HOW TO PLAY ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.step {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 20px;
  border: 2px solid rgba(247,166,41,0.12);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.step:hover {
  border-color: rgba(247,166,41,0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(233,25,138,0.15);
}
.step-num {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 10px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.step h3 { font-size: 1rem; font-weight: 800; margin-bottom: 6px; }
.step p { font-size: 0.88rem; color: var(--text-muted); }

/* ===== WHY PLAY ===== */
.why-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.why-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1.5px solid rgba(255,255,255,0.06);
  transition: border-color 0.2s, transform 0.2s;
}
.why-card:hover { border-color: rgba(233,25,138,0.3); transform: translateY(-3px); }
.why-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 8px; }
.why-card p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }

/* ===== ABOUT ===== */
.about-text { color: var(--text-muted); }
.about-text p { margin-bottom: 14px; }
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); }

/* ===== HOW TO PLAY — STEPPER ===== */
.flow {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 8px 0;
}
.flow-step {
  flex: 1;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
/* connector line between circles */
.flow-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: calc(50% + 22px);
  right: calc(-50% + 22px);
  height: 2px;
  background: linear-gradient(90deg, rgba(247,166,41,0.5), rgba(233,25,138,0.3));
  z-index: 0;
}
.flow-top {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 10px;
  text-align: center;
}
.flow-bottom {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 10px;
  text-align: center;
}
.flow-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f7a629, #e9198a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 14px rgba(233,25,138,0.35);
}
.flow-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.flow-sub {
  margin-top: 3px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}
@media (max-width: 640px) {
  .flow { flex-wrap: wrap; }
  .flow-step { flex: 0 0 50%; padding-bottom: 24px; }
  .flow-step::after { display: none; }
  .flow-top { display: none; }
  .flow-bottom { min-height: auto; }
}

/* ===== MODE TABLE ===== */
.mode-table-wrap { overflow-x: auto; margin-top: 12px; }
.mode-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.mode-table th, .mode-table td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mode-table thead tr { border-bottom: 1.5px solid rgba(255,255,255,0.1); }
.mode-table th {
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  background: var(--surface);
}
.mode-table th:nth-child(2) { color: var(--accent-orange); }
.mode-table th:nth-child(3) { color: var(--accent); }
.mode-table td { color: var(--text-muted); }
.mode-table td:first-child { color: var(--text); font-weight: 700; }
.mode-table tr:last-child td { border-bottom: none; }
.mode-table .yes { color: #4ade80; font-weight: 700; }
.mode-table .no { opacity: 0.35; }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 2px; }
.faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.97rem;
  font-weight: 700;
  text-align: left;
  padding: 18px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  line-height: 1.4;
}
.faq-q::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  display: none;
  padding-bottom: 18px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 760px;
}
.faq-item.open .faq-a { display: block; }

/* ===== TIPS ===== */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tip-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 20px;
  border: 1.5px solid rgba(255,255,255,0.06);
}
.tip-num {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}
.tip-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 6px; }
.tip-card p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; margin: 0; }
@media (max-width: 860px) { .tips-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .tips-grid { grid-template-columns: 1fr; } }


.page-content {
  max-width: 760px;
  margin: 56px auto 80px;
  padding: 0 24px;
}
.page-content h1 { font-size: 2rem; font-weight: 900; margin-bottom: 8px; }
.page-content .updated { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 40px; }
.page-content h2 { font-size: 1.1rem; font-weight: 800; margin: 32px 0 10px; color: var(--text); }
.page-content p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 14px; }
.page-content ul { padding-left: 20px; margin-bottom: 14px; }
.page-content li { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 6px; }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 40px 24px 28px;
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: var(--max);
  margin: 0 auto;
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-logo { height: 36px; border-radius: 8px; }
.footer-brand-name {
  font-size: 1.1rem;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-links { display: flex; gap: 32px; flex-wrap: wrap; }
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text);
  margin-bottom: 12px;
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { color: var(--text-muted); font-size: 0.78rem; text-decoration: none; }
.footer-legal a:hover { color: var(--text); }

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .why-cards { grid-template-columns: 1fr 1fr; }
  .site-nav .nav-label { display: none; }
}
@media (max-width: 640px) {
  .site-nav { display: none; }
  .hero { margin-top: 28px; }
  .game-frame-wrap iframe { height: 88vh; }
  .steps { grid-template-columns: 1fr; }
  .why-cards { grid-template-columns: 1fr; }
  .stat-strip { gap: 8px; }
  .stat-item { border-right: none; padding: 4px 16px; }
}
