/* ========== base ========== */

:root {
  --bg: #050608;
  --bg-alt: #0b0d13;
  --accent: #7b5cff;
  --accent-soft: rgba(123, 92, 255, 0.25);
  --accent-2: #3fd0ff;
  --text: #f5f5f7;
  --text-muted: #9b9bab;
  --border-soft: rgba(255, 255, 255, 0.05);
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.65);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  color: var(--text);
  background: radial-gradient(circle at top, #151827 0, #050608 45%, #000 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Inter", sans-serif;
  scroll-behavior: smooth;
}

body {
  position: relative;
  overflow-x: hidden;
}

/* ========== background blobs ========== */

.bg-blob {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), transparent 65%);
  opacity: 0.07;
  filter: blur(2px);
  z-index: -2;
  pointer-events: none;
  animation: float 24s ease-in-out infinite;
}

.bg-blob-1 {
  top: -60px;
  left: -40px;
}

.bg-blob-2 {
  bottom: -120px;
  right: -50px;
  background: radial-gradient(circle at 30% 30%, var(--accent-2), transparent 65%);
  animation-duration: 32s;
}

.bg-blob-3 {
  top: 40%;
  left: 60%;
  opacity: 0.05;
  animation-duration: 40s;
}

/* ========== layout ========== */

.page {
  min-height: 100vh;
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 18px 32px;
}

/* navbar */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  margin-bottom: 30px;
  background: rgba(5, 6, 8, 0.8);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 12px;
  z-index: 10;
}

.logo {
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: lowercase;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 16px;
  font-size: 0.86rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease,
    transform 0.12s ease;
}

.nav-links a:hover {
  color: var(--accent-2);
  border-color: rgba(63, 208, 255, 0.4);
  background: rgba(63, 208, 255, 0.06);
  transform: translateY(-1px);
}

/* ========== hero ========== */

.hero {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 55vh;
  padding: 32px 12px 12px;
}

.hero-content {
  max-width: 640px;
}

.hero-title {
  font-size: clamp(2.3rem, 4vw, 3rem);
  line-height: 1.12;
  margin: 0 0 14px;
}

.hero-title span {
  color: var(--accent);
  text-shadow: 0 0 22px var(--accent-soft);
}

.hero-subtitle {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease,
    box-shadow 0.18s ease, border-color 0.18s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #050608;
  box-shadow: var(--shadow-soft);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.btn.ghost {
  border-color: var(--border-soft);
  color: var(--text-muted);
  background: rgba(5, 6, 8, 0.75);
}

.btn.ghost:hover {
  border-color: var(--accent-soft);
  color: var(--text);
  background: rgba(10, 12, 18, 0.95);
}

/* ========== sections ========== */

.section {
  margin: 32px 0;
  padding: 20px 16px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, rgba(123, 92, 255, 0.08), transparent 55%),
    radial-gradient(circle at bottom right, rgba(63, 208, 255, 0.07), transparent 55%),
    rgba(5, 6, 10, 0.9);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.section-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  text-transform: lowercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.section-text {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.section-text.small {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* cards */

.card-grid {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

@media (min-width: 720px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  display: block;
  padding: 14px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: rgba(7, 8, 12, 0.92);
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.18s ease,
    border-color 0.18s ease, background 0.18s ease;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-soft);
  background: rgba(11, 13, 20, 0.98);
  box-shadow: var(--shadow-soft);
}

/* ========== footer ========== */

.footer {
  margin-top: 24px;
  padding: 12px 4px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ========== animations ========== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(20px, -18px, 0) scale(1.05);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* utility animation classes */

.fade-in {
  animation: fadeIn 0.7s ease-out forwards;
  opacity: 0;
}

.fade-in-up {
  animation: fadeInUp 0.7s ease-out forwards;
  opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.25s; }
.delay-3 { animation-delay: 0.4s; }
.delay-4 { animation-delay: 0.55s; }
.delay-5 { animation-delay: 0.7s; }
.delay-6 { animation-delay: 0.85s; }
.delay-7 { animation-delay: 1s; }

/* ========== responsive tweaks ========== */

@media (max-width: 640px) {
  .navbar {
    padding-inline: 14px;
  }

  .nav-links {
    display: none; /* keep it minimal on mobile */
  }

  .hero {
    min-height: 50vh;
    padding-top: 20px;
  }

  .section {
    padding-inline: 14px;
  }

   .chatbox {
    display: flex;
    flex-direction: column;
    gap: 12px;
   }

  #chat-output {
   max-height: 260px;
   overflow-y: auto;
   padding: 12px;
   border-radius: 14px;
   background: rgba(0,0,0,0.4);
   border: 1px solid rgba(255,255,255,0.05);
   font-size: 0.9rem;
  }

  .user { color: var(--accent-2); margin-bottom: 6px; }
  .ai   { color: var(--text); margin-bottom: 8px; }

  .chat-input {
   display: flex;
   gap: 10px;
  }

  .chat-input input {
   flex: 1;
   padding: 10px 14px;
   border: none;
   border-radius: 999px;
   background: rgba(0,0,0,0.6);
   color: white;
   outline: none;
  }

  .chat-input button {
   padding: 10px 18px;
   border-radius: 999px;
   border: none;
   background: linear-gradient(135deg, var(--accent), var(--accent-2));
   color: black;
   cursor: pointer;
  }

  .status-card {
   border: 1px solid rgba(255,255,255,0.06);
   background: rgba(0,0,0,0.6);
   border-radius: 16px;
   padding: 16px;
   display: flex;
   flex-direction: column;
   gap: 10px;
   box-shadow: var(--shadow-soft);
  }

  .status-row {
   display: flex;
   justify-content: space-between;
   font-size: 0.9rem;
   color: var(--text-muted);
  }

  .status-row span:last-child {
   color: var(--text);
   font-weight: 500;
  }

  .online {
   color: #28f59f;
  }

  .offline {
   color: #ff5f5f;
  }

  .loading {
   color: #999;
  }
