:root {
  --bg: #06111c;
  --bg-soft: #0b1826;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.085);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f6fbff;
  --muted: rgba(214, 226, 244, 0.75);
  --soft: rgba(214, 226, 244, 0.56);
  --accent: #35e6d0;
  --accent-2: #ffd02e;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(720px 420px at 22% 4%, rgba(53, 230, 208, 0.16), transparent 64%),
    radial-gradient(760px 480px at 80% 14%, rgba(36, 168, 255, 0.18), transparent 60%),
    linear-gradient(180deg, #08131f 0%, #06111c 58%, #050a11 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

a {
  color: #a9f5eb;
}

.site {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 20px 18px 34px;
}

.topbar,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  min-height: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  box-shadow: inset 0 0 0 3px rgba(255, 208, 46, 0.58), 0 0 18px rgba(53, 230, 208, 0.34);
}

.brand-name {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0;
}

.topnav,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.topnav a,
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 800;
}

.topnav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

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

.topnav a:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.05);
}

.main {
  margin-top: 18px;
}

.home-shell,
.page,
.ringzzle-leaderboard-page {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.035));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.78fr);
  gap: 24px;
  align-items: center;
  padding: 36px 30px 30px;
}

.eyebrow,
.ringzzle-eyebrow {
  margin: 0 0 9px;
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(3.1rem, 10vw, 6rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.3rem, 4vw, 2rem);
  line-height: 1.15;
  font-weight: 900;
}

.hero-copy,
.section p,
.page-content,
.ringzzle-leaderboard-hero p,
.ringzzle-leaderboard-note {
  color: var(--muted);
  line-height: 1.65;
}

.hero-copy {
  max-width: 610px;
  margin: 12px 0 0;
  font-size: 1rem;
}

.actions,
.leaderboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.btn,
.ringzzle-play-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.btn.primary,
.ringzzle-play-link {
  border-color: transparent;
  background: linear-gradient(135deg, #35e6d0, #ffd02e);
  color: #07131e;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #a9f5eb;
  font-weight: 900;
  text-decoration: none;
}

.btn:hover,
.ringzzle-play-link:hover {
  transform: translateY(-1px);
}

.game-preview {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
}

.mini-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: min(280px, 100%);
  margin: 0 auto 16px;
  padding: 10px;
  border: 2px solid rgba(53, 230, 208, 0.28);
  border-radius: var(--radius);
  background: #07131e;
}

.mini-cell {
  aspect-ratio: 1;
  border: 1px solid rgba(246, 251, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  position: relative;
}

.mini-cell::before,
.mini-cell::after,
.mini-cell span {
  content: "";
  position: absolute;
  inset: 13%;
  border: 5px solid var(--ring-color, #35e6d0);
  border-radius: 50%;
}

.mini-cell::after {
  inset: 27%;
  border-width: 4px;
  border-color: var(--ring-color-2, #ffd02e);
}

.mini-cell span {
  inset: 41%;
  border-width: 3px;
  border-color: var(--ring-color-3, #24a8ff);
}

.preview-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.preview-list li,
.plain-list li {
  color: var(--muted);
  line-height: 1.45;
}

.home-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
}

.section {
  padding: 24px 26px;
}

.section + .section {
  border-left: 1px solid var(--border);
}

.section h2,
.leaderboard-teaser h2,
.posts-teaser h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.plain-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
}

.section-link {
  margin: 14px 0 0;
}

.section-link a {
  color: #a9f5eb;
  font-weight: 900;
  text-decoration: none;
}

.leaderboard-teaser,
.posts-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px 26px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.13);
}

.posts-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.posts-list a {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.page {
  padding: 28px;
}

.page-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: 1;
}

.page-content {
  max-width: 780px;
}

.page-content h2 {
  margin-top: 28px;
  color: var(--text);
}

.page-content a {
  font-weight: 850;
}

.ringzzle-leaderboard-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px;
}

.ringzzle-leaderboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.ringzzle-leaderboard-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2.2rem, 8vw, 4.6rem);
  line-height: 0.96;
}

.ringzzle-leaderboard-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.ringzzle-leaderboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.ringzzle-leaderboard-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.ringzzle-leaderboard-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.075);
}

.ringzzle-leaderboard-tabs button {
  min-height: 34px;
  padding: 7px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.ringzzle-leaderboard-tabs button.is-active {
  background: var(--accent);
  color: #07131e;
}

.ringzzle-leaderboard-status,
.ringzzle-leaderboard-note {
  margin: 0;
  color: var(--muted);
}

.ringzzle-leaderboard-status {
  padding: 18px;
}

.ringzzle-leaderboard-table-wrap {
  overflow-x: auto;
}

.ringzzle-leaderboard-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.ringzzle-leaderboard-table th,
.ringzzle-leaderboard-table td {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.ringzzle-leaderboard-table th {
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ringzzle-leaderboard-note {
  margin-top: 16px;
}

.footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .site {
    padding: 16px 14px 28px;
  }

  .topbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav,
  .footer-links {
    justify-content: flex-start;
  }

  .topnav a {
    padding: 8px 7px;
  }

  .hero,
  .home-sections,
  .leaderboard-teaser,
  .posts-teaser {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 26px 20px 22px;
  }

  .game-preview {
    padding: 14px;
  }

  .section {
    padding: 20px;
  }

  .section + .section {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .leaderboard-teaser,
  .posts-teaser,
  .page,
  .ringzzle-leaderboard-page {
    padding: 20px;
  }

  .actions,
  .leaderboard-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .ringzzle-play-link {
    width: 100%;
  }

  .ringzzle-leaderboard-hero,
  .ringzzle-leaderboard-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ringzzle-leaderboard-tabs {
    width: 100%;
  }

  .ringzzle-leaderboard-tabs button {
    flex: 1;
  }
}
