:root {
  --bg: #050915;
  --panel: rgba(10, 18, 36, 0.84);
  --panel-solid: #0a1224;
  --text: #f8fbff;
  --muted: #aab6c8;
  --blue: #0ea5e9;
  --gold: #f5b82e;
  --red: #ef3340;
  --green: #18b96f;
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --header-h: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 8%, rgba(14, 165, 233, 0.2), transparent 34rem),
    radial-gradient(circle at 90% 30%, rgba(245, 184, 46, 0.14), transparent 28rem),
    linear-gradient(180deg, #050915 0%, #081122 52%, #050915 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  padding-bottom: 180px;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(245, 184, 46, 0.9);
  outline-offset: 4px;
}

.container {
  width: min(100% - 32px, 1180px);
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 9, 21, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--gold));
  color: #06101f;
  font-size: 18px;
  letter-spacing: 0;
}

.brand-text {
  font-size: 15px;
  white-space: nowrap;
}

.menu-toggle {
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  display: grid;
  place-content: center;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.site-nav {
  position: fixed;
  inset: var(--header-h) 16px auto 16px;
  display: none;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(10, 18, 36, 0.96);
  box-shadow: var(--shadow);
}

.site-nav.is-open {
  display: grid;
}

.nav-link {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 14px;
  color: var(--muted);
  font-weight: 700;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.header-cta {
  display: none;
}

.section {
  position: relative;
  padding: 82px 0;
}

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 42px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 9, 21, 0.92) 0%, rgba(5, 9, 21, 0.72) 44%, rgba(5, 9, 21, 0.2) 100%),
    url("../img/hero-worldcup-2026.webp") center / cover no-repeat;
  opacity: 0.72;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.hero-grid,
.section-grid,
.download-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 34px;
}

.section-label {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(42px, 8vw, 108px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(32px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 22px;
}

.hero-lead,
.section-copy p,
.download-grid p,
.community-panel p {
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0;
}

.btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #ff8a1f);
  color: #10131b;
}

.btn-ghost {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
  margin: 0;
}

.hero-stats div {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
}

.hero-stats dt {
  font-size: 30px;
  line-height: 1;
  font-weight: 950;
}

.hero-stats dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-card {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 26px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-card img {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
}

.hero-card figcaption {
  padding: 12px 16px 16px;
  color: var(--muted);
  font-size: 13px;
}

.theme-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.06));
}

.theme-ribbons {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.theme-ribbons span {
  height: 14px;
  border-radius: 999px;
}

.theme-ribbons span:nth-child(1) {
  background: linear-gradient(90deg, var(--blue), transparent);
}

.theme-ribbons span:nth-child(2) {
  background: linear-gradient(90deg, var(--red), transparent);
}

.theme-ribbons span:nth-child(3) {
  background: linear-gradient(90deg, var(--green), transparent);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.benefit-list {
  display: grid;
  gap: 14px;
}

.benefit-item {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.06);
}

.benefit-index {
  color: var(--gold);
  font-weight: 950;
  font-size: 13px;
}

.benefit-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.download-section {
  background: radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.16), transparent 26rem);
}

.download-cards {
  display: grid;
  gap: 16px;
}

.download-card {
  display: grid;
  gap: 10px;
  min-height: 44px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.07);
}

.download-card img {
  width: 100%;
  border-radius: 18px;
}

.download-card span {
  font-size: 20px;
  font-weight: 900;
}

.download-card small {
  color: var(--muted);
}

.register-section {
  background:
    radial-gradient(circle at 12% 18%, rgba(239, 51, 64, 0.14), transparent 28rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05));
}

.register-panel {
  display: grid;
  gap: 28px;
  padding: 24px;
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.16), transparent 48%),
    rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

.register-copy {
  max-width: 680px;
}

.register-copy p {
  color: var(--muted);
  font-size: 18px;
}

.register-actions,
.auth-register-list {
  display: grid;
  gap: 14px;
}

.register-link,
.auth-register-link {
  min-height: 76px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.register-link:hover,
.auth-register-link:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 184, 46, 0.72);
  background: rgba(245, 184, 46, 0.12);
}

.register-link-index,
.auth-register-link span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 950;
}

.register-link strong,
.auth-register-link strong {
  font-size: 18px;
}

.register-link small {
  color: var(--muted);
}

.register-link em {
  overflow-wrap: anywhere;
  color: #9bdcff;
  font-size: 12px;
  font-style: normal;
}

.community-panel {
  display: grid;
  gap: 26px;
  align-items: center;
  padding: 26px;
  border: 1px solid rgba(245, 184, 46, 0.28);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(245, 184, 46, 0.16), transparent 42%),
    rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

.community-panel img {
  width: min(100%, 360px);
  border-radius: 24px;
}

.app-download-rail {
  position: fixed;
  right: 14px;
  bottom: 104px;
  z-index: 25;
}

.rail-trigger {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.rail-panel {
  position: absolute;
  right: 0;
  bottom: 56px;
  display: none;
  width: 168px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(10, 18, 36, 0.96);
  box-shadow: var(--shadow);
}

.app-download-rail.is-open .rail-panel {
  display: grid;
  gap: 10px;
}

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

.rail-card {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.rail-card img {
  border-radius: 12px;
}

.floating-community {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 28;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(245, 184, 46, 0.34);
  border-radius: 22px;
  background: rgba(10, 18, 36, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.floating-community.is-hidden {
  display: none;
}

.floating-community img {
  width: 62px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
}

.floating-community strong {
  display: block;
  font-size: 15px;
}

.floating-community p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.floating-btn {
  grid-column: 1 / -1;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--gold);
  color: #10131b;
  font-weight: 950;
}

.floating-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

.floating-restore {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 28;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--gold);
  color: #10131b;
  font-weight: 950;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: calc(100svh - 36px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgba(245, 184, 46, 0.34);
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 8%, rgba(245, 184, 46, 0.2), transparent 16rem),
    rgba(10, 18, 36, 0.98);
  box-shadow: var(--shadow);
}

.auth-dialog h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 8vw, 48px);
}

.auth-desc {
  color: var(--muted);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

.auth-secondary {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.auth-modal-open {
  overflow: hidden;
}

.site-footer {
  padding: 34px 0 190px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin-bottom: 6px;
}

@media (min-width: 768px) {
  body {
    padding-bottom: 132px;
  }

  .site-header {
    padding: 0 28px;
  }

  .menu-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.06);
  }

  .nav-link {
    min-height: 42px;
    padding: 0 12px;
    font-size: 13px;
  }

  .header-cta {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 18px;
    background: var(--gold);
    color: #10131b;
    font-weight: 900;
  }

  .hero-grid,
  .section-grid,
  .download-grid,
  .community-panel {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.75fr);
  }

  .download-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .register-panel {
    grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1fr);
    align-items: center;
    padding: 34px;
  }

  .benefit-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floating-community {
    left: 50%;
    right: auto;
    width: min(720px, calc(100% - 48px));
    grid-template-columns: 70px minmax(0, 1fr) auto;
    transform: translateX(-50%);
  }

  .floating-btn {
    grid-column: auto;
    padding: 0 22px;
  }

  .app-download-rail {
    right: 18px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
}

@media (min-width: 1200px) {
  .site-header {
    padding: 0 40px;
  }

  .brand-text {
    font-size: 17px;
  }

  .nav-link {
    padding: 0 16px;
    font-size: 14px;
  }

  .hero-grid {
    grid-template-columns: 0.95fr 1.05fr;
    align-items: center;
  }

  h1 {
    font-size: clamp(64px, 7.8vw, 116px);
  }

  .hero-card {
    transform: translateY(32px);
  }

  .benefit-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .rail-trigger {
    display: none;
  }

  .rail-panel {
    position: static;
    display: grid;
    gap: 10px;
    width: 172px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
