@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap; src: url(fonts/fredoka-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-display: swap; src: url(fonts/fredoka-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url(fonts/nunito-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url(fonts/nunito-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url(fonts/nunito-latin-800-normal.woff2) format('woff2'); }

:root {
  --bg: #1c0542;
  --bg-top: #3c0c8c;
  --ink: #360376;
  --panel: rgba(60, 14, 118, .55);
  --panel-edge: rgba(255, 255, 255, .12);
  --text: #ffffff;
  --muted: #d9bff2;
  --pink: #ff3fa4;
  --violet: #6e1ac3;
  --blue: #049cfc;
  --cyan: #63e3fd;
  --yellow: #ffd60a;
  --wordmark: linear-gradient(180deg, #ffffff 6%, #ffa6dc 50%, #ffd83a 94%);
  --display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font: 400 17px/1.6 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(60vmax 50vmax at 0% 0%, rgba(122, 32, 222, .75), transparent 70%),
    radial-gradient(55vmax 45vmax at 100% 20%, rgba(255, 63, 164, .45), transparent 70%),
    radial-gradient(50vmax 40vmax at 50% 110%, rgba(214, 39, 183, .30), transparent 70%),
    linear-gradient(180deg, var(--bg-top), var(--bg) 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}
a { color: var(--cyan); }
img { max-width: 100%; }

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

/* Floating sparkles behind everything. */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.sky i {
  position: absolute; border-radius: 50%; filter: blur(2px); opacity: .7;
  animation: float 14s ease-in-out infinite alternate;
}
.sky i:nth-child(1) { width: 10px; height: 10px; background: var(--yellow); top: 18%; left: 12%; }
.sky i:nth-child(2) { width: 6px; height: 6px; background: var(--cyan); top: 32%; left: 82%; animation-duration: 11s; }
.sky i:nth-child(3) { width: 8px; height: 8px; background: var(--pink); top: 70%; left: 8%; animation-duration: 17s; }
.sky i:nth-child(4) { width: 5px; height: 5px; background: #fff; top: 12%; left: 58%; animation-duration: 9s; }
.sky i:nth-child(5) { width: 7px; height: 7px; background: var(--yellow); top: 82%; left: 74%; animation-duration: 13s; }
.sky i:nth-child(6) { width: 140px; height: 140px; background: #9b4dff; top: 55%; left: 88%; filter: blur(60px); opacity: .35; }
.sky i:nth-child(7) { width: 180px; height: 180px; background: #63e3fd; top: 4%; left: 40%; filter: blur(80px); opacity: .18; }
@keyframes float { to { transform: translate(18px, -26px); } }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { width: 44px; height: 44px; border-radius: 13px; box-shadow: 0 6px 18px rgba(255, 63, 164, .35); }
.wordmark {
  font: 700 28px/1 var(--display); letter-spacing: .2px;
  background: var(--wordmark); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 var(--ink));
}
.nav { display: flex; gap: 6px; }
.nav a {
  color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 8px 14px; border-radius: 999px;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 48px 0 72px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow);
  background: rgba(255, 214, 10, .12); border: 1px solid rgba(255, 214, 10, .3); padding: 6px 12px; border-radius: 999px;
}
h1 {
  font: 700 clamp(44px, 6.4vw, 76px)/1.02 var(--display); margin: 18px 0 18px; letter-spacing: -.5px;
}
h1 .pop { background: var(--wordmark); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 var(--ink)); }
.lead { font-size: 20px; color: var(--muted); max-width: 34ch; margin: 0 0 30px; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 700 18px/1 var(--display); color: #fff;
  padding: 16px 26px; border-radius: 18px;
  background: linear-gradient(180deg, #ff6dbb, #ff3fa4 55%, #e01f86);
  box-shadow: 0 5px 0 #a3105d, 0 14px 30px rgba(255, 63, 164, .4);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #a3105d, 0 8px 18px rgba(255, 63, 164, .4); }
.btn.alt {
  background: linear-gradient(180deg, #8a3cf0, #6619d2);
  box-shadow: 0 5px 0 #3d0a8c, 0 14px 30px rgba(110, 26, 195, .45);
}
.soon { font-size: 14px; color: var(--muted); font-weight: 700; }

.hero-art { position: relative; display: grid; place-items: center; }
.hero-art::before {
  content: ''; position: absolute; width: 88%; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(from 90deg, #ff3fa4, #ffd60a, #63e3fd, #9b4dff, #ff3fa4);
  filter: blur(46px); opacity: .55; animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }
.hero-art img {
  position: relative; width: min(400px, 82vw); height: auto; aspect-ratio: 1; border-radius: 22%;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .14), 0 30px 70px rgba(28, 4, 60, .7);
  animation: bob 5s ease-in-out infinite alternate;
}
@keyframes bob { to { transform: translateY(-14px) rotate(-1.5deg); } }

/* Stats strip */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-top: -20px; margin-bottom: 84px;
}
.stat {
  background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 22px;
  padding: 20px; text-align: center; backdrop-filter: blur(10px);
}
.stat b { display: block; font: 700 40px/1 var(--display); background: var(--wordmark); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-weight: 700; font-size: 15px; }

/* Sections */
section { margin-bottom: 96px; }
h2 { font: 700 clamp(32px, 4vw, 46px)/1.1 var(--display); margin: 0 0 12px; text-align: center; }
.sub { text-align: center; color: var(--muted); font-size: 19px; margin: 0 auto 40px; max-width: 46ch; }

.ico {
  display: inline-block; width: 30px; height: 30px; background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}

/* Play modes */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mode {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 28px; padding: 30px 28px;
  backdrop-filter: blur(10px);
}
.mode .badge {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--a), var(--b)); color: #fff;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--a) 45%, transparent);
}
.mode h3 { font: 700 24px/1.2 var(--display); margin: 0 0 8px; }
.mode p { margin: 0; color: var(--muted); }

/* Categories */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat {
  position: relative; border-radius: 24px; padding: 22px 20px 20px; overflow: hidden;
  background: linear-gradient(140deg, var(--a), var(--b));
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), 0 14px 30px rgba(20, 2, 50, .35);
  transition: transform .15s ease;
}
.cat:hover { transform: translateY(-4px) rotate(-.6deg); }
.cat .ico { width: 40px; height: 40px; color: #fff; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .2)); }
.cat .big {
  position: absolute; right: -14px; bottom: -14px; width: 110px; height: 110px; opacity: .18;
}
.cat h3 { font: 700 21px/1.2 var(--display); margin: 14px 0 2px; text-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.cat span { font-weight: 800; font-size: 14px; opacity: .9; }

/* Game ticker */
.ticker { overflow: hidden; margin-top: 30px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker .row { display: flex; gap: 10px; width: max-content; animation: scroll 60s linear infinite; }
.ticker .row.rev { animation-direction: reverse; animation-duration: 70s; margin-top: 10px; }
.ticker span {
  white-space: nowrap; font-weight: 800; font-size: 15px;
  padding: 9px 16px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid var(--panel-edge);
}
@keyframes scroll { to { transform: translateX(-50%); } }

/* Invite */
.invite {
  display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center;
  border-radius: 32px; padding: 40px;
  background: linear-gradient(120deg, rgba(255, 63, 164, .9), rgba(138, 60, 240, .9));
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .15), 0 30px 60px rgba(28, 4, 60, .5);
}
.invite .gift {
  width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center;
  background: var(--yellow); color: #8a2a00; box-shadow: 0 6px 0 #c79a00;
}
.invite .gift .ico { width: 56px; height: 56px; }
.invite h2 { text-align: left; margin-bottom: 6px; }
.invite p { margin: 0; font-size: 18px; color: #ffe8f5; }

/* Footer */
footer { border-top: 1px solid var(--panel-edge); padding: 30px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; font-weight: 700; }
footer a:hover { color: #fff; }

/* Legal pages */
.doc {
  background: rgba(28, 4, 60, .62); border: 1px solid var(--panel-edge); border-radius: 28px;
  padding: clamp(24px, 5vw, 56px); margin: 24px auto 80px; max-width: 820px; backdrop-filter: blur(12px);
}
.doc h1 { font-size: clamp(36px, 5vw, 52px); margin: 0 0 6px; }
.doc .date { color: var(--muted); margin: 0 0 30px; font-weight: 700; }
.doc h2 { text-align: left; font-size: 24px; margin: 38px 0 10px; color: #ffd6ee; }
.doc h3 { font: 700 18px/1.3 var(--display); margin: 22px 0 6px; }
.doc p, .doc li { color: #f0e4ff; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--panel-edge); }
.doc th { color: var(--yellow); font-weight: 800; }
.doc .note { background: rgba(255, 214, 10, .1); border: 1px solid rgba(255, 214, 10, .3); border-radius: 16px; padding: 14px 18px; }
mark.ph { background: rgba(255, 214, 10, .22); color: #fff3b0; padding: 1px 6px; border-radius: 6px; }
.toc { columns: 2; padding-left: 20px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 24px; gap: 30px; }
  .hero-art { order: -1; }
  .lead { margin-inline: auto; }
  .cta { justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 0; }
  .modes { grid-template-columns: 1fr; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .invite { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 32px 24px; }
  .invite h2 { text-align: center; }
}
@media (max-width: 560px) {
  .nav a:not(:last-child) { display: none; }
  .hero-art img { width: 200px; }
  .toc { columns: 1; }
  .cat { padding: 18px 16px; }
  .cat h3 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
