/* ── MadX Games Hub — Landing Page ─────────────────────────────────────────── */

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

:root {
  --bg:          #080c14;
  --bg2:         #0f172a;
  --bg3:         #131c2e;
  --border:      rgba(200,146,42,0.15);
  --gold:        #c8922a;
  --gold-bright: #e8b84b;
  --gold-dim:    rgba(200,146,42,0.4);
  --text:        #64748b;
  --text-mid:    #94a3b8;
  --text-bright: #e2ddd5;
  --green:       #2ecc71;
  --green-dim:   #1a6e3f;
  --accent:      #6366f1;
  --accent2:     #818cf8;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-mid);
  line-height: 1.6;
  min-height: 100vh;
}

/* Subtle noise — matches Madbyte hub */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

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

/* ── Nav ── */
.hub-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(8,8,16,0.85);
  backdrop-filter: blur(12px);
}

.hub-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hub-nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.02em;
}
.logo-accent { color: var(--gold); }

.hub-nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.85rem;
  color: var(--text);
}
.hub-nav-links a:hover { color: var(--text-bright); }

/* ── Hero ── */
.hub-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hub-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
}
.hero-glow-1 {
  width: 600px; height: 600px;
  background: var(--accent);
  top: -100px; left: -100px;
}
.hero-glow-2 {
  width: 500px; height: 500px;
  background: var(--gold);
  bottom: -80px; right: -80px;
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hub-hero-content {
  position: relative;
  text-align: center;
  max-width: 700px;
}

.hero-badge {
  display: inline-block;
  background: rgba(91,79,207,0.15);
  border: 1px solid rgba(91,79,207,0.4);
  color: var(--accent2);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 28px;
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.cta-primary {
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: #0d0d0d;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
  transition: transform 0.15s, opacity 0.15s;
}
.cta-primary:hover { transform: translateY(-2px); opacity: 0.9; }

.cta-secondary {
  padding: 14px 28px;
  background: rgba(46,204,113,0.1);
  border: 1px solid rgba(46,204,113,0.3);
  color: var(--green);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
  transition: transform 0.15s, background 0.15s;
}
.cta-secondary:hover { transform: translateY(-2px); background: rgba(46,204,113,0.16); }

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-stat-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  font-family: 'Courier New', monospace;
}
.hero-stat-label {
  font-size: 0.7rem;
  color: var(--text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-stat-div {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ── Sections ── */
.hub-section {
  padding: 96px 24px;
}
.hub-section-dark {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hub-container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.section-sub {
  font-size: 1rem;
  color: var(--text);
  max-width: 560px;
  margin-bottom: 56px;
  line-height: 1.7;
}

/* ── Game Cards ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.game-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.game-card:hover {
  border-color: rgba(200,146,42,0.3);
  transform: translateY(-3px);
}

.game-card-featured {
  border-color: rgba(200,146,42,0.25);
  background: linear-gradient(145deg, #0f0f1e 0%, #090912 100%);
}
.game-card-featured:hover { border-color: rgba(200,146,42,0.5); }

.game-card-glow {
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(200,146,42,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.game-card-soon {
  opacity: 0.55;
}
.game-card-soon:hover { opacity: 0.7; transform: none; }

.game-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.game-icon { font-size: 2rem; }
.game-icon-dim { filter: grayscale(1); opacity: 0.5; }

.game-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 20px;
}
.game-badge-live {
  background: rgba(46,204,113,0.12);
  border: 1px solid rgba(46,204,113,0.3);
  color: var(--green);
}
.game-badge-free {
  background: rgba(91,79,207,0.12);
  border: 1px solid rgba(91,79,207,0.35);
  color: var(--accent2);
}
.game-badge-soon {
  background: rgba(100,100,120,0.15);
  border: 1px solid rgba(100,100,120,0.3);
  color: var(--text);
}

.game-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.01em;
}
.game-title-dim { color: var(--text); }

.game-desc {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.65;
}
.game-desc-dim { color: rgba(136,136,153,0.6); }

.game-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-mid);
}
.game-features li { display: flex; align-items: baseline; gap: 6px; }

.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.game-requires {
  font-size: 0.72rem;
  color: var(--text);
}

.game-play-btn {
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: #0d0d0d;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 4px;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.game-play-btn:hover { opacity: 0.85; }

.game-play-btn-green {
  background: linear-gradient(135deg, #1a6e3f, var(--green));
  color: #040d08;
}

.game-play-btn-disabled {
  padding: 8px 18px;
  background: rgba(100,100,120,0.1);
  color: var(--text);
  font-size: 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: default;
  white-space: nowrap;
}

/* ── Token section ── */
.token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin: 48px 0;
}

.token-stat {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}
.token-stat-num {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
  font-family: 'Courier New', monospace;
  line-height: 1.3;
}
.token-stat-label {
  font-size: 0.72rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.token-steps {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: wrap;
  margin-top: 40px;
}

.token-step {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.step-num {
  width: 28px;
  height: 28px;
  background: var(--gold-dim);
  color: var(--gold-bright);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-text {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.5;
}
.step-text strong { color: var(--text-bright); display: block; margin-bottom: 2px; }

.step-arrow {
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: var(--gold-dim);
  font-size: 1.2rem;
  flex-shrink: 0;
  align-self: center;
}

/* ── Pillars ── */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.pillar {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  transition: border-color 0.2s;
}
.pillar:hover { border-color: rgba(200,146,42,0.25); }

.pillar-icon { font-size: 1.8rem; margin-bottom: 14px; }

.pillar h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.pillar p {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.65;
}

/* ── Footer ── */
.hub-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  background: var(--bg);
}

.hub-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-by { font-size: 0.78rem; color: var(--text); }
.footer-by a:hover { color: var(--gold); }

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.82rem;
  color: var(--text);
}
.footer-links a:hover { color: var(--text-bright); }

.footer-disclaimer {
  font-size: 0.72rem;
  color: rgba(136,136,153,0.5);
  width: 100%;
  text-align: center;
  margin-top: 8px;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .hub-nav-links { display: none; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .hero-stats { gap: 18px; }
  .hero-stat-div { display: none; }
  .token-steps { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); align-self: flex-start; margin-left: 10px; }
  .hub-footer-inner { flex-direction: column; align-items: flex-start; }
  .games-grid { grid-template-columns: 1fr; }
}
