:root {
  --bg: #090b14;
  --bg-soft: #12182a;
  --text: #ecf1ff;
  --muted: #9ea8c6;
  --primary: #7b8cff;
  --accent: #29ffd3;
  --card: rgba(17, 24, 43, 0.65);
  --border: rgba(164, 186, 255, 0.2);
  --shadow: 0 24px 80px rgba(10, 13, 30, 0.45);
}

body.light {
  --bg: #f3f6ff;
  --bg-soft: #ffffff;
  --text: #0f1730;
  --muted: #5a6687;
  --primary: #405af3;
  --accent: #00b894;
  --card: rgba(255, 255, 255, 0.88);
  --border: rgba(27, 64, 190, 0.16);
  --shadow: 0 24px 60px rgba(80, 99, 153, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: radial-gradient(circle at top right, #1f2c67 0%, var(--bg) 45%), var(--bg);
  color: var(--text);
  min-height: 100%;
}

body.light {
  background: radial-gradient(circle at top right, #dce4ff 0%, var(--bg) 50%), var(--bg);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 0);
  background-size: 5px 5px;
  opacity: 0.15;
}

.topbar,
.section,
.hero,
footer {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 1rem;
  z-index: 10;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 16px;
}

.glass {
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  box-shadow: 0 0 16px var(--accent);
}

nav { display: flex; gap: 1rem; }
nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
nav a:hover { color: var(--text); }

.hero {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
}

.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; }
h1 {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(2.1rem, 4vw, 4rem);
  margin: 0.4rem 0;
}
.lead { color: var(--muted); max-width: 62ch; }

.hero-panel { padding: 1.3rem; border-radius: 20px; }
.hero-panel ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.hero-panel li { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border); padding-bottom: 0.5rem; }
.hero-panel span { color: var(--muted); }

.btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 0.62rem 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--primary); }
.btn.primary { background: linear-gradient(120deg, var(--primary), #6650f5); border: none; color: #fff; }
.btn.ghost { padding-inline: 0.8rem; }
.hero-actions { display: flex; gap: 0.8rem; margin-top: 1rem; }

.section { margin-top: 4rem; }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }

.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.card {
  border-radius: 16px;
  padding: 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.card h3 { margin-top: 0; }
.card p { color: var(--muted); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

textarea,
input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem;
  color: var(--text);
  margin-top: 0.35rem;
}

textarea { margin: 0.8rem 0; }
.result { border-radius: 16px; padding: 1rem; }
.result p { color: var(--muted); white-space: pre-line; }

.auth-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.auth-card { padding: 1rem; border-radius: 16px; }
label { display: block; margin-bottom: 0.6rem; font-size: 0.9rem; }
.row { display: flex; gap: 0.6rem; }
.hint { color: var(--muted); font-size: 0.86rem; }
.status { margin-top: 1rem; padding: 0.85rem 1rem; border-radius: 12px; }

footer { margin: 3rem auto 2rem; color: var(--muted); text-align: center; }

@media (max-width: 860px) {
  nav { display: none; }
  .hero, .split { grid-template-columns: 1fr; }
}
