:root {
  --bg: #09090b;
  --surface: #111115;
  --surface-2: #18181d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #10b981;
  --accent-hover: #059669;
  --indigo: #6366f1;
  --danger: #ef4444;
  --radius: 14px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.88em;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
  color: #e4e4e7;
}

.hidden {
  display: none !important;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 20%, black 35%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
}

.bg-glow-1 {
  top: -180px;
  left: -120px;
  background: var(--indigo);
}

.bg-glow-2 {
  top: 80px;
  right: -160px;
  background: var(--accent);
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(9, 9, 11, 0.78);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--indigo));
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
}

.brand-muted {
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}

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

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.84rem;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: #052e16;
}

.btn-primary:hover:not(:disabled) {
  background: #34d399;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: #222229;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

/* Hero */
.hero {
  padding: 64px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
  color: #6ee7b7;
  font-size: 0.76rem;
  margin-bottom: 18px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 4vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  margin: 0 0 28px;
  font-size: 1.06rem;
  color: var(--text-muted);
  max-width: 540px;
}

.hero-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.hero-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.hero-highlights strong {
  color: var(--text);
}

.check-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 2px;
}

/* Auth Card */
.auth-card {
  background: rgba(17, 17, 21, 0.92);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.auth-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.auth-tab.active {
  background: var(--surface-2);
  color: var(--text);
}

.auth-alert {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.86rem;
  margin-bottom: 16px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.auth-alert.success {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
}

.auth-form {
  display: grid;
  gap: 15px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.94rem;
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus {
  border-color: var(--accent);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 60px;
}

.toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}

.toggle-pw:hover {
  color: var(--text);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.session-view {
  display: grid;
  gap: 12px;
  text-align: center;
  padding: 8px 0;
}

.session-badge {
  display: inline-block;
  margin: 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.session-view h2 {
  margin: 4px 0 0;
  font-size: 1.35rem;
}

.session-email {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.session-actions {
  display: grid;
  gap: 10px;
}

/* Sections & Bento */
.section {
  padding: 52px 0;
}

.section-compact {
  padding: 28px 0 44px;
}

.section-head {
  margin-bottom: 26px;
}

.section-kicker {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.15s;
}

.bento-card:hover {
  border-color: var(--border-strong);
}

.bento-wide {
  grid-column: span 2;
}

.bento-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.bento-card h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

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

/* Code Panel */
.code-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.code-panel-head h3 {
  margin: 0;
  font-size: 1.08rem;
}

.code-tabs {
  display: flex;
  gap: 6px;
}

.code-tab {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.code-tab.active {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.code-block {
  margin: 0;
  padding: 20px 22px;
  background: #0c0c10;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #e4e4e7;
}

/* Stack & Footer */
.stack-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.stack-items {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

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

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

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

@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-wide {
    grid-column: span 1;
  }
  .nav-links {
    display: none;
  }
}
