:root {
  --bg: #0a1628;
  --surface: #111d33;
  --accent: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.45);
  --gold: #c9a84c;
  --text: #f1f5f9;
  --muted: #94a3b8;
}

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

.maya-voice-body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: radial-gradient(ellipse at 50% 0%, #1e3a5f 0%, var(--bg) 55%);
  min-height: 100vh;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.voice-container {
  width: 100%;
  max-width: 32rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.voice-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.voice-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.voice-logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #1b2a8e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  border: 1.5px solid rgba(201, 168, 76, 0.5);
}

.voice-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.voice-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(37, 99, 235, 0.35);
}

.voice-back {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}
.voice-back:hover { color: var(--text); }

.voice-intro {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  max-width: 28rem;
  line-height: 1.5;
}

.orb {
  position: relative;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 35%, #3b82f6, #1b2a8e 70%);
  box-shadow: 0 0 40px var(--accent-glow);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  user-select: none;
}
.orb:hover { transform: scale(1.04); }
.orb--listening {
  box-shadow: 0 0 60px rgba(34, 197, 94, 0.5);
  animation: pulse-listen 1.5s ease-in-out infinite;
}
.orb--speaking {
  box-shadow: 0 0 60px rgba(201, 168, 76, 0.55);
  animation: pulse-speak 0.8s ease-in-out infinite;
}
.orb--connecting { animation: pulse-connect 1s ease-in-out infinite; }

@keyframes pulse-listen {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes pulse-speak {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes pulse-connect {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.orb-inner {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}
.orb-ring--1 { width: 100%; height: 100%; }
.orb-ring--2 { width: 115%; height: 115%; opacity: 0.5; }
.orb-ring--3 { width: 130%; height: 130%; opacity: 0.25; }

.mic-indicator {
  position: absolute;
  bottom: 0.5rem;
  font-size: 1.25rem;
  opacity: 0.7;
}
.mic-indicator--active { opacity: 1; animation: mic-blink 1s infinite; }
@keyframes mic-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.voice-status {
  font-size: 1rem;
  color: var(--muted);
  text-align: center;
  min-height: 1.5rem;
}

.voice-speed {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.voice-speed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.voice-speed-header label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.voice-speed-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: #93c5fd;
  font-variant-numeric: tabular-nums;
}

.voice-speed-slider {
  width: 100%;
  height: 6px;
  appearance: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
}

.voice-speed-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, var(--accent));
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px var(--accent-glow);
}

.voice-speed-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, var(--accent));
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px var(--accent-glow);
}

.voice-speed-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.transcript {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.transcript-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  display: block;
  margin-bottom: 0.35rem;
}
.transcript--user p,
.transcript--maya p {
  font-size: 0.95rem;
  line-height: 1.5;
}
.transcript--maya { border-color: rgba(37, 99, 235, 0.3); }

.voice-error {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.voice-error button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
}

.btn-stop,
.btn-validate {
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-stop {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.btn-validate {
  background: var(--accent);
  color: #fff;
}

.hidden { display: none !important; }