/* ─── Google Font ──────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── Design Tokens ────────────────────────────────────────────────────────── */
:root {
  --bg:          #07070f;
  --bg-2:        #0d0d1e;
  --bg-3:        #111128;
  --card:        #0f0f22;
  --card-hover:  #141430;
  --border:      rgba(168,85,247,.14);
  --border-hover:rgba(168,85,247,.45);
  --purple:      #a855f7;
  --purple-light:#c084fc;
  --purple-dark: #7c3aed;
  --purple-deep: #5b21b6;
  --glow:        rgba(168,85,247,.28);
  --glow-lg:     rgba(168,85,247,.18);
  --text:        #e2e8f0;
  --text-muted:  #94a3b8;
  --text-dim:    #64748b;
  --success:     #22c55e;
  --danger:      #ef4444;
  --warning:     #f59e0b;
  --info:        #38bdf8;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   18px;
  --transition:  .2s ease;
}

/* ─── Reset ────────────────────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ─── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--purple-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }

/* ─── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 20px var(--glow); }
  50%      { box-shadow: 0 0 50px var(--glow), 0 0 100px var(--glow-lg); }
}
@keyframes gradientFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes orbFloat {
  0%,100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-20px) scale(1.06); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(20px) scale(.95); }
}
@keyframes counterUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes borderGlow {
  0%,100% { border-color: rgba(168,85,247,.2); }
  50%      { border-color: rgba(168,85,247,.7); }
}

/* ─── Typography ───────────────────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #fff 0%, #c084fc 40%, #a855f7 80%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientFlow 5s ease infinite;
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  transition: var(--transition);
  border: none; outline: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: #fff;
  box-shadow: 0 4px 20px var(--glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  box-shadow: 0 6px 30px var(--glow);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--purple);
  color: var(--purple-light);
  background: rgba(168,85,247,.06);
}
.btn-ghost {
  background: rgba(168,85,247,.1);
  color: var(--purple-light);
  border: 1px solid rgba(168,85,247,.2);
}
.btn-ghost:hover { background: rgba(168,85,247,.2); border-color: var(--purple); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #16a34a; transform: translateY(-1px); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 15px 36px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ─── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.card:hover { border-color: var(--border-hover); }
.card-glow:hover { box-shadow: 0 0 30px var(--glow-lg); }

/* ─── Forms ────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.form-input, .form-select, .form-textarea {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  transition: var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(168,85,247,.12);
}
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1000px var(--bg-2) inset;
  transition: background-color 99999s ease-out 0s;
}
/* Hide browser password-manager / credential-picker controls (wrong file icon on token fields). */
.form-input::-webkit-credentials-auto-fill-button,
.form-input::-webkit-strong-password-auto-fill-button,
.form-input::-webkit-contacts-auto-fill-button,
.form-input::-webkit-caps-lock-indicator {
  visibility: hidden;
  pointer-events: none;
  display: none !important;
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-hint { font-size: 12px; color: var(--text-dim); }
.form-error { font-size: 12px; color: var(--danger); }

/* ─── Badge / Pill ─────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
}
.badge-purple  { background: rgba(168,85,247,.15); color: var(--purple-light); }
.badge-green   { background: rgba(34,197,94,.15); color: #4ade80; }
.badge-red     { background: rgba(239,68,68,.15); color: #f87171; }
.badge-yellow  { background: rgba(245,158,11,.15); color: #fbbf24; }
.badge-blue    { background: rgba(56,189,248,.15); color: #7dd3fc; }
.badge-gray    { background: rgba(148,163,184,.1); color: var(--text-muted); }

/* ─── Spinner ──────────────────────────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(168,85,247,.2);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block; flex-shrink: 0;
}
.spinner-lg { width: 36px; height: 36px; border-width: 3px; }

/* ─── Toast ────────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--bg-3);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  font-size: 14px; font-weight: 500;
  animation: toastIn .3s ease;
  pointer-events: all;
  max-width: 340px;
}
.toast.out { animation: toastOut .3s ease forwards; }
.toast-icon { width: 18px; height: 18px; flex-shrink: 0; }
.toast-success { border-color: rgba(34,197,94,.3); }
.toast-error   { border-color: rgba(239,68,68,.3); }
.toast-info    { border-color: rgba(168,85,247,.3); }

/* ─── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .2s ease;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 500px; width: 100%;
  animation: fadeInUp .25s ease;
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ─── Stars ────────────────────────────────────────────────────────────────── */
.stars { color: #fbbf24; letter-spacing: 2px; }

/* ─── Table ────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  background: var(--bg-3); color: var(--text-muted);
  font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  padding: 10px 14px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(168,85,247,.04); }
.mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }

/* ─── LANDING PAGE ─────────────────────────────────────────────────────────── */
/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 40px;
  background: rgba(7,7,15,.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(168,85,247,.08);
  transition: var(--transition);
}
.navbar-logo { display: flex; align-items: center; gap: 12px; }
.navbar-logo img { width: 34px; height: 34px; border-radius: 8px; }
.navbar-brand { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.navbar-nav { display: flex; align-items: center; gap: 32px; }
.navbar-link {
  font-size: 14px; color: var(--text-muted); font-weight: 500;
  transition: var(--transition); position: relative;
}
.navbar-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--purple); transform: scaleX(0); transition: transform .2s ease;
}
.navbar-link:hover { color: var(--text); }
.navbar-link:hover::after { transform: scaleX(1); }
.navbar-actions { display: flex; align-items: center; gap: 12px; }

/* Hero */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px;
  overflow: hidden;
}
#hero-canvas {
  position: absolute; inset: 0; z-index: 0;
  opacity: .6;
}
.hero-orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); pointer-events: none; z-index: 0;
}
.hero-orb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(124,58,237,.25) 0%, transparent 70%);
  top: -200px; left: -150px;
  animation: orbFloat 10s ease-in-out infinite;
}
.hero-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(168,85,247,.18) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  animation: orbFloat 8s ease-in-out infinite reverse;
}
.hero-content { position: relative; z-index: 1; max-width: 900px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 100px;
  background: rgba(168,85,247,.1);
  border: 1px solid rgba(168,85,247,.25);
  font-size: 12px; font-weight: 600; color: var(--purple-light);
  margin-bottom: 24px;
  animation: fadeInUp .6s ease;
}
.hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--purple-light); animation: glowPulse 2s ease-in-out infinite; }
.hero-title {
  font-size: clamp(52px, 10vw, 90px);
  font-weight: 900; letter-spacing: -2px; line-height: 1;
  margin-bottom: 24px;
  animation: fadeInUp .6s ease .1s both;
}
.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 20px); color: var(--text-muted);
  max-width: 580px; margin: 0 auto 40px;
  animation: fadeInUp .6s ease .2s both;
}
.hero-actions {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  animation: fadeInUp .6s ease .3s both;
}
.hero-scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  color: var(--text-dim); font-size: 12px;
  animation: fadeIn 1s ease 1s both;
}

/* Features */
.section { padding: 80px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-tag {
  display: inline-block; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px; color: var(--purple);
  margin-bottom: 12px;
}
.section-title { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -.5px; margin-bottom: 16px; }
.section-subtitle { font-size: 16px; color: var(--text-muted); max-width: 560px; }
.section-header { margin-bottom: 56px; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  padding: 28px; border-radius: var(--radius-lg);
  background: var(--card); border: 1px solid var(--border);
  transition: var(--transition);
  animation: fadeInUp .5s ease both;
}
.feature-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 40px var(--glow-lg);
  transform: translateY(-3px);
}
.feature-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 18px;
  box-shadow: 0 4px 16px var(--glow);
}
.feature-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature-desc { font-size: 14px; color: var(--text-muted); line-height: 1.65; }

/* Stats */
.stats-section { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; }
.stat-item {
  padding: 48px 32px; text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-value {
  font-size: clamp(36px, 5vw, 52px); font-weight: 900; letter-spacing: -1px;
  background: linear-gradient(135deg, #fff, var(--purple-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { font-size: 14px; color: var(--text-muted); margin-top: 6px; font-weight: 500; }

/* Modules showcase (inspired layout — Ferroe purple, category cards) */
.mod-showcase {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 40%, var(--bg) 100%);
  border-top: 1px solid var(--border);
}
.mod-showcase-inner { max-width: 1100px; }
.mod-showcase-head {
  text-align: center;
  margin-bottom: 40px;
}
.mod-showcase-head .section-subtitle {
  margin: 0 auto 28px;
  max-width: 520px;
}
.mod-showcase-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -.5px;
  margin-bottom: 12px;
}
.mod-summary-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.mod-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--card);
  border: 1px solid var(--border);
}
.mod-summary-pill strong {
  color: var(--text);
  font-weight: 800;
}
.mod-summary-pill-accent {
  border-color: rgba(168,85,247,.35);
  background: rgba(168,85,247,.08);
  color: var(--purple-light);
}
.mod-summary-pill-accent strong { color: #fff; }

.mod-summary-pill-status {
  font-size: 14px;
  padding: 10px 18px;
  gap: 10px;
}
.mod-summary-pill-status strong {
  font-size: 15px;
}
.mod-summary-pill-status.mod-status-clear {
  border-color: rgba(74,222,128,.35);
  background: rgba(74,222,128,.08);
  color: #86efac;
}
.mod-summary-pill-status.mod-status-clear strong { color: #bbf7d0; }
.mod-summary-pill-status.mod-status-heads-up {
  border-color: rgba(251,191,36,.35);
  background: rgba(251,191,36,.08);
  color: #fcd34d;
}
.mod-summary-pill-status.mod-status-heads-up strong { color: #fde68a; }
.mod-summary-pill-status.mod-status-detected {
  border-color: rgba(248,113,113,.35);
  background: rgba(248,113,113,.08);
  color: #fca5a5;
}
.mod-summary-pill-status.mod-status-detected strong { color: #fecaca; }

.mod-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}
.mod-summary-pill-status .mod-status-icon {
  background: rgba(255,255,255,.08);
}

.mod-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 36px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(15,15,34,.85);
  border: 1px solid var(--border);
  max-width: 100%;
}
.mod-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.mod-filter:hover {
  color: var(--text);
  background: rgba(168,85,247,.08);
}
.mod-filter.active {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: #fff;
  box-shadow: 0 4px 18px var(--glow);
}
.mod-filter-icon {
  font-size: 14px;
  line-height: 1;
  opacity: .9;
}

.mod-groups { display: flex; flex-direction: column; gap: 40px; }
.mod-group { animation: fadeInUp .45s ease both; }
.mod-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.mod-group-head h3 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.3px;
}
.mod-group-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

.mod-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 900px) {
  .mod-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .mod-cards { grid-template-columns: 1fr; }
  .mod-filter-bar { border-radius: var(--radius-lg); }
  .mod-filter { padding: 8px 14px; font-size: 12px; }
}

.mod-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.mod-card:hover {
  border-color: var(--border-hover);
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.mod-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mod-status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2px;
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.mod-status .mod-status-icon {
  width: 14px;
  height: 14px;
  font-size: 9px;
}
.mod-status-clear {
  background: rgba(74,222,128,.1);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,.22);
}
.mod-status-clear .mod-status-icon { background: rgba(74,222,128,.18); }
.mod-status-heads-up {
  background: rgba(251,191,36,.1);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,.22);
}
.mod-status-heads-up .mod-status-icon { background: rgba(251,191,36,.18); }
.mod-status-detected {
  background: rgba(248,113,113,.1);
  color: #f87171;
  border: 1px solid rgba(248,113,113,.22);
}
.mod-status-detected .mod-status-icon { background: rgba(248,113,113,.18); }

/* Legacy category tags (unused on cards) */
.mod-card-tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 4px 8px;
  border-radius: 6px;
}
.mod-tag-combat     { background: rgba(239,68,68,.12);  color: #f87171; border: 1px solid rgba(239,68,68,.2); }
.mod-tag-misc       { background: rgba(148,163,184,.1); color: #94a3b8; border: 1px solid rgba(148,163,184,.18); }
.mod-tag-donut      { background: rgba(74,222,128,.1); color: #4ade80; border: 1px solid rgba(74,222,128,.22); }
.mod-tag-basefinding{ background: rgba(251,146,60,.1);  color: #fb923c; border: 1px solid rgba(251,146,60,.22); }
.mod-tag-render     { background: rgba(56,189,248,.1);  color: #38bdf8; border: 1px solid rgba(56,189,248,.22); }
.mod-tag-client     { background: rgba(168,85,247,.12); color: var(--purple-light); border: 1px solid rgba(168,85,247,.25); }

.mod-group.is-hidden { display: none; }

/* Legacy tag grid (unused after showcase redesign) */
.modules-grid {
  display: none;
}

/* Reviews section */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.review-card {
  padding: 24px; border-radius: var(--radius-lg);
  background: var(--card); border: 1px solid var(--border);
  transition: var(--transition);
}
.review-card:hover { border-color: var(--border-hover); box-shadow: 0 0 30px var(--glow-lg); }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.review-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--bg-3); }
.review-author { font-weight: 600; font-size: 14px; }
.review-stars { color: #fbbf24; font-size: 12px; }
.review-text { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* CTA Banner */
.cta-banner {
  padding: 80px 24px; text-align: center;
  background: linear-gradient(135deg, rgba(124,58,237,.12), rgba(168,85,247,.06), var(--bg));
  border-top: 1px solid var(--border);
}

/* Footer */
footer {
  background: var(--bg-2); border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 40px; }
.footer-brand { max-width: 280px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-logo img { width: 28px; height: 28px; border-radius: 6px; }
.footer-logo span { font-weight: 800; font-size: 16px; }
.footer-tagline { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.footer-links h4 { font-size: 13px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 14px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 14px; color: var(--text-dim); transition: color var(--transition); }
.footer-links a:hover { color: var(--purple-light); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-dim); flex-wrap: wrap; gap: 12px; }
.footer-discord-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(88,101,242,.15); border: 1px solid rgba(88,101,242,.3);
  color: #a5b4fc; padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; transition: var(--transition);
}
.footer-discord-btn:hover { background: rgba(88,101,242,.25); }

/* ─── DASHBOARD / ADMIN SHELL ──────────────────────────────────────────────── */
.app-shell {
  display: flex; min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px; flex-shrink: 0;
  background: #08080f;
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
  transition: transform var(--transition);
}
.sidebar-logo {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-logo img { width: 28px; height: 28px; border-radius: 7px; }
.sidebar-logo span { font-weight: 800; font-size: 15px; letter-spacing: -.2px; }

/* Profile block below logo */
.sidebar-profile {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-3); }
.sidebar-profile-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sidebar-profile-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-profile-status { font-size: 11px; color: var(--text-dim); }
.sidebar-profile-status.active-lic { color: #4ade80; }
.sidebar-profile-status.expired-lic { color: var(--danger); }

.sidebar-nav { flex: 1; padding: 10px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.nav-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .9px;
  color: #3a3a52; padding: 10px 10px 4px; margin-top: 4px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 7px;
  font-size: 13px; font-weight: 500; color: #6b6b88;
  transition: var(--transition); cursor: pointer; border: none; background: none; width: 100%; text-align: left;
}
.nav-link svg { flex-shrink: 0; }
.nav-link:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav-link.active { background: var(--purple); color: #fff; font-weight: 600; }

/* Logout at bottom */
.sidebar-logout {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; color: #4a4a66;
  transition: var(--transition); text-decoration: none;
}
.sidebar-logout svg { flex-shrink: 0; }
.sidebar-logout:hover { color: var(--danger); background: rgba(239,68,68,.05); }

/* Download card */
.dl-main-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 26px;
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.dl-main-icon {
  width: 50px; height: 50px; background: rgba(168,85,247,.1);
  border: 1px solid rgba(168,85,247,.2); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--purple);
}
.dl-main-info { flex: 1; min-width: 160px; }
.dl-main-info h2 { font-size: 16px; font-weight: 700; margin-bottom: 7px; }
.dl-main-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 5px; }
.dl-badge {
  padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
  background: rgba(168,85,247,.12); color: var(--purple-light);
  border: 1px solid rgba(168,85,247,.2);
}
.dl-badge-jar {
  background: rgba(148,163,184,.07); color: var(--text-dim);
  border: 1px solid rgba(148,163,184,.12);
}
.dl-main-note { font-size: 12px; color: var(--text-dim); }

/* Quick Start */
.section-heading { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.qs-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 24px; }
.qs-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
}
.qs-icon {
  width: 36px; height: 36px; background: rgba(168,85,247,.1);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--purple); margin-bottom: 10px;
}
.qs-card strong { display: block; font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.qs-card p { font-size: 12px; color: var(--text-muted); }

/* Launchers */
.launchers-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(130px,1fr)); gap: 10px; margin-bottom: 12px; }
.launcher-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.launcher-card .lc-icon { width: 28px; height: 28px; object-fit: contain; display: block; }
.launcher-card .lc-icon-svg { width: 26px; height: 26px; color: var(--text-muted); flex-shrink: 0; }
.launcher-card strong { display: block; font-size: 13px; font-weight: 600; }
.launcher-card span { font-size: 11px; color: var(--text-dim); }
.launcher-card.official span { color: var(--purple-light); }

/* Main content */
.main-content {
  margin-left: 230px; flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: var(--bg-2); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.topbar-title { font-size: 18px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.topbar-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

.page-content { padding: 28px; flex: 1; }

/* Page sections */
.page-section { animation: fadeIn .3s ease; }
.page-section.hidden { display: none; }

/* License Status Card */
.license-card {
  padding: 24px; border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(168,85,247,.06) 0%, var(--card) 100%);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.license-info { display: flex; align-items: center; gap: 16px; }
.license-icon { font-size: 28px; }
.license-key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; background: var(--bg-3);
  padding: 4px 10px; border-radius: 6px;
  color: var(--purple-light); margin-top: 4px;
}

/* File drop zone */
.file-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 14px;
  transition: var(--transition);
  background: var(--bg-3);
  user-select: none;
}
.file-drop:hover { border-color: var(--purple); color: var(--text-muted); }
.file-drop.has-file { border-color: var(--success); color: var(--success); }
.file-drop svg { flex-shrink: 0; opacity: .7; }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 780px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.pricing-card-featured {
  border-color: var(--purple);
  box-shadow: 0 0 40px rgba(168,85,247,.18);
}
.pricing-badge {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--purple);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 18px;
  border-radius: 99px;
  white-space: nowrap;
  letter-spacing: .5px;
}
.pricing-name { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.pricing-price {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.pricing-currency { font-size: 22px; font-weight: 700; color: var(--purple-light); }
.pricing-period { font-size: 14px; font-weight: 400; color: var(--text-dim); margin-left: 4px; }
.pricing-divider { height: 1px; background: var(--border); margin-bottom: 20px; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pricing-features li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-muted); }
.pf-check { color: var(--success); font-weight: 700; flex-shrink: 0; }
.pf-no    { color: var(--danger);  font-weight: 700; flex-shrink: 0; }
.pricing-btn { width: 100%; justify-content: center; border-radius: 10px; padding: 13px; font-size: 15px; margin-top: auto; }

/* Update cards */
.update-card {
  padding: 22px; border-radius: var(--radius-lg);
  background: var(--card); border: 1px solid var(--border);
  margin-bottom: 16px; transition: var(--transition);
}
.update-card:hover { border-color: var(--border-hover); }
.update-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.update-title { font-size: 16px; font-weight: 700; }
.update-meta { font-size: 12px; color: var(--text-dim); }
.update-body { font-size: 14px; color: var(--text-muted); line-height: 1.7; white-space: pre-wrap; }
.update-code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.65;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin: 0 0 10px;
  overflow-x: auto;
  white-space: pre-wrap;
}
.update-code-diff {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(74, 222, 128, 0.18);
  color: #86efac;
}
.update-code-fix {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(244, 114, 182, 0.22);
  color: #f9a8d4;
}
.update-extra {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 4px;
  white-space: pre-wrap;
}
.update-footer-line {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.update-image { margin-top: 14px; border-radius: var(--radius-sm); overflow: hidden; }
.update-image img { width: 100%; max-height: 300px; object-fit: cover; }

/* FAQ accordion */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.faq-question {
  width: 100%; background: var(--card); border: none; color: var(--text);
  font-size: 14px; font-weight: 600; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  cursor: pointer; transition: var(--transition); text-align: left;
}
.faq-question:hover { background: var(--card-hover); }
.faq-question.open { color: var(--purple-light); }
.faq-chevron { transition: transform var(--transition); flex-shrink: 0; }
.faq-question.open .faq-chevron { transform: rotate(180deg); }
.faq-answer { display: none; padding: 0 20px 16px; font-size: 14px; color: var(--text-muted); line-height: 1.7; background: var(--card); }
.faq-answer.open { display: block; animation: fadeIn .2s ease; }

/* Basefind cards */
.basefind-card {
  padding: 20px; border-radius: var(--radius-lg);
  background: var(--card); border: 1px solid var(--border);
  margin-bottom: 14px;
}
.basefind-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.basefind-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.basefind-coords {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  background: var(--bg-3); padding: 2px 8px; border-radius: 4px; color: var(--info);
}

/* Star rating input */
.star-rating { display: flex; gap: 4px; flex-direction: row-reverse; justify-content: flex-end; }
.star-rating input { display: none; }
.star-rating label {
  font-size: 26px; color: var(--text-dim); cursor: pointer;
  transition: color var(--transition);
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color: #fbbf24; }

/* Empty state */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-dim);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: .5; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.empty-state-desc { font-size: 14px; }

/* Admin-specific */
.admin-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 24px; }
.tab-btn {
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  background: var(--bg-3); color: var(--text-muted);
  border: 1px solid var(--border); cursor: pointer;
  transition: var(--transition);
}
.tab-btn:hover { border-color: var(--purple); color: var(--text); }
.tab-btn.active { background: rgba(168,85,247,.15); border-color: var(--purple); color: var(--purple-light); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .2s ease; }

.admin-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.admin-stat-card {
  padding: 18px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border); text-align: center;
}
.admin-stat-num { font-size: 28px; font-weight: 800; }
.admin-stat-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.search-bar {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap;
}
.search-bar .form-input { max-width: 300px; }

/* Copy button */
.copy-btn {
  background: none; border: none; color: var(--text-dim);
  padding: 2px 4px; border-radius: 4px; cursor: pointer;
  font-size: 12px; transition: color var(--transition);
}
.copy-btn:hover { color: var(--purple); }

/* Responsive */
@media (max-width: 768px) {
  .navbar { padding: 14px 20px; }
  .navbar-nav { display: none; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { flex-direction: column; }
  .page-content { padding: 18px; }
  .features-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn-lg { width: 100%; justify-content: center; }
  .stats-grid { grid-template-columns: 1fr; }
  .license-card { flex-direction: column; }
}

/* ---- Animated toggle switch (admin Settings group, etc.) ---- */
.ferroe-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.ferroe-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.ferroe-toggle .ferroe-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(120, 120, 130, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}
.ferroe-toggle .ferroe-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 0 0 0.5px rgba(0, 0, 0, 0.05);
  transition: transform 200ms cubic-bezier(0.4, 0.05, 0.2, 1.05);
  pointer-events: none;
}
.ferroe-toggle input:checked + .ferroe-toggle-track {
  background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}
.ferroe-toggle input:checked + .ferroe-toggle-track .ferroe-toggle-thumb {
  transform: translateX(20px);
}
.ferroe-toggle input:focus-visible + .ferroe-toggle-track {
  outline: 2px solid rgba(168, 85, 247, 0.55);
  outline-offset: 2px;
}
.ferroe-toggle input:disabled + .ferroe-toggle-track {
  opacity: 0.45;
  cursor: not-allowed;
}
.ferroe-toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}
.ferroe-toggle-state {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.ferroe-toggle-state.on  { color: #4ade80; }
.ferroe-toggle-state.off { color: #f87171; }

/* ── Config cards (dashboard + admin Configs sections) ──────────────────── */
.config-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.config-card:hover {
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.05);
}
.config-card-main { flex: 1; min-width: 0; }
.config-card-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.config-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  white-space: pre-wrap;
  word-break: break-word;
}
.config-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}
.config-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
