:root {
  --bg-a: #0b1220;
  --bg-b: #0e1a2b;
  --text: #eaf0ff;
  --muted: #b9c6e8;
  --accent: #6b9bff;
  --card: rgba(17, 30, 70, 0.58);
  --stroke: rgba(155, 180, 255, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
}

body {
  min-height: 100vh;
  font-family:
    "Manrope",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 8%, rgba(61, 123, 255, 0.2), transparent 42%),
    radial-gradient(circle at 84% 12%, rgba(45, 212, 191, 0.14), transparent 38%),
    linear-gradient(180deg, var(--bg-a), var(--bg-b));
  overflow-x: hidden;
}

img,
svg,
video {
  max-width: 100%;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
}

.orb-a {
  width: 260px;
  height: 260px;
  background: #3d7bff;
  left: -70px;
  top: 14%;
}

.orb-b {
  width: 300px;
  height: 300px;
  background: #2dd4bf;
  right: -95px;
  bottom: 12%;
}

.page-header {
  width: calc(100% - 56px);
  margin: 0 auto;
  padding: 16px 0 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.zyno-brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.header-nav-right {
  justify-self: end;
}

.zyno-brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
}

.zyno-brand-mark::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(86, 152, 255, 0.34) 0%, rgba(45, 212, 191, 0.2) 40%, rgba(86, 152, 255, 0) 72%);
  filter: blur(8px);
  z-index: -1;
}

.mark-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(8, 19, 49, 0.4), rgba(8, 19, 49, 0.4)) padding-box,
    conic-gradient(from 0deg, #6b9bff, #4e7fff, #2dd4bf, #6b9bff) border-box;
}

.ring-a {
  inset: 0;
  box-shadow: 0 0 10px rgba(107, 155, 255, 0.42);
  animation: zynoRingSpin 6s linear infinite;
}

.ring-b {
  inset: 8px;
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.42);
  animation: zynoRingSpinReverse 4.4s linear infinite;
}

.mark-core {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, #d9f3ff 0%, #6b9bff 46%, #2dd4bf 100%);
  box-shadow:
    0 0 14px rgba(107, 155, 255, 0.5),
    0 0 24px rgba(45, 212, 191, 0.32);
  animation: zynoCorePulse 1.9s ease-in-out infinite;
}

.zyno-brand-text {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: #e6efff;
  line-height: 1;
}

.home-icon-link {
  justify-self: end;
  text-decoration: none;
  color: #d9e7ff;
  border: 1px solid rgba(148, 180, 245, 0.32);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: rgba(10, 25, 58, 0.45);
}

.home-icon-link svg {
  width: 18px;
  height: 18px;
}

@keyframes zynoRingSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes zynoRingSpinReverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes zynoCorePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.glass {
  background: var(--card);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
}

.voice-chat-page {
  width: calc(100% - 56px);
  margin: 10px auto 22px;
  min-height: calc(100vh - 102px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  align-items: stretch;
  gap: 16px;
}

.chat-panel {
  border-radius: 22px;
  padding: 18px;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto auto;
  gap: 10px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
  line-height: 1.18;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  letter-spacing: 0.005em;
  max-width: 64ch;
}

.top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.qa-editor-link {
  text-decoration: none;
  color: #d7e8ff;
  border: 1px solid rgba(157, 188, 255, 0.34);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.4rem 0.62rem;
  width: fit-content;
  background: rgba(13, 27, 63, 0.52);
}

.vc-messages {
  overflow: auto;
  max-height: 48vh;
  display: grid;
  gap: 8px;
  padding-right: 2px;
}

.msg {
  border-radius: 14px;
  padding: 11px 12px;
  max-width: 90%;
  line-height: 1.55;
}

.msg p {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.msg.bot {
  background: rgba(13, 27, 63, 0.6);
  border: 1px solid rgba(157, 188, 255, 0.24);
  justify-self: start;
}

.msg.user {
  background: rgba(77, 140, 255, 0.18);
  border: 1px solid rgba(157, 188, 255, 0.34);
  justify-self: end;
}

.vc-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vc-chips button {
  border: 1px solid rgba(157, 188, 255, 0.28);
  background: rgba(13, 27, 63, 0.55);
  color: #dbe7ff;
  border-radius: 999px;
  padding: 7px 11px;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
}

.vc-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.vc-input-row input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(13, 27, 63, 0.58);
  color: var(--text);
  padding: 12px 12px;
  font: inherit;
}

.vc-input-row button {
  border: 1px solid rgba(157, 188, 255, 0.34);
  background: rgba(13, 27, 63, 0.62);
  color: #e6efff;
  border-radius: 12px;
  padding: 0 12px;
  font-weight: 700;
  cursor: pointer;
}

#sendBtn {
  background: linear-gradient(135deg, #4d8cff 0%, #6c7cff 45%, #1fcbb0 100%);
}

.provider-pill {
  margin: 0;
  border: 1px solid rgba(157, 188, 255, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
  color: #b9c6e8;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  background: rgba(13, 27, 63, 0.55);
}

.voice-right {
  border-radius: 22px;
  border: 1px solid rgba(155, 180, 255, 0.2);
  background: rgba(14, 26, 63, 0.44);
  backdrop-filter: blur(10px);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 18px;
}

.signal-label {
  margin: 0;
  color: #dce8ff;
  font-size: 0.86rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 700;
}

.signal-note {
  margin: 0;
  color: #b9c6e8;
  font-size: 0.82rem;
}

.visualizer-shell {
  width: min(100%, 360px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
}

.visualizer-shell::before {
  content: "";
  position: absolute;
  inset: 3%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(106, 72, 255, 0.3) 0%, rgba(71, 201, 255, 0.14) 45%, rgba(10, 12, 38, 0) 78%);
  filter: blur(18px);
  pointer-events: none;
}

.siri-wave-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

.visualizer-core {
  position: absolute;
  width: 32%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #f3f7ff;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: radial-gradient(circle at 40% 35%, rgba(104, 79, 220, 0.58), rgba(22, 20, 56, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(173, 190, 255, 0.14),
    0 0 28px rgba(120, 112, 255, 0.24);
}

@media (max-width: 980px) {
  .page-header,
  .voice-chat-page {
    width: calc(100% - 28px);
  }

  .voice-chat-page {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
  }

  .voice-right {
    order: -1;
    padding: 14px;
  }

  .visualizer-shell {
    width: min(100%, 260px);
  }

  .vc-messages {
    max-height: 34vh;
  }
}

@media (max-width: 700px) {
  .page-header,
  .voice-chat-page {
    width: calc(100% - 18px);
  }

  .page-header {
    padding-top: 8px;
  }

  .zyno-brand-mark {
    width: 40px;
    height: 40px;
  }

  .ring-b {
    inset: 6px;
  }

  .mark-core {
    width: 13px;
    height: 13px;
  }

  .zyno-brand-text {
    font-size: 1.55rem;
  }

  .home-icon-link {
    width: 36px;
    height: 36px;
  }

  .chat-panel,
  .voice-right {
    border-radius: 16px;
  }

  .chat-panel {
    padding: 12px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .lead {
    font-size: 0.91rem;
  }

  .vc-chips {
    gap: 6px;
  }

  .vc-chips button {
    font-size: 0.8rem;
  }

  .vc-input-row {
    grid-template-columns: 1fr;
  }

  .vc-input-row button {
    height: 40px;
  }

  .top-meta {
    align-items: flex-start;
  }
}
