/* Professional Shadcn Dark Theme (Zinc Palette - Vercel / Linear / Resend Style) */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* HSL Color System - Refined Zinc Dark Mode */
  --bg-dark: #09090b;
  --card-dark: #121215;
  --card-dark-hover: #18181b;
  --secondary-dark: #1c1c20;
  --border-color: #27272a;
  --border-muted: #1f1f23;
  
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --radius: 0.5rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: var(--border-color);
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle Top Background Gradient Light Spot - Very Restrained */
.bg-radial-glow {
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 40%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* Container */
.shad-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
.shad-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.shad-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.brand-logo-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-primary);
}

.brand-accent {
  color: var(--text-secondary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link svg {
  width: 0.9375rem;
  height: 0.9375rem;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #22c55e;
  padding: 0.2rem 0.6rem;
  background-color: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 9999px;
}

.pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #22c55e;
}

/* Shadcn Cards */
.shad-card {
  background-color: var(--card-dark);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}

.shad-card-header {
  padding: 1.25rem 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.shad-card-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shad-card-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.shad-card-content {
  padding: 1.25rem;
}

/* Shadcn Badges */
.shad-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  padding: 0.2rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  background-color: var(--secondary-dark);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.shad-badge-outline {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.shad-badge-accent {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Shadcn Buttons */
.shad-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: calc(var(--radius) - 0.125rem);
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.25rem;
  padding: 0 0.875rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
}

.shad-btn-primary {
  background-color: #fafafa;
  color: #09090b;
}

.shad-btn-primary:hover {
  background-color: #e4e4e7;
}

.shad-btn-secondary {
  background-color: #27272a;
  color: #fafafa;
  border-color: #3f3f46;
}

.shad-btn-secondary:hover {
  background-color: #3f3f46;
}

.shad-btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.shad-btn-outline:hover {
  background-color: #18181b;
  border-color: #3f3f46;
}

.shad-btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
}

.shad-btn-ghost:hover {
  background-color: #18181b;
  color: var(--text-primary);
}

.shad-btn-sm {
  height: 1.875rem;
  padding: 0 0.625rem;
  font-size: 0.75rem;
}

.shad-btn svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* Form Controls / Input */
.shad-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.shad-input-icon {
  position: absolute;
  left: 0.75rem;
  width: 1rem;
  height: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.shad-input {
  width: 100%;
  height: 2.375rem;
  padding: 0 0.875rem 0 2.375rem;
  background-color: #09090b;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: calc(var(--radius) - 0.125rem);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.shad-input:focus {
  border-color: #52525b;
  box-shadow: 0 0 0 1px #52525b;
}

.shad-input::placeholder {
  color: var(--text-muted);
  font-family: var(--font-sans);
}

/* Preset Chips */
.preset-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border-muted);
}

.preset-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  border-color: #52525b;
  color: var(--text-primary);
  background-color: #18181b;
}

/* Section Container Layout */
.section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.section-header h2 svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-secondary);
}

.section-header p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* Hero Section */
.hero {
  padding: 4.5rem 0 3rem;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: #18181b;
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero-pill-icon {
  width: 0.875rem;
  height: 0.875rem;
  color: #a1a1aa;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Terminal / Quick cURL Box */
.terminal-box {
  max-width: 580px;
  margin: 0 auto 3rem;
  background-color: #0c0c0e;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.875rem;
  background-color: #121215;
  border-bottom: 1px solid var(--border-color);
}

.terminal-dots {
  display: flex;
  gap: 0.35rem;
}

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background-color: #27272a;
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.84375rem;
}

.terminal-cmd {
  color: var(--text-primary);
}

.terminal-prompt {
  color: var(--text-muted);
  margin-right: 0.5rem;
}

.terminal-url {
  color: #e4e4e7;
}

/* Hero Stats Grid */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.875rem;
  max-width: 900px;
  margin: 0 auto;
}

.stat-item {
  padding: 1rem;
  text-align: center;
  background-color: #121215;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.stat-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Inspector Grid */
.inspector-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.inspector-search-card {
  margin-bottom: 1.25rem;
}

.search-form-row {
  display: flex;
  gap: 0.625rem;
}

/* Location Card Header */
.location-hero-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.flag-emoji {
  font-size: 2.25rem;
  line-height: 1;
}

.location-title {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* Metrics Grid Inside Card */
.metrics-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.metric-box {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.75rem;
  background-color: #16161a;
  border: 1px solid var(--border-color);
  border-radius: calc(var(--radius) - 0.25rem);
}

.metric-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 0.25rem;
  background-color: #27272a;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.metric-icon-box svg {
  width: 0.9375rem;
  height: 0.9375rem;
}

.metric-content {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  overflow: hidden;
}

.metric-lbl {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.metric-val {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Map Container */
.map-card-wrapper {
  margin-top: 1.25rem;
}

.map-frame {
  width: 100%;
  height: 240px;
  border-radius: calc(var(--radius) - 0.25rem);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.leaflet-container {
  background-color: #0c0c0e !important;
}

.leaflet-tile-pane {
  filter: brightness(0.65) invert(1) contrast(1.1) hue-rotate(200deg) saturate(0.2);
}

/* JSON Code Viewer */
.json-viewer-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.json-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  background-color: #16161a;
}

.json-viewer-header span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.json-viewer-header svg {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--text-secondary);
}

.json-code-box {
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #e4e4e7;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  background-color: #0c0c0e;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  flex-grow: 1;
}

/* Code Snippets Section */
.tabs-container {
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background-color: var(--card-dark);
  overflow: hidden;
}

.tabs-list {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.375rem;
  background-color: #16161a;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.tab-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.78125rem;
  font-weight: 500;
  color: var(--text-muted);
  background-color: transparent;
  border: none;
  border-radius: calc(var(--radius) - 0.25rem);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tab-trigger:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.tab-trigger.active {
  color: var(--text-primary);
  background-color: #27272a;
}

.code-display-wrapper {
  position: relative;
  background-color: #0c0c0e;
}

.copy-code-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
}

.code-block {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #e4e4e7;
  overflow-x: auto;
  margin: 0;
}

/* Endpoints Table */
.table-card {
  overflow: hidden;
}

.shad-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.shad-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84375rem;
}

.shad-table th {
  padding: 0.75rem 1rem;
  background-color: #16161a;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.shad-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-muted);
  color: var(--text-primary);
  vertical-align: middle;
}

.shad-table tbody tr {
  transition: background-color 0.15s ease;
}

.shad-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.shad-table tbody tr:last-child td {
  border-bottom: none;
}

.endpoint-code {
  font-family: var(--font-mono);
  font-size: 0.78125rem;
  padding: 0.15rem 0.4rem;
  background-color: #18181b;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  color: var(--text-primary);
}

.table-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 450;
  font-size: 0.78125rem;
  font-family: var(--font-mono);
  transition: color 0.15s ease;
}

.table-link:hover {
  text-decoration: underline;
  color: var(--text-primary);
}

/* Method Badges */
.method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
}

.method-get {
  background-color: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.method-post {
  background-color: rgba(168, 85, 247, 0.1);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

/* Toast Notification Styling */
.shad-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #18181b;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.625rem 1rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(60px);
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
  font-size: 0.8125rem;
  font-weight: 500;
}

.shad-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.shad-toast svg {
  width: 1rem;
  height: 1rem;
  color: #22c55e;
}

/* Footer */
.shad-footer {
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 0;
  background-color: var(--bg-dark);
  margin-top: 3rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-content a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-content a:hover {
  color: var(--text-primary);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.375rem;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .inspector-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 1.875rem;
  }
  .hero-stats {
    grid-template-columns: 1fr;
  }
  .metrics-2col {
    grid-template-columns: 1fr;
  }
  .search-form-row {
    flex-direction: column;
  }
  .nav-menu {
    display: none;
  }
}
