:root {
  --bg: #070603;
  --bg-deep: #110d07;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(120, 115, 90, 0.42);
  --accent: #6ab04c;
  --accent-soft: #badc58;
  --gold: #c8a85a;
  --gold-soft: #f3dfab;
  --text: #e8f5e9;
  --muted: rgba(232, 245, 233, 0.66);
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --container: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(106, 176, 76, 0.12), transparent 24%),
    radial-gradient(circle at 82% 10%, rgba(200, 168, 90, 0.12), transparent 18%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.42)),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 46%, #050402 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0.36) 70%, rgba(0, 0, 0, 0.74) 100%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 92%);
  pointer-events: none;
}

main,
.topbar,
.footer {
  position: relative;
  z-index: 1;
}

main section[id] {
  scroll-margin-top: 6.5rem;
}

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

button,
input {
  font: inherit;
}

.page-shell {
  position: relative;
  overflow: hidden;
}

.ambient {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(26px);
  pointer-events: none;
  opacity: 0.34;
  z-index: 0;
}

.ambient-left {
  top: 4rem;
  left: -12rem;
  background: radial-gradient(circle, rgba(106, 176, 76, 0.24), transparent 62%);
}

.ambient-right {
  top: 16rem;
  right: -10rem;
  background: radial-gradient(circle, rgba(200, 168, 90, 0.22), transparent 64%);
}

.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  max-width: calc(var(--container) + 64px);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  background: rgba(7, 6, 3, 0.76);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 16px;
  border: 1px solid rgba(200, 168, 90, 0.34);
  background: linear-gradient(145deg, rgba(200, 168, 90, 0.2), rgba(106, 176, 76, 0.16));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  font-family: "Cinzel", serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold-soft);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-copy strong,
h1,
h2,
h3,
h4 {
  font-family: "Cinzel", serif;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.84rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  flex: 1;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.18s ease, transform 0.18s ease;
}

.nav a:hover,
.nav a.is-active {
  color: var(--gold-soft);
  transform: translateY(-1px);
}

.topbar-actions,
.hero-actions,
.button-stack,
.footer-links,
.hiscore-meta,
.hiscore-mini-stats {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex-wrap: wrap;
}

.topbar-actions {
  justify-content: flex-end;
}

.primary-button,
.secondary-button,
.ghost-button,
.hiscore-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.primary-button {
  color: #081007;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 34px rgba(106, 176, 76, 0.24);
  font-weight: 800;
}

.secondary-button,
.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line);
}

.ghost-button {
  color: var(--gold-soft);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.hiscore-entry:hover {
  transform: translateY(-2px);
}

.large {
  min-height: 54px;
  padding: 0.95rem 1.45rem;
}

.language-button {
  min-width: 64px;
  padding-inline: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.portal-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.section {
  margin-bottom: 2rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 1.4rem;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.news-card,
.info-card,
.sidebar-card,
.launch-card,
.faq-list details,
.hiscore-profile {
  background: linear-gradient(180deg, rgba(20, 18, 10, 0.95), rgba(11, 10, 6, 0.9));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel,
.sidebar-card,
.launch-card,
.hiscore-profile,
.faq-list details,
.info-card,
.news-card {
  border-radius: var(--radius-xl);
}

.hero-copy {
  padding: 3rem;
}

.hero-panel {
  padding: 1.2rem;
}

.eyebrow,
.panel-label,
.news-date {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 0.8rem;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  max-width: 11ch;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
}

.hero-text,
.hero-support,
.news-card p,
.info-card p,
.sidebar-card p,
.launch-card p,
.faq-list p,
.hiscore-bio,
.hiscore-meta p,
.form-note {
  color: var(--muted);
  line-height: 1.72;
}

.hero-text {
  margin: 1.35rem 0 1rem;
  max-width: 60ch;
  font-size: 1.04rem;
}

.hero-support {
  max-width: 58ch;
  margin: 0 0 2rem;
  color: rgba(232, 245, 233, 0.82);
}

.teaser-card {
  height: 100%;
  padding: 1.6rem;
  background:
    linear-gradient(180deg, rgba(200, 168, 90, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.025);
}

.teaser-card h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
}

.teaser-card ul {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.85;
}

.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.4rem;
  align-items: start;
}

.portal-content {
  display: grid;
  gap: 1.4rem;
}

.service-sidebar {
  position: sticky;
  top: 6rem;
  display: grid;
  gap: 1rem;
}

.section-heading {
  margin-bottom: 1rem;
}

.section-heading.inline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading h2 {
  max-width: 16ch;
}

.news-feed {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 0.9fr));
  gap: 1rem;
}

.news-card {
  padding: 1.5rem;
}

.news-card-featured {
  min-height: 100%;
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.editorial-card {
  padding: 1.45rem;
}

.editorial-card.wide {
  grid-column: 1 / -1;
}

.sidebar-card {
  padding: 1.25rem;
}

.sidebar-head {
  margin-bottom: 1rem;
}

.sidebar-head h3 {
  margin-top: 0.35rem;
  font-size: 1.2rem;
}

.button-stack.vertical {
  flex-direction: column;
  align-items: stretch;
}

.sidebar-note-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.compact-hiscores {
  display: grid;
  gap: 0.55rem;
}

.hiscore-entry {
  width: 100%;
  min-height: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(39, 36, 24, 0.9), rgba(24, 22, 14, 0.92));
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 64px;
  gap: 0.55rem;
  align-items: center;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.hiscore-entry.is-active {
  border-color: rgba(106, 176, 76, 0.5);
  box-shadow: 0 0 0 1px rgba(106, 176, 76, 0.2), 0 14px 32px rgba(0, 0, 0, 0.28);
  background: linear-gradient(180deg, rgba(50, 59, 29, 0.92), rgba(24, 27, 14, 0.95));
}

.hiscore-rank {
  color: var(--gold-soft);
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  font-weight: 800;
}

.hiscore-player {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.hiscore-player strong {
  font-size: 0.96rem;
}

.hiscore-player span {
  color: var(--muted);
  font-size: 0.76rem;
}

.hiscore-level {
  justify-self: end;
  color: var(--accent-soft);
  font-weight: 800;
  font-size: 0.92rem;
}

.compact-profile {
  margin-top: 0.9rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.hiscore-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.hiscore-total span,
.hiscore-meta span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hiscore-total strong {
  color: var(--gold-soft);
  font-size: 1.2rem;
}

.hiscore-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.hiscore-meta p {
  margin: 0;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.hiscore-meta strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--text);
}

.roadmap-rail {
  display: grid;
  gap: 0.7rem;
}

.compact-step {
  padding: 1rem 1rem 1rem 1.2rem;
  border-radius: 14px;
}

.roadmap-step {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(20, 18, 10, 0.95), rgba(11, 10, 6, 0.9));
  border: 1px solid var(--line-strong);
}

.roadmap-step::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: rgba(106, 176, 76, 0.5);
}

.roadmap-step.current::before {
  background: linear-gradient(180deg, var(--gold), var(--accent));
}

.roadmap-step span {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: var(--gold-soft);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.compact-faq {
  display: grid;
  gap: 0.85rem;
}

.faq-list details {
  padding: 1.15rem 1.2rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list p {
  margin: 0.75rem 0 0;
}

.subscribe-form {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0 0.75rem;
}

.subscribe-form input {
  width: 100%;
  min-height: 50px;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.subscribe-form input::placeholder {
  color: rgba(232, 245, 233, 0.42);
}

.text-link,
.footer p,
.footer-links a {
  color: var(--muted);
}

.text-link:hover,
.footer-links a:hover {
  color: var(--gold-soft);
}

.launch-anchor {
  margin-top: 2rem;
  margin-bottom: 0;
}

.launch-card {
  text-align: center;
  padding: 1.8rem;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 999px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1120px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero,
  .portal-grid,
  .news-feed,
  .editorial-grid,
  .hiscore-meta {
    grid-template-columns: 1fr;
  }

  .service-sidebar {
    position: static;
  }

  .section-heading h2 {
    max-width: none;
  }
}

@media (max-width: 820px) {
  .topbar {
    padding: 0.9rem 1rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav,
  .topbar-actions {
    display: none;
  }

  .topbar.is-open .nav,
  .topbar.is-open .topbar-actions {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar.is-open .nav a,
  .topbar.is-open .topbar-actions a,
  .topbar.is-open .topbar-actions button {
    width: 100%;
  }

  .portal-main {
    padding: 1.4rem 1rem 3rem;
  }

  .hero-copy,
  .teaser-card,
  .sidebar-card,
  .launch-card,
  .news-card,
  .info-card,
  .faq-list details {
    padding: 1.35rem;
  }

  .section-heading.inline,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 2.3rem;
  }

  .brand-copy span {
    display: none;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
  }

  .hero-actions,
  .button-stack {
    width: 100%;
  }

  .hiscore-entry {
    grid-template-columns: 40px minmax(0, 1fr) 56px;
  }
}

.full-width {
  width: 100%;
}

body.overlay-open {
  overflow: hidden;
}

.hiscores-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

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

.hiscores-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 2, 0.78);
  backdrop-filter: blur(6px);
}

.hiscores-dialog {
  position: relative;
  width: min(1120px, 100%);
  max-height: calc(100vh - 3rem);
  overflow: auto;
  padding: 1.5rem;
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(20, 18, 10, 0.98), rgba(11, 10, 6, 0.95));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.46);
}

.hiscores-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.25rem;
}

.icon-button {
  min-width: 48px;
  padding-inline: 0.9rem;
}

.overlay-subtitle {
  max-width: 62ch;
  margin: 0.6rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.hiscores-overlay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1rem;
}

.hiscores-overlay-table,
.overlay-profile {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.hiscores-overlay-table {
  padding: 1rem;
}

.overlay-head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 120px;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.overlay-rows {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.overlay-rows .hiscore-entry {
  grid-template-columns: 72px minmax(0, 1fr) 120px;
}

.overlay-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.overlay-page-label {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.overlay-profile {
  padding: 1.15rem;
}

.overlay-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.overlay-mini-stats .hiscore-mini-stat {
  padding: 0.85rem 0.95rem;
}

@media (max-width: 1120px) {
  .hiscores-overlay-grid,
  .overlay-mini-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .hiscores-dialog {
    padding: 1rem;
  }

  .hiscores-dialog-head,
  .overlay-pagination {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  .overlay-head,
  .overlay-rows .hiscore-entry {
    grid-template-columns: 48px minmax(0, 1fr) 72px;
  }
}
