/* =====================================================================================
   NFRZ website. Same design language as the in-game UI kit (nfrz_core/web/ui/theme.css):
   the violet scale, the surfaces, Inter for text and Outfit for headings, the aurora of
   the loading screen. Tokens are copied here (the site does not load game files).
   ===================================================================================== */

@font-face { font-family: "NFRZ Inter"; src: url("../fonts/inter-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "NFRZ Outfit"; src: url("../fonts/outfit-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "NFRZ Mono"; src: url("../fonts/jetbrains-mono-latin-wght.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --p-200: #d0bfff; --p-300: #b197fc; --p-400: #9775fa; --p-500: #845ef7; --p-600: #7950f2; --p-800: #6741d9;
  --accent: #c084fc; --accent-2: #e879f9;
  --grad: linear-gradient(135deg, var(--p-600) 0%, var(--accent) 100%);
  --grad-text: linear-gradient(110deg, #d0bfff 0%, #c084fc 45%, #f0abfc 100%);

  --bg: #0b0614;
  --surface: rgba(24, 16, 42, 0.72);
  --surface-2: rgba(34, 23, 58, 0.78);
  --surface-solid: #140c24;
  --border: rgba(177, 151, 252, 0.14);
  --border-strong: rgba(177, 151, 252, 0.3);
  --divider: rgba(177, 151, 252, 0.09);

  --text: #f5f3ff; --muted: #b4a9d6; --dim: #7d7299;
  --ok: #34d399; --warn: #fbbf24; --bad: #f87171;
  --gold: #fbbf24; --silver: #cbd5e1; --bronze: #d08b4c;

  --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "NFRZ Inter", "Inter", "Segoe UI", system-ui, sans-serif;
  --display: "NFRZ Outfit", "Outfit", "NFRZ Inter", system-ui, sans-serif;
  --mono: "NFRZ Mono", "JetBrains Mono", ui-monospace, monospace;
  --wrap: 1200px;
  --header: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
code { font-family: var(--mono); font-size: 0.92em; }
::selection { background: rgba(151, 117, 250, 0.45); }
:focus-visible { outline: 2px solid var(--p-300); outline-offset: 3px; border-radius: 6px; }

.i { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
.i.flip { transform: scaleX(-1); }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.wrap--narrow { width: min(780px, 100% - 40px); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------------------------------------------------------------- background */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg__aurora { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.bg__aurora--a { background: radial-gradient(circle, rgba(121, 80, 242, 0.55), transparent 65%); top: -25vmax; left: -15vmax; animation: drift 26s var(--ease) infinite alternate; }
.bg__aurora--b { background: radial-gradient(circle, rgba(232, 121, 249, 0.32), transparent 65%); top: 10vmax; right: -25vmax; animation: drift 32s var(--ease) infinite alternate-reverse; }
.bg__aurora--c { background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent 65%); bottom: -30vmax; left: 20vmax; animation: drift 38s var(--ease) infinite alternate; }
.bg__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(177, 151, 252, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(177, 151, 252, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
@keyframes drift { to { transform: translate(6vmax, 4vmax) scale(1.08); } }

/* ------------------------------------------------------------------- buttons, chips */
.btn {
  display: inline-flex; align-items: center; gap: 0.55em;
  padding: 0.72em 1.25em; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; line-height: 1; cursor: pointer; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 8px 28px rgba(121, 80, 242, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn--primary:hover { box-shadow: 0 12px 36px rgba(121, 80, 242, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn--ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--border-strong); }
.btn--ghost:hover { background: rgba(151, 117, 250, 0.12); border-color: var(--p-400); }
.btn--danger { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.4); color: #fecaca; }
.btn--sm { padding: 0.55em 1em; font-size: 0.85rem; }
.btn--lg { padding: 0.95em 1.6em; font-size: 1rem; }

.chip {
  --c: var(--p-400);
  display: inline-flex; align-items: center; gap: 0.35em;
  padding: 0.2em 0.65em; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
}
.tier {
  --c: var(--p-400);
  display: inline-flex; align-items: center; gap: 0.35em;
  padding: 0.18em 0.6em 0.18em 0.45em; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.tier .i { width: 0.95em; height: 0.95em; }
.kicker, .eyebrow {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--p-300);
}
.kicker { padding: 0.45em 0.9em; border-radius: 999px; background: rgba(151, 117, 250, 0.1); border: 1px solid var(--border-strong); }

/* ------------------------------------------------------------------- banner + header */
.banner {
  display: flex; align-items: center; justify-content: center; gap: 0.6em;
  padding: 0.55em 20px; font-size: 0.88rem; font-weight: 600; text-align: center;
  background: linear-gradient(90deg, rgba(121, 80, 242, 0.35), rgba(232, 121, 249, 0.25));
  border-bottom: 1px solid var(--border);
}
.top {
  position: sticky; top: 0; z-index: 50; height: var(--header);
  background: rgba(11, 6, 20, 0.6); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent; transition: border-color 0.3s, background 0.3s;
}
.top.is-scrolled { background: rgba(11, 6, 20, 0.85); border-bottom-color: var(--border); }
.top__inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 0.65em; font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.01em; }
.brand__logo { width: 36px; height: 36px; filter: drop-shadow(0 6px 18px rgba(121, 80, 242, 0.5)); }
.nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.nav__link { position: relative; padding: 0.5em 0.85em; border-radius: 999px; font-size: 0.92rem; font-weight: 600; color: var(--muted); transition: color 0.2s, background 0.2s; }
.nav__link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav__link.is-active { color: var(--text); background: rgba(151, 117, 250, 0.14); }
.top__right { display: flex; align-items: center; gap: 12px; }
.top__menu { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.04); cursor: pointer; align-items: center; justify-content: center; }
.top__menu .i { width: 20px; height: 20px; }
.status {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.42em 0.85em; border-radius: 999px; font-size: 0.82rem; color: var(--muted);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
}
.status b { color: var(--text); }
.status__max { color: var(--dim); }
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.status.is-online .status__dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

/* ------------------------------------------------------------------- hero */
.hero { padding: clamp(48px, 9vh, 110px) 0 40px; }
.hero__inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero__title { font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 800; margin: 22px 0 18px; letter-spacing: -0.025em; line-height: 1.02; }
.hero__lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 36em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.connect {
  display: inline-flex; align-items: center; gap: 0.7em; margin-top: 16px;
  padding: 0.5em 0.6em 0.5em 0.5em; border-radius: 12px; cursor: pointer;
  background: rgba(0, 0, 0, 0.25); border: 1px dashed var(--border-strong); color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
.connect:hover { border-color: var(--p-400); color: var(--text); }
.connect__label { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; padding: 0.2em 0.5em; border-radius: 6px; background: rgba(151, 117, 250, 0.2); color: var(--p-200); }
.connect code { color: var(--text); }
.connect.is-copied { border-color: var(--ok); color: var(--ok); }

.hero__art { display: flex; justify-content: center; }
.orbit { position: relative; width: min(420px, 80vw); aspect-ratio: 1; }
.orbit__ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--border-strong); }
.orbit__ring--1 { inset: 12%; animation: spin 40s linear infinite; border-style: dashed; }
.orbit__ring--2 { inset: 0; animation: spin 70s linear infinite reverse; }
.orbit__ring--3 { inset: 26%; background: radial-gradient(circle, rgba(121, 80, 242, 0.35), transparent 70%); border: 0; }
.orbit__ring--2::before { content: ""; position: absolute; top: 8%; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px var(--accent); }
.orbit__logo { position: absolute; inset: 33%; width: 34%; filter: drop-shadow(0 20px 50px rgba(121, 80, 242, 0.7)); animation: float 6s ease-in-out infinite; }
.orbit__chip {
  --c: var(--p-400);
  position: absolute; display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.6em 1em; border-radius: 999px; font-weight: 700; font-size: 0.88rem;
  background: rgba(20, 12, 36, 0.85); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); animation: float 7s ease-in-out infinite;
}
.orbit__chip .i { color: var(--c); }
.orbit__chip--a { top: 6%; left: -4%; }
.orbit__chip--b { top: 46%; right: -10%; animation-delay: -2s; }
.orbit__chip--c { bottom: 4%; left: 6%; animation-delay: -4s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-10px); } }

.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 56px; }
.counter {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
  padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border);
}
.counter__icon { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(151, 117, 250, 0.14); color: var(--p-300); }
.counter__value { font-family: var(--display); font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.counter__label { font-size: 0.82rem; color: var(--muted); }

/* ------------------------------------------------------------------- sections */
.section { padding: 56px 0; }
.section--tight { padding: 24px 0 56px; }
.section__head { margin-bottom: 28px; }
.section__head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 800; margin-top: 8px; }
.section__head p { color: var(--muted); margin-top: 8px; }
.section__head--row { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section__head--small { margin: 44px 0 18px; }
.section__head--small h2 { font-size: 1.4rem; margin: 0; }

.pagehead { padding: clamp(40px, 7vh, 80px) 0 20px; }
.pagehead h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; margin-top: 10px; }
.pagehead p { color: var(--muted); margin-top: 10px; max-width: 42em; }

.notice {
  display: flex; align-items: center; gap: 18px; padding: 18px 22px; border-radius: var(--r-lg);
  background: linear-gradient(110deg, rgba(121, 80, 242, 0.22), rgba(232, 121, 249, 0.08)); border: 1px solid var(--border-strong);
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.notice:hover { border-color: var(--p-400); transform: translateY(-2px); }
.notice__icon { width: 46px; height: 46px; flex: none; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(121, 80, 242, 0.45); }
.notice__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.notice__meta { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--muted); }
.notice__body b { font-family: var(--display); font-size: 1.15rem; }
.notice__text { color: var(--muted); font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice__go { color: var(--p-300); }

/* ------------------------------------------------------------------- worlds */
.worlds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.world {
  --c: var(--p-400);
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--border); overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.world::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 55%); pointer-events: none; }
.world:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.world__icon { width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.world__icon .i { width: 24px; height: 24px; }
.world h3 { font-size: 1.45rem; font-weight: 800; }
.world p { color: var(--muted); }
.world ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 7px; }
.world li { display: flex; align-items: center; gap: 0.55em; font-size: 0.92rem; }
.world li .i { color: var(--c); }
.world__link { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 0.4em; font-weight: 700; font-size: 0.9rem; color: var(--c); }

/* ------------------------------------------------------------------- post cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-solid); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__art { --c: var(--p-400); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: color-mix(in srgb, var(--c) 80%, white); background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c) 35%, transparent), transparent 60%), linear-gradient(135deg, #1a1030, #0f0820); }
.card__art .i { width: 44px; height: 44px; opacity: 0.85; }
.card__pin { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 0.35em; padding: 0.25em 0.7em; border-radius: 999px; font-size: 0.72rem; font-weight: 700; background: rgba(11, 6, 20, 0.8); border: 1px solid var(--border-strong); }
.card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px; flex: 1; }
.card__meta { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--dim); }
.card__title { font-family: var(--display); font-size: 1.22rem; font-weight: 700; line-height: 1.25; }
.card__text { color: var(--muted); font-size: 0.92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__more { margin-top: auto; display: inline-flex; align-items: center; gap: 0.4em; font-size: 0.85rem; font-weight: 700; color: var(--p-300); }

/* ------------------------------------------------------------------- boards */
.boards { display: grid; gap: 18px; }
.boards--3 { grid-template-columns: repeat(3, 1fr); }
.boards--2 { grid-template-columns: repeat(2, 1fr); }
.board { display: flex; flex-direction: column; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.board__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.board__head h3 { font-size: 1.12rem; font-weight: 700; }
.board__head span:not(.board__icon) { font-size: 0.8rem; color: var(--dim); }
.board__icon { --c: var(--p-400); width: 40px; height: 40px; flex: none; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); }
.board__empty { color: var(--dim); font-size: 0.9rem; padding: 18px 0; }
.board__more { margin-top: 12px; display: inline-flex; align-items: center; gap: 0.3em; font-size: 0.85rem; font-weight: 700; color: var(--p-300); }

.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rank-list__row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; transition: background 0.2s; }
.rank-list__row:hover { background: rgba(255, 255, 255, 0.035); }
.rank-list__name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-list__name small { display: block; font-weight: 500; font-size: 0.78rem; color: var(--dim); }
.rank-list__value { font-family: var(--display); font-size: 1.02rem; }
.pos {
  width: 30px; height: 30px; flex: none; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 800; font-size: 0.88rem; color: var(--muted); background: rgba(255, 255, 255, 0.05);
}
.pos--1 { color: #1a1206; background: linear-gradient(135deg, #fde68a, var(--gold)); box-shadow: 0 4px 16px rgba(251, 191, 36, 0.35); }
.pos--2 { color: #111827; background: linear-gradient(135deg, #f1f5f9, var(--silver)); }
.pos--3 { color: #1f1208; background: linear-gradient(135deg, #f3c08e, var(--bronze)); }
.gang-dot { --c: var(--p-400); display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.55em; background: var(--c); box-shadow: 0 0 10px var(--c); vertical-align: 0.05em; }

.banner-link { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 18px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); color: var(--muted); transition: border-color 0.2s; }
.banner-link:hover { border-color: var(--p-400); }
.banner-link > .i:first-child { color: var(--gold); width: 22px; height: 22px; }
.banner-link span { flex: 1; }
.banner-link b { color: var(--text); margin-right: 0.5em; }

/* ------------------------------------------------------------------- tabs, filters, pager */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tab {
  --c: var(--p-400);
  display: inline-flex; align-items: center; gap: 0.55em; padding: 0.7em 1.15em; border-radius: 14px;
  font-weight: 700; font-size: 0.92rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.tab .i { color: var(--c); }
.tab:hover { color: var(--text); border-color: var(--border-strong); }
.tab.is-active { color: var(--text); border-color: color-mix(in srgb, var(--c) 60%, transparent); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.filter { --c: var(--p-400); padding: 0.38em 0.95em; border-radius: 999px; font-size: 0.84rem; font-weight: 600; color: var(--muted); border: 1px solid var(--border); transition: all 0.2s; }
.filter:hover { color: var(--text); border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.filter.is-active { color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 36px; color: var(--muted); font-size: 0.9rem; }

/* ------------------------------------------------------------------- tables */
.table-card { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.table-card__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 22px; border-bottom: 1px solid var(--divider); }
.table-card__head h2 { font-size: 1.25rem; }
.table-card__foot { padding: 14px 22px; font-size: 0.8rem; color: var(--dim); border-top: 1px solid var(--divider); }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.table th { text-align: left; padding: 12px 16px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.table td { padding: 12px 16px; border-top: 1px solid var(--divider); white-space: nowrap; }
.table tbody tr { transition: background 0.2s; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .strong { font-weight: 700; }
.table__empty { text-align: center; color: var(--dim); padding: 36px !important; }
.search { display: flex; align-items: center; gap: 8px; padding: 0.5em 0.9em; border-radius: 12px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border); color: var(--dim); }
.search:focus-within { border-color: var(--p-400); }
.search input { background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 0.9rem; width: 200px; }

/* ------------------------------------------------------------------- rankings */
.tiers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.tiers__item { --c: var(--p-400); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px; border-radius: var(--r); text-align: center; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 12%, transparent), transparent), var(--surface); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); }
.tiers__gem { color: var(--c); filter: drop-shadow(0 0 10px var(--c)); }
.tiers__gem .i { width: 26px; height: 26px; }
.tiers__item b { font-family: var(--display); font-size: 1.02rem; }
.tiers__min { font-size: 0.78rem; color: var(--muted); }
.tiers__count { font-size: 0.75rem; color: var(--dim); }

.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 16px; align-items: end; }
.podium__spot {
  --c: var(--p-400);
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 18px 24px; text-align: center;
  border-radius: var(--r-xl); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%), var(--surface); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.podium__spot--1 { padding-top: 46px; box-shadow: 0 24px 60px rgba(121, 80, 242, 0.25); }
.podium__place { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 1.3rem; font-weight: 800; background: rgba(255, 255, 255, 0.06); }
.podium__spot--1 .podium__place { width: 56px; height: 56px; color: #1a1206; background: linear-gradient(135deg, #fde68a, var(--gold)); box-shadow: 0 10px 30px rgba(251, 191, 36, 0.4); }
.podium__spot--1 .podium__place .i { width: 28px; height: 28px; }
.podium__spot--2 .podium__place { color: #111827; background: linear-gradient(135deg, #f1f5f9, var(--silver)); }
.podium__spot--3 .podium__place { color: #1f1208; background: linear-gradient(135deg, #f3c08e, var(--bronze)); }
.podium__name { font-family: var(--display); font-size: 1.3rem; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium__rating { font-family: var(--display); font-size: 2rem; font-weight: 800; line-height: 1; }
.podium__rating small { font-size: 0.8rem; color: var(--muted); margin-left: 0.3em; font-weight: 600; }
.podium__stats { display: flex; gap: 12px; font-size: 0.82rem; color: var(--muted); }

/* ------------------------------------------------------------------- media */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile {
  position: relative; display: block; width: 100%; padding: 0; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; cursor: pointer;
  background: var(--surface-solid); border: 1px solid var(--border); text-align: left;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.tile:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.tile:hover img { transform: scale(1.06); }
.tile__art { --c: var(--p-400); position: absolute; inset: 0; background: radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--c) 35%, transparent), transparent 60%), linear-gradient(135deg, #1a1030, #0f0820); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 30%, rgba(6, 3, 12, 0.72) 62%, rgba(6, 3, 12, 0.96)); }
.tile__play { position: absolute; top: 50%; left: 50%; z-index: 2; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(121, 80, 242, 0.85); box-shadow: 0 10px 30px rgba(121, 80, 242, 0.5); transition: transform 0.3s var(--ease); }
.tile__play .i { width: 24px; height: 24px; fill: currentColor; margin-left: 3px; }
.tile:hover .tile__play { transform: scale(1.1); }
.tile__info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; }
.tile__meta { display: flex; gap: 8px; align-items: center; }
.tile__provider { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--p-200); }
.tile__info b { font-family: var(--display); font-size: 1.05rem; line-height: 1.25; }
.tile__credit { display: inline-flex; align-items: center; gap: 0.4em; font-size: 0.8rem; color: var(--muted); }

.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(6, 3, 12, 0.9); backdrop-filter: blur(8px); }
.lightbox__frame { position: relative; margin: 0; width: min(1100px, 100%); }
.lightbox__stage { border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.lightbox__stage iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.lightbox__stage img { width: 100%; max-height: 80vh; object-fit: contain; }
.lightbox__caption { display: flex; justify-content: space-between; gap: 16px; padding: 14px 4px 0; color: var(--muted); }
.lightbox__caption b { color: var(--text); font-family: var(--display); }
.lightbox__close { position: absolute; top: -48px; right: 0; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.06); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

/* ------------------------------------------------------------------- article */
.article__head { padding: clamp(36px, 6vh, 70px) 0 24px; }
.back { display: inline-flex; align-items: center; gap: 0.45em; font-size: 0.88rem; font-weight: 600; color: var(--muted); }
.back:hover { color: var(--text); }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 26px; font-size: 0.85rem; color: var(--muted); }
.article__meta span:not(.chip) { display: inline-flex; align-items: center; gap: 0.4em; }
.article__head h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 800; margin-top: 16px; }
.article__lead { margin-top: 14px; font-size: 1.15rem; color: var(--muted); }
.article__cover { width: 100%; border-radius: var(--r-lg); border: 1px solid var(--border); margin-bottom: 32px; }
.article__share { margin: 40px 0 0; padding-top: 24px; border-top: 1px solid var(--divider); }
.prose { font-size: 1.05rem; line-height: 1.75; color: #e7e2fb; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.6em; }
.prose h4 { font-size: 1.1rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--p-300); }
.prose a { color: var(--p-300); text-decoration: underline; text-underline-offset: 3px; }
.prose code { padding: 0.15em 0.4em; border-radius: 6px; background: rgba(151, 117, 250, 0.14); color: var(--p-200); }
.prose blockquote { margin-left: 0; padding: 14px 20px; border-left: 3px solid var(--p-500); border-radius: 0 12px 12px 0; background: rgba(151, 117, 250, 0.08); color: var(--muted); }
.prose hr { border: 0; height: 1px; background: var(--divider); margin: 2em 0; }
.prose img { border-radius: var(--r); border: 1px solid var(--border); }
.prose strong { color: var(--text); }

/* ------------------------------------------------------------------- join, empty, 404 */
.join { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 36px; align-items: center; padding: 40px; border-radius: var(--r-xl); background: linear-gradient(120deg, rgba(121, 80, 242, 0.25), rgba(232, 121, 249, 0.08)), var(--surface); border: 1px solid var(--border-strong); }
.join h2 { font-size: 2.1rem; font-weight: 800; margin-top: 8px; }
.join__copy p { color: var(--muted); margin-top: 8px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps li div { display: flex; flex-direction: column; }
.steps li span:not(.steps__n) { font-size: 0.88rem; color: var(--muted); }
.steps__n { width: 32px; height: 32px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; background: var(--grad); }
.join__cta { display: flex; flex-direction: column; gap: 10px; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 56px 20px; text-align: center; border-radius: var(--r-lg); border: 1px dashed var(--border-strong); color: var(--muted); }
.empty b { font-family: var(--display); font-size: 1.2rem; color: var(--text); }
.empty__icon { width: 54px; height: 54px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; background: rgba(151, 117, 250, 0.12); color: var(--p-300); }
.empty__icon .i { width: 24px; height: 24px; }
.notfound { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 100px 0; }
.notfound__code { font-family: var(--display); font-size: 7rem; font-weight: 800; line-height: 1; }
.notfound p { color: var(--muted); }

/* ------------------------------------------------------------------- footer */
.foot { margin-top: 60px; border-top: 1px solid var(--border); background: rgba(8, 4, 15, 0.6); }
.foot__inner { display: grid; grid-template-columns: 1.3fr 2fr; gap: 48px; padding: 56px 0 36px; }
.foot__brand p { color: var(--muted); margin-top: 14px; max-width: 26em; font-size: 0.92rem; }
.foot__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot__cols h4 { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; }
.foot__cols a { display: block; padding: 4px 0; color: var(--muted); font-size: 0.92rem; }
.foot__cols a:hover { color: var(--text); }
.foot__legal { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0 28px; border-top: 1px solid var(--divider); font-size: 0.8rem; color: var(--dim); }
.foot__legal a:hover { color: var(--muted); }

/* ------------------------------------------------------------------- reveal on scroll */
/* hidden only when JS runs (html.js, set inline in the head), so no-JS visitors see it all */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { display: none; }
  .counters { grid-template-columns: repeat(2, 1fr); }
  .worlds, .cards, .gallery, .boards--3 { grid-template-columns: repeat(2, 1fr); }
  .tiers { grid-template-columns: repeat(3, 1fr); }
  .join { grid-template-columns: 1fr; }
  .join__cta { flex-direction: row; }
}
@media (max-width: 900px) {
  .nav {
    position: fixed; top: var(--header); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 20px 20px;
    background: rgba(11, 6, 20, 0.97); border-bottom: 1px solid var(--border); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: all 0.25s var(--ease);
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__link { padding: 0.85em 1em; font-size: 1rem; }
  .top__menu { display: inline-flex; }
  .top__inner { gap: 12px; }
  .brand__name { display: none; }
  .top__right { margin-left: auto; }
}
@media (max-width: 640px) {
  .worlds, .cards, .gallery, .boards--3, .boards--2, .podium { grid-template-columns: 1fr; }
  .counters { grid-template-columns: 1fr 1fr; gap: 10px; }
  .counter { padding: 14px; column-gap: 10px; }
  .counter__icon { width: 36px; height: 36px; }
  .counter__value { font-size: 1.25rem; }
  .tiers { grid-template-columns: repeat(2, 1fr); }
  .podium__spot--1 { order: -1; }
  .section__head--row { flex-direction: column; align-items: flex-start; }
  .foot__inner { grid-template-columns: 1fr; }
  .foot__cols { grid-template-columns: 1fr 1fr; }
  .foot__legal { flex-direction: column; }
  .status__max, .top__play { display: none; }
  .join { padding: 26px; }
  .join__cta { flex-direction: column; }
  .search input { width: 140px; }
  .notice__text { white-space: normal; }
}

/* =====================================================================================
   STAFF AREA (/admin)
   ===================================================================================== */
.alert { display: flex; align-items: center; gap: 0.6em; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 0.92rem; background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.35); color: #a7f3d0; }
.alert--error { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.4); color: #fecaca; }
.btn--discord { background: #5865f2; color: #fff; box-shadow: 0 8px 28px rgba(88, 101, 242, 0.45); justify-content: center; }
.btn--discord:hover { background: #4752c4; }

.login { display: flex; align-items: center; justify-content: center; padding: 20px; }
.login__card { width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 32px; text-align: center; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.login__logo { width: 64px; height: 64px; filter: drop-shadow(0 10px 30px rgba(121, 80, 242, 0.6)); }
.login__card h1 { font-size: 1.8rem; }
.login__card p { color: var(--muted); font-size: 0.95rem; }
.login__card .btn { width: 100%; margin-top: 6px; }
.login__card .alert { width: 100%; text-align: left; margin: 0; }

.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 22px 16px; background: rgba(8, 4, 15, 0.85); border-right: 1px solid var(--border); }
.side__nav { display: flex; flex-direction: column; gap: 3px; }
.side__link { display: flex; align-items: center; gap: 0.7em; padding: 0.65em 0.85em; border-radius: 12px; font-weight: 600; font-size: 0.92rem; color: var(--muted); transition: background 0.2s, color 0.2s; }
.side__link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.side__link.is-active { color: var(--text); background: rgba(151, 117, 250, 0.16); }
.side__link.is-active .i { color: var(--p-300); }
.side__user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: 0.88rem; font-weight: 600; }
.side__user img, .side__avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: rgba(151, 117, 250, 0.2); }
.side__user > span:not(.side__avatar) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__out { width: 32px; height: 32px; border-radius: 10px; border: 0; background: none; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.side__out:hover { color: var(--bad); background: rgba(248, 113, 113, 0.1); }
.panel { padding: 32px clamp(20px, 4vw, 48px) 60px; min-width: 0; }
.panel__head { margin-bottom: 24px; }
.panel__head h1 { font-size: 1.9rem; }

.box { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.box + .box, .admin-grid + .box { margin-top: 18px; }
.box h2 { font-size: 1.1rem; margin-bottom: 14px; }
.box--flush { padding: 0; overflow: hidden; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); transition: border-color 0.2s; }
.stat:hover { border-color: var(--border-strong); }
.stat span { display: inline-flex; align-items: center; gap: 0.5em; color: var(--muted); font-size: 0.85rem; }
.stat b { font-family: var(--display); font-size: 1.9rem; }
.admin-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.actions, .toolbar { display: flex; flex-wrap: wrap; gap: 10px; }
.toolbar { margin-bottom: 18px; }
.hint { display: flex; align-items: center; gap: 0.5em; margin-top: 12px; font-size: 0.85rem; color: var(--dim); }
.feed-state { display: flex; align-items: center; gap: 0.6em; font-weight: 700; }
.feed-state.is-ok .status__dot { background: var(--ok); }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.log li { display: flex; flex-wrap: wrap; gap: 0.6em; padding: 8px 0; border-top: 1px solid var(--divider); font-size: 0.9rem; }
.log li:first-child { border-top: 0; }
.log__when { color: var(--dim); min-width: 90px; }
.pill { display: inline-flex; padding: 0.2em 0.7em; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.pill--published { background: rgba(52, 211, 153, 0.12); color: var(--ok); }
.row-actions { text-align: right; }
.icon-btn { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 10px; color: var(--muted); }
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.box--flush .table td a:hover { color: var(--p-300); }

.editor { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.editor__main, .editor__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.editor__side .box { display: flex; flex-direction: column; gap: 14px; }
.editor__side .box + .box { margin-top: 0; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span, .field__label { font-size: 0.85rem; font-weight: 700; }
.field small { font-weight: 500; color: var(--dim); }
.field input[type="text"], .field input[type="url"], .field select, .field textarea {
  width: 100%; padding: 0.75em 0.9em; border-radius: 12px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border-strong); color: var(--text); font: inherit; font-size: 0.95rem;
}
.field textarea { resize: vertical; line-height: 1.6; font-family: var(--mono); font-size: 0.9rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--p-400); box-shadow: 0 0 0 3px rgba(151, 117, 250, 0.2); }
.check { display: flex; align-items: center; gap: 0.6em; font-size: 0.9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--p-600); }
.file { font-size: 0.85rem; color: var(--muted); }
.file::file-selector-button { margin-right: 10px; padding: 0.5em 0.9em; border-radius: 10px; border: 1px solid var(--border-strong); background: rgba(151, 117, 250, 0.14); color: var(--text); font: inherit; cursor: pointer; }
.cover-preview { width: 100%; border-radius: 12px; border: 1px solid var(--border); }
.embed-preview iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #000; }
.help { border-radius: 12px; border: 1px solid var(--border); padding: 12px 16px; font-size: 0.88rem; }
.help summary { cursor: pointer; display: flex; align-items: center; gap: 0.5em; color: var(--muted); font-weight: 600; }
.help__grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin-top: 12px; color: var(--muted); }
.help__grid code { color: var(--p-200); }
.danger-zone { margin-top: 26px; }
.settings { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.settings .btn { align-self: flex-start; }
.media-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.media-admin__item { border-radius: var(--r); overflow: hidden; background: var(--surface); border: 1px solid var(--border); transition: border-color 0.2s; }
.media-admin__item:hover { border-color: var(--p-400); }
.media-admin__item.is-hidden { opacity: 0.55; }
.media-admin__thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: var(--surface-solid); color: var(--p-300); }
.media-admin__thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-admin__info { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; }
.media-admin__info span { font-size: 0.8rem; color: var(--dim); }

@media (max-width: 960px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px 16px; }
  .side__nav { flex-direction: row; flex-wrap: wrap; }
  .side__user { margin-top: 0; margin-left: auto; }
  .editor, .admin-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
