:root {
  --bg: #0f1419;
  --card: #1a2332;
  --accent: #3d9a6a;
  --accent-glow: rgba(61, 154, 106, 0.45);
  --text: #e8f0ea;
  --muted: #8fa89a;
  --danger: #e85d5d;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.app {
  max-width: 420px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.logo {
  font-size: 2.2rem;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  background: var(--card);
  border-radius: 1rem;
}

h1 {
  font-size: 1.35rem;
  font-weight: 600;
}

.subtitle {
  color: var(--muted);
  font-size: 0.85rem;
}

.status {
  text-align: center;
  padding: 0.65rem 1rem;
  background: var(--card);
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.status.live {
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.status.error {
  color: var(--danger);
}

.orb-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 1rem 0 1.5rem;
}

.call-btn {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, #2d6b4a, var(--accent));
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-shadow: 0 8px 32px var(--accent-glow);
  transition: transform 0.15s, box-shadow 0.15s;
  z-index: 2;
  touch-action: none;
  user-select: none;
}

.call-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.call-btn.active {
  transform: scale(1.06);
  box-shadow: 0 0 48px var(--accent-glow);
}

.call-icon {
  font-size: 2rem;
}

.pulse {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pulse 1.4s ease-out infinite;
  z-index: 1;
}

.pulse.hidden {
  display: none;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}

.mode-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mode-btn {
  flex: 1;
  padding: 0.55rem 0.4rem;
  border-radius: 10px;
  border: 1px solid #2a3a4a;
  background: var(--card);
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
}

.mode-btn.active {
  border-color: var(--accent);
  color: var(--text);
  background: #1e3d2e;
}

.end-btn {
  display: block;
  width: 100%;
  margin: 0 0 1rem;
  padding: 0.75rem;
  border: none;
  border-radius: 12px;
  background: var(--danger);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.end-btn.hidden {
  display: none;
}

.hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

.transcript {
  flex: 1;
  background: var(--card);
  border-radius: 14px;
  padding: 0.85rem;
  overflow-y: auto;
  max-height: 220px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.transcript .line {
  margin-bottom: 0.65rem;
}

.transcript .line.user {
  color: #9ecfb0;
}

.transcript .line.model {
  color: var(--text);
}

footer {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
}
