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

:root {
  --accent: #7c6aff;
  --accent-2: #ff6ac1;
  --bg: #0a0a14;
  --text: #ffffff;
  --text-muted: rgba(255,255,255,0.5);
  --card-bg: rgba(255,255,255,0.06);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Animated background orbs */
.bg-orbs { position: fixed; inset: 0; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: drift 12s ease-in-out infinite alternate;
}
.orb-1 { width: 500px; height: 500px; background: #7c6aff; top: -100px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: #ff6ac1; bottom: -80px; right: -80px; animation-delay: -4s; }
.orb-3 { width: 300px; height: 300px; background: #6af0ff; top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: -8s; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, 20px) scale(1.08); }
}

/* Layout */
.container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 24px;
}

.state { display: none; flex-direction: column; align-items: center; text-align: center; gap: 16px; max-width: 400px; width: 100%; }
.state.active { display: flex; animation: fadeIn 0.4s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Avatar */
.avatar-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  margin-bottom: 8px;
}
.avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  color: white;
}

/* Pulse ring for connecting state */
.pulse-ring::before, .pulse-ring::after {
  content: ''; position: absolute;
  inset: -12px; border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pulse-out 2s ease-out infinite;
}
.pulse-ring::after { animation-delay: 1s; }

@keyframes pulse-out {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}

/* Active ring */
.active-ring {
  border-color: var(--accent);
  box-shadow: 0 0 32px rgba(124,106,255,0.4);
  animation: glow 2s ease-in-out infinite alternate;
}
@keyframes glow {
  from { box-shadow: 0 0 20px rgba(124,106,255,0.3); }
  to   { box-shadow: 0 0 48px rgba(124,106,255,0.7); }
}

/* Ended ring */
.ended-ring { border-color: #4ade80; box-shadow: 0 0 24px rgba(74,222,128,0.3); }
.ended-ring .avatar { background: linear-gradient(135deg, #4ade80, #22c55e); }

/* Typography */
.name { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.tagline { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); }
.description { font-size: 15px; color: var(--text-muted); line-height: 1.6; }
.status-text { font-size: 16px; font-weight: 600; color: var(--text-muted); }
.connecting-text { color: var(--accent); }
.active-text { color: #4ade80; }
.hint { font-size: 12px; color: var(--text-muted); margin-top: -8px; }

/* Dots animation */
.dots span { animation: blink 1.4s infinite; }
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%,80%,100% { opacity: 0; } 40% { opacity: 1; } }

/* Audio visualizer */
.visualizer {
  display: flex; align-items: center; gap: 4px; height: 48px;
}
.bar {
  width: 4px; border-radius: 4px;
  background: var(--accent);
  height: 8px;
  animation: bounce 1.2s ease-in-out infinite;
}
.bar:nth-child(1) { animation-delay: 0s; }
.bar:nth-child(2) { animation-delay: 0.1s; }
.bar:nth-child(3) { animation-delay: 0.2s; }
.bar:nth-child(4) { animation-delay: 0.3s; }
.bar:nth-child(5) { animation-delay: 0.2s; }
.bar:nth-child(6) { animation-delay: 0.1s; }
.bar:nth-child(7) { animation-delay: 0s; }

@keyframes bounce {
  0%, 100% { height: 8px; opacity: 0.5; }
  50% { height: 36px; opacity: 1; }
}

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; border: none; border-radius: 50px;
  padding: 16px 36px; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 8px 32px rgba(124,106,255,0.35);
  margin-top: 8px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(124,106,255,0.5); }
.btn-primary:active { transform: translateY(0); }

.btn-end {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,90,90,0.15); color: #ff7070;
  border: 1px solid rgba(255,90,90,0.3); border-radius: 50px;
  padding: 12px 28px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.btn-end:hover { background: rgba(255,90,90,0.25); }

.btn-secondary {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; text-decoration: none; border-radius: 50px;
  padding: 12px 28px; font-size: 14px; font-weight: 600;
  margin-top: 8px; transition: transform 0.15s;
}
.btn-secondary:hover { transform: translateY(-2px); }

.btn-ghost {
  background: none; border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-muted); border-radius: 50px;
  padding: 10px 24px; font-size: 13px; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.4); color: var(--text); }

.btn-restart {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text); border-radius: 50px;
  padding: 14px 32px; font-size: 15px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  margin-top: 8px;
}
.btn-restart:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.35); transform: translateY(-1px); }

/* CTA card */
.cta-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 24px 32px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 100%;
}
.cta-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.cta-name { font-size: 22px; font-weight: 800; }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 8px; }
.contact-form input {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.contact-form input::placeholder { color: rgba(255,255,255,0.35); }
.contact-form input:focus { border-color: var(--accent); }
.form-success { font-size: 14px; color: #4ade80; font-weight: 600; margin-top: 4px; }

/* Language switcher */
.lang-switcher {
  position: fixed; top: 20px; right: 24px;
  display: flex; align-items: center; gap: 6px;
  z-index: 100;
}
.lang-btn {
  background: none; border: none;
  color: var(--text-muted); font-size: 13px; font-weight: 700;
  font-family: inherit; letter-spacing: 1px;
  cursor: pointer; padding: 4px 2px;
  transition: color 0.15s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { color: var(--accent); }
.lang-sep { color: rgba(255,255,255,0.2); font-size: 13px; }

/* Mobile */
@media (max-width: 480px) {
  .name { font-size: 26px; }
  .btn-primary { padding: 14px 28px; font-size: 15px; }
  .avatar { width: 72px; height: 72px; }
  .avatar-ring { width: 100px; height: 100px; }
}
