:root {
  --bg: #0b0f14;
  --surface: #121820;
  --border: #243044;
  --text: #e8edf4;
  --muted: #8b9cb3;
  --accent: #60a5fa;
  --discord: #5865f2;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header h1 { margin: 0; font-size: 1.15rem; }
.site-header nav { display: flex; gap: 1rem; font-size: 0.85rem; align-items: center; flex-wrap: wrap; }
.header-logout {
  margin: 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
}
.dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.dash-header h2 { margin: 0; }
.login-divider {
  margin: 1.5rem 0 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  position: relative;
}
.login-divider::before,
.login-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--border);
}
.login-divider::before { left: 0; }
.login-divider::after { right: 0; }
.token-login-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}
.token-login-row input {
  flex: 1;
  min-width: 12rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 0.95rem;
}
.token-login-row button { margin-top: 0; }
.discord-link-box {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: rgba(88, 101, 242, 0.08);
}
.discord-link-box p { margin: 0 0 0.75rem; }
.container { flex: 1; max-width: 720px; margin: 0 auto; padding: 2rem 1.25rem; width: 100%; }
.container--wide { max-width: min(1200px, 96vw); padding: 2rem 1.75rem; }
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
}
.lead { color: var(--muted); line-height: 1.5; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error { color: #f87171; }
.hidden { display: none !important; }
.btn-discord {
  background: var(--discord);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1rem;
}
.btn-discord:disabled { opacity: 0.5; cursor: not-allowed; }
.guild-gate-hint {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--discord) 35%, transparent);
  background: color-mix(in srgb, var(--discord) 12%, transparent);
  border-radius: 8px;
}
.guild-gate-hint p { margin: 0 0 0.75rem; }
.guild-gate-hint .btn-discord {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}
.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  margin-top: 0.5rem;
}
.token-box {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0 0.5rem;
}
.scanner-token-hint {
  margin: 0.35rem 0 1.25rem;
  max-width: 42rem;
}
#token-existing-msg {
  margin: 0.35rem 0 0;
}
#token-existing-msg:not(.hidden) + .scanner-token-hint {
  margin-top: 0.25rem;
}
.rel-token-note {
  margin: 0.5rem 0 0;
  max-width: 42rem;
}
.token-box code { word-break: break-all; font-size: 0.95rem; }
.token-blur-field {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.45;
  filter: blur(7px);
  transition: filter 0.2s ease;
  cursor: pointer;
  user-select: none;
}
.token-blur-field:hover,
.token-blur-field:focus {
  filter: blur(0);
  user-select: all;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.copy-toast {
  position: fixed;
  z-index: 10000;
  transform: translate(-50%, -120%);
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  background: #1e293b;
  border: 1px solid var(--accent);
  color: var(--text);
  font-size: 0.8rem;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.stat-card {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
}
.stat-val { font-size: 1.25rem; font-weight: 700; color: var(--accent); }
.stat-lbl { font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }
.site-footer { text-align: center; padding: 1rem; border-top: 1px solid var(--border); }
.features-panel {
  margin-bottom: 1.5rem;
  padding: 0;
  background: transparent;
  border: none;
}
.features-panel h2 { margin: 0 0 0.5rem; font-size: 1.35rem; }
.features-columns {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1rem;
  margin-top: 1.25rem;
}
.features-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
}
.features-col h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.features-col-without { border-color: #3d4a5c; }
.features-col-with { border-color: #2d4a6e; }
.features-list {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.55;
  color: var(--text);
}
.features-list li { margin-bottom: 0.45rem; }
.features-list-cards {
  list-style: none;
  padding: 0;
}
.features-list-cards li {
  margin-bottom: 0.65rem;
  padding: 0.65rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.features-list-cards strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
  color: var(--accent);
}
.features-start {
  margin-top: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
}
.features-start h3 { margin: 0 0 0.65rem; font-size: 1rem; }
.features-steps {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.55;
  color: var(--muted);
}
.features-steps li { margin-bottom: 0.35rem; }
.features-updated { margin: 0.75rem 0 0; text-align: right; }
@media (max-width: 900px) {
  .landing-hero--modern {
    grid-template-columns: 1fr;
    padding: 1.75rem 1.5rem;
  }
  .hero-highlights {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .hero-highlights li { flex: 1 1 100%; }
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .compare-vs {
    padding: 0.25rem 0;
  }
  .compare-vs span { margin: 0 auto; }
  .features-steps--cards {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .features-columns { grid-template-columns: 1fr; }
}
@media (max-width: 600px) { .stats-grid { grid-template-columns: 1fr; } }

/* ── Landing page ── */
.landing-page {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(96, 165, 250, 0.12), transparent),
    var(--bg);
}

.landing-hero--modern {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2.25rem 2.5rem;
  border-color: #2a3d5c;
  background: linear-gradient(145deg, #141c28 0%, #1a2a42 45%, #121820 100%);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}
.landing-hero--modern::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(88, 101, 242, 0.18), transparent 45%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.35);
}
.landing-hero--modern h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hero-lead {
  margin: 0;
  max-width: 38rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #b8c5d9;
}
.hero-note { margin: 1rem 0 0; }
.hero-highlights {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.hero-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.92rem;
  line-height: 1.4;
  color: #dce6f5;
}
.hero-highlight-icon {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #3b82f6, #5865f2);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.35rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.45);
}
.btn-ghost {
  display: inline-block;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem 1.35rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(96, 165, 250, 0.08);
}

.section-head { margin-bottom: 1.5rem; }
.section-head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -0.02em;
}
.section-lead { max-width: 42rem; margin: 0; font-size: 1.02rem; }

.compare-grid {
  display: grid;
  grid-template-columns: 1fr auto 1.2fr;
  gap: 1rem;
  align-items: stretch;
}
.compare-card {
  border-radius: 16px;
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.compare-card--without {
  background: linear-gradient(180deg, #141a22 0%, #121820 100%);
  border-color: #3a4555;
  opacity: 0.92;
}
.compare-card--with {
  background: linear-gradient(180deg, #152238 0%, #121c2e 100%);
  border-color: #3d5f8f;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.12);
}
.compare-card--with:hover {
  border-color: #60a5fa;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.18);
}
.compare-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.compare-card-head h3 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.compare-tagline {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.compare-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  font-size: 1rem;
  flex-shrink: 0;
}
.compare-icon--muted {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.25);
}
.compare-icon--accent {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.35);
}
.compare-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
}
.compare-vs span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
}
.compare-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.compare-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #a8b4c8;
}
.compare-mark {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.1rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
}
.compare-mark--neg {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}
.compare-mark--pos {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}
.feature-card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(96, 165, 250, 0.12);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.feature-card:hover {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.06);
}
.feature-card strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  color: #e8edf4;
}
.feature-card p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.features-start--modern {
  margin-top: 1.75rem;
  padding: 1.5rem 1.6rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.features-start--modern h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}
.features-steps--cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}
.step-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.3);
}
.step-text {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #c5d0e0;
}

.landing-hero { margin-bottom: 1.25rem; }
.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 0.75rem;
}
.landing-btn {
  display: inline-block;
  text-decoration: none;
  text-align: center;
  margin-top: 0;
}
a.secondary.landing-btn {
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 1rem;
}

.relative-search-box {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.relative-search-box h3 { margin-top: 0; }

.gdpr-export-box {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.gdpr-export-box h3 { margin-top: 0; }

.gdpr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.gdpr-status-text { margin: 0.5rem 0 0; }

.quota-panel {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0.75rem 0 1rem;
}

.quota-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

.quota-bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  overflow: hidden;
}

.quota-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563b8, var(--accent));
  border-radius: 999px;
  transition: width 0.35s ease;
}

.quota-fill.quota-low { background: linear-gradient(90deg, #b45309, #f59e0b); }
.quota-fill.quota-empty { background: #7f1d1d; }

.rel-url-field { display: block; margin-top: 0.35rem; word-break: break-all; }

.rel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
}

dialog {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  color: var(--text);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.82); }
.top-dialog,
.confirm-dialog { z-index: 2147483647; }
.confirm-dialog { max-width: min(440px, 94vw); width: auto; }
.confirm-dialog h3 { margin: 0; font-size: 1.05rem; }
.confirm-dialog-message { margin: 0.75rem 0 0; line-height: 1.45; color: var(--text); }
.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  border: none;
}
button.danger { background: #dc2626; }
button.danger:hover { background: #b91c1c; }
