/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0A0A0A;
  --bg-card: #1A1A1A;
  --bg-code: #111111;
  --border: #2A2A2A;
  --text: #E8E8E8;
  --text-dim: #888888;
  --text-muted: #666666;
  --accent: #7FD6FF;
  --accent-hover: #A8E4FF;
  --accent-glow: rgba(127, 214, 255, 0.15);
  --accent-glow-strong: rgba(127, 214, 255, 0.25);
  --green: #4ADE80;
  --yellow: #FACC15;
  --pink: #F472B6;
  --orange: #FB923C;
  --purple: #C084FC;
  --red: #F87171;
  --max-width: 900px;
  --radius: 12px;
  --radius-sm: 8px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 96px 0;
}

section + section {
  border-top: 1px solid var(--border);
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.8);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
}

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

.nav-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: var(--accent);
  color: #0A0A0A !important;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.15s ease;
}

.nav-cta:hover {
  background: var(--accent-hover);
  color: #0A0A0A !important;
  transform: translateY(-1px);
}

/* ===== Hero ===== */
.hero {
  padding: 160px 0 80px;
  text-align: center;
  border-top: none !important;
}

.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  margin: 0 auto 28px;
  animation: float 4s ease-in-out infinite;
  box-shadow: 0 8px 40px rgba(127, 214, 255, 0.12);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
}

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

.hero-tagline {
  font-size: 20px;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.5;
}

.hero-tagline .cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
}

.hero-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 56px;
}

.hero-meta span {
  margin: 0 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--accent);
  color: #0A0A0A;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #0A0A0A;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(127, 214, 255, 0.25);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #222222;
  color: var(--text);
  border-color: #3A3A3A;
  transform: translateY(-2px);
}

/* Demo Placeholder */
.demo-placeholder {
  max-width: 720px;
  margin: 0 auto;
  height: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 15px;
  position: relative;
  overflow: hidden;
}

.demo-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(127, 214, 255, 0.03) 0%,
    transparent 50%,
    rgba(127, 214, 255, 0.02) 100%
  );
  pointer-events: none;
}

/* ===== Section Headers ===== */
.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 600px;
  margin-bottom: 48px;
}

.section-header-center {
  text-align: center;
}

.section-header-center .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* ===== Features Grid ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  border-color: #3A3A3A;
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::after {
  opacity: 0.5;
}

.feature-emoji {
  font-size: 28px;
  margin-bottom: 14px;
  display: block;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ===== Code Blocks ===== */
.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.code-dots {
  display: flex;
  gap: 7px;
}

.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #333;
}

.code-dots span:nth-child(1) { background: #FF5F57; }
.code-dots span:nth-child(2) { background: #FEBC2E; }
.code-dots span:nth-child(3) { background: #28C840; }

.code-title {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Menlo, Monaco,
    'Courier New', monospace;
}

.code-copy {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.code-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.code-copy.copied {
  border-color: var(--green);
  color: var(--green);
}

pre {
  padding: 20px;
  overflow-x: auto;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Menlo, Monaco,
    'Courier New', monospace;
  font-size: 13.5px;
  line-height: 1.7;
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}

pre code {
  font-family: inherit;
  font-size: inherit;
}

/* Syntax colors */
.tok-cmd { color: var(--green); }
.tok-flag { color: var(--purple); }
.tok-url { color: var(--accent); }
.tok-str { color: var(--yellow); }
.tok-key { color: var(--accent); }
.tok-val { color: var(--yellow); }
.tok-comment { color: var(--text-muted); font-style: italic; }
.tok-method { color: var(--orange); font-weight: 600; }
.tok-header { color: var(--pink); }
.tok-punct { color: var(--text-muted); }
.tok-num { color: var(--orange); }
.tok-prompt { color: var(--text-muted); user-select: none; }

/* ===== Endpoints Table ===== */
.endpoints-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.endpoints-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.endpoints-table thead {
  background: rgba(255, 255, 255, 0.03);
}

.endpoints-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.endpoints-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

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

.endpoints-table tbody tr:hover {
  background: rgba(127, 214, 255, 0.03);
}

.method-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Menlo, Monaco,
    'Courier New', monospace;
  letter-spacing: 0.5px;
}

.method-get {
  background: rgba(74, 222, 128, 0.12);
  color: var(--green);
}

.method-post {
  background: rgba(127, 214, 255, 0.12);
  color: var(--accent);
}

.path-cell {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Menlo, Monaco,
    'Courier New', monospace;
  color: var(--text);
  font-size: 13px;
}

.desc-cell {
  color: var(--text-dim);
}

/* ===== API & CLI Sections ===== */
.api-section .section-subtitle,
.cli-section .section-subtitle {
  max-width: 700px;
}

.api-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cli-examples {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.port-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Menlo, Monaco,
    'Courier New', monospace;
  color: var(--accent);
  margin-bottom: 32px;
}

.port-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===== Pricing ===== */
.pricing-section {
  text-align: center;
}

.pricing-card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 44px 40px;
  position: relative;
  overflow: hidden;
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.pricing-amount {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 4px;
}

.pricing-amount .currency {
  font-size: 28px;
  font-weight: 600;
  vertical-align: super;
  margin-right: 2px;
  color: var(--text-dim);
}

.pricing-type {
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.pricing-trial {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  background: rgba(74, 222, 128, 0.1);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 28px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 32px;
}

.pricing-features li {
  padding: 10px 0;
  font-size: 15px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features .check {
  color: var(--accent);
  font-size: 16px;
  flex-shrink: 0;
}

.pricing-card .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 14px 24px;
  font-size: 16px;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-heart {
  font-size: 14px;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  section {
    padding: 64px 0;
  }

  .hero {
    padding: 120px 0 56px;
  }

  .hero h1 {
    font-size: 34px;
    letter-spacing: -1px;
  }

  .hero-tagline {
    font-size: 17px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .demo-placeholder {
    height: 240px;
  }

  .section-title {
    font-size: 28px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links .hide-mobile {
    display: none;
  }

  .pricing-card {
    padding: 32px 24px;
  }

  .pricing-amount {
    font-size: 44px;
  }

  .endpoints-table th,
  .endpoints-table td {
    padding: 12px 14px;
  }

  pre {
    font-size: 12.5px;
    padding: 16px;
  }
}

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Scrollbar ===== */
pre::-webkit-scrollbar {
  height: 6px;
}

pre::-webkit-scrollbar-track {
  background: transparent;
}

pre::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

pre::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* ===== Selection ===== */
::selection {
  background: rgba(127, 214, 255, 0.25);
  color: #fff;
}
