:root {
  --bg: #0b0f17;
  --panel: #111827;
  --text: #e5e7eb;
  --muted: #9aa0a6;
  --accent: #22d3ee; /* cyan */
  --accent-2: #a78bfa; /* purple */
  --danger: #f87171;
  --success: #34d399;
  --warning: #fbbf24;
  --glow: 0 0 16px rgba(34, 211, 238, 0.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: radial-gradient(circle at 20% 20%, rgba(167,139,250,0.05), transparent 40%),
              radial-gradient(circle at 80% 0%, rgba(34,211,238,0.06), transparent 40%),
              var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container { width: min(1280px, 92%); margin: 0 auto; }
.site-header, .site-footer { align-self: stretch; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11,15,23,0.8); backdrop-filter: blur(6px); border-bottom: 1px solid rgba(255,255,255,0.06); }
.nav-container { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.logo { font-weight: 800; letter-spacing: 0.5px; color: var(--text); text-decoration: none; }
.logo:hover { text-shadow: var(--glow); color: var(--accent); }
.main-nav { display: flex; gap: 18px; align-items: center; }
.main-nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 9999px; transition: color .2s, background .2s, box-shadow .2s; }
.main-nav a:hover { color: var(--text); background: rgba(255,255,255,0.06); box-shadow: 0 0 0 1px rgba(167,139,250,0.25), var(--glow); }
.main-nav .cta { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #020617; font-weight: 700; }
.main-nav .cta:hover { box-shadow: var(--glow); }
.nav-toggle { display: none; background: none; color: var(--text); border: 1px solid rgba(255,255,255,0.2); padding: 6px 10px; border-radius: 8px; }

@media (max-width: 820px) {
  .main-nav { display: none; position: absolute; right: 4%; top: 58px; background: var(--panel); padding: 12px; border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,0.4); flex-direction: column; width: 220px; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
}

.hero { padding: 64px 0 28px; text-align: center; }
.hero h1 { font-size: clamp(28px, 5vw, 48px); margin: 0 0 12px; }
.gradient-text { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); margin: 0 auto 24px; max-width: 720px; }
.btn-primary { display: inline-block; padding: 14px 22px; border-radius: 14px; color: #020617; background: linear-gradient(90deg, var(--accent), var(--accent-2)); font-weight: 700; text-decoration: none; box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-1px); }
textarea.big-input {
  width: min(680px, 92%);
  height: 220px;
  margin: 16px auto 8px;
  display: block;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--text);
  font-size: 16px;
  transition: box-shadow .25s, border-color .25s;
}
textarea.big-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(34,211,238,0.35), var(--glow);
}

.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  justify-content: center;
  gap: 24px;
  margin: 32px 0 64px;
  justify-items: center;
  text-align: center;
}
.panel { width: clamp(260px, 28vw, 320px); background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); border: 1px solid rgba(255,255,255,0.08); padding: 18px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); transition: transform .2s, box-shadow .2s; }
.panel:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0,0,0,0.35); }
.panel h3 { margin-top: 4px; }

@media (max-width: 900px) {
  .panels { grid-template-columns: 1fr; }
}

.form-card { width: min(720px, 96%); margin: 40px auto; background: var(--panel); padding: 22px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.08); }
.form-row { display: grid; gap: 10px; margin-bottom: 14px; }
label { color: var(--muted); font-size: 14px; }
input[type="text"], input[type="password"], select, textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: var(--text); }
button, .btn { cursor: pointer; }
button.btn-primary { border: 0; }
.help { color: var(--muted); font-size: 12px; }
.error { color: var(--danger); }
.success { color: var(--success); }

.site-footer { border-top: 1px solid rgba(255,255,255,0.06); margin-top: 48px; padding: 24px 0; background: rgba(11,15,23,0.4); }
.footer-grid { display: flex; justify-content: space-between; align-items: start; gap: 24px; }
.footer-grid nav a { display: inline-block; margin-right: 12px; color: var(--muted); text-decoration: none; }
.footer-grid nav a:hover { color: var(--text); }
.small { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* Utilities */
.row { display: flex; gap: 16px; align-items: center; }
.space { height: 16px; }
.badge { padding: 4px 10px; border-radius: 9999px; background: rgba(167,139,250,0.2); color: var(--accent-2); font-weight: 600; font-size: 12px; }

/* Chat */
.chat-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
@media (max-width: 1100px) { .chat-layout { grid-template-columns: 1fr; } }
.chat-window { background: var(--panel); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; min-height: 420px; padding: 12px; display: flex; flex-direction: column; }
.messages { flex: 1; overflow-y: auto; display: grid; gap: 10px; padding: 8px; }
.msg { max-width: 78%; padding: 12px 14px; border-radius: 14px; line-height: 1.5; }
.msg.user { margin-left: auto; background: rgba(34,211,238,0.12); border: 1px solid rgba(34,211,238,0.4); }
.msg.ai { background: rgba(167,139,250,0.12); border: 1px solid rgba(167,139,250,0.35); }
.input-bar { display: grid; grid-template-columns: 1fr 52px 132px; gap: 12px; padding: 10px; background: rgba(255,255,255,0.02); border-top: 1px solid rgba(255,255,255,0.06); border-radius: 0 0 16px 16px; }
.input-bar textarea { resize: vertical; min-height: 96px; max-height: 260px; font-size: 16px; border: 1px solid rgba(255,255,255,0.14); padding: 12px; border-radius: 12px; transition: box-shadow .25s, border-color .25s; }
.input-bar textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(34,211,238,0.35), var(--glow); }
.input-bar textarea.working { animation: borderBlink 1.4s ease-in-out infinite; }
@keyframes borderBlink { 0% { box-shadow: 0 0 0 0 rgba(34,211,238,0.0); border-color: rgba(34,211,238,0.35);} 50% { box-shadow: 0 0 0 4px rgba(34,211,238,0.18); border-color: var(--accent);} 100% { box-shadow: 0 0 0 0 rgba(34,211,238,0.0); border-color: rgba(34,211,238,0.35);} }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; width: 44px; border-radius: 12px; background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid rgba(255,255,255,0.12); }
.icon-btn.recording { box-shadow: 0 0 0 2px rgba(248,113,113,0.5), 0 0 18px rgba(248,113,113,0.4); border-color: var(--danger); }
.send-btn { padding: 0 16px; border-radius: 12px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #020617; border: 0; font-weight: 700; }

.side-panel { background: var(--panel); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 12px; }
.score-meter { height: 12px; background: rgba(255,255,255,0.06); border-radius: 9999px; overflow: hidden; }
.score-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--success), var(--accent)); transition: width .4s ease; }
.tips { color: var(--muted); font-size: 14px; }

.typing { display: inline-block; width: 60px; }
.typing span { display: inline-block; width: 8px; height: 8px; margin: 0 2px; background: var(--muted); border-radius: 50%; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2 } 40% { opacity: 1 } }

/* Gate overlay */
.gate {
  position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(167,139,250,0.12), transparent 60%), rgba(2,6,23,0.92);
  backdrop-filter: blur(6px);
}
.gate.show { display: flex; }
.gate-card { text-align: center; background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)); padding: 28px; border-radius: 18px; border: 1px solid rgba(255,255,255,0.12); width: min(520px, 92%); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.gate-card h2 { margin: 0 0 8px; }
.gate-card p { color: var(--muted); margin: 0 0 16px; }
.tap-target { display: inline-flex; align-items: center; justify-content: center; width: 120px; height: 120px; border-radius: 9999px; border: 2px solid rgba(34,211,238,0.6); box-shadow: 0 0 30px rgba(34,211,238,0.5), inset 0 0 20px rgba(167,139,250,0.35); font-size: 64px; font-weight: 800; color: var(--accent); user-select: none; }
.tap-target:active { transform: scale(0.98); }
.tap-help { margin-top: 10px; font-size: 13px; color: var(--muted); }

@media (max-width: 600px) {
  .input-bar { grid-template-columns: 1fr 44px 100px; gap: 8px; }
  .input-bar textarea { min-height: 64px; }
}


