body {
  margin: 0;
  padding: 0;
  background: #020205;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  overflow: hidden;
}

#voiceGradient {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 10%, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.22) 40%, transparent 64%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.44), transparent 24%, transparent 76%, rgba(0, 0, 0, 0.44));
}

.brand {
  position: fixed;
  top: clamp(34px, 7vh, 76px);
  left: 50%;
  transform: translateX(-50%);
  width: min(300px, 66vw);
  pointer-events: auto;
  opacity: 0.96;
}

.brand a {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  transition: opacity 0.3s ease;
  text-decoration: none;
}

.brand a:hover {
  opacity: 0.8;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 55px rgba(139, 143, 255, 0.22));
}

.glass-panel {
  position: relative;
  z-index: 1;
  width: min(672px, calc(100vw - 32px));
  display: grid;
  gap: 18px;
  text-align: center;
}

.persona-selector {
  min-height: 82px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(14, 15, 34, 0.66);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 24px 80px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(24px) saturate(128%);
  -webkit-backdrop-filter: blur(24px) saturate(128%);
}

.persona-option {
  min-width: 0;
  min-height: 68px;
  border: 0;
  border-radius: 23px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px 12px;
  color: rgba(236, 237, 255, 0.66);
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition:
    background 220ms ease,
    box-shadow 220ms ease,
    color 220ms ease,
    transform 220ms ease;
}

.persona-option:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.045);
}

.persona-option.is-selected {
  color: rgba(255, 255, 255, 0.96);
  background:
    linear-gradient(180deg, rgba(160, 161, 229, 0.34), rgba(102, 103, 159, 0.45)),
    rgba(95, 96, 146, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 13px 28px rgba(0, 0, 0, 0.18);
}

.persona-selector.is-locked {
  cursor: not-allowed;
}

.persona-selector.is-locked .persona-option:not(.is-selected) {
  opacity: 0.42;
}

.persona-option:disabled {
  cursor: not-allowed;
}

.persona-option span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 850;
}

.persona-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(236, 237, 255, 0.72);
  font-size: 12px;
  font-weight: 750;
}

.input-row {
  width: min(520px, 100%);
  justify-self: center;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 8px 7px 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06)),
    rgba(73, 75, 117, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 24px 70px rgba(0, 0, 0, 0.24),
    0 0 90px rgba(139, 143, 255, 0.12);
  backdrop-filter: blur(24px) saturate(132%);
  -webkit-backdrop-filter: blur(24px) saturate(132%);
}

input {
  min-width: 0;
  flex: 1;
  height: 48px;
  border: 0;
  outline: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.96);
  background: transparent;
  font: inherit;
  font-size: clamp(16px, 3.4vw, 18px);
  font-weight: 750;
}

.btn {
  min-width: 154px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  color: #141520;
  background: linear-gradient(180deg, #ffffff, #f3f3fb);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 34px rgba(0, 0, 0, 0.22);
}

#stopBtn {
  display: none;
  color: #fff;
  background: linear-gradient(180deg, #ff5966, #ff3949);
}

#status {
  min-height: 22px;
  margin: 0;
  color: rgba(235, 236, 255, 0.72);
  font-size: 14px;
  font-weight: 650;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #24c66f;
  border-radius: 50%;
  display: inline-block;
  margin-right: 10px;
}

.pulse {
  background: #fff;
  animation: pulse-red 1.4s ease-in-out infinite;
}

@keyframes pulse-red {
  50% {
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.18);
  }
}

@media (max-width: 620px) {
  body {
    align-items: center;
    justify-content: flex-start;
    padding: 110px 0 54px;
    box-sizing: border-box;
  }

  .brand {
    top: 24px;
    width: min(226px, 60vw);
  }

  .glass-panel {
    width: 90vw;
    gap: 13px;
    box-sizing: border-box;
    margin: auto;
  }

  .persona-selector {
    min-height: auto;
    width: 100%;
    box-sizing: border-box;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 24px;
    padding: 6px;
  }

  .persona-option {
    min-height: 62px;
    border-radius: 18px;
    padding: 9px 10px;
  }

  .persona-option span {
    font-size: 14px;
  }

  .persona-option small {
    font-size: 11px;
  }

  .input-row {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
    box-sizing: border-box;
    min-height: 98px;
    align-items: stretch;
    flex-direction: column;
    border-radius: 23px;
    padding: 12px;
  }

  input {
    width: 100%;
    text-align: center;
  }

  .btn {
    width: 100%;
    min-width: 0;
  }
}