/* FUSION NETWORK — stile allineato a FUSION HUB PROJECT (palette blu-ciano, come le pagine network di FUSION HUB). */
:root {
  --coal: #04080f;
  --iron: rgba(0, 180, 230, 0.07);
  --iron-2: #0b1b2e;
  --line: rgba(0, 212, 255, 0.18);
  --text: rgba(255, 255, 255, 0.88);
  --muted: rgba(255, 255, 255, 0.45);
  --ember: #00d4ff;
  --gold: #0047c8;
  --radius: 14px;
  --display: 'Rajdhani', 'Impact', sans-serif;
  --body: 'Exo 2', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--coal);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* barra superiore */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 10, 13, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: 0.04em; }
.brand img { border-radius: 10px; }
.brand b { color: var(--ember); font-weight: 700; margin-left: 4px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 999px; color: var(--muted);
}
.nav a:hover, .nav a:focus-visible { color: var(--text); background: var(--iron-2); outline: none; }

/* hero */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(0, 212, 255, 0.16), transparent 60%),
    radial-gradient(700px 380px at -10% 10%, rgba(0, 71, 200, 0.18), transparent 60%);
  border-bottom: 1px solid var(--line);
}
.hero--small { padding: 56px 0 36px; }
.eyebrow {
  margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 13px; font-weight: 700; color: var(--ember);
}
.hero__title {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: clamp(48px, 9vw, 104px); line-height: 0.92; letter-spacing: -0.01em;
  text-transform: uppercase;
}
.hero__sub { max-width: 640px; margin: 18px 0 0; font-size: 18px; color: var(--muted); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 700; font-size: 15px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn--primary { background: var(--ember); color: #001018; }
.btn--primary:hover { background: #5ce3ff; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--block { width: 100%; margin-top: 16px; }

/* sezioni */
.section { padding: 56px 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section__title {
  display: flex; align-items: center; gap: 14px; margin: 0 0 28px;
  font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4.5vw, 44px);
  text-transform: uppercase; letter-spacing: 0.01em; line-height: 1;
}
.rule { display: inline-block; width: 36px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--ember), var(--gold)); flex: 0 0 auto; }

/* numeri */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat {
  background: var(--iron); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; position: relative; overflow: hidden;
}
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--stat-color, var(--ember)); }
.stat__icon { color: var(--stat-color, var(--ember)); font-size: 20px; }
.stat__num { font-family: var(--display); font-weight: 700; font-size: 42px; line-height: 1; margin-top: 10px; font-variant-numeric: tabular-nums; }
.stat__label { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* card */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.cards--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cards--creators { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card {
  background: var(--iron); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; display: flex; flex-direction: column; gap: 8px;
}
.card p { margin: 0; color: var(--muted); }
.card__title { margin: 0; font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.05; text-transform: uppercase; }

/* livelli */
.levels { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.level {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 14px;
  background: var(--iron); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px;
}
.level__num {
  font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1;
  color: var(--coal); background: linear-gradient(135deg, var(--ember), var(--gold));
  border-radius: 10px; text-align: center; padding: 6px 0;
}
.level__name { font-weight: 700; font-size: 17px; }
.level__link { text-decoration: none; font-weight: 700; font-size: 14px; color: var(--gold); white-space: nowrap; }
.level__link:hover { text-decoration: underline; }

/* server */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: var(--iron-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-weight: 600; font-size: 14px;
}
.chip span { color: var(--ember); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin-left: 4px; }

/* creator */
.creator { align-items: flex-start; }
.creator__avatar {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 28px; color: #001018;
  background: linear-gradient(135deg, var(--ember), var(--gold));
}
.tag {
  display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--gold); border: 1px solid rgba(0, 212, 255, 0.45); border-radius: 999px; padding: 3px 10px;
}
.creator .btn { margin-top: auto; align-self: stretch; }
.back { margin-top: 28px; }
.back a { color: var(--gold); font-weight: 600; }

/* call to action finale */
.join {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(0, 71, 200, 0.14)), var(--iron);
  border: 1px solid var(--line); border-radius: 18px; padding: 36px 28px; text-align: center;
}
.join h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(30px, 5vw, 46px); text-transform: uppercase; line-height: 1; }
.join p { max-width: 640px; margin: 14px auto 22px; color: var(--muted); }

/* footer */
.footer { padding: 28px 0 36px; }
.footer__in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.footer p { margin: 0; }

/* telefono */
@media (max-width: 640px) {
  .hero { padding: 48px 0 40px; }
  .section { padding: 40px 0; }
  .level { grid-template-columns: 44px 1fr; }
  .level__link { grid-column: 2; }
  .level__num { font-size: 26px; }
  .nav a { padding: 6px 9px; font-size: 13px; }
  .join { padding: 28px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- pannello admin e accesso ---------- */
label {
  display: grid; gap: 6px; margin: 0 0 14px;
  font-size: 14px; font-weight: 600; color: var(--muted);
}
input, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--text);
  background: var(--coal); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus { outline: 2px solid var(--ember); outline-offset: 1px; }
form.inline { display: inline; }

.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth__box {
  width: 100%; max-width: 420px; background: var(--iron);
  border: 1px solid var(--line); border-radius: 18px; padding: 28px 24px;
}
.auth__box h1 { margin: 0 0 8px; font-family: var(--display); font-weight: 700; font-size: 40px; text-transform: uppercase; line-height: 1; }
.auth__box .btn { width: 100%; }

.alert { border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-size: 14px; font-weight: 600; }
.alert--ok { background: rgba(0, 212, 255, 0.12); border: 1px solid rgba(0, 212, 255, 0.45); color: var(--gold); }
.alert--err { background: rgba(255, 60, 60, 0.12); border: 1px solid rgba(255, 60, 60, 0.45); color: #ff8a8a; }

.adminbar { position: sticky; top: 0; z-index: 10; background: var(--iron); border-bottom: 1px solid var(--line); }
.adminbar__in { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.adminbar .btn { padding: 8px 14px; font-size: 14px; }

.admin { padding-top: 24px; padding-bottom: 48px; }
.panel {
  background: var(--iron); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; margin: 0 0 18px;
}
.panel h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 700; font-size: 28px; text-transform: uppercase; }
.panel .muted { margin: 0 0 14px; font-size: 14px; }
.panel .btn { margin-top: 4px; }

/* ---------- home a schermo fisso (come la home di FUSION HUB): niente scorrimento ---------- */
html:has(.home-fixed), body:has(.home-fixed) { height: 100%; overflow: hidden; }
.home-fixed {
  position: relative; height: calc(100vh - 64px); height: calc(100svh - 64px);
  min-height: 520px; overflow: hidden; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 16px;
}
.home-bg { position: absolute; inset: 0; z-index: 0; background: radial-gradient(900px 500px at 50% 30%, rgba(0, 71, 200, 0.35), var(--coal) 70%); }
.home-bg video { width: 100%; height: 100%; object-fit: cover; filter: hue-rotate(180deg) saturate(1.15); }
.home-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.25) 40%, rgba(0, 0, 0, 0.6)); }
.home-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.home-logo { width: 220px; height: 220px; object-fit: contain; filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.45)); }
.home-title { margin: 6px 0 0; font-family: var(--display); font-weight: 700; font-size: clamp(40px, 7vw, 84px); line-height: 0.95; text-transform: uppercase; }
.home-tag { margin: 12px 0 28px; text-transform: uppercase; letter-spacing: 3px; color: var(--muted); font-size: 14px; }
.home-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
/* il video pesante non si carica sul telefono: sullo sfondo resta il colore */
@media (max-width: 767px) {
  .home-bg video { display: none; }
  .home-logo { width: 160px; height: 160px; }
}
@media (prefers-reduced-motion: reduce) { .home-bg video { display: none; } }
.creator__avatar--big { width: 84px; height: 84px; font-size: 48px; border-radius: 20px; margin-bottom: 14px; }
