/* ============================================
   Quantum API — Galaxy Starlink Theme
   Dark cosmic background + glassmorphism UI
   ============================================ */

:root {
  --primary: #c084fc;
  --primary-light: #e879f9;
  --primary-glow: rgba(192, 132, 252, 0.4);
  --accent-pink: #f472b6;
  --accent-blue: #7dd3fc;

  --bg-deep: #0a0a1a;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-card-hover: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

  --text-primary: #f1f5f9;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---- Canvas Background ---- */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: auto;
}

/* Everything above canvas */
nav, main, footer {
  position: relative;
  z-index: 1;
}

/* ---- Glassmorphism ---- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 20px;
}

/* ---- Navigation ---- */
.glass-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 1200px;
  background: rgba(10, 10, 26, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 0.95rem;
  transition: color 0.3s;
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 10px 26px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent-pink));
  color: #fff !important;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px var(--primary-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary) !important;
  border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary) !important;
  transform: translateY(-2px);
}

.btn-large {
  padding: 15px 36px;
  font-size: 1.05rem;
}

/* ---- Section Titles ---- */
.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 50px;
  font-size: 1.05rem;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 60px 8% 60px;
  max-width: 1400px;
  margin: 0 auto;
  gap: 60px;
}

.hero-content {
  flex: 1;
  max-width: 560px;
}

.badge {
  display: inline-block;
  padding: 8px 18px;
  background: rgba(192, 132, 252, 0.15);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 24px;
  border: 1px solid rgba(192, 132, 252, 0.2);
}

.hero-content h1 {
  font-size: 3.6rem;
  line-height: 1.15;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.highlight {
  background: linear-gradient(120deg, var(--primary), var(--accent-pink), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 50px;
}

/* Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 30px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--glass-border);
}

/* API Endpoint Card */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
}

.api-endpoint-card {
  padding: 0;
  width: 100%;
  max-width: 520px;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.card-title {
  margin-left: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.endpoint-body {
  padding: 24px 20px;
}

.endpoint-item {
  margin-bottom: 18px;
}

.endpoint-item:last-of-type {
  margin-bottom: 12px;
}

.endpoint-item label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.endpoint-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.endpoint-row input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--accent-blue);
  font-family: 'Fira Code', 'Cascadia Code', Consolas, monospace;
  font-size: 0.82rem;
  outline: none;
  cursor: text;
  transition: border-color 0.3s;
}

.endpoint-row input:focus {
  border-color: rgba(192, 132, 252, 0.4);
}

.copy-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}

.endpoint-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================
   FEATURES
   ============================================ */
.features {
  padding: 80px 8%;
  max-width: 1400px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.feature-card {
  padding: 36px 28px;
  text-align: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
}

.feature-icon {
  font-size: 2.8rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}


/* ============================================
   FOOTER
   ============================================ */
footer {
  padding: 40px 8%;
  text-align: center;
  border-top: 1px solid var(--glass-border);
}

.footer-content p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 140px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-content h1 {
    font-size: 2.6rem;
  }

  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    width: 100%;
  }

  .api-endpoint-card {
    max-width: 100%;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .section-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }

  .stat-divider {
    width: 40px;
    height: 1px;
  }

  .glass-nav {
    width: 95%;
    padding: 12px 20px;
  }
}