.avatar-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 480px;
  margin-bottom: 40px;
  opacity: 0;
  z-index: 1;
}
/* Main gradient glow background - matches your CareEcho design */

.glow-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 50%,
    var(--accent-color) 100%
  );
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.6;
  animation: rotate-gradient 20s linear infinite;
  pointer-events: none;
}
/* Secondary glow layer for depth */

.glow-secondary {
  position: absolute;
  inset: 20px;
  z-index: 0;
  background: radial-gradient(circle, rgba(125, 225, 243, 0.4) 0%, rgba(108, 92, 231, 0.3) 50%, rgba(166, 246, 193, 0.4) 100%);
  border-radius: 50%;
  filter: blur(20px);
  animation: pulse-soft 4s ease-in-out infinite;
  pointer-events: none;
}
/* Avatar image container */
.avatar-image-container {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 60px rgba(108, 92, 231, 0.2), 0 20px 40px rgba(0, 0, 0, 0.1), inset 0 0 20px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  z-index: 1;
  text-align: center;
  aspect-ratio: 1;
}
.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
/* Placeholder for demo */
.avatar-placeholder {
  position: absolute;
  z-index: -1;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}
/* Floating particles for extra magic */
.text-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
}
.gradient-title {
  font-weight: 600;
  font-size: 1.5rem; /* text-2xl */
  display: inline;
  background: linear-gradient(
    to right,
    var(--primary-color) 0%,
    var(--secondary-color) 50%,
    var(--accent-color) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  text-align: center;
  margin: 0 0 16px;
}

.subtitle {
  color: #666;
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 28rem;
  text-align: center;
}

/* Animations */
@keyframes rotate-gradient {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.5);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}
@keyframes pulse-soft {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}
@keyframes float-1 {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(10px, -15px) rotate(90deg);
  }
  50% {
    transform: translate(-5px, -10px) rotate(180deg);
  }
  75% {
    transform: translate(-10px, 5px) rotate(270deg);
  }
}
@keyframes float-2 {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-12px, -8px) scale(1.2);
  }
  66% {
    transform: translate(8px, -12px) scale(0.8);
  }
}
@keyframes float-3 {
  0%, 100% {
    transform: translate(0, 0);
    opacity: 0.7;
  }
  50% {
    transform: translate(15px, -20px);
    opacity: 1;
  }
}
@keyframes float-4 {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-8px, 12px) rotate(-45deg);
  }
  75% {
    transform: translate(12px, -8px) rotate(45deg);
  }
}

@media (min-width: 40rem) { /* sm */
  .gradient-title {
    font-size: 1.875rem; /* text-3xl */
  }
}
@media (min-width: 48rem) { /* sm */
  .gradient-title {
    font-size: 2.25rem; /* text-4xl */
  }
}
@media (max-width: 34rem) {
  .avatar-container {
    padding: 20px;
  }
}
@media (max-width: 48rem) {
  .subtitle {
    padding: 0 20px;
  }
}



@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInScaleUp {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes fadeInSlideDown {
  from { opacity: 0; transform: translateY(-5rem); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScaleUpMore {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes fadeInSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Add these classes to your CSS */
.animate-entrance {
  animation: fadeInScaleUp 0.8s ease-out 0.3s forwards;
}

.animate-avatar {
  animation: fadeInScaleUpMore 1s ease-out 0.5s forwards;
}

.animate-text {
  animation: fadeInSlideUp 0.6s ease-out 0.7s forwards;
}

.animate-selector {
  animation: fadeInSlideDown 0.6s ease-out 0.2s forwards;
}

.start-call {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  transition: opacity 0.5s ease, max-height 0.5s ease-in-out;
  opacity: 1;
  padding-top: 5rem;
  opacity: 0;
}
.start-call.is-fading-out {
  animation: none; /* Stops all animations on this element */
  opacity: 0;
}
.assistant-selector-wrap {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#assistant-selector {
  height: 54px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px 20px 0;
  background-color: color-mix(in srgb, #fff 15%, transparent);
  backdrop-filter: blur(24px);
  will-change: transform, opacity, backdrop-filter;
  border-radius: var(--radius);
  box-shadow: 
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
  position: relative;
  color: #fff;
  opacity: 0;
}
#assistant-selector button {
  background-color: color-mix(in srgb, #fff 90%, transparent);
  backdrop-filter: blur(24px);
  border-radius: var(--radius);
  border: none;
  padding: 16px;
  height: 54px;
  width: 160px;
  align-items: center;
  column-gap: 8px;
  display: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
}
#assistant-selector button.selected {
  background-color: color-mix(in srgb, #fff 10%, transparent);
  display: flex;
  color: var(--text-color);
}
#assistant-selector button.selected svg,
#assistant-selector button.selected span {
  pointer-events: none;
}

#assistant-selector button:nth-child(1) svg {
  color: var(--primary-color);
}
#assistant-selector button:nth-child(2) svg {
  color: var(--accent-color);
}
#assistant-selector button:nth-child(3) svg {
  color: #fb64b6;
}
#assistant-selector button:nth-child(4) svg {
  color: #00c950;
}
#assistant-selector button:nth-child(5) svg {
  color: #ff8904;
}
#assistant-selector button:nth-child(6) svg {
  color: #7c86ff;
}
#assistant-selector button:nth-child(7) svg {
  color: #fdc700;
}

#assistant-selector > svg {
  position: absolute;
  right: 16px;
  pointer-events: none;
  color: var(--text-color);
}
#assistant-selector button#assist-start-convo {
  width: 44px;
  height: 44px;
  min-width: 44px;
  max-width: 44px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--secondary-color) 80%, transparent),
    color-mix(in srgb, var(--accent-color) 80%, transparent)
  );
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  margin-right: 12px;
  color: #fff;
  display: none;
  cursor: pointer;
}
#assistant-selector button#assist-start-convo > svg {
  pointer-events: none;
  color: #fff;
}

.button-container {
  position: relative;
  width: 80px; /* md:w-20 */
  height: 80px; /* md:h-20 */
  display: flex;
  justify-content: center;
  align-items: center;
}
.outer-glow-rings {
  position: absolute;
  inset: -16px; /* -inset-4 (16px) */
  border-radius: 50%;
}

.glow-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.ring-1 {
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--primary-color) 40%, transparent),
    color-mix(in srgb, var(--secondary-color) 40%, transparent),
    color-mix(in srgb, var(--accent-color) 40%, transparent)
  );
  animation-name: pulse-ring-1;
  animation-duration: 3s;
}

.ring-2 {
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--accent-color) 15%, transparent),
    color-mix(in srgb, var(--primary-color) 15%, transparent),
    color-mix(in srgb, var(--background-colorseconday) 15%, transparent)
  );
  animation-name: pulse-ring-2;
  animation-duration: 3.5s;
  animation-delay: 0.5s;
}

@keyframes pulse-ring-1 {
  0% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.2); opacity: 0.6; }
  100% { transform: scale(1); opacity: 0.3; }
}

@keyframes pulse-ring-2 {
  0% { transform: scale(1.1); opacity: 0.2; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(1.1); opacity: 0.2; }
}

#startCallButton {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent; /* Handled by .button-background */
}

#startCallButton:hover {
  transform: scale(1.05);
  box-shadow: 0 0 60px rgba(120, 119, 198, 0.4), 0 0 100px rgba(163, 119, 198, 0.3);
}

#startCallButton:active {
  transform: scale(0.95);
}

#startCallButton.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: scale(1); /* No scale on hover/active when disabled */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

#startCallButton div,
#startCallButton div svg {
  pointer-events: none
}

.button-background {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 50%,
    var(--accent-color) 100%
  );
}

.inner-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0.3;
}

.micon-container {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.micon {
  width: 28px; /* md:w-7 */
  height: 28px; /* md:h-7 */
  color: #fff;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.07)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.06)); /* drop-shadow-lg */
  position: absolute;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  fill: none;
}

.mic-icon {
  opacity: 1;
  transform: scale(1);
}

.loader-icon {
  opacity: 0;
  transform: scale(0.8);
}

#startCallButton.is-connecting .mic-icon {
  opacity: 0;
  transform: scale(0.8);
}

#startCallButton.is-connecting .loader-icon {
  opacity: 1;
  transform: scale(1);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.sound-wave-animation {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px; /* space-x-1 (4px) */
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

#startCallButton:hover .sound-wave-animation,
#startCallButton.is-connecting .sound-wave-animation {
  opacity: 1;
}

.wave-bar {
  width: 4px; /* w-1 (4px) */
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 9999px; /* rounded-full */
  height: 8px; /* initial height */
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-name: wave-pulse;
  animation-duration: 1.2s;
}

.wave-bar:nth-child(1) { animation-delay: 0s; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave-pulse {
  0% { height: 8px; opacity: 0.4; }
  50% { height: 20px; opacity: 1; }
  100% { height: 8px; opacity: 0.4; }
}

.ripple-effect {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.4);
  opacity: 0;
  transform: scale(1);
}

#startCallButton.is-connecting .ripple-effect {
  animation: ripple 1s ease-out forwards;
}

@keyframes ripple {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

.floating-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 9;
}

.particle {
  position: absolute;
  width: 4px; /* w-1 */
  height: 4px; /* h-1 */
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-name: float-particle;
}

.avatar-container .floating-particles .particle {
  width: 6px;
  height: 6px;
  background-color: #fff;
  opacity: 0.3;
}

.particle-1 { left: 20%; top: 30%; animation-duration: 4s; animation-delay: 0s; }
.particle-2 { left: 35%; top: 50%; animation-duration: 4.5s; animation-delay: 0.3s; }
.particle-3 { left: 50%; top: 30%; animation-duration: 5s; animation-delay: 0.6s; }
.particle-4 { left: 65%; top: 70%; animation-duration: 5.5s; animation-delay: 0.9s; }
.particle-5 { left: 80%; top: 30%; animation-duration: 6s; animation-delay: 1.2s; }
.particle-6 { left: 25%; top: 70%; animation-duration: 6.5s; animation-delay: 1.5s; }
.particle-7 { left: 40%; top: 10%; animation-duration: 7s; animation-delay: 1.8s; }
.particle-8 { left: 70%; top: 50%; animation-duration: 7.5s; animation-delay: 2.1s; }

@keyframes float-particle {
  0% { transform: translate(-10px, -20px) scale(0.5); opacity: 0.3; }
  50% { transform: translate(10px, 20px) scale(1); opacity: 0.8; }
  100% { transform: translate(-10px, -20px) scale(0.5); opacity: 0.3; }
}


.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.backdrop.active {
  opacity: 1;
  pointer-events: all;
  z-index: 12;
}
.sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(24px);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  max-height: 85vh;
  cursor: grab;
  z-index: 13;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255,255,255,0.3);
}
.handle {
  width: 40px;
  height: 5px;
  background: rgba(255,255,255,0.5);
  border-radius: 3px;
  margin: 12px auto;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
}
.handle-coice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 16px 16px 8px;
  position: relative;
  background-image: linear-gradient(
    to right,
    transparent,
    color-mix(in srgb, var(--primary-color) 20%, transparent),
    color-mix(in srgb, var(--secondary-color) 20%, transparent),
    color-mix(in srgb, var(--accent-color) 20%, transparent),
    transparent
  );
}
.handle-coice > h3 {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(
    to right,
    var(--primary-color) 0%,
    var(--secondary-color) 50%,
    var(--accent-color) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.handle-coice > div {
  display: flex;
}
button#sheet-start-convo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.2);
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  margin-right: 12px;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
button#sheet-start-convo svg {
  pointer-events: none;
}
button#close-sheet {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: none;
  background-color: rgba(255,255,255,0.1);
  color: #fff;
  cursor: pointer;
}

.sheet-content {
  padding: 0 20px 20px;
  max-height: 50vh;
  display: flex;
  flex-direction: column;
  row-gap: 12px; 
  overflow-y: auto;
}
.sheet-content button {
  background-color: color-mix(in srgb, #fff 10%, transparent);
  backdrop-filter: blur(12px);
  padding: 20px;
  border-radius: var(--radius);
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 16px;
  min-height: 68px;
  cursor: pointer;
}
.sheet-content button.selected {
  background-color: transparent;
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--primary-color) 90%, transparent),
    color-mix(in srgb, var(--secondary-color) 90%, transparent),
    color-mix(in srgb, var(--accent-color) 90%, transparent)
  );
}
.sheet-content button > div {
  display: flex;
  align-items: center;
  column-gap: 12px;
}
.sheet-content button > div:last-child {
  display: none;
}
.sheet-content button.selected > div:last-child {
  display: flex;
  align-items: center;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #fff;
}
.sheet-content button > div > div {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  justify-content: center;
  align-items: center;
}
.sheet-content button > div > div > span {
  font-size: 18px;
}

#conversation-view {
  opacity: 0;
  pointer-events: none; /* Prevents interaction when hidden */
  transition: opacity 0.5s ease-in-out;
  display: none;
  width: 100%;
}
#conversation-view.active {
  opacity: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: all; /* Allows interaction when visible */
}

#conversation-view.active ~ .start-call.is-fading-out {
  display: none;
}

/* start chat */
.chat-container {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  max-width: 40rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 11rem;
  /* Space for the input area */
  height: 100%;
  width: 100%;
}
.message {
  width: 80%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.message.agent {
  background-color: var(--background-color);
  border: 1px solid hsl(40 10% 85%);
  color: var(--text-color);
}
.message.user {
  margin-left: auto;
  background-color: var(--primary-color);
  color: #fff;
  border: 1px solid rgba(255,255,255, 0.25);
}
.message-header {
  font-size: 0.875rem;
  text-transform: capitalize;
  opacity: 0.5;
  padding-bottom: 0.5rem;
}
.message.agent > .message-header {
  color: var(--primary-color);
  opacity: 1;
}
.message-body {
  font-size: 1rem;
  line-height: 1.5rem;
}
.input-area {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  max-width: 40rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.input-wrapper {
  position: relative;
  width: 100%;
  max-width: 25rem;
  margin-top: 20px;
}
.input-wrapper textarea {
  width: 100%;
  background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
  backdrop-filter: blur(12px);
  color: var(--foreground-color);
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  padding: 0.5rem 2.5rem 0.5rem 0.5rem;
  resize: none;
  box-sizing: border-box;
  line-height: 1.5;
  min-height: 44px;
  /* A good minimum height */
}
.input-wrapper textarea:focus {
  outline: none;
  border-color: #525252;
}
.input-wrapper button {
  position: absolute;
  right: 0.5rem;
  top: 45%;
  transform: translateY(-50%);
  background-color: var(--primary-color);
  color: var(--primary-text-color);
  border: none;
  border-radius: 9999px;
  padding: 0.5rem;
  cursor: pointer;
}
/* end chat */


/* Ripple effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}




/* === Emotion Readout Styles === */
.emotions-container {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(221, 221, 221, 0.5);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.8s ease forwards;  
}
.emotion-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 12px;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.5s ease forwards;
}
.emotion-bar:nth-child(1) { animation-delay: 0.1s; }
.emotion-bar:nth-child(2) { animation-delay: 0.2s; }
.emotion-bar:nth-child(3) { animation-delay: 0.3s; }
.emotion-bar:nth-child(4) { animation-delay: 0.4s; }
.emotion-bar:nth-child(5) { animation-delay: 0.5s; }

.emotion-info {
  display: flex;
  align-items: center;
  opacity: 0.5;
}
.emotion-name {
  width: 90px;
  text-transform: capitalize;
}
.emotion-score {
  width: 30px;
  text-align: right;
  font-family: monospace;
  margin-right: 10px;
}
.bar-wrapper {
  flex-grow: 1;
  height: 8px;
  background-color: rgba(221, 221, 221, 0.5);
  border-radius: 4px;
}
.bar {
  height: 100%;
  background-color: #2196F3;
  border-radius: 4px;
  transition: width 1s ease;
}









@media (min-width: 57.5rem) {
  #assistant-selector {
    width: auto;
    height: 98px;
    max-width: 57rem;
    padding: 24px;
    margin-top: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    background-image: linear-gradient(
      to right,
      color-mix(in srgb, var(--primary-color) 20%, transparent),
      color-mix(in srgb, var(--secondary-color) 20%, transparent),
      color-mix(in srgb, var(--accent-color) 20%, transparent)
    );

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    column-gap: 8px;
  }
  #assistant-selector button {
    display: flex;
    align-items: center;
    column-gap: 8px;
    height: 48px;
    min-width: 90px;
    background-color: color-mix(in srgb, #fff 40%, transparent);
    color: var(--link-color);
    width: auto;
    padding: 0 10px;
  }
  #assistant-selector button.selected {
    /*background-color: color-mix(in srgb, #f0b100 90%, transparent);*/
    background-color: transparent;
    background: linear-gradient(
      to right,
      color-mix(in srgb, var(--primary-color) 90%, transparent),
      color-mix(in srgb, var(--secondary-color) 90%, transparent),
      color-mix(in srgb, var(--accent-color) 90%, transparent)
    );
    color: #fff;
  }
  #assistant-selector button#assist-start-convo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 0;
    margin-left: 12px;
  }
  #assistant-selector > svg {
    display: none;
  }
  #backdrop, #sheet {
    display: none;
  }
}

/* vu-meter button */
.vu-meter {
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 32rem;
  width: fit-content;
}

.vu-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: transparent;
  height: 2.5rem;
  padding: 0 0.75rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border: none;
}

.vu-icon-button:hover {
  background: #f3f3f3;
  color: #333;
}

.vu-icon-button[data-state="on"] {
  background: #e0f0ff;
  color: #0070f3;
}

.vu-icon {
  width: 1rem;
  height: 1rem;
  pointer-events: none;
}

.waveform {
  position: relative;
  display: grid;
  height: 2rem;
  width: 12rem;
  flex-shrink: 0;
}

.waveform-bars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: currentColor;
  color: #444;
}

.end-button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-content: center;
  white-space: nowrap;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.25rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  background: #dc2626;
  color: #fff;
  border: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  transition: background 0.2s;
}

.end-button:hover {
  background: #b91c1c;
}

/* End call animation */
.conversation-view.ending-call {
  animation: fadeOutAndShrink 0.5s ease-out forwards;
}

@keyframes fadeOutAndShrink {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* End call visual feedback */
.end-call-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.end-call-overlay.active {
  display: flex;
}

.end-call-message {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  max-width: 80%;
  animation: slideUp 0.3s ease-out;
}

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

/* end vu-meter button */