﻿:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f6f7fb;
  background: #090b10;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(110, 83, 255, .22), transparent 32rem),
    radial-gradient(circle at 12% 80%, rgba(0, 208, 255, .11), transparent 26rem),
    #090b10;
}

button, select, textarea, input { font: inherit; }

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.voice-card {
  width: min(720px, 100%);
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 28px;
  background: rgba(15, 18, 27, .82);
  box-shadow: 0 36px 100px rgba(0,0,0,.48);
  backdrop-filter: blur(22px);
}

.hero { text-align: center; }
.eyebrow {
  margin-bottom: 12px;
  color: #9f91ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 8vw, 62px);
  line-height: 1;
  letter-spacing: -.055em;
}

.hero p {
  max-width: 520px;
  margin: 18px auto 0;
  color: #a9afbd;
  line-height: 1.7;
}

.orb {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 40px auto 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #d2caff 0, #806cff 34%, #3b25c9 68%, #13183e 100%);
  box-shadow: 0 0 60px rgba(105, 83, 255, .36), inset -18px -22px 38px rgba(2, 5, 20, .32);
  transition: filter .25s ease, transform .25s ease, opacity .25s ease;
}

.orb span {
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(155, 140, 255, .22);
  border-radius: inherit;
  opacity: 0;
}

.orb[data-state="connecting"] span,
.orb[data-state="live"] span { animation: pulse 2.2s ease-out infinite; }
.orb span:nth-child(2) { animation-delay: .7s !important; }
.orb span:nth-child(3) { animation-delay: 1.4s !important; }
.orb[data-state="connecting"] { filter: saturate(.65); }
.orb[data-state="live"] { animation: breathe 2.8s ease-in-out infinite; }
.orb[data-state="error"] { filter: hue-rotate(95deg) saturate(1.4); }

@keyframes pulse {
  0% { opacity: .7; transform: scale(.9); }
  100% { opacity: 0; transform: scale(1.55); }
}
@keyframes breathe {
  50% { transform: scale(1.045); box-shadow: 0 0 80px rgba(105,83,255,.52); }
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 24px;
  color: #c8ccd5;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #737986;
}
.status-dot[data-state="connecting"] { background: #f7c65c; box-shadow: 0 0 12px #f7c65c; }
.status-dot[data-state="live"] { background: #50e3a4; box-shadow: 0 0 12px #50e3a4; }
.status-dot[data-state="error"] { background: #ff637d; box-shadow: 0 0 12px #ff637d; }

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

button {
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 13px;
  color: #eef0f6;
  background: #202530;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
button:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(255,255,255,.28); }
button:disabled { opacity: .42; cursor: not-allowed; }
button.primary { background: linear-gradient(135deg, #785cff, #5740d9); border-color: #8d79ff; }
button.danger { color: #ff9cad; background: rgba(112, 29, 47, .34); }

.settings {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.settings summary { color: #b7bdc9; cursor: pointer; user-select: none; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}
label { display: grid; gap: 7px; }
label > span { color: #9299a8; font-size: 13px; }
label.wide { grid-column: 1 / -1; }

select, textarea, input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 12px;
  outline: none;
  color: #f1f3f8;
  background: #121620;
}
select, input { height: 44px; padding: 0 12px; }
textarea { resize: vertical; min-height: 84px; padding: 12px; line-height: 1.5; }
select:focus, textarea:focus, input:focus { border-color: #816dff; box-shadow: 0 0 0 3px rgba(112,88,255,.14); }

.footnote {
  margin: 24px 0 0;
  color: #747c8c;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 620px) {
  .voice-card { border-radius: 22px; }
  .settings-grid { grid-template-columns: 1fr; }
  label.wide { grid-column: auto; }
  .controls button { flex: 1 1 calc(50% - 10px); }
}
