:root {
  --bg: #0b1220;
  --bg-soft: #111b2f;
  --panel: rgba(16, 24, 40, 0.75);
  --panel-hover: rgba(22, 32, 50, 0.85);
  --line: #2e3f5a;
  --line-focus: #4dc3ff;
  --text: #f2f7ff;
  --muted: #94a3b8;
  --accent: #32d7a3;
  --accent-2: #4dc3ff;
  --accent-2-hover: #7cd4ff;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  --font-sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "Fira Code", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: radial-gradient(circle at 20% 15%, #1e2b48 0%, var(--bg) 45%), linear-gradient(150deg, #070b12 0%, #0f1a2f 100%);
  min-height: 100vh;
  line-height: 1.5;
  overflow-y: scroll;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #2e3f5a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3e5275;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-2-hover);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: rgba(8, 14, 24, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(46, 63, 90, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  background: linear-gradient(to right, var(--text), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.topbar nav {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
  font-weight: 500;
}

.topbar nav a {
  color: var(--muted);
}
.topbar nav a:hover,
.topbar nav a.active {
  color: var(--text);
}

.layout {
  max-width: 1300px;
  margin: 32px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

.card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sidebar label {
  display: block;
  margin-top: 16px;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
}

.sidebar label:first-child {
  margin-top: 0;
}

input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  background: rgba(15, 23, 40, 0.6);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  outline: none;
}

input:hover, select:hover {
  border-color: #3e5275;
}

input:focus, select:focus {
  border-color: var(--line-focus);
  background: rgba(15, 23, 40, 0.9);
  box-shadow: 0 0 0 3px rgba(77, 195, 255, 0.15);
}

input::placeholder {
  color: #4a5d7c;
}

.hint {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 12px;
  line-height: 1.4;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.results {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  padding-right: 8px;
}

.results li {
  background: rgba(15, 23, 40, 0.4);
  border: 1px solid rgba(46, 63, 90, 0.5);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.results li:hover {
  background: var(--panel-hover);
  border-color: rgba(77, 195, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.results li.active {
  background: var(--panel-hover);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.results li h4 {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.result-meta {
  color: var(--muted);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.details {
  border: 1px solid var(--line);
  background: rgba(11, 18, 32, 0.6);
  border-radius: 16px;
  min-height: 400px;
  padding: 24px;
  font-family: var(--font-mono);
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 0.9rem;
  overflow-x: auto;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.details h2 {
  margin-top: 0;
  color: var(--accent-2);
  font-family: var(--font-sans);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(46, 63, 90, 0.8);
  background: rgba(15, 23, 40, 0.6);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.25;
  z-index: -1;
}

.bg-orb-a {
  width: 400px;
  height: 400px;
  background: #13b8ff;
  top: -100px;
  left: -100px;
}

.bg-orb-b {
  width: 500px;
  height: 500px;
  background: #00d18f;
  right: -150px;
  bottom: -150px;
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .results {
    max-height: 40vh;
  }
}
