:root {
  --bg: #08090d;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Ambient Background Glows */
.glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(130px);
  z-index: -1;
  pointer-events: none;
}
.glow-1 { top: -100px; left: -100px; background: rgba(59, 130, 246, 0.22); }
.glow-2 { bottom: 10%; right: -120px; background: rgba(16, 185, 129, 0.15); }

/* Navbar */
.navbar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 1px;
}
.logo span { color: var(--accent); }
.navbar nav { display: flex; gap: 1.75rem; }
.navbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.navbar nav a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 0.75rem; align-items: center; }

/* Buttons */
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 20px var(--accent-glow);
  transition: transform 0.15s, opacity 0.15s;
}
.btn-primary:hover { transform: translateY(-1px); opacity: 0.92; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary, .btn-outline {
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover, .btn-outline:hover { background: var(--surface-hover); }

/* Hero */
.hero {
  max-width: 820px;
  margin: 4rem auto 3rem;
  padding: 0 1.5rem;
  text-align: center;
}
.badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: #60a5fa;
  font-size: 0.8rem;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 1.25rem;
}
.hero h1 span {
  background: linear-gradient(90deg, #60a5fa, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subtitle {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Interactive Sandbox */
.sandbox-section {
  max-width: 820px;
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}
.sandbox-card {
  background: rgba(15, 18, 26, 0.85);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}
.sandbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.8rem;
  color: var(--muted);
}
.dots { display: flex; gap: 6px; }
.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #374151;
}
.model-select {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}
.model-select option { background: #0f121a; color: var(--text); }
.status-pill { color: #34d399; font-weight: 600; }

.chat-output {
  padding: 1.5rem;
  min-height: 200px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.msg {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  max-width: 88%;
  white-space: pre-wrap;
}
.msg.ai {
  background: var(--surface);
  border: 1px solid var(--border);
  align-self: flex-start;
}
.msg.user {
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.35);
  align-self: flex-end;
}

.quick-prompts {
  padding: 0 1.25rem 0.9rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--accent); }

.prompt-bar {
  display: flex;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}
.prompt-bar input {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}
.prompt-bar input:focus { border-color: var(--accent); }

/* Bento Grid */
.bento-section {
  max-width: 1000px;
  margin: 0 auto 5rem;
  padding: 0 1.5rem;
}
.bento-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2.25rem;
}
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}
.bento-card:hover {
  border-color: rgba(96, 165, 250, 0.45);
  transform: translateY(-2px);
}
.bento-card.wide { grid-column: span 2; }
.tag {
  font-size: 0.75rem;
  color: #60a5fa;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.bento-card h3 { margin: 0.6rem 0; font-size: 1.25rem; }
.bento-card p { color: var(--muted); font-size: 0.95rem; }

/* API Key Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal.hidden { display: none; }
.modal-box {
  background: #0f121a;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  width: 90%;
  max-width: 420px;
}
.modal-box h3 { margin-bottom: 0.5rem; }
.modal-box p { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.modal-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--text);
  margin-bottom: 1.25rem;
  outline: none;
}
.modal-box input:focus { border-color: var(--accent); }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.75rem; }

footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card.wide { grid-column: span 1; }
  .navbar nav { display: none; }
}