:root {
  --bg: #1e0f36;
  --bg-2: #150a28;
  --accent: #7c3aed;
  --accent-2: #c084fc;
  --teal: #2dd4bf;
  --text: #f1eaff;
  --text-dim: #b8a9d9;
  --glass: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: radial-gradient(circle at 20% -10%, #3b1d6b 0%, var(--bg) 45%, var(--bg-2) 100%);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 6vw;
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(21, 10, 40, 0.75);
  border-bottom: 1px solid var(--glass-border);
  z-index: 50;
}
.nav .brand { font-weight: 800; font-size: 1.25rem; letter-spacing: 0.5px; }
.nav .brand span { color: var(--teal); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--text); font-weight: 500; }
.nav-links .cta {
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: #0d0620;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 6vw; }

.hero { padding: 64px 0 40px; text-align: left; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08; margin: 0 0 18px; }
.hero p.lead { color: var(--text-dim); font-size: 1.15rem; max-width: 620px; }
.hero .actions { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--teal)); color: #0d0620; }
.btn-ghost { background: var(--glass); color: var(--text); border: 1px solid var(--glass-border); }

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 22px;
  backdrop-filter: blur(8px);
}

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 30px 0; }
@media (max-width: 820px) { .grid3 { grid-template-columns: 1fr; } }

.tag {
  display: inline-block;
  font-size: 0.8rem;
  background: rgba(45, 212, 191, 0.15);
  color: var(--teal);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.milestone { border-left: 3px solid var(--accent); padding-left: 16px; margin-bottom: 18px; }
.milestone .stage { font-weight: 700; color: var(--accent-2); }

.locked-banner {
  background: rgba(124, 58, 237, 0.18);
  border: 1px dashed var(--accent-2);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  margin-top: 20px;
}

section { padding: 40px 0; }
h2 { font-size: 1.8rem; }

footer {
  border-top: 1px solid var(--glass-border);
  padding: 30px 6vw 60px;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 40px;
}
footer a { color: var(--text-dim); }

/* Coach page */
.coach-wrap { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.avatar-box {
  flex: 0 0 220px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
/* Abstract voice-AI orb — no face, no character, no cartoon shape */
.avatar {
  width: 180px; height: 180px; border-radius: 50%;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(124,58,237,0.25), transparent 70%);
}
.avatar::before, .avatar::after {
  content: '';
  position: absolute; border-radius: 50%;
  border: 1.5px solid rgba(192,132,252,0.35);
}
.avatar::before { inset: 0; }
.avatar::after { inset: 22px; border-color: rgba(45,212,191,0.4); }
.avatar-core {
  width: 90px; height: 90px; border-radius: 50%;
  background: conic-gradient(from 0deg, #7c3aed, #2dd4bf, #c084fc, #7c3aed);
  filter: blur(0.5px);
  box-shadow: 0 0 36px rgba(124,58,237,0.55);
  animation: spin 8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar.speaking .avatar-core { animation: spin 2.2s linear infinite; }
.avatar.speaking::before { animation: ringPulse 0.9s ease-in-out infinite; }
.avatar.speaking::after { animation: ringPulse 0.9s ease-in-out infinite 0.15s; }
@keyframes ringPulse {
  0%,100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.06); opacity: 1; }
}
.wave-bars {
  position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: flex-end; gap: 4px; height: 20px; opacity: 0;
  transition: opacity 0.2s;
}
.avatar.speaking .wave-bars { opacity: 1; }
.wave-bars span {
  width: 4px; background: var(--teal); border-radius: 2px;
  animation: wave 0.9s ease-in-out infinite;
}
.wave-bars span:nth-child(1){height:6px;animation-delay:0s}
.wave-bars span:nth-child(2){height:14px;animation-delay:0.1s}
.wave-bars span:nth-child(3){height:20px;animation-delay:0.2s}
.wave-bars span:nth-child(4){height:12px;animation-delay:0.3s}
.wave-bars span:nth-child(5){height:8px;animation-delay:0.4s}
@keyframes wave {
  0%,100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}
.chat-panel { flex: 1 1 400px; min-width: 280px; }
.chat-log {
  height: 360px; overflow-y: auto; background: var(--glass);
  border: 1px solid var(--glass-border); border-radius: 14px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.bubble { max-width: 80%; padding: 10px 14px; border-radius: 14px; line-height: 1.4; }
.bubble.user { align-self: flex-end; background: var(--accent); color: #fff; }
.bubble.coach { align-self: flex-start; background: rgba(255,255,255,0.1); }
.chat-input-row { display: flex; gap: 10px; margin-top: 14px; }
.chat-input-row input {
  flex: 1; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05); color: var(--text); font-size: 1rem;
}
.mic-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--glass-border);
  background: var(--glass); color: var(--text); cursor: pointer; font-size: 1.1rem;
}
.mic-btn.listening { background: var(--teal); color: #0d0620; }

.form-box { max-width: 420px; margin: 40px auto; }
.form-box input, .form-box select {
  width: 100%; padding: 12px 14px; margin-bottom: 12px; border-radius: 10px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.05); color: var(--text);
}
.error-text { color: #fca5a5; margin-bottom: 10px; }
.owner-dot {
  position: fixed; left: 10px; bottom: 10px; width: 10px; height: 10px;
  border-radius: 50%; background: rgba(124,58,237,0.35); cursor: pointer;
}
