@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --mono-v2: 'JetBrains Mono', 'SFMono-Regular', Consolas, Menlo, monospace;
  --v2-line: rgba(255, 255, 255, 0.06);
  --v2-card-top: #0a0a0d;
  --v2-card-bot: #060608;
}

body:not(.landing-page)::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--v2-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--v2-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 100% 65% at 50% 0%, black 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 100% 65% at 50% 0%, black 25%, transparent 78%);
}

body:not(.landing-page)::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 34% at 50% -6%, rgba(255, 255, 255, 0.075) 0%, transparent 62%),
    radial-gradient(ellipse 45% 26% at 50% 108%, rgba(255, 255, 255, 0.04) 0%, transparent 68%);
}

.navbar,
.auth-container,
.footer,
.dashboard-container,
.docs-container,
.plans-hero,
.plans-grid,
.plans-grid-bottom,
.docs-main,
.section,
.hero,
.cta-section,
.migration-banner {
  position: relative;
  z-index: 1;
}

body.chat-page::before {
  mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
  opacity: 0.6;
}

body.chat-page::after {
  background:
    radial-gradient(ellipse 60% 30% at 50% -8%, rgba(255, 255, 255, 0.055) 0%, transparent 62%);
}

.chat-layout {
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 { letter-spacing: -0.01em; }

.logo { letter-spacing: -0.01em; }

.mono-v2,
.section-label,
.sidebar-section h3,
.results-header h3 small {
  font-family: var(--mono-v2);
}

.feature-card,
.stat-card,
.result-card,
.endpoint-card,
.profile-card,
.api-token-card,
.search-form-container,
.enhanced-search,
.table-container,
.custom-modal,
.faq-item {
  background: linear-gradient(180deg, var(--v2-card-top) 0%, var(--v2-card-bot) 100%);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45);
}

.stat-card:hover,
.result-card:hover,
.endpoint-card:hover {
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(255, 255, 255, 0.035);
}

.feature-icon,
.stat-icon {
  filter: grayscale(1) brightness(1.6);
}

body.auth-page::before {
  mask-image: radial-gradient(ellipse 80% 55% at 50% 30%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 30%, black 20%, transparent 75%);
}

body.auth-page .auth-box {
  border-radius: 18px;
  padding: 1.75rem;
}

.auth-logo {
  border-radius: 14px;
  box-shadow: 0 10px 32px rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.auth-header h1.logo {
  font-size: 1.05rem;
  letter-spacing: 1.5px;
}

.auth-header h2 {
  font-weight: 700;
}

.form-group label i {
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.form-group input {
  border-radius: 9px;
}

.btn-block {
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

input[type="checkbox"] {
  accent-color: #ffffff;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.pw-checklist {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 9px;
}

.plans-hero h1 {
  letter-spacing: -0.015em;
}

.free-notice {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.03);
}

.plan-card {
  background: linear-gradient(180deg, var(--v2-card-top) 0%, var(--v2-card-bot) 100%);
  border-radius: 16px;
}

.plan-card.popular {
  background:
    radial-gradient(ellipse 70% 90% at 50% 130%, rgba(255, 255, 255, 0.09), transparent 60%),
    linear-gradient(180deg, #0c0c10 0%, #060608 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 24px 70px rgba(0, 0, 0, 0.65), 0 0 70px rgba(255, 255, 255, 0.05);
}

.popular-tag {
  font-family: var(--mono-v2);
  letter-spacing: 0.12em;
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.25);
}

.plan-price,
.plan-card [class*="price"] {
  font-variant-numeric: tabular-nums;
}

.plan-icon-wrap {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.docs-sidebar {
  border-radius: 14px !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
}

@media (min-width: 769px) {
  .docs-sidebar {
    background: linear-gradient(180deg, var(--v2-card-top), var(--v2-card-bot)) !important;
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

.docs-section h2 {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.endpoint-card code {
  font-family: var(--mono-v2);
  background: rgba(255, 255, 255, 0.04);
}

.endpoint-card pre,
.api-example pre {
  font-family: var(--mono-v2);
  background: linear-gradient(180deg, #06060a, #040405);
  border-color: rgba(255, 255, 255, 0.08);
}

.method.get,
.method.post {
  font-family: var(--mono-v2);
}

.param-table,
.token-table {
  font-size: 0.84rem;
}

.param-table code,
.token-table code {
  font-family: var(--mono-v2);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.credits-pill {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--mono-v2);
  letter-spacing: 0.3px;
}

.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  font-family: var(--mono-v2);
  font-size: 0.74rem;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.75), 0 0 16px 5px rgba(255, 255, 255, 0.35);
  animation: online-pulse 2.2s ease-in-out infinite;
}

@keyframes online-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.75), 0 0 16px 5px rgba(255, 255, 255, 0.35); }
  50% { opacity: 0.55; box-shadow: 0 0 2px 0 rgba(255, 255, 255, 0.25); }
}

.search-type-btn.active {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 24px rgba(255, 255, 255, 0.05);
}

.info-item {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
}

.info-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
}

.token-input {
  font-family: var(--mono-v2);
  background: rgba(255, 255, 255, 0.02);
}

.badge-success,
.method.get { box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.12); }
.badge-danger { box-shadow: inset 0 0 0 1px rgba(255, 71, 87, 0.12); }

.chat-messages::-webkit-scrollbar,
.chat-area::-webkit-scrollbar {
  width: 6px;
}

.navbar {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.06);
}

.footer {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.014));
  border-top-color: rgba(255, 255, 255, 0.07);
}

::selection {
  background: rgba(255, 255, 255, 0.85);
  color: #000000;
}

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
  border-radius: 4px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
}

.alert { border-radius: 10px; }

.loader {
  border-color: rgba(255, 255, 255, 0.12);
  border-top-color: #ffffff;
}

@media (max-width: 768px) {
  .navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 3000 !important;
    background: #06060a !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  .nav-links {
    background: #06060a !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .mobile-menu-toggle {
    pointer-events: auto;
  }
}

