:root {
  --bg: #0b1113;
  --bg-soft: rgba(16, 28, 31, 0.78);
  --panel: rgba(15, 24, 27, 0.94);
  --panel-border: rgba(157, 214, 165, 0.16);
  --text: #f6f5ef;
  --muted: #aeb8b4;
  --accent: #d2ff72;
  --accent-strong: #87f1b7;
  --danger: #ff9b71;
  --chip: rgba(255, 255, 255, 0.06);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(135, 241, 183, 0.24), transparent 32%),
    radial-gradient(circle at 85% 10%, rgba(210, 255, 114, 0.18), transparent 26%),
    linear-gradient(140deg, #071012 0%, #0b1113 48%, #132024 100%);
  font-family: "Aptos", "Trebuchet MS", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 90%);
}

.page-shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar,
.panel,
.search-card,
.stats-card,
.result-card {
  backdrop-filter: blur(18px);
}

.eyebrow,
.results-kicker {
  margin: 0 0 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-size: 0.78rem;
}

h1,
h2,
h3 {
  font-family: "Bahnschrift", "Segoe UI Variable Display", sans-serif;
  line-height: 0.98;
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  max-width: 12ch;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 4px 18px;
}

.topbar-text {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.accent {
  color: var(--accent);
}

.search-hero {
  margin-bottom: 14px;
  padding: 18px;
  animation: rise 0.7s ease both;
}

.search-card,
.stats-card,
.panel,
.result-card {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-card,
.stats-card,
.panel {
  padding: 22px;
}

.search-label,
.stats-label,
.result-meta-label {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.search-row {
  display: flex;
  gap: 10px;
}

.compact-stats {
  display: flex;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 20px;
}

input[type="search"] {
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

input[type="search"]:focus {
  border-color: rgba(210, 255, 114, 0.5);
  box-shadow: 0 0 0 4px rgba(210, 255, 114, 0.12);
}

button {
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    opacity 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
}

.ghost-button,
.chip,
.copy-button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.ghost-button {
  padding: 0 16px;
}

.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  color: #081010;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-weight: 700;
}

.quick-examples,
.chip-grid,
.result-badges,
.requirements,
.notes,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-examples {
  margin-top: 12px;
}

.example-pill,
.chip,
.badge {
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 0.86rem;
}

.example-pill {
  border: 1px solid rgba(135, 241, 183, 0.18);
  background: rgba(135, 241, 183, 0.08);
  color: var(--text);
}

.stats-card strong {
  font-family: "Bahnschrift", "Segoe UI Variable Display", sans-serif;
  font-size: 1.18rem;
}

.compact-chip-grid {
  margin-top: 12px;
}

.mini-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.mini-panel {
  padding: 14px 16px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: rgba(15, 24, 27, 0.72);
  color: var(--muted);
}

.mini-panel strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.mini-panel p {
  margin: 0;
  line-height: 1.5;
}

.results-only {
  display: block;
}

.panel h2 {
  font-size: 1.28rem;
  margin-bottom: 16px;
}

.chip-grid {
  gap: 12px;
}

.chip {
  padding: 10px 14px;
  text-align: left;
}

.chip.active {
  border-color: rgba(210, 255, 114, 0.42);
  background: rgba(210, 255, 114, 0.14);
  color: var(--accent);
}

.notes-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.results-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.results-head h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.8rem);
}

.results-meta {
  margin: 0;
  color: var(--muted);
  max-width: 30ch;
  text-align: right;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.result-card {
  padding: 16px;
  display: grid;
  gap: 10px;
  animation: rise 0.35s ease both;
}

.result-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.result-title {
  font-size: 1.1rem;
  line-height: 1.08;
  margin-bottom: 6px;
}

.result-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.94rem;
}

.badge {
  background: var(--chip);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.badge.guide {
  color: #09100b;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.badge.command {
  color: #081115;
  background: linear-gradient(135deg, #88d8ff, #87f1b7);
}

.badge.convar {
  color: #160c00;
  background: linear-gradient(135deg, #ffb46f, #ffe082);
}

.command-box {
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: auto;
}

.command-box code {
  white-space: pre-wrap;
  color: #f6ffca;
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 0.9rem;
}

.list-block {
  display: grid;
  gap: 8px;
}

.list-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.52;
}

.requirements span,
.notes span {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.copy-button {
  padding: 10px 14px;
}

.copy-button.copied {
  border-color: rgba(135, 241, 183, 0.45);
  color: var(--accent-strong);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.empty-state {
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: 34px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

code {
  font-family: "Cascadia Code", "Consolas", monospace;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .results-grid,
  .mini-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 18px, 1380px);
    padding-top: 16px;
  }

  .search-card,
  .stats-card,
  .panel,
  .result-card {
    border-radius: 22px;
  }

  .search-row,
  .results-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar {
    display: grid;
    align-items: start;
  }

  .search-row {
    gap: 12px;
  }

  .ghost-button,
  .primary-button {
    width: 100%;
  }

  .results-meta {
    text-align: left;
  }
}
