/* ModSignal — design system v2
 * Dark, modern, purposeful. Inspired by Linear, Vercel, Resend.
 */

:root {
  --brand: #5468ff;
  --brand-bright: #7c8aff;
  --brand-dim: #3a4bdb;
  --brand-accent: #22d3ee;
  --gold: #f5b840;
  --success: #3ba55d;
  --danger: #ed4245;
  --warning: #f0b232;

  --bg: #07080d;
  --bg-soft: #0c0e16;
  --bg-elev: #13151f;
  --bg-card: #181b27;
  --bg-card-hover: #1d2130;
  --border: #232635;
  --border-soft: #1c1f2c;
  --border-bright: #30344a;

  --text: #eef0f7;
  --text-muted: #9599ad;
  --text-dim: #666a80;

  --gradient-brand: linear-gradient(135deg, #5468ff 0%, #22d3ee 100%);
  --gradient-gold: linear-gradient(135deg, #f5b840 0%, #f59e0b 100%);
  --gradient-text: linear-gradient(180deg, #ffffff 0%, #9da3bf 100%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 20px 60px rgba(84, 104, 255, 0.35);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --max-width: 1160px;
  --nav-h: 68px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 200ms;
}

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

*::selection { background: rgba(84, 104, 255, 0.4); color: #fff; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "ss01", "cv11";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% -10%, rgba(84, 104, 255, 0.22), transparent 60%),
    radial-gradient(ellipse 80% 60% at 100% 20%, rgba(34, 211, 238, 0.1), transparent 55%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(245, 184, 64, 0.05), transparent 60%);
  pointer-events: none;
  z-index: -1;
  animation: drift 50s linear infinite;
}

@keyframes drift {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(2%, -1%) rotate(180deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: -1;
  mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55) 0%, transparent 75%);
}

a { color: var(--brand-bright); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--brand-accent); }

code, pre, kbd {
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}

code {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--text);
  font-size: 0.88em;
}

pre {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  overflow-x: auto;
  line-height: 1.5;
  font-size: 0.88rem;
  box-shadow: var(--shadow-sm);
}

pre code { background: none; border: none; padding: 0; font-size: inherit; }

h1, h2, h3, h4 {
  color: #fff;
  letter-spacing: -0.025em;
  line-height: 1.15;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  letter-spacing: -0.035em;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 18px;
  letter-spacing: -0.03em;
}

h3 { font-size: 1.15rem; margin-bottom: 10px; }

p { color: var(--text-muted); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; position: relative; }

/* ─── Navigation ─────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 8, 13, 0.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

.brand-link img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links > a:not(.btn) {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--dur) var(--ease);
}

.nav-links > a:not(.btn):hover,
.nav-links > a.is-active:not(.btn) {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.nav-cta {
  margin-left: 8px;
}

.nav-invite-link {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted) !important;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--dur) var(--ease);
}

.nav-invite-link:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.04);
}

/* ─── Buttons ─────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  font-family: inherit;
}

.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 26px 70px rgba(84, 104, 255, 0.5);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.25) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 600ms var(--ease);
}

.btn-primary:hover::after { transform: translateX(100%); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover { border-color: var(--brand); color: #fff; }

.btn-lg { padding: 14px 26px; font-size: 1rem; }

.btn-sm { padding: 7px 14px; font-size: 0.84rem; }

.btn-danger {
  background: rgba(237, 66, 69, 0.1);
  color: var(--danger);
  border-color: rgba(237, 66, 69, 0.25);
}
.btn-danger:hover {
  background: rgba(237, 66, 69, 0.15);
  border-color: rgba(237, 66, 69, 0.5);
  color: var(--danger);
}

/* ─── Hero ────────────────────────────────────────────────────────── */

.hero {
  padding: 80px 0 48px;
  text-align: center;
  position: relative;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--radius-full);
  background: rgba(84, 104, 255, 0.1);
  border: 1px solid rgba(84, 104, 255, 0.25);
  color: var(--brand-bright);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 28px;
  letter-spacing: 0.01em;
  backdrop-filter: blur(8px);
}

.hero-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-accent);
  box-shadow: 0 0 10px var(--brand-accent);
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  margin-bottom: 24px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title .accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto 36px;
  color: var(--text-muted);
  line-height: 1.55;
}

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

/* ─── Discord alert mockup ───────────────────────────────────────── */

.showcase {
  max-width: 820px;
  margin: 72px auto 0;
  position: relative;
}

.showcase-glow {
  position: absolute;
  inset: 40px;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(84, 104, 255, 0.4), transparent 70%);
  filter: blur(60px);
  z-index: -1;
}

.discord-mock {
  background: #2b2d31;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transform: perspective(1200px) rotateX(0.5deg);
  transition: transform 400ms var(--ease);
}

.discord-mock:hover { transform: perspective(1200px) rotateX(0deg) translateY(-3px); }

.discord-message { display: flex; gap: 16px; align-items: flex-start; }

.discord-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.discord-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.discord-body { flex: 1; min-width: 0; }

.discord-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.discord-username { color: #fff; font-weight: 600; font-size: 0.95rem; }

.discord-badge {
  background: #5865f2;
  color: #fff;
  font-size: 0.64rem;
  padding: 1px 5px 2px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.discord-time { color: #949ba4; font-size: 0.76rem; }

.discord-ping {
  background: rgba(88, 101, 242, 0.16);
  border-radius: 5px;
  padding: 1px 4px;
  color: #c9cdfb;
  margin-right: 4px;
  font-size: 0.95rem;
  font-weight: 500;
}

.discord-container {
  background: rgba(255, 255, 255, 0.025);
  border-left: 4px solid var(--brand-accent);
  border-radius: 4px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: flex-start;
  margin-top: 8px;
}

.discord-container-body h4 { color: #fff; font-size: 1rem; margin-bottom: 8px; }

.discord-container-hero {
  color: #949ba4;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.discord-container-body p { color: #dbdee1; font-size: 0.88rem; margin-bottom: 12px; }

.discord-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.discord-thumb img { width: 100%; height: 100%; object-fit: cover; }

.discord-fields {
  display: grid;
  gap: 4px;
  font-size: 0.86rem;
  color: #dbdee1;
  margin: 10px 0 14px;
  line-height: 1.6;
}

.discord-field strong {
  color: #fff;
  display: inline-block;
  min-width: 80px;
  font-weight: 600;
}

.discord-buttons {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.discord-btn {
  background: #43a25a;
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
}

.discord-btn.secondary { background: #4e5058; }
.discord-btn.link { background: rgba(255, 255, 255, 0.04); color: #dbdee1; border: 1px solid rgba(255, 255, 255, 0.08); }

.discord-footer { color: #6b6f7a; font-size: 0.72rem; margin-top: 10px; }

/* ─── Hero banner (clean, integrated) ────────────────────────────── */

.hero-banner {
  max-width: 1000px;
  margin: 80px auto 0;
  padding: 0 4px;
  position: relative;
}

.hero-banner-inner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow-lg);
}

.hero-banner-inner::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(84, 104, 255, 0.4), transparent 40%, rgba(34, 211, 238, 0.3) 100%);
  border-radius: var(--radius-lg);
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.hero-banner-inner img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Soft fade at bottom to blend into page bg */
.hero-banner-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(7, 8, 13, 0.7) 100%);
  pointer-events: none;
}

/* ─── Stats strip ────────────────────────────────────────────────── */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 56px 0;
}

.stat {
  background: var(--bg-soft);
  padding: 28px 24px;
  text-align: center;
  transition: background var(--dur) var(--ease);
}

.stat:hover { background: var(--bg-card); }

.stat-value {
  font-size: 2.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-feature-settings: "tnum";
}

.stat-value.is-loading {
  color: var(--text-dim);
  background: none;
  -webkit-text-fill-color: initial;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 8px;
  font-weight: 500;
}

/* ─── Feature grid ───────────────────────────────────────────────── */

.section-head { text-align: center; margin-bottom: 56px; }

.section-head .eyebrow {
  display: inline-block;
  color: var(--brand-bright);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.section-head p { max-width: 580px; margin: 14px auto 0; font-size: 1.05rem; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: all var(--dur) var(--ease);
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}

.feature:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature:hover::before { opacity: 1; }

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(84, 104, 255, 0.2) 0%, rgba(84, 104, 255, 0.05) 100%);
  border: 1px solid rgba(84, 104, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-bright);
  margin-bottom: 20px;
}

.feature h3 { color: #fff; margin-bottom: 10px; font-size: 1.1rem; }
.feature p { font-size: 0.93rem; line-height: 1.6; }

/* ─── Steps ──────────────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--brand);
  opacity: 0.12;
  line-height: 1;
  letter-spacing: -0.05em;
}

.step h3 { margin-bottom: 12px; padding-right: 40px; }
.step p { font-size: 0.94rem; }

.step code {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.82rem;
  background: rgba(84, 104, 255, 0.08);
  border-color: rgba(84, 104, 255, 0.2);
  color: var(--brand-bright);
}

/* ─── Quick start ────────────────────────────────────────────────── */

.quickstart {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.quickstart h2 { margin-bottom: 14px; }
.quickstart p { font-size: 1.02rem; margin-bottom: 20px; }

.quickstart ol { margin-left: 1.2rem; color: var(--text); }
.quickstart li { margin-bottom: 10px; font-size: 0.94rem; }
.quickstart li::marker { color: var(--brand-bright); font-weight: 600; }

@media (max-width: 820px) {
  .quickstart { grid-template-columns: 1fr; gap: 32px; }
}

/* ─── FAQ ────────────────────────────────────────────────────────── */

.faq {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}

.faq-item:hover { border-color: var(--border-bright); }

.faq-question {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  gap: 16px;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-chevron {
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease);
  color: var(--text-muted);
}

.faq-item[open] .faq-chevron { transform: rotate(180deg); color: var(--brand-bright); }

.faq-answer {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ─── CTA ────────────────────────────────────────────────────────── */

.cta {
  text-align: center;
  padding: 100px 24px;
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(84, 104, 255, 0.18), transparent 70%),
    var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  margin: 32px 0;
}

.cta h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 14px; }
.cta p { font-size: 1.05rem; max-width: 520px; margin: 0 auto 28px; }

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Footer ─────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border-soft);
  padding: 64px 0 40px;
  margin-top: 80px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 40px;
}

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

.footer h4 {
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a { color: var(--text-muted); font-size: 0.9rem; transition: color var(--dur) var(--ease); }
.footer-links a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ─── Command / commands page ───────────────────────────────────── */

.command-group { margin-bottom: 48px; }

.command-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.command-row {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 28px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-soft);
  align-items: baseline;
  transition: background var(--dur) var(--ease);
}

.command-row:hover { background: rgba(255, 255, 255, 0.02); }
.command-row:last-child { border-bottom: none; }

.command-name {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  color: var(--brand-accent);
  font-size: 0.92rem;
  font-weight: 500;
}

.command-desc { color: var(--text-muted); font-size: 0.92rem; }

@media (max-width: 640px) {
  .command-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ─── Pricing ────────────────────────────────────────────────────── */

.pricing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 40px 0;
}

@media (max-width: 820px) { .pricing { grid-template-columns: 1fr; } }

.plan {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
}

.plan-tag {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  font-weight: 600;
}

.plan.is-premium {
  border-color: rgba(245, 184, 64, 0.25);
  background: linear-gradient(180deg, rgba(245, 184, 64, 0.06) 0%, transparent 30%), var(--bg-card);
}

.plan.is-premium::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 3px;
  background: var(--gradient-gold);
}

.plan.is-premium .plan-tag { color: var(--gold); }

.plan-price {
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.plan-price-unit { font-size: 1rem; color: var(--text-muted); font-weight: 500; }

.plan p { margin-top: 8px; }

.plan-features { list-style: none; margin: 28px 0; display: grid; gap: 10px; }

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text);
  font-size: 0.93rem;
  line-height: 1.5;
}

.plan-features .check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(59, 165, 93, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  margin-top: 2px;
}

.plan.is-premium .plan-features .check {
  background: rgba(245, 184, 64, 0.15);
  color: var(--gold);
}

/* ─── Status page ────────────────────────────────────────────────── */

.status-hero { padding: 64px 0 32px; text-align: center; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: rgba(59, 165, 93, 0.12);
  border: 1px solid rgba(59, 165, 93, 0.28);
  color: var(--success);
  font-weight: 600;
  font-size: 0.95rem;
}

.status-badge.is-error { background: rgba(237, 66, 69, 0.12); border-color: rgba(237, 66, 69, 0.28); color: var(--danger); }
.status-badge.is-warn { background: rgba(240, 178, 50, 0.12); border-color: rgba(240, 178, 50, 0.28); color: var(--warning); }
.status-badge.is-loading { background: rgba(84, 104, 255, 0.12); border-color: rgba(84, 104, 255, 0.25); color: var(--brand-bright); }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(59, 165, 93, 0.15);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.status-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.status-service {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color var(--dur) var(--ease);
}

.status-service:hover { border-color: var(--border-bright); }

.status-service-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.status-service-name { color: #fff; font-weight: 600; }

.status-chip {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-chip.is-ok { background: rgba(59, 165, 93, 0.15); color: var(--success); }
.status-chip.is-loading { background: rgba(92, 96, 120, 0.2); color: var(--text-muted); }
.status-chip.is-error { background: rgba(237, 66, 69, 0.12); color: var(--danger); }

.status-service-meta { color: var(--text-muted); font-size: 0.88rem; }

/* ─── Legal ──────────────────────────────────────────────────────── */

.legal h2 { margin-top: 48px; margin-bottom: 14px; font-size: 1.4rem; color: #fff; }
.legal h2:first-of-type { margin-top: 0; }
.legal h3 { color: #fff; margin-top: 20px; margin-bottom: 8px; }
.legal p, .legal ul, .legal ol { margin-bottom: 18px; color: var(--text); }
.legal ul, .legal ol { margin-left: 1.4rem; }
.legal li { margin-bottom: 8px; color: var(--text); }

.legal-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}

/* ─── Utility ────────────────────────────────────────────────────── */

.page-header { padding: 96px 0 40px; }
.page-header h1 { margin-bottom: 14px; font-size: clamp(2rem, 4.5vw, 3rem); }
.page-header p { font-size: 1.08rem; max-width: 620px; line-height: 1.55; }

.text-center { text-align: center; }

.divider { height: 1px; background: var(--border-soft); margin: 56px 0; }

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .nav-links > a:not(.btn) { display: none; }
  .nav-links .nav-dashboard { display: inline-flex !important; }
  .hero { padding: 56px 0 32px; }
  .section { padding: 64px 0; }
  .showcase { margin-top: 48px; }
  .discord-mock { padding: 16px; }
  .discord-container { grid-template-columns: 1fr; }
  .discord-thumb { order: -1; }
}

/* ═══════════════════════════════════════════════════════════════════
   Dashboard v2 — full rewrite
   ═══════════════════════════════════════════════════════════════════ */

.dash {
  min-height: calc(100vh - var(--nav-h));
  padding: 0;
}

.dash-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

@media (max-width: 720px) {
  .dash-shell { padding: 24px 16px 56px; }
}

/* Login card */

.dash-login {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: center;
  padding: 48px 24px;
}

.dash-login-card {
  max-width: 460px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.dash-login-card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 3px;
  background: var(--gradient-brand);
}

.dash-login-card img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
}

.dash-login-card h1 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.dash-login-card p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 0.98rem;
}

.dash-login-card .btn { width: 100%; justify-content: center; }

.dash-login-footer {
  margin-top: 24px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Server list */

.dash-head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.dash-greeting h1 {
  font-size: 1.9rem;
  margin-bottom: 4px;
}

.dash-greeting p {
  color: var(--text-muted);
}

.dash-user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}

.dash-user-chip img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.dash-user-chip-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.dash-section {
  margin-top: 40px;
}

.dash-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.dash-section-head h2 {
  font-size: 1.25rem;
  margin: 0;
}

.dash-section-head .count {
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 500;
}

.dash-section-desc {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 20px;
  margin-top: -12px;
}

.dash-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.server-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
}

.server-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}

.server-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.server-card:hover::after { opacity: 1; }

.server-card.is-inactive {
  opacity: 0.6;
  cursor: default;
}

.server-card.is-inactive:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: none;
}

.server-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.server-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 1.3rem;
}

.server-icon img { width: 100%; height: 100%; object-fit: cover; }

.server-card-info {
  flex: 1;
  min-width: 0;
}

.server-name {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-meta {
  color: var(--text-muted);
  font-size: 0.84rem;
  margin-top: 2px;
}

.server-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  align-self: flex-start;
}

.server-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.server-badge.is-active { background: rgba(59, 165, 93, 0.14); color: var(--success); }
.server-badge.is-paused { background: rgba(240, 178, 50, 0.14); color: var(--warning); }
.server-badge.is-inactive { background: rgba(255, 255, 255, 0.05); color: var(--text-dim); }

.server-card-cta {
  color: var(--brand-bright);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.server-card-cta svg {
  transition: transform var(--dur) var(--ease);
}

.server-card:hover .server-card-cta svg { transform: translateX(3px); }

/* ─── Server detail — header ─────────────────────────────────────── */

.dash-server-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.dash-back {
  color: var(--text-muted);
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  transition: color var(--dur) var(--ease);
}

.dash-back:hover { color: #fff; }

.dash-server-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.dash-server-icon img { width: 100%; height: 100%; object-fit: cover; }

.dash-server-title h1 {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.dash-server-title p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.dash-server-tags {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(84, 104, 255, 0.14);
  color: var(--brand-bright);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.tag.is-gold { background: rgba(245, 184, 64, 0.14); color: var(--gold); }
.tag.is-success { background: rgba(59, 165, 93, 0.14); color: var(--success); }
.tag.is-muted { background: rgba(255, 255, 255, 0.05); color: var(--text-dim); }

/* ─── Overview stats ─────────────────────────────────────────────── */

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.dash-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.dash-stat-label {
  color: var(--text-dim);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 8px;
}

.dash-stat-value {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.dash-stat-sub {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 6px;
}

/* ─── Tab navigation ─────────────────────────────────────────────── */

.dash-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow-x: auto;
}

.dash-tab {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
  font-family: inherit;
}

.dash-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.dash-tab.is-active {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 4px 12px rgba(84, 104, 255, 0.3);
}

/* ─── Card ───────────────────────────────────────────────────────── */

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}

.dash-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.dash-card-head h2 {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.dash-card-head p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ─── Form controls ──────────────────────────────────────────────── */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.field:last-of-type { margin-bottom: 0; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
}

.field-label {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-label .lock {
  color: var(--gold);
}

.field-help {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.field-control {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-family: inherit;
  transition: all var(--dur) var(--ease);
  width: 100%;
}

.field-control:hover:not(:disabled) { border-color: var(--border-bright); }

.field-control:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(84, 104, 255, 0.15);
}

.field-control:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

textarea.field-control {
  resize: vertical;
  min-height: 110px;
  line-height: 1.55;
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 0.88rem;
}

select.field-control {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239599ad' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Toggle switch */

.field-toggle {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  user-select: none;
  margin-bottom: 12px;
}

.field-toggle:hover { border-color: var(--border-bright); }

.field-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  width: 40px;
  height: 22px;
  background: var(--bg-elev);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-full);
  position: relative;
  transition: all var(--dur) var(--ease);
  flex-shrink: 0;
  margin-top: 2px;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all var(--dur) var(--ease);
}

.field-toggle input:checked + .toggle-track {
  background: var(--brand);
  border-color: var(--brand);
}

.field-toggle input:checked + .toggle-track::after {
  background: #fff;
  transform: translateX(18px);
}

.toggle-body { flex: 1; min-width: 0; }
.toggle-title { color: #fff; font-weight: 500; font-size: 0.94rem; }
.toggle-desc { color: var(--text-muted); font-size: 0.84rem; margin-top: 2px; line-height: 1.45; }

/* Color picker hybrid */

.color-input {
  display: flex;
  gap: 10px;
  align-items: center;
}

.color-swatch {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-bright);
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.color-swatch input[type="color"] {
  position: absolute;
  inset: -2px;
  width: 110%;
  height: 110%;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}

/* Form actions bar */

.form-actions {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
  margin-top: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.form-actions .spacer { flex: 1; }

.form-status {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--danger); }
.form-status.is-saving { color: var(--brand-bright); }

/* ─── Sticky save bar ─────────────────────────────────────────────── */

.dash-save-bar {
  position: sticky;
  bottom: 24px;
  z-index: 50;
  background: rgba(24, 27, 39, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-lg);
  margin-top: 24px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 250ms var(--ease);
  pointer-events: none;
}

.dash-save-bar.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dash-save-bar-msg {
  flex: 1;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 500;
}

.dash-save-bar-msg strong { color: #fff; font-weight: 600; }

/* ─── Empty states + spinner ─────────────────────────────────────── */

.empty-state {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  padding: 64px 32px;
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(84, 104, 255, 0.1);
  border: 1px solid rgba(84, 104, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-bright);
  margin: 0 auto 20px;
}

.empty-state h3 { color: #fff; margin-bottom: 10px; font-size: 1.2rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; max-width: 400px; margin-left: auto; margin-right: auto; }

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--brand-bright);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
  margin: 0 auto;
}

.spinner-sm { width: 16px; height: 16px; border-width: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }

.loading-view {
  min-height: 40vh;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 16px;
}

.loading-view p {
  color: var(--text-muted);
}

/* ─── Top handlers leaderboard ───────────────────────────────────── */

.leaderboard {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease);
}

.leaderboard-row:hover { border-color: var(--border-bright); }

.leaderboard-rank {
  color: var(--text-dim);
  font-weight: 700;
  font-size: 0.88rem;
  text-align: center;
}

.leaderboard-rank.is-gold { color: #ffd35d; }
.leaderboard-rank.is-silver { color: #cbd0dc; }
.leaderboard-rank.is-bronze { color: #d4894a; }

.leaderboard-name {
  color: #fff;
  font-weight: 500;
  font-size: 0.94rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-count {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

/* ─── Tab panels ─────────────────────────────────────────────────── */

.dash-panel { display: none; }
.dash-panel.is-active { display: block; animation: fadein 200ms var(--ease); }

@keyframes fadein {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
