/* ============================================================
   Rollbit 落地页 — Mobile-First
   配色与规范见 DESIGN.md
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --bg: #0b0e17;
  --bg-2: #121624;
  --bg-3: #1a1f30;
  --gold: #f5c518;
  --gold-light: #ffd84d;
  --green: #19c37d;
  --text: #f5f7fa;
  --text-2: #9ba3b4;
  --text-3: #6b7280;
  --line: rgba(245, 197, 24, 0.22);
  --line-soft: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 64px;
  --maxw: 1140px;
  --font-display: "Archivo", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
    box-shadow 0.25s var(--ease), border-color 0.2s var(--ease);
  will-change: transform;
}

.btn-gold {
  color: #1a1503;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  box-shadow: 0 6px 24px rgba(245, 197, 24, 0.25);
}

.btn-gold:hover {
  background: linear-gradient(180deg, #ffe680, var(--gold-light));
  box-shadow: 0 10px 32px rgba(245, 197, 24, 0.4);
  transform: translateY(-2px);
}

.btn-gold:active {
  transform: translateY(0);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
}

.btn-ghost:hover {
  border-color: var(--line);
  background: rgba(245, 197, 24, 0.08);
  transform: translateY(-2px);
}

.btn-sm {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 14px;
}

.btn-lg {
  min-height: 56px;
  padding: 16px 36px;
  font-size: 17px;
}

.btn-block {
  width: 100%;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 14, 23, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--gold-light), #d9a800);
  color: #14110a;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.3px;
}

/* 官方 Logo 图片标识 */
.brand-logo-link {
  margin-right: auto;
}

.brand-logo {
  width: auto;
  height: 28px;
  filter: drop-shadow(0 1px 6px rgba(245, 197, 24, 0.12));
  transition: opacity 0.2s var(--ease);
}

.brand-logo:hover {
  opacity: 0.88;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--gold);
}

.nav-cta {
  display: none;
}

/* 汉堡按钮 */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin-inline: auto;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 移动端菜单 */
.mobile-menu {
  border-top: 1px solid var(--line-soft);
  background: rgba(11, 14, 23, 0.98);
  padding: 12px 20px 24px;
  animation: menuIn 0.2s var(--ease);
}

.mobile-menu[hidden] {
  display: none;
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu li a {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-size: 17px;
  font-weight: 600;
  border-bottom: 1px solid var(--line-soft);
}

.mobile-menu .btn {
  margin-top: 18px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding: 64px 0 56px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("../assets/hero-bg.jpeg") center 30% / cover no-repeat;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 14, 23, 0.82) 0%, rgba(11, 14, 23, 0.9) 55%, var(--bg) 100%),
    radial-gradient(90% 60% at 70% 10%, rgba(245, 197, 24, 0.12), transparent 60%);
}

.hero-inner {
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(245, 197, 24, 0.08);
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(25, 195, 125, 0.18);
}

.hero-title {
  margin-top: 22px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 7.5vw, 64px);
  line-height: 1.18;
  letter-spacing: -0.5px;
}

.text-gold {
  color: var(--gold);
}

.hero-sub {
  max-width: 560px;
  margin: 18px auto 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 30px;
}

.hero-actions .btn {
  width: 100%;
}

.hero-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}

.hero-mini strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
  line-height: 1.2;
}

.hero-mini span {
  font-size: 12.5px;
  color: var(--text-3);
}

/* ---------- 数据带 ---------- */
.stats {
  padding: 8px 0 40px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat {
  padding: 22px 16px;
  text-align: center;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line-soft);
}

.stat-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 7vw, 40px);
  line-height: 1.1;
  color: var(--gold);
}

.stat-label {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-2);
}

/* ---------- 通用 Section ---------- */
.section {
  padding: 56px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 36px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.section-title {
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 6vw, 38px);
  line-height: 1.22;
  letter-spacing: -0.3px;
}

.section-desc {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 15px;
}

/* ---------- 核心产品 Feature ---------- */
.products {
  background: linear-gradient(180deg, var(--bg), #0d111d 40%, var(--bg));
}

.feature {
  display: grid;
  gap: 24px;
  padding: 32px 0;
}

.feature + .feature {
  border-top: 1px solid var(--line-soft);
}

.feature-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
}

.feature-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(245, 197, 24, 0.1), transparent 40%);
  pointer-events: none;
}

.feature-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.feature-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.feature-title {
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(21px, 5.4vw, 30px);
  line-height: 1.25;
}

.feature-text {
  margin-top: 12px;
  color: var(--text-2);
}

.feature-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.feature-list li {
  position: relative;
  padding-left: 28px;
  color: var(--text);
  font-size: 14.5px;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l5 5L20 7' fill='none' stroke='%23F5C518' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  min-height: 44px;
  font-weight: 700;
  color: var(--gold);
  transition: gap 0.2s var(--ease), color 0.2s var(--ease);
}

.link-arrow:hover {
  color: var(--gold-light);
  gap: 10px;
}

/* ---------- 平台优势 ---------- */
.perks {
  background: var(--bg-2);
  border-block: 1px solid var(--line-soft);
}

.perk-grid {
  display: grid;
  gap: 14px;
}

.perk-card {
  padding: 26px 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line-soft);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}

.perk-card svg {
  color: var(--gold);
}

.perk-card h3 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
}

.perk-card p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-2);
}

.perk-card:hover {
  transform: translateY(-4px);
  border-color: var(--line);
  background: rgba(245, 197, 24, 0.05);
}

/* ---------- 热门游戏 ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.game-card {
  display: block;
}

.game-cover {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--bg-2);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.game-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.game-rtp {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #06281a;
  background: var(--green);
}

.game-name {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.game-card:hover .game-cover {
  transform: translateY(-4px);
  border-color: var(--line);
}

/* ---------- 终版 CTA ---------- */
.final-cta {
  padding: 72px 0;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(245, 197, 24, 0.14), transparent 60%),
    var(--bg);
}

.final-inner {
  text-align: center;
}

.final-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 7vw, 44px);
  line-height: 1.2;
}

.final-text {
  max-width: 480px;
  margin: 14px auto 0;
  color: var(--text-2);
}

.final-inner .btn {
  margin-top: 30px;
}

.final-note {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: #080a11;
}

.footer-grid {
  display: grid;
  gap: 32px;
  padding: 48px 20px 36px;
}

.footer-slogan {
  margin: 14px 0 18px;
  color: var(--text-2);
  font-size: 13.5px;
}

.footer-col h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text);
}

.footer-col ul {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.footer-col a {
  color: var(--text-2);
  font-size: 14px;
  transition: color 0.2s var(--ease);
}

.footer-col a:hover {
  color: var(--gold);
}

.age-badge {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-2);
}

.age-badge strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-right: 8px;
  border-radius: 10px;
  border: 1.5px solid var(--gold);
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--gold);
  vertical-align: middle;
}

.footer-tip {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.7;
}

.footer-legal {
  border-top: 1px solid var(--line-soft);
  padding: 26px 0 40px;
}

.footer-legal p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-3);
}

.footer-legal p + p {
  margin-top: 10px;
}

.footer-legal a {
  color: var(--text-2);
  text-decoration: underline;
}

.footer-copy {
  margin-top: 16px;
}

/* ---------- 跳转加载遮罩 ---------- */
.leaving-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 17, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.2s var(--ease);
}

.leaving-overlay[hidden] {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.leaving-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 34px 44px;
  border-radius: var(--radius-lg);
  background: rgba(18, 22, 36, 0.6);
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.leaving-card p {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  letter-spacing: 0.2px;
}

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(245, 197, 24, 0.22);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- 滚动进入动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   响应式：平板 ≥ 640px
   ============================================================ */
@media (min-width: 640px) {
  body {
    font-size: 16px;
  }

  .container {
    padding-inline: 28px;
  }

  .hero {
    padding: 96px 0 80px;
  }

  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }

  .hero-actions .btn {
    width: auto;
    min-width: 170px;
  }

  .hero-mini strong {
    font-size: 28px;
  }

  .hero-mini span {
    font-size: 13.5px;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .game-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 40px;
  }
}

/* ============================================================
   响应式：PC ≥ 980px
   ============================================================ */
@media (min-width: 980px) {
  .nav-links,
  .nav-cta {
    display: inline-flex;
  }

  .nav-toggle {
    display: none;
  }

  .hero {
    padding: 130px 0 110px;
  }

  .hero-inner {
    text-align: left;
  }

  .hero-sub {
    margin-inline: 0;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-mini {
    max-width: 560px;
  }

  .section {
    padding: 88px 0;
  }

  .feature {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
    padding: 56px 0;
  }

  .feature-reverse .feature-media {
    order: 2;
  }

  .feature-reverse .feature-body {
    order: 1;
  }

  .perk-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }
}

/* ---------- 减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
