* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  background: radial-gradient(circle at 50% 20%, #0d281e 0%, #06110d 60%, #020705 100%);
  color: #f0fdf4;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: env(safe-area-inset-top, 20px) 20px env(safe-area-inset-bottom, 24px);
  text-align: center;
}

/* Header */
.header {
  width: 100%;
  margin-top: 10px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 12px;
}

.logo-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #4ade80;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.mode-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #a7f3d0;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-toggle-btn.continuous {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #22c55e;
  border-radius: 50%;
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 4px;
  background: linear-gradient(180deg, #ffffff 0%, #86efac 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 400;
  max-width: 320px;
  line-height: 1.35;
  margin: 0 auto;
  transition: all 0.25s ease;
}

/* Orb */
.orb-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 15px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.orb {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4ade80 0%, #10b981 40%, #064e3b 100%);
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.35);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.orb-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(74, 222, 128, 0.2);
  pointer-events: none;
}

.ring-1 { width: 160px; height: 160px; }
.ring-2 { width: 190px; height: 190px; }
.ring-3 { width: 220px; height: 220px; }

/* States */
.orb.listening {
  transform: scale(1.15);
  background: radial-gradient(circle at 35% 35%, #38bdf8 0%, #0284c7 40%, #0c4a6e 100%);
  box-shadow: 0 0 55px rgba(56, 189, 248, 0.75);
  animation: breathe 1.2s infinite alternate ease-in-out;
}

.orb.speaking {
  transform: scale(1.18);
  background: radial-gradient(circle at 35% 35%, #c084fc 0%, #9333ea 40%, #581c87 100%);
  box-shadow: 0 0 65px rgba(192, 132, 252, 0.85);
  animation: ripple 0.8s infinite alternate ease-in-out;
}

.orb.processing {
  transform: scale(1.06);
  background: radial-gradient(circle at 35% 35%, #facc15 0%, #eab308 40%, #713f12 100%);
  box-shadow: 0 0 50px rgba(250, 204, 21, 0.7);
  animation: spin 2s infinite linear;
}

@keyframes breathe {
  0% { transform: scale(1.05); }
  100% { transform: scale(1.22); }
}

@keyframes ripple {
  0% { transform: scale(1.1); filter: brightness(1); }
  100% { transform: scale(1.25); filter: brightness(1.25); }
}

@keyframes spin {
  0% { transform: rotate(0deg) scale(1.05); }
  100% { transform: rotate(360deg) scale(1.05); }
}

/* Wave bars */
.wave-bars {
  position: absolute;
  bottom: -15px;
  display: flex;
  gap: 4px;
  height: 20px;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.wave-bars.active {
  opacity: 1;
}

.wave-bars span {
  width: 4px;
  height: 5px;
  background: #4ade80;
  border-radius: 4px;
  animation: wave 1s infinite ease-in-out;
}

.wave-bars span:nth-child(2) { animation-delay: 0.1s; }
.wave-bars span:nth-child(3) { animation-delay: 0.2s; }
.wave-bars span:nth-child(4) { animation-delay: 0.3s; }
.wave-bars span:nth-child(5) { animation-delay: 0.4s; }
.wave-bars span:nth-child(6) { animation-delay: 0.5s; }
.wave-bars span:nth-child(7) { animation-delay: 0.4s; }
.wave-bars span:nth-child(8) { animation-delay: 0.3s; }
.wave-bars span:nth-child(9) { animation-delay: 0.2s; }
.wave-bars span:nth-child(10) { animation-delay: 0.1s; }

@keyframes wave {
  0%, 100% { height: 4px; }
  50% { height: 20px; }
}

/* Transcript Card */
.transcript-card {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px;
  text-align: left;
  margin: 5px 0 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.transcript-row {
  margin-bottom: 6px;
}

.transcript-row p {
  font-size: 0.92rem;
  line-height: 1.45;
  color: #f1f5f9;
  margin-top: 4px;
  user-select: text;
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 10px 0;
}

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 2px 7px;
  border-radius: 5px;
}

.user-badge {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
}

.ai-badge {
  background: rgba(74, 222, 128, 0.18);
  color: #4ade80;
}

/* Controls */
.controls-area {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.mic-row {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mic-btn {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  border: none;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(34, 197, 94, 0.45);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mic-btn:active, .mic-btn.active {
  transform: scale(0.92);
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.7);
}

/* Quick Chips */
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:active {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
  color: #4ade80;
}

/* Text Input Form */
.text-input-form {
  display: flex;
  width: 100%;
  gap: 8px;
  margin-top: 2px;
}

.text-input-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  padding: 10px 16px;
  color: #ffffff;
  font-size: 0.85rem;
  outline: none;
  user-select: text;
}

.text-input-form input:focus {
  border-color: #22c55e;
  background: rgba(255, 255, 255, 0.1);
}

.send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #22c55e;
  border: none;
  color: #ffffff;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.send-btn:active {
  transform: scale(0.92);
}
