/* Jai Game Club — design tokens from websiteplan.md */
:root {
  --bg-primary: #0a0e27;
  --bg-card: #131837;
  --cta-primary: #ffb800;
  --cta-hover: #e5a600;
  --text-primary: #ffffff;
  --text-muted: #b0b5cc;
  --color-success: #00c853;
  --color-danger: #ff1744;
  --color-accent: #7c4dff;
  --border-color: #1e2347;
  --font-heading: "Inter", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --nav-height: 60px;
  --bottom-cta-height: 56px;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 768px) {
  body.has-mobile-cta {
    padding-bottom: calc(var(--bottom-cta-height) + env(safe-area-inset-bottom));
  }
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.625rem);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
}

h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
}

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

a {
  color: var(--cta-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.top-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8125rem;
}

.top-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  padding: 0.5rem 1.25rem;
  max-width: 1140px;
  margin: 0 auto;
}

.top-bar a {
  color: var(--text-primary);
  font-weight: 500;
}

.top-bar a:hover {
  color: var(--cta-primary);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(10, 14, 39, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.logo:hover {
  text-decoration: none;
  color: var(--cta-primary);
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: conic-gradient(
    from 45deg,
    var(--color-success),
    var(--cta-primary),
    var(--color-danger),
    var(--color-accent),
    var(--color-success)
  );
  box-shadow: var(--shadow);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
  color: var(--text-primary);
  background: rgba(255, 184, 0, 0.08);
  text-decoration: none;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
}

.nav-mobile {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  flex-direction: column;
  padding: 0.75rem 1.25rem 1rem;
  gap: 0.25rem;
}

.nav-mobile.is-open {
  display: flex;
}

.nav-mobile a {
  color: var(--text-primary);
  padding: 0.65rem 0.5rem;
  border-radius: 8px;
  font-weight: 500;
}

.nav-mobile a:hover {
  background: rgba(255, 184, 0, 0.1);
  text-decoration: none;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .nav-mobile {
    display: none !important;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9375rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--cta-primary);
  color: #0a0e27;
  box-shadow: 0 4px 20px rgba(255, 184, 0, 0.35);
}

.btn-primary:hover {
  background: var(--cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 184, 0, 0.45);
  text-decoration: none;
  color: #0a0e27;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--cta-primary);
  color: var(--cta-primary);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-block {
  width: 100%;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 0 4rem;
}

.hero-bg {
  position: absolute;
  inset: -40%;
  background: radial-gradient(
      ellipse at 30% 20%,
      rgba(124, 77, 255, 0.25) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 70% 60%,
      rgba(255, 23, 68, 0.12) 0%,
      transparent 45%
    ),
    radial-gradient(
      ellipse at 50% 100%,
      rgba(0, 200, 83, 0.15) 0%,
      transparent 40%
    );
  animation: heroPulse 12s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes heroPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.05) rotate(3deg);
  }
}

.colour-wheel {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: conic-gradient(
    var(--color-success),
    var(--cta-primary),
    var(--color-danger),
    var(--color-accent),
    var(--color-success)
  );
  opacity: 0.22;
  filter: blur(1px);
  animation: wheelSpin 20s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes wheelSpin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 2rem 0;
  border-block: 1px solid var(--border-color);
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.trust-badge span {
  color: var(--text-muted);
  font-weight: 400;
}

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

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--cta-primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.section {
  padding: 3rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title p {
  max-width: 640px;
  margin: 0.5rem auto 0;
}

.feature-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(255, 184, 0, 0.35);
  transform: translateY(-2px);
}

.card h3 {
  color: var(--text-primary);
}

.games-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: rgba(0, 200, 83, 0.15);
  color: var(--color-success);
}

.tag-soon {
  background: rgba(124, 77, 255, 0.2);
  color: #c4b5fd;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.25rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--cta-primary);
  color: #0a0e27;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.winners-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .winners-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.winner-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.winner-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-danger));
  flex-shrink: 0;
}

.winner-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.winner-amount {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-success);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--bg-card);
}

.faq-item summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
}

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

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--cta-primary);
  font-weight: 800;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item .faq-body {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.cta-banner {
  background: linear-gradient(
    135deg,
    rgba(255, 184, 0, 0.15) 0%,
    rgba(124, 77, 255, 0.12) 100%
  );
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  margin: 2rem 0;
}

.cta-banner.inline {
  margin: 1.5rem 0;
}

.page-header {
  padding: 2.5rem 0 1.5rem;
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--cta-primary);
}

.prose {
  max-width: 760px;
}

.prose h2 {
  margin-top: 2.5rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: var(--bg-card);
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
}

tr:last-child td {
  border-bottom: none;
}

.tip-box {
  background: rgba(0, 200, 83, 0.08);
  border: 1px solid rgba(0, 200, 83, 0.25);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.tip-box h3 {
  color: var(--color-success);
  margin-top: 0;
}

.mockup-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .mockup-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mockup {
  aspect-ratio: 9/16;
  max-height: 220px;
  background: linear-gradient(
    180deg,
    var(--bg-card) 0%,
    rgba(30, 35, 71, 0.9) 100%
  );
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
}

.referral-hero {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 2px solid var(--cta-primary);
  margin: 2rem 0;
}

.referral-code-display {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  color: var(--cta-primary);
  letter-spacing: 0.08em;
  margin: 1rem 0;
}

.faq-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.faq-tabs a {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.faq-tabs a:hover {
  border-color: var(--cta-primary);
  color: var(--cta-primary);
  text-decoration: none;
}

.faq-category {
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--cta-primary);
}

.footer-disclaimer {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.mobile-cta-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  padding: 0.5rem 1rem;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  background: rgba(10, 14, 39, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}

@media (max-width: 1023px) {
  .mobile-cta-bar {
    display: block;
  }

  .mobile-cta-bar .btn {
    width: 100%;
    padding: 0.85rem;
  }
}

.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;
}

.version-badge {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.qr-placeholder {
  width: 120px;
  height: 120px;
  margin: 1rem auto;
  background: repeating-linear-gradient(
      45deg,
      var(--border-color),
      var(--border-color) 2px,
      transparent 2px,
      transparent 8px
    ),
    var(--bg-card);
  border-radius: 8px;
}
