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

:root {
  --bg: #06070b;
  --surface: #0d0e14;
  --surface-2: #11131c;
  --surface-3: #161823;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);
  --text: #e8eaed;
  --text-muted: #9aa0a6;
  --text-dim: #5f6368;

  --google-blue: #4285f4;
  --google-red: #ea4335;
  --google-yellow: #fbbc04;
  --google-green: #34a853;

  --accent: var(--google-blue);
  --accent-glow: rgba(66, 133, 244, 0.4);

  --critical: #ef4444;
  --critical-bg: rgba(239, 68, 68, 0.12);
  --critical-border: rgba(239, 68, 68, 0.3);

  --high: #f59e0b;
  --high-bg: rgba(245, 158, 11, 0.12);
  --high-border: rgba(245, 158, 11, 0.3);

  --info: #06b6d4;
  --info-bg: rgba(6, 182, 212, 0.12);
  --info-border: rgba(6, 182, 212, 0.3);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

.mono, code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

button { font-family: inherit; }

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at center top, black 0%, transparent 75%);
  mask-image: radial-gradient(ellipse at center top, black 0%, transparent 75%);
  z-index: 0;
}

.bg-glow {
  position: fixed;
  top: -240px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 700px;
  background:
    radial-gradient(ellipse 60% 50% at 30% 50%, rgba(66, 133, 244, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(234, 67, 53, 0.12), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 60px;
  position: relative;
  z-index: 1;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 64px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--google-blue) 0%, var(--google-red) 35%, var(--google-yellow) 70%, var(--google-green) 100%);
  box-shadow: 0 8px 24px rgba(66, 133, 244, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.brand-name { font-weight: 600; letter-spacing: -0.01em; }
.brand-version {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.passive-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
}
.passive-dot {
  width: 6px; height: 6px;
  background: var(--google-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--google-green);
}

/* Hero */
.hero { max-width: 820px; margin-bottom: 36px; }
.hero-title {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 18px;
}
.hero-gradient {
  background: linear-gradient(90deg, #4285f4 0%, #ea4335 35%, #fbbc04 70%, #34a853 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 720px;
}
.hero-sub code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12.5px;
  color: var(--text);
}

/* Generator panel */
.generator {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 32px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 24px 60px rgba(0, 0, 0, 0.4);
}
.search-row { display: flex; gap: 12px; }
.search-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  transition: border-color 120ms, box-shadow 120ms;
  cursor: text;
}
.search-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  color: var(--text);
}
.search-input input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 15px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.search-input input::placeholder { color: var(--text-dim); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  height: 46px;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
  cursor: pointer;
  transition: transform 80ms, box-shadow 120ms, opacity 120ms;
  box-shadow:
    0 8px 24px rgba(66, 133, 244, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.7; cursor: progress; }
.btn-primary.is-loading svg { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
  padding: 4px 4px 0;
}
.filter-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-label {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.chip-group { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 120ms;
}
.chip:hover { border-color: rgba(255, 255, 255, 0.18); color: var(--text); }
.chip.active.chip-cat {
  background: white;
  color: black;
  border-color: white;
}
.sev-chip.active.sev-critical {
  background: var(--critical-bg);
  color: var(--critical);
  border-color: var(--critical-border);
}
.sev-chip.active.sev-high {
  background: var(--high-bg);
  color: var(--high);
  border-color: var(--high-border);
}
.sev-chip.active.sev-info {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info-border);
}

/* Empty state */
.empty-state {
  background:
    radial-gradient(ellipse at center, rgba(66, 133, 244, 0.07) 0%, transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 64px 24px;
  text-align: center;
  margin-bottom: 32px;
}
.empty-head { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.empty-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--google-blue);
  box-shadow: 0 0 12px var(--google-blue);
}
.empty-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 600;
}
.empty-state p {
  color: var(--text-dim);
  max-width: 540px;
  margin: 0 auto;
  font-size: 14px;
}

.hidden { display: none !important; }

/* Stats */
.results { margin-bottom: 32px; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
}
.stat-dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-total { background: white; box-shadow: 0 0 8px white; }
.dot-critical { background: var(--critical); box-shadow: 0 0 8px var(--critical); }
.dot-high { background: var(--high); box-shadow: 0 0 8px var(--high); }
.dot-info { background: var(--info); box-shadow: 0 0 8px var(--info); }
.stat-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.stat-critical .stat-value { color: var(--critical); }
.stat-high .stat-value { color: var(--high); }
.stat-info .stat-value { color: var(--info); }
.stat-bar {
  background: rgba(255, 255, 255, 0.05);
  height: 3px;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}
.stat-bar-fill { height: 100%; transition: width 240ms ease; }
.bar-total { background: white; }
.bar-critical { background: var(--critical); }
.bar-high { background: var(--high); }
.bar-info { background: var(--info); }
.stat-foot { font-size: 11px; color: var(--text-dim); }

/* Toolbar */
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.results-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}
.domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(52, 168, 83, 0.1);
  border: 1px solid rgba(52, 168, 83, 0.28);
  color: #6ee7b7;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 6px #34d399; }

.results-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.view-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}
.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: 120ms;
}
.view-btn.active { background: rgba(255, 255, 255, 0.06); color: var(--text); }

.btn-secondary, .btn-google {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: 120ms;
}
.btn-secondary:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.18); }
.btn-google {
  color: var(--google-blue);
  border-color: rgba(66, 133, 244, 0.3);
  background: rgba(66, 133, 244, 0.06);
}
.btn-google:hover { background: rgba(66, 133, 244, 0.14); }

/* Card list */
.dork-list { display: flex; flex-direction: column; gap: 28px; }

.category-section { display: flex; flex-direction: column; gap: 12px; }
.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 600;
}
.cat-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--google-blue);
  box-shadow: 0 0 8px var(--google-blue);
}
.cat-count {
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
}

.dork-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
body.list-mode .dork-grid {
  grid-template-columns: 1fr;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 160ms, transform 160ms;
}
.card:hover { border-color: var(--border-strong); }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-cat {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 600;
}
.card-sev {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.card-sev.critical { background: var(--critical-bg); color: var(--critical); border: 1px solid var(--critical-border); }
.card-sev.high { background: var(--high-bg); color: var(--high); border: 1px solid var(--high-border); }
.card-sev.info { background: var(--info-bg); color: var(--info); border: 1px solid var(--info-border); }

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.card-query {
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 40px 10px 12px;
  font-size: 12.5px;
  color: var(--text);
  word-break: break-all;
  line-height: 1.5;
}
.copy-icon {
  position: absolute;
  top: 6px;
  right: 6px;
  background: transparent;
  border: 0;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-dim);
  transition: 120ms;
  display: inline-flex;
}
.copy-icon:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}
.card-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: 120ms;
  font-weight: 500;
}
.card-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.2); }
.card-btn.primary {
  color: var(--google-blue);
  border-color: rgba(66, 133, 244, 0.3);
  background: rgba(66, 133, 244, 0.06);
}
.card-btn.primary:hover { background: rgba(66, 133, 244, 0.14); }

/* Footer */
.site-footer {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms, transform 200ms;
  z-index: 100;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Mobile */
@media (max-width: 760px) {
  .topbar { margin-bottom: 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .search-row { flex-direction: column; }
  .btn-primary { width: 100%; justify-content: center; }
  .filters { gap: 12px; }
  .filter-group { width: 100%; }
}
