/* ── Reset & Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors */
  --bg:        #0b0b0f;
  --bg2:       #0f0f15;
  --card:      #12121a;
  --card2:     #16161f;
  --border:    #1e1e2e;
  --border2:   #2a2a3e;

  --accent:    #2563eb;
  --accent-h:  #3b82f6;
  --accent-d:  #1d4ed8;
  --accent-glow: rgba(37,99,235,.25);

  --cyan:      #06b6d4;
  --cyan-h:    #22d3ee;
  --green:     #22c55e;
  --red:       #ef4444;
  --yellow:    #f59e0b;

  --text:      #f1f5f9;
  --text2:     #94a3b8;
  --text3:     #475569;

  /* Spacing */
  --radius:    10px;
  --radius-lg: 16px;
  --nav-h:     60px;

  /* Shadows */
  --shadow:    0 4px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,.6);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }
img { max-width: 100%; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Utilities ────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.flex { display: flex; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.items-center { align-items: center; }

/* ── Navbar ───────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(11,11,15,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 17px;
  letter-spacing: -.3px;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.logo-text { color: var(--text2); }
.logo-text strong { color: var(--text); }

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

.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  transition: color .15s, background .15s;
  white-space: nowrap;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 50%; right: 50%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #38bdf8);
  border-radius: 2px;
  transition: left .2s ease, right .2s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after,
.nav-link.active::after { left: 0; right: 0; }
.nav-link.active { color: var(--text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text3);
  font-size: 13px;
  transition: border-color .15s, color .15s;
}

.btn-search:hover { border-color: var(--border2); color: var(--text2); }
.btn-search kbd {
  background: var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
}

.btn-login {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  background: #5865F2;
  color: #fff;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: background .15s, transform .1s;
}

.btn-login:hover { background: #4752c4; transform: translateY(-1px); }

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  object-fit: cover;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  display: flex;
  align-items: center;
  padding: 5px;
  color: var(--text3);
  border-radius: 6px;
  transition: color .15s, background .15s;
}

.btn-logout:hover { color: var(--red); background: rgba(239,68,68,.1); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: .2s;
}

/* ── Main ─────────────────────────────────────────────────────────────── */
.main {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-h));
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.home-hero,
.page-header,
.container,
.tf-layout {
  animation: fadeUp .3s ease both;
}

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

/* ── Hero (Home) ──────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 80px 24px 48px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(37,99,235,.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-icon {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 24px;
  box-shadow: 0 0 40px var(--accent-glow);
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.hero h1 .accent { color: var(--accent-h); }

.hero p {
  color: var(--text2);
  font-size: 17px;
  max-width: 500px;
  margin: 0 auto 16px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text2);
  font-size: 13px;
}

.hero-stat .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

/* ── Tool grid ────────────────────────────────────────────────────────── */
.tools-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text3);
  margin-bottom: 20px;
}

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

.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  opacity: 0;
  transition: opacity .2s;
}

.tool-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.tool-card:hover::before { opacity: 1; }

.tool-card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  background: rgba(37,99,235,.12);
  border: 1px solid rgba(37,99,235,.2);
}

.tool-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.tool-card p {
  color: var(--text2);
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.tool-card-open {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-h);
  font-size: 13px;
  font-weight: 600;
  transition: gap .2s;
}

.tool-card:hover .tool-card-open { gap: 10px; }

/* ── Page header ──────────────────────────────────────────────────────── */
.page-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 32px;
}

.page-header-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: rgba(37,99,235,.12);
  border: 1px solid rgba(37,99,235,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 16px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.5px;
  margin-bottom: 6px;
}

.page-header p { color: var(--text2); font-size: 15px; }

/* ── Container ────────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ── Cards ────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
}

.card-body { padding: 24px; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: .15s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--card2);
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-secondary:hover { background: var(--border); }

.btn-ghost {
  color: var(--text2);
  background: transparent;
}
.btn-ghost:hover { color: var(--text); background: var(--card2); }

.btn-danger {
  background: rgba(239,68,68,.12);
  color: var(--red);
  border: 1px solid rgba(239,68,68,.2);
}
.btn-danger:hover { background: rgba(239,68,68,.2); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* ── Forms ────────────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
}

.form-input,
.form-textarea,
.form-select {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color .15s;
  width: 100%;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.form-hint { font-size: 12px; color: var(--text3); }

/* ── Upload drop zone ─────────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(37,99,235,.05);
}

.dropzone-icon { font-size: 40px; margin-bottom: 12px; }
.dropzone h3 { font-size: 16px; margin-bottom: 6px; }
.dropzone p { color: var(--text2); font-size: 13px; }
.dropzone input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
}

/* ── Dump cards ───────────────────────────────────────────────────────── */
.dump-grid {
  display: grid;
  gap: 14px;
}

.dump-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color .2s;
}

.dump-card:hover { border-color: var(--border2); }

.dump-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  flex-shrink: 0;
  object-fit: cover;
}

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

.dump-server {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dump-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text2);
  font-size: 12px;
}

.dump-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
}

.dump-tag.green { color: var(--green); border-color: rgba(34,197,94,.25); background: rgba(34,197,94,.08); }
.dump-tag.cyan  { color: var(--cyan);  border-color: rgba(6,182,212,.25); background: rgba(6,182,212,.08); }
.dump-tag.yellow{ color: var(--yellow);border-color: rgba(245,158,11,.25); background: rgba(245,158,11,.08); }

.dump-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Uploader leaderboard ─────────────────────────────────────────────── */
.uploader-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.uploader-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--card2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.uploader-rank {
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.uploader-row:nth-child(1) .uploader-rank { color: #f59e0b; }
.uploader-row:nth-child(2) .uploader-rank { color: #94a3b8; }
.uploader-row:nth-child(3) .uploader-rank { color: #92400e; }

.uploader-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.uploader-name { flex: 1; font-size: 14px; font-weight: 500; }

.uploader-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-h);
}

/* ── Trigger viewer modal ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .2s ease;
}

.modal-overlay.visible { opacity: 1; }

.modal {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(24px) scale(0.97);
  transition: transform .28s cubic-bezier(.16,1,.3,1);
}

.modal-overlay.visible .modal { transform: translateY(0) scale(1); }

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 16px; font-weight: 600; }

.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  background: var(--card2);
  border: 1px solid var(--border);
  transition: .15s;
  font-size: 18px;
  line-height: 1;
}

.modal-close:hover { color: var(--text); background: var(--border); }

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ── Search modal ─────────────────────────────────────────────────────── */
.search-modal {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
}

.search-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px;
}

.search-results { padding: 8px 0; max-height: 360px; overflow-y: auto; }

.search-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background .15s;
}

.search-item:hover,
.search-item.focused { background: var(--card2); }

.search-item-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(37,99,235,.12);
  border: 1px solid rgba(37,99,235,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.search-item-title { font-size: 14px; font-weight: 600; }
.search-item-desc  { font-size: 12px; color: var(--text2); }

/* ── Code editor area ─────────────────────────────────────────────────── */
.code-area {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ── Lua Beautifier layout ────────────────────────────────────────────── */
.lb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.lb-stats-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 10px;
}

.lb-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text3);
  padding: 0 4px;
}

.lb-stats strong { color: var(--text2); font-weight: 700; }

.lb-switch-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text2);
  cursor: pointer;
  user-select: none;
}

.lb-switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
}

.lb-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  z-index: 1;
}

.lb-switch-track {
  position: absolute;
  inset: 0;
  background: var(--border2);
  border-radius: 999px;
  transition: background .2s;
}

.lb-switch-track::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  left: 2px; top: 2px;
  background: var(--text2);
  border-radius: 50%;
  transition: transform .2s, background .2s;
}

.lb-switch input:checked + .lb-switch-track {
  background: linear-gradient(135deg, var(--accent), #38bdf8);
}

.lb-switch input:checked + .lb-switch-track::before {
  transform: translateX(14px);
  background: #fff;
}

@media (max-width: 900px) {
  .lb-grid, .lb-stats-bar { grid-template-columns: 1fr; }
}

.code-toolbar {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card2);
}

.code-toolbar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text3);
  font-family: 'JetBrains Mono', monospace;
}

.code-editor,
.code-output {
  width: 100%;
  min-height: 300px;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  padding: 16px;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  tab-size: 2;
}

.code-output {
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ── Syntax highlight (simple) ────────────────────────────────────────── */
.tok-kw     { color: #c792ea; }
.tok-str    { color: #c3e88d; }
.tok-num    { color: #f78c6c; }
.tok-fn     { color: #82aaff; }
.tok-cmt    { color: #546e7a; font-style: italic; }
.tok-punct  { color: #89ddff; }

/* ── Tabs ─────────────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  padding-bottom: 0;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  transition: .15s;
  position: relative;
  bottom: -1px;
}

.tab-btn:hover { color: var(--text); background: var(--card2); }
.tab-btn.active {
  color: var(--text);
  background: var(--card);
  border-color: var(--border);
  border-bottom-color: var(--card);
}

/* ── Badge ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}

.badge-accent { background: rgba(37,99,235,.15); color: var(--accent-h); }
.badge-green  { background: rgba(34,197,94,.12); color: var(--green); }
.badge-red    { background: rgba(239,68,68,.12); color: var(--red); }

/* ── Pagination ───────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.page-btn {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  background: var(--card);
  border: 1px solid var(--border);
  transition: .15s;
}

.page-btn:hover,
.page-btn.active { color: var(--text); border-color: var(--accent); background: rgba(37,99,235,.12); }
.page-btn:disabled { opacity: .4; pointer-events: none; }

/* ── Empty state ──────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text2);
}

.empty-state .emoji { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.empty-state p  { font-size: 14px; max-width: 360px; margin: 0 auto; }

/* ── GTA Map ──────────────────────────────────────────────────────────── */
.map-container {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 520px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-placeholder {
  text-align: center;
  color: var(--text2);
}

.map-coords-panel {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(11,11,15,.9);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  backdrop-filter: blur(8px);
}

/* ── Snippet cards ────────────────────────────────────────────────────── */
.snippet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.snippet-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .2s;
}

.snippet-card:hover { border-color: var(--border2); }

.snippet-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

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

.snippet-card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snippet-card-desc {
  font-size: 12px;
  color: var(--text2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.snippet-card-code {
  padding: 16px 20px;
  background: #0d1117;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #e2e8f0;
  overflow-x: auto;
  max-height: 160px;
  overflow-y: hidden;
  white-space: pre;
}

.snippet-card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ── Toast ────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: slideIn .25s ease;
  max-width: 340px;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--accent-h); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(24px); }
}

/* ── Auth gate ────────────────────────────────────────────────────────── */
.auth-gate {
  text-align: center;
  padding: 80px 24px;
}

.auth-gate .icon { font-size: 56px; margin-bottom: 20px; }
.auth-gate h2 { font-size: 24px; margin-bottom: 10px; }
.auth-gate p { color: var(--text2); margin-bottom: 28px; max-width: 400px; margin-left: auto; margin-right: auto; }

/* ── Split layout ─────────────────────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.split.thirds {
  grid-template-columns: 2fr 1fr;
}

/* ── Script builder ───────────────────────────────────────────────────── */
.trigger-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.trigger-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
}

.trigger-item:hover  { border-color: var(--border2); background: var(--border); }
.trigger-item.active { border-color: var(--accent); background: rgba(37,99,235,.08); }

.trigger-event { color: var(--cyan); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trigger-badge { font-size: 10px; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .split, .split.thirds { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .snippet-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--bg2); border-bottom: 1px solid var(--border); padding: 12px; gap: 2px; }
  .nav-links.open { display: flex; }
  .nav-hamburger { display: flex; }
  .btn-search span, .btn-search kbd { display: none; }
  .btn-search { padding: 8px; }
}

@media (max-width: 480px) {
  .dump-card { flex-wrap: wrap; }
  .dump-actions { width: 100%; }
  .user-name { display: none; }
}

/* ── Page-header & search icon colors (SVG) ──────────────────────────── */
.page-header-icon { color: var(--accent-h); }
.search-item-icon { color: var(--accent-h); }
.logo-icon { color: #fff; }

/* ── Home redesign ────────────────────────────────────────────────────── */
.home-hero {
  position: relative;
  background:
    radial-gradient(ellipse 900px 420px at 15% -10%, rgba(37,99,235,.18), transparent 60%),
    radial-gradient(ellipse 700px 380px at 100% 0%, rgba(6,182,212,.12), transparent 60%),
    linear-gradient(180deg, rgba(37,99,235,.06) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  padding: 76px 24px 64px;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 85%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 85%);
  pointer-events: none;
}

.home-hero-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 56px;
}

.home-hero-title {
  font-size: clamp(40px, 5.5vw, 62px);
  font-weight: 800;
  letter-spacing: -1.8px;
  line-height: 1.08;
  margin-bottom: 18px;
}

.home-hero-title .grad {
  background: linear-gradient(135deg, var(--accent-h), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-hero-sub {
  color: var(--text2);
  font-size: 16.5px;
  max-width: 460px;
  line-height: 1.75;
  margin-bottom: 30px;
}

.home-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.home-hero-actions .btn { padding: 11px 22px; font-size: 14.5px; }
.home-hero-actions .btn-primary { box-shadow: 0 8px 28px rgba(37,99,235,.35); }
.home-hero-actions .btn-primary:hover { box-shadow: 0 10px 34px rgba(37,99,235,.45); }

.home-stats-card {
  position: relative;
  background: linear-gradient(160deg, var(--card) 0%, var(--card2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 220px;
  box-shadow: var(--shadow);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}

.home-stats-card:hover {
  border-color: rgba(37,99,235,.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.home-stats-card::after {
  content: '';
  position: absolute;
  top: 0; left: 22px; right: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
}

.home-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform .2s;
}

.home-stat:hover { transform: translateX(2px); }

.home-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: rgba(37,99,235,.1);
  border: 1px solid rgba(37,99,235,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-h);
  flex-shrink: 0;
}

.home-stat-val {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 2px;
}

.home-stat-label {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.home-body {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 24px 90px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  align-items: start;
}

.home-featured {
  background: linear-gradient(165deg, var(--card) 0%, var(--card2) 120%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}

.home-featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.home-featured::after {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(37,99,235,.12) 0%, transparent 70%);
  pointer-events: none;
}

.home-featured:hover {
  border-color: rgba(37,99,235,.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(37,99,235,.1);
}

.home-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37,99,235,.12);
  border: 1px solid rgba(37,99,235,.2);
  color: var(--accent-h);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 20px;
}

.home-featured-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37,99,235,.22), rgba(6,182,212,.16));
  border: 1px solid rgba(37,99,235,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-h);
  margin-bottom: 22px;
  box-shadow: 0 0 24px rgba(37,99,235,.15);
  transition: transform .25s;
}

.home-featured:hover .home-featured-icon {
  transform: scale(1.06) rotate(-2deg);
}

.home-featured h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.5px;
  margin-bottom: 10px;
}

.home-featured p {
  color: var(--text2);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 400px;
}

.home-featured-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-h);
  font-size: 14px;
  font-weight: 600;
  transition: gap .2s;
}

.home-featured:hover .home-featured-open { gap: 14px; }

.home-tool-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-tool-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}

.home-tool-row:hover {
  border-color: rgba(37,99,235,.3);
  background: var(--card2);
  transform: translateX(3px);
  box-shadow: var(--shadow);
}

.home-tool-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  flex-shrink: 0;
  transition: color .2s, border-color .2s, background .2s, transform .2s;
}

.home-tool-row:hover .home-tool-icon {
  color: var(--accent-h);
  border-color: rgba(37,99,235,.25);
  background: rgba(37,99,235,.1);
  transform: scale(1.06);
}

.home-tool-info { flex: 1; min-width: 0; }
.home-tool-name { font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
.home-tool-desc { font-size: 12px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.home-tool-arrow { color: var(--text3); transition: color .15s, transform .15s; }
.home-tool-row:hover .home-tool-arrow { color: var(--accent-h); transform: translateX(3px); }

/* Responsive home */
@media (max-width: 900px) {
  .home-hero { padding: 56px 20px 44px; }
  .home-hero-inner { grid-template-columns: 1fr; }
  .home-stats-card { flex-direction: row; flex-wrap: wrap; min-width: unset; }
  .home-body { grid-template-columns: 1fr; }
  .home-featured { padding: 32px 24px; }
}

/* ── TriggerFinder Layout ─────────────────────────────────────────────── */
.tf-layout {
  display: flex;
  height: calc(100vh - var(--nav-h));
  overflow: hidden;
}

.tf-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg2) 0%, rgba(15,15,21,.4) 100%);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Brand */
.tf-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
}
.tf-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.25);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tf-brand-text { min-width: 0; }
.tf-brand-name {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.2px;
  color: var(--text);
}
.tf-brand-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px;
}

/* Dropzone */
.tf-dropzone {
  margin: 4px 16px 16px;
  padding: 26px 16px;
  border: 1.5px dashed rgba(59,130,246,.35);
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  position: relative;
  background: rgba(59,130,246,.05);
  transition: background .2s, border-color .2s;
}
.tf-dropzone:hover,
.tf-dropzone.drag-over {
  background: rgba(59,130,246,.10);
  border-color: rgba(59,130,246,.6);
}
.tf-dropzone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%;
}
.tf-drop-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  transition: transform .2s;
}
.tf-dropzone:hover .tf-drop-icon,
.tf-dropzone.drag-over .tf-drop-icon { transform: translateY(-2px); }
.tf-drop-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.tf-drop-sub {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.6;
}

/* Stats */
.tf-sidebar-stats {
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tf-sstat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tf-sstat-val {
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  line-height: 1.1;
}
.tf-sstat-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text3);
}

/* Filters */
.tf-filter-section {
  padding: 16px 16px 20px;
  flex: 1;
}
.tf-filter-header {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text3);
  text-transform: uppercase;
  margin-bottom: 8px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tf-reset-btn {
  color: var(--text3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color .15s;
}
.tf-reset-btn:hover { color: var(--red); }

.tf-filter-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  font-size: 12.5px;
  color: var(--text2);
}
.tf-filter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fcolor, var(--text3));
  flex-shrink: 0;
  opacity: .9;
}
.tf-filter-item:hover { background: var(--card); color: var(--text); }
.tf-filter-item.active {
  background: rgba(59,130,246,.10);
  border-color: rgba(59,130,246,.25);
  color: var(--text);
  font-weight: 600;
}
.tf-filter-label { flex: 1; font-size: 12px; }
.tf-filter-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 7px;
}
.tf-filter-item.active .tf-filter-count {
  color: var(--text);
  border-color: rgba(59,130,246,.3);
}

/* ── TriggerFinder Main ───────────────────────────────────────────────── */
.tf-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.tf-toolbar {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  background: var(--bg2);
  flex-wrap: wrap;
}

.tf-tab-bar {
  display: flex;
  gap: 2px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
}
.tf-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text3);
  background: none;
  border: none;
  cursor: pointer;
  transition: color .15s, background .15s, box-shadow .15s;
  white-space: nowrap;
}
.tf-tab:hover { color: var(--text); }
.tf-tab.active {
  color: var(--text);
  background: var(--card2);
  box-shadow: inset 0 0 0 1px var(--border2), 0 2px 8px rgba(0,0,0,.25);
}

.tf-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}
.tf-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tf-toolbar-sep {
  width: 1px;
  height: 20px;
  background: var(--border2);
  margin: 0 2px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 8px;
  font-weight: 600;
  transition: border-color .15s, color .15s, background .15s;
}
.btn-ghost:hover {
  border-color: var(--border2);
  color: var(--text);
  background: var(--card);
}

.tf-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text3);
  min-width: 220px;
  transition: border-color .15s;
}
.tf-search-wrap:focus-within { border-color: rgba(59,130,246,.45); }
.tf-search-wrap input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 13px;
  width: 100%;
}

.tf-content {
  flex: 1;
  overflow-y: auto;
}

.tf-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 48px;
  text-align: center;
  color: var(--text2);
  min-height: 380px;
}
.tf-empty-icon {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  margin-bottom: 22px;
}
.tf-empty h3 { font-size: 19px; color: var(--text); margin-bottom: 8px; letter-spacing: -.3px; }
.tf-empty p { font-size: 14px; max-width: 400px; line-height: 1.7; }

/* ── TriggerFinder Trigger List ──────────────────────────────────────── */
.tf-trigger-list { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; }

.tf-trigger-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px 13px 19px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.tf-trigger-row::before {
  content: '';
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--tcolor, var(--border2));
  opacity: .85;
}
.tf-trigger-row:hover {
  background: var(--card2);
  border-color: var(--border2);
  box-shadow: 0 2px 12px rgba(0,0,0,.28);
}

.tf-trigger-check { flex-shrink: 0; }
.tf-checkbox {
  width: 15px; height: 15px;
  cursor: pointer;
  accent-color: var(--accent);
}

.tf-trigger-info { flex: 1; min-width: 0; }
.tf-trigger-event {
  font-size: 13px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tf-trigger-file {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text3);
}
.tf-sep-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border2);
  flex-shrink: 0;
}
.tf-trigger-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 420px;
}

.tf-trigger-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--tcolor, var(--border2));
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  color: var(--tcolor, var(--text2));
  background: transparent;
}
.tf-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tcolor, var(--text3));
  flex-shrink: 0;
}

/* ── TriggerFinder Analysis Stats ────────────────────────────────────── */
.tf-analysis-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
.tf-astat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text3);
}
.tf-astat.red { color: var(--red); }
.tf-astat.yellow { color: var(--yellow); }
.tf-astat.green { color: var(--green); }
.tf-astat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 4px;
}
.tf-astat-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

/* ── TriggerFinder Findings ──────────────────────────────────────────── */
.tf-findings-list {
  padding: 4px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tf-finding-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border2);
  border-radius: 14px;
  padding: 18px 20px;
}
.tf-finding-card.sev-high { border-left-color: var(--red); }
.tf-finding-card.sev-medium { border-left-color: var(--yellow); }
.tf-finding-card.sev-low { border-left-color: var(--text3); }
.tf-finding-card.sev-info { border-left-color: var(--cyan); }

.tf-finding-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.tf-finding-title {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text);
}
.tf-finding-desc {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 12px;
}
.tf-finding-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text3);
  font-family: 'JetBrains Mono', monospace;
}
.tf-finding-code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  overflow-x: auto;
}
.tf-code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
}
.tf-code-block pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  color: #e2e8f0;
  white-space: pre;
  margin: 0;
}

.tf-severity-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}
.tf-severity-badge.high { background: rgba(239,68,68,.15); color: var(--red); }
.tf-severity-badge.medium { background: rgba(245,158,11,.15); color: var(--yellow); }
.tf-severity-badge.low { background: rgba(100,116,139,.15); color: var(--text3); }

.tf-confidence-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.tf-modal-exploit-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}
.tf-modal-exploit-header .btn { margin-left: auto; }

/* ── TriggerFinder Detail Modal ──────────────────────────────────────── */
.tf-detail-modal { max-width: 680px; }
.tf-modal-section { margin-bottom: 16px; }
.tf-modal-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 6px;
}
.tf-modal-code {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  overflow-x: auto;
}

/* ── TriggerFinder Responsive ────────────────────────────────────────── */
@media (max-width: 860px) {
  .tf-layout { flex-direction: column; height: auto; }
  .tf-sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .tf-analysis-stats { grid-template-columns: 1fr; }
  .tf-toolbar { gap: 10px; }
  .tf-toolbar-right { margin-left: 0; width: 100%; }
  .tf-search-wrap { flex: 1; min-width: 0; }
}



/* ── Auth overlay: aligned with the home hero ───────────────────────── */
#authOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  overflow: auto;
  isolation: isolate;
  transition: opacity .25s ease;
}
#authOverlay.visible { opacity: 1; }
.auth-overlay-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #0b0b0f;
  overflow: hidden;
}
.auth-overlay-bg::before,
.auth-overlay-bg::after {
  content: '';
  position: absolute;
  width: min(70vw, 760px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(24px);
  pointer-events: none;
}
.auth-overlay-bg::before {
  top: -33%; left: -14%;
  background: radial-gradient(circle, rgba(37,99,235,.30), transparent 68%);
}
.auth-overlay-bg::after {
  right: -20%; bottom: -38%;
  background: radial-gradient(circle, rgba(6,182,212,.20), transparent 68%);
}
.auth-overlay-card {
  position: relative;
  width: min(100%, 448px);
  padding: 44px 40px 36px;
  text-align: center;
  background: linear-gradient(155deg, rgba(22,22,31,.94), rgba(14,14,21,.96));
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.04);
  transform: translateY(12px) scale(.985);
  transition: transform .32s cubic-bezier(.2,.8,.2,1);
}
.auth-overlay-card::before {
  content: '';
  position: absolute;
  top: 0; left: 16%; right: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-h), transparent);
  opacity: .8;
}
#authOverlay.visible .auth-overlay-card { transform: translateY(0) scale(1); }
.auth-overlay-logo { display: flex; justify-content: center; margin-bottom: 16px; }
.auth-overlay-logo img { filter: drop-shadow(0 10px 24px rgba(37,99,235,.28)); }
.auth-overlay-title {
  margin-bottom: 10px;
  color: var(--text);
  font-size: clamp(28px, 5vw, 34px);
  font-weight: 700;
  letter-spacing: -1.1px;
  line-height: 1.1;
}
.auth-overlay-sub {
  max-width: 330px;
  margin: 0 auto 28px;
  color: var(--text2);
  font-size: 14px;
  line-height: 1.65;
}
.auth-overlay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  width: 100%;
  margin-bottom: 16px;
  padding: 13px 20px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: linear-gradient(135deg, #6573f7, #5865f2);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(88,101,242,.26);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.auth-overlay-btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 14px 34px rgba(88,101,242,.38); }
.auth-overlay-btn:focus-visible { outline: 3px solid rgba(96,165,250,.72); outline-offset: 3px; }
.auth-overlay-footer {
  padding-top: 20px;
  border-top: 1px solid rgba(148,163,184,.12);
  color: var(--text3);
  font-size: 13px;
}
.auth-overlay-footer a { font-weight: 600; }
.auth-overlay-error {
  margin: -12px 0 20px;
  padding: 10px 12px;
  border: 1px solid rgba(229,100,88,.36);
  border-radius: 8px;
  background: rgba(229,100,88,.10);
  color: #f5aaa3;
  font-size: 13px;
  line-height: 1.45;
}
.auth-overlay-footer a { color: var(--accent-h); }
@media (max-width: 480px) {
  #authOverlay { padding: 16px; }
  .auth-overlay-card { padding: 36px 24px 28px; border-radius: 16px; }
  .auth-overlay-logo img { height: 64px !important; }
}
@media (prefers-reduced-motion: reduce) {
  #authOverlay, .auth-overlay-card, .auth-overlay-btn { transition: none; }
}

/* ── Coordinate Map (interactive) ─────────────────────────────────────── */
.cm-layout {
  display: flex;
  height: calc(100vh - var(--nav-h));
  overflow: hidden;
}

.cm-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #0a1b30;
  cursor: grab;
  user-select: none;
}

.cm-viewport.dragging { cursor: grabbing; }

.cm-world {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
  transform-origin: 0 0;
}

.cm-pin-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.cm-zoom-controls {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}

.cm-zoom-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  transition: background .15s;
}

.cm-zoom-btn:hover { background: var(--border); }

.cm-coords-readout {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 5;
  background: rgba(15,15,21,.85);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text);
  backdrop-filter: blur(6px);
  pointer-events: none;
  white-space: pre;
}

.cm-pin-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 3;
}

.cm-pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-h);
  border: 2px solid #fff;
  box-shadow: 0 0 10px var(--accent-glow), 0 0 0 4px rgba(139,92,246,.2);
}

.cm-pin-tag {
  position: absolute;
  bottom: 100%;
  margin-bottom: 4px;
  background: rgba(15,15,21,.9);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
}

.cm-pin-marker .cm-pin-remove {
  position: absolute;
  top: -8px;
  right: -14px;
  opacity: 0;
  transition: opacity .15s;
}

.cm-pin-marker:hover .cm-pin-remove { opacity: 1; }

.cm-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  background: var(--bg2);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.cm-section {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.cm-section-header {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cm-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.cm-input-sm {
  padding: 8px 10px;
  font-size: 13px;
  min-width: 0;
}

.cm-label-input {
  margin-bottom: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.cm-add-btn {
  width: 100%;
  justify-content: center;
}

.cm-paste-input {
  padding: 8px 10px;
  font-size: 13px;
}

.cm-icon-btn {
  padding: 8px 10px;
  flex-shrink: 0;
}

.cm-pins-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-bottom: none;
}

.cm-pin-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.cm-pin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.cm-pin-row:hover { border-color: var(--border2); background: var(--card2); }

.cm-pin-row-info { overflow: hidden; }

.cm-pin-row-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-pin-row-coords {
  font-size: 11px;
  color: var(--text3);
  font-family: 'JetBrains Mono', monospace;
}

.cm-pin-remove {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--red);
  background: rgba(239,68,68,.1);
  opacity: 0;
  transition: opacity .15s, background .15s;
}

.cm-pin-row:hover .cm-pin-remove { opacity: 1; }
.cm-pin-remove:hover { background: rgba(239,68,68,.2); }

.cm-empty-pins {
  text-align: center;
  color: var(--text3);
  font-size: 12px;
  padding: 24px 12px;
}

.cm-sidebar-footer {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cm-footer-btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 900px) {
  .cm-layout { flex-direction: column; height: auto; }
  .cm-viewport { height: 60vh; }
  .cm-sidebar { width: 100%; height: 40vh; border-left: none; border-top: 1px solid var(--border); }
}

/* ── CFX Lookup ────────────────────────────────────────────────────────── */

.cfx-inline-code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  color: var(--accent-h);
}

.cfx-recent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cfx-recent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--card2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.cfx-recent-row:hover { border-color: var(--border2); background: var(--border); }

.cfx-recent-icon {
  width: 26px; height: 26px;
  flex-shrink: 0;
  border-radius: 6px;
  background: rgba(37,99,235,.12);
  border: 1px solid rgba(37,99,235,.2);
  color: var(--accent-h);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cfx-recent-code {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  flex-shrink: 0;
  width: 100px;
}

.cfx-recent-host {
  flex: 1;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cfx-recent-players {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text3);
  flex-shrink: 0;
}

.cfx-recent-remove {
  width: 22px; height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  border-radius: 6px;
  transition: .15s;
}

.cfx-recent-remove:hover { color: var(--red); background: rgba(239,68,68,.1); }

.cfx-resource-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 0;
}

.cfx-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cfx-table-row {
  display: grid;
  grid-template-columns: 36px 1fr 100px 100px 100px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--card2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 13px;
}

.cfx-table-head {
  background: transparent;
  border: none;
  padding: 0 14px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--text3);
}

.cfx-table-row-clickable { cursor: pointer; transition: border-color .15s, background .15s; }
.cfx-table-row-clickable:hover { border-color: var(--border2); background: var(--border); }

.cfx-col-rank {
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
  text-align: center;
}

.cfx-col-server {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cfx-server-icon {
  width: 24px; height: 24px;
  flex-shrink: 0;
  border-radius: 6px;
  background: rgba(37,99,235,.12);
  border: 1px solid rgba(37,99,235,.2);
  color: var(--accent-h);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cfx-server-icon-img {
  width: 24px; height: 24px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid var(--border2);
  object-fit: cover;
  background: var(--bg2);
}

.cfx-resource-name {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--text);
}

.cfx-col-num {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text2);
  text-align: right;
}


/* ── CFX Server Detail Modal ─────────────────────────────────────────────── */
.cfx-detail-wrap {
  background: var(--bg2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: min(1020px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

/* HEADER */
.cfx-detail-header {
  min-height: 110px;
  background: var(--card);
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
}
.cfx-detail-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(11,11,15,.92) 0%, rgba(11,11,15,.55) 100%);
}
.cfx-detail-header-overlay {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  gap: 16px;
}
.cfx-detail-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.cfx-detail-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,.15);
  object-fit: cover;
  flex-shrink: 0;
}
.cfx-detail-icon-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37,99,235,.2);
  color: var(--accent-h);
}
.cfx-detail-header-info { min-width: 0; }
.cfx-detail-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 580px;
}
.cfx-detail-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255,255,255,.7);
  margin-top: 6px;
}
.cfx-online-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  flex-shrink: 0;
}
.cfx-detail-sep { color: rgba(255,255,255,.35); }
.cfx-detail-code { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: rgba(255,255,255,.55); }
.cfx-detail-close {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
}
.cfx-detail-close:hover { background: rgba(255,255,255,.22); }

/* BODY */
.cfx-detail-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}
.cfx-detail-main {
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: 1px solid var(--border);
}
.cfx-detail-sidebar {
  overflow-y: auto;
  padding: 16px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Sections */
.cfx-detail-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.cfx-detail-section:last-child { border-bottom: none; }
.cfx-section-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text3);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Endpoints */
.cfx-endpoint-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  flex-wrap: wrap;
}
.cfx-ep-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cfx-ep-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cfx-ep-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: var(--card2);
  color: var(--text2);
  transition: .15s;
  flex-shrink: 0;
  text-decoration: none;
}
.cfx-ep-btn:hover { background: var(--border); color: var(--text); }
.cfx-ep-connect { background: rgba(37,99,235,.15); border-color: rgba(37,99,235,.35); color: var(--accent-h); }
.cfx-ep-connect:hover { background: rgba(37,99,235,.28); }
.cfx-ep-txadmin { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3); color: var(--green); }
.cfx-ep-txadmin:hover { background: rgba(34,197,94,.2); }

/* Description */
.cfx-desc-text {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.65;
  margin: 0;
}

/* Tags row */
.cfx-tags-row { display: flex; flex-wrap: wrap; gap: 7px; }
.cfx-tag-chip {
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--border2);
  color: var(--text2);
}

/* Collapsible */
.cfx-collapse {
  border-bottom: 1px solid var(--border);
}
.cfx-collapse-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  transition: color .15s;
}
.cfx-collapse-btn:hover { color: var(--accent-h); }
.cfx-collapse-title { flex: 1; text-align: left; }
.cfx-collapse-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 9px;
}
.cfx-collapse-btn.open svg { transform: rotate(180deg); }
.cfx-collapse-body { padding-bottom: 14px; }

/* Player list */
.cfx-player-list { display: flex; flex-direction: column; gap: 4px; }
.cfx-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--card);
  border-radius: 6px;
  font-size: 13px;
}
.cfx-player-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 80%; }
.cfx-player-ping { font-size: 11px; color: var(--text3); font-family: 'JetBrains Mono', monospace; }

/* Server Variables */
.cfx-vars-list { display: flex; flex-direction: column; gap: 4px; }
.cfx-var-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 5px 10px;
  background: var(--card);
  border-radius: 6px;
  font-size: 12px;
}
.cfx-var-key { color: var(--accent-h); font-family: 'JetBrains Mono', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfx-var-val { color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }

/* Raw JSON */
.cfx-raw-json {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text2);
  overflow-x: auto;
  line-height: 1.6;
  white-space: pre;
  max-height: 280px;
  overflow-y: auto;
}

/* Meta card */
.cfx-meta-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cfx-meta-card-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text3);
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cfx-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.cfx-meta-row:last-child { border-bottom: none; }
.cfx-meta-label { color: var(--text3); min-width: 70px; flex-shrink: 0; }
.cfx-meta-value { color: var(--text); display: flex; align-items: center; gap: 6px; }
.cfx-owner-av { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.cfx-owner-av-placeholder {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 10px;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}

/* Responsive */
@media (max-width: 760px) {
  .cfx-detail-body { grid-template-columns: 1fr; }
  .cfx-detail-main { border-right: none; border-bottom: 1px solid var(--border); }
  .cfx-detail-name { font-size: 15px; max-width: 80vw; }
}

/* Animation for cfx-detail-wrap inside modal-overlay */
.cfx-detail-wrap {
  transform: translateY(12px) scale(.97);
  transition: transform .22s ease;
}
.modal-overlay.visible .cfx-detail-wrap {
  transform: translateY(0) scale(1);
}

/* ══════════════════════════════════════════════════════════════════════════════
   HOME PAGE – Redesign
══════════════════════════════════════════════════════════════════════════════ */

/* ── HERO ────────────────────────────────────────────────────────────────── */
.home2-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 900px 460px at 22% -12%, rgba(59,130,246,.16), transparent 62%),
    radial-gradient(ellipse 720px 400px at 92% -4%, rgba(34,211,238,.10), transparent 62%);
}

.home2-hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.65), transparent 88%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.65), transparent 88%);
  pointer-events: none;
}

.home2-hero-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
}
.home2-hero-glow-a {
  width: 420px; height: 420px;
  top: -160px; left: 6%;
  background: rgba(37,99,235,.16);
}
.home2-hero-glow-b {
  width: 340px; height: 340px;
  top: -110px; right: 4%;
  background: rgba(6,182,212,.12);
}

.home2-hero-inner {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: 92px 28px 46px;
  text-align: center;
}

.home2-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #60a5fa;
  background: rgba(59,130,246,.09);
  border: 1px solid rgba(59,130,246,.22);
  border-radius: 99px;
  padding: 6px 15px;
  margin-bottom: 26px;
}

.home2-hero-title {
  font-size: clamp(42px, 6vw, 66px);
  font-weight: 800;
  letter-spacing: -2.2px;
  line-height: 1.06;
  margin-bottom: 22px;
}
.home2-hero-title .grad {
  background: linear-gradient(120deg, #60a5fa 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home2-hero-sub {
  font-size: 16.5px;
  color: var(--text2);
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto 34px;
}

.home2-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 42px;
}
.home2-cta {
  padding: 13px 26px;
  font-size: 15px;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(37,99,235,.32);
}
.home2-cta:hover { box-shadow: 0 10px 36px rgba(37,99,235,.45); }
.home2-cta2 {
  padding: 13px 24px;
  font-size: 15px;
  border-radius: 12px;
}

/* Feature chips */
.home2-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: center;
}
.home-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text3);
}
.home-feature-icon {
  color: #60a5fa;
  display: flex;
  flex-shrink: 0;
}

/* Stats strip */
.home2-stats-strip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.015);
}
.home2-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 54px;
  gap: 4px;
}
.home2-stat-val {
  font-size: 23px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
}
.home2-stat-online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
}
.home2-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: home2Pulse 2.2s ease-out infinite;
}
@keyframes home2Pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.45); }
  70%  { box-shadow: 0 0 0 9px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.home2-stat-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text3);
}
.home2-stat-sep {
  width: 1px;
  height: 38px;
  background: var(--border);
}

/* ── TOOL GRID ────────────────────────────────────────────────────────────── */
.home2-tools-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 24px 88px;
}
.home2-section-header {
  text-align: center;
  margin-bottom: 48px;
}
.home2-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: #60a5fa;
  margin-bottom: 12px;
}
.home2-section-title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -.8px;
  margin-bottom: 12px;
}
.home2-section-sub {
  font-size: 15px;
  color: var(--text2);
  max-width: 520px;
  margin: 0 auto;
}

.home2-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Tool Card */
.home-tool-card {
  background: linear-gradient(170deg, var(--card) 0%, var(--card2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color .22s, transform .22s, box-shadow .22s;
  animation: homeCardIn .5s ease both;
  animation-delay: calc(var(--card-i, 0) * 70ms);
}
@keyframes homeCardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.home-tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--card-accent), transparent 75%);
  opacity: 0;
  transition: opacity .22s;
}
.home-tool-card::after {
  content: '';
  position: absolute;
  top: -70px; right: -70px;
  width: 210px; height: 210px;
  background: radial-gradient(circle, var(--card-bg) 0%, transparent 70%);
  pointer-events: none;
}
.home-tool-card:hover {
  border-color: var(--card-border);
  transform: translateY(-3px);
  box-shadow: 0 14px 44px rgba(0,0,0,.38);
}
.home-tool-card:hover::before { opacity: 1; }

.home-card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--card-accent);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 99px;
  padding: 4px 11px;
  z-index: 1;
}

.home-tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.home-tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card-accent);
  flex-shrink: 0;
  transition: transform .22s;
}
.home-tool-card:hover .home-tool-card-icon { transform: scale(1.07); }

.home-tool-card-arrow {
  color: var(--text3);
  transition: color .2s, transform .2s;
  flex-shrink: 0;
  margin-top: 4px;
}
.home-tool-card:hover .home-tool-card-arrow {
  color: var(--card-accent);
  transform: translateX(4px);
}

.home-tool-card-name {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.2px;
  margin-bottom: 7px;
}
.home-tool-card-desc {
  font-size: 13.5px;
  color: var(--text3);
  line-height: 1.65;
  margin-bottom: 18px;
}

.home-tool-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.home-tool-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--text2);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 9px;
}

/* ── FOOTER STRIP ─────────────────────────────────────────────────────────── */
.home2-footer-strip {
  border-top: 1px solid var(--border);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text3);
}
.home2-discord-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #60a5fa;
  font-weight: 600;
  font-size: 13px;
  transition: opacity .15s;
}
.home2-discord-link:hover { opacity: .8; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .home2-tool-grid { grid-template-columns: 1fr; }
  .home2-hero-inner { padding: 64px 20px 36px; }
  .home2-stat { padding: 16px 26px; }
  .home2-stat-val { font-size: 19px; }
  .home2-tools-section { padding: 52px 18px 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .home2-pulse { animation: none; }
  .home-tool-card { animation: none; }
}



/* ── Global selection & drag prevention ── */
body { -webkit-user-select: none; user-select: none; }
input, textarea, select, [contenteditable], code, pre, .code-editor, .code-output {
  -webkit-user-select: text !important; user-select: text !important;
}
img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
.cm-viewport img, .cfx-server-icon-img, .cfx-detail-icon, .user-avatar { pointer-events: auto; }

/* ── Admin Panel ──────────────────────────────────────────────────────────────────── */
.admin-panel-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 9000;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--card2); border: 1px solid var(--border2);
  color: var(--text2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); transition: .2s;
}
.admin-panel-fab:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.admin-panel-overlay {
  position: fixed; inset: 0; z-index: 8999;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 80px 24px 90px; opacity: 0; transition: opacity .2s;
  pointer-events: none;
}
.admin-panel-overlay.visible { opacity: 1; pointer-events: all; }
.admin-panel {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: 560px; max-width: 95vw;
  max-height: 72vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px); transition: transform .2s;
}
.admin-panel-overlay.visible .admin-panel { transform: translateY(0); }
.admin-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 14px; color: var(--text); flex-shrink: 0;
}
.admin-panel-header button {
  color: var(--text3); cursor: pointer; border: none; background: none;
  font-size: 16px; transition: color .15s;
}
.admin-panel-header button:hover { color: var(--text); }
.admin-panel-body { overflow-y: auto; padding: 16px; }
.admin-strip { display: flex; gap: 16px; margin-bottom: 20px; }
.admin-kpi {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; text-align: center;
}
.admin-kpi-val { font-size: 28px; font-weight: 800; color: var(--text); }
.admin-kpi-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; }
.admin-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text3); margin-bottom: 10px;
}
.admin-table { display: flex; flex-direction: column; gap: 6px; }
.admin-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; font-size: 12.5px;
}
.admin-row-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.admin-row-user { color: var(--accent-h); font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.admin-row-date { color: var(--text3); font-size: 11px; white-space: nowrap; }
.admin-row-dl { color: var(--text3); font-size: 11px; white-space: nowrap; }
.admin-del-btn {
  color: var(--red); cursor: pointer; border: none; background: none;
  font-size: 13px; padding: 2px 6px; border-radius: 4px; transition: background .15s;
}
.admin-del-btn:hover { background: rgba(239,68,68,.12); }
.admin-av { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.admin-av-ph {
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 11px; display: flex; align-items: center;
  justify-content: center; font-weight: 700; flex-shrink: 0;
}
