:root {
  --bg: #0b0818;
  --bg2: #150f2e;
  --card: rgba(255, 255, 255, .05);
  --card2: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .1);
  --text: #f2f0ff;
  --muted: #a9a3c9;
  --acc: #b38cff;
  --acc2: #5ac8ff;
  --ok: #57f287;
  --bad: #ff5c7a;
  --blurple: #5865f2;
  --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.55;
}
body::before {   /* luci colorate dietro a tutto */
  content: "";
  position: fixed; inset: -20%;
  background:
    radial-gradient(40% 35% at 20% 20%, rgba(179, 140, 255, .22), transparent 70%),
    radial-gradient(35% 30% at 85% 30%, rgba(90, 200, 255, .16), transparent 70%),
    radial-gradient(40% 35% at 50% 100%, rgba(255, 110, 200, .12), transparent 70%);
  animation: drift 24s ease-in-out infinite alternate;
  z-index: -2;
}
body::after {   /* stelle */
  content: "";
  position: fixed; inset: 0;
  background-image: radial-gradient(1px 1px at 10% 20%, #fff8, transparent),
    radial-gradient(1px 1px at 70% 80%, #fff6, transparent), radial-gradient(1.5px 1.5px at 40% 60%, #fff7, transparent),
    radial-gradient(1px 1px at 90% 10%, #fff9, transparent), radial-gradient(1px 1px at 25% 85%, #fff5, transparent);
  background-size: 380px 380px;
  z-index: -1;
  opacity: .7;
}
@keyframes drift { to { transform: translate(4%, -3%) scale(1.08); } }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.grad { background: linear-gradient(90deg, var(--acc), var(--acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* barra in alto */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: rgba(11, 8, 24, .6); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; }
.brand img { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 18px rgba(179, 140, 255, .6); }
.nav .links { display: flex; gap: 20px; margin-left: auto; color: var(--muted); font-weight: 600; font-size: 15px; }
.nav .links a:hover { color: var(--text); }
@media (max-width: 760px) { .nav .links { display: none; } }

/* pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 12px; font-weight: 700;
  border: 1px solid var(--line); background: var(--card2); color: var(--text); cursor: pointer; font-size: 15px; transition: .18s; font-family: inherit; }
.btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .13); }
.btn.primary { background: linear-gradient(135deg, var(--acc), #8a63ff); border: 0; box-shadow: 0 10px 30px rgba(140, 100, 255, .35); }
.btn.discord { background: var(--blurple); border: 0; box-shadow: 0 10px 30px rgba(88, 101, 242, .35); }
.btn.danger { background: rgba(255, 92, 122, .15); border-color: rgba(255, 92, 122, .4); color: #ffb3c1; }
.btn.small { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* home */
.hero { padding: 90px 0 60px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(38px, 6vw, 66px); line-height: 1.05; font-weight: 900; letter-spacing: -1.5px; }
.hero p { color: var(--muted); font-size: 19px; margin: 20px 0 30px; max-width: 560px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.badge { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line);
  color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.badge b { color: var(--ok); }
.orb { position: relative; display: grid; place-items: center; }
.orb img { width: min(360px, 80%); border-radius: 50%; animation: float 6s ease-in-out infinite; box-shadow: 0 0 80px rgba(179, 140, 255, .55), 0 0 0 10px rgba(255, 255, 255, .04); }
@keyframes float { 50% { transform: translateY(-14px) rotate(2deg); } }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; text-align: center; padding-top: 50px; } .hero p { margin-inline: auto; } .hero .cta { justify-content: center; } .orb { order: -1; } .orb img { width: 220px; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 70px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.stat b { display: block; font-size: 34px; font-weight: 900; }
.stat span { color: var(--muted); font-size: 14px; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

section { padding: 40px 0 70px; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 900; letter-spacing: -1px; }
.section-title p { color: var(--muted); margin-top: 10px; font-size: 17px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: .2s; position: relative; overflow: hidden; }
.feature:hover { transform: translateY(-4px); border-color: rgba(179, 140, 255, .5); background: var(--card2); }
.feature .ico { font-size: 34px; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 16px; background: rgba(179, 140, 255, .14); margin-bottom: 14px; }
.feature h3 { font-size: 19px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 15px; }
.feature code, .cmd { font-family: "Cascadia Code", Consolas, monospace; background: rgba(90, 200, 255, .12); color: #9fdcff; padding: 2px 7px; border-radius: 6px; font-size: 13px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; counter-increment: s; }
.step::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-weight: 900;
  background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #120c26; margin-bottom: 12px; }
.step p { color: var(--muted); font-size: 15px; }

.cmds { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cmds .cmd { font-size: 14px; padding: 6px 12px; }
.search { display: block; width: min(420px, 100%); margin: 0 auto 22px; }

.videos { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 800px) { .videos { grid-template-columns: 1fr; } }
.video { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; aspect-ratio: 16/9; }
.video.short { aspect-ratio: 9/16; max-height: 520px; margin: 0 auto; width: 100%; }
.video iframe { width: 100%; height: 100%; border: 0; }

.final { text-align: center; background: linear-gradient(135deg, rgba(179, 140, 255, .18), rgba(90, 200, 255, .12)); border: 1px solid var(--line);
  border-radius: 28px; padding: 60px 24px; }
.final h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 900; }
.final p { color: var(--muted); margin: 12px 0 26px; }
footer { padding: 40px 0; color: var(--muted); font-size: 14px; text-align: center; }
footer a { color: var(--acc); }

/* moduli */
input, textarea, select { width: 100%; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); color: var(--text); border-radius: 12px;
  padding: 12px 14px; font-size: 15px; font-family: inherit; outline: none; transition: .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(179, 140, 255, .2); }
textarea { resize: vertical; min-height: 120px; }
select option { background: var(--bg2); }
label { display: block; font-weight: 600; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
input[type=color] { padding: 4px; height: 46px; cursor: pointer; }

/* pannello */
.dash { display: grid; grid-template-columns: 270px 1fr; gap: 20px; padding: 26px 0 60px; min-height: calc(100vh - 66px); }
@media (max-width: 860px) { .dash { grid-template-columns: 1fr; } }
.side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; height: fit-content; position: sticky; top: 86px; }
.side .server { display: flex; align-items: center; gap: 12px; padding: 8px; margin-bottom: 10px; }
.side .server img, .gicon { width: 46px; height: 46px; border-radius: 14px; background: var(--card2); display: grid; place-items: center; font-weight: 800; object-fit: cover; flex: none; }
.side .server b { display: block; line-height: 1.2; }
.side .server small { color: var(--muted); }
.tab { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border-radius: 12px; color: var(--muted); font-weight: 600; cursor: pointer;
  border: 0; background: none; font-size: 15px; font-family: inherit; text-align: left; }
.tab:hover { background: var(--card2); color: var(--text); }
.tab.on { background: linear-gradient(90deg, rgba(179, 140, 255, .25), rgba(179, 140, 255, .05)); color: var(--text); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.panel h2 { font-size: 26px; font-weight: 800; }
.panel .sub { color: var(--muted); margin: 4px 0 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } .grid4 { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.kpi b { font-size: 28px; font-weight: 900; display: block; }
.kpi span { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > * { flex: 1; }
.list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); }
.item img { width: 36px; height: 36px; border-radius: 50%; }
.item .grow { flex: 1; min-width: 0; }
.item small { color: var(--muted); }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }

.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.scard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; gap: 14px; align-items: center; cursor: pointer; transition: .18s; }
.scard:hover { transform: translateY(-3px); border-color: rgba(179, 140, 255, .5); }
.scard.off { opacity: .75; }
.scard small { color: var(--muted); display: block; }

/* anteprima embed stile Discord */
.preview { background: #313338; border-radius: 12px; padding: 16px; font-family: "gg sans", "Segoe UI", sans-serif; }
.preview .who { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.preview .who img { width: 38px; height: 38px; border-radius: 50%; }
.preview .who b { color: #c9b6ff; }
.preview .tag { background: var(--blurple); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px; }
.preview .emb { border-left: 4px solid var(--acc); background: #2b2d31; border-radius: 6px; padding: 12px 14px; margin-left: 48px; }
.preview .emb h4 { margin-bottom: 6px; }
.preview .emb p { color: #dbdee1; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.preview .emb img { max-width: 100%; border-radius: 6px; margin-top: 10px; }
.preview .plain { color: #dbdee1; margin-left: 48px; white-space: pre-wrap; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120px); background: #1d1640; border: 1px solid var(--line);
  padding: 14px 22px; border-radius: 14px; font-weight: 600; transition: .3s; z-index: 50; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); max-width: 90vw; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: rgba(87, 242, 135, .5); }
.toast.err { border-color: rgba(255, 92, 122, .6); }
.center { display: grid; place-items: center; text-align: center; min-height: 60vh; gap: 14px; }
.center p { color: var(--muted); max-width: 520px; }
.spinner { width: 42px; height: 42px; border: 4px solid var(--line); border-top-color: var(--acc); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
.muted { color: var(--muted); }
/* su telefono niente scorrimento orizzontale */
.hero > *, .features > *, .steps > *, .stats > *, .dash > *, .grid2 > *, .videos > * { min-width: 0; }
@media (max-width: 860px) { .hero, .dash { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .wrap { padding: 0 16px; } .hero .cta .btn { flex: 1 1 100%; } .stat b { font-size: 26px; } }
hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
