* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f1117;
  color: #e0e0e0;
  min-height: 100vh;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px;
}

header {
  text-align: center;
  margin-bottom: 32px;
}

header h1 {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 0.85rem;
  color: #888;
}

/* Config Panel */
.config-panel {
  background: #1a1d27;
  border: 1px solid #2a2d3a;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #aaa;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  background: #12141c;
  border: 1px solid #2a2d3a;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #4a9eff;
}

.btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn-connect {
  background: #4a9eff;
  color: #fff;
  margin-top: 8px;
}

.btn-connect:hover { background: #3a8eef; }
.btn-connect:disabled { background: #333; color: #666; cursor: not-allowed; }

.btn-end {
  background: #ef4444;
  color: #fff;
  margin-top: 16px;
}

.btn-end:hover { background: #dc2626; }

/* Call Panel */
.call-panel {
  background: #1a1d27;
  border: 1px solid #2a2d3a;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fbbf24;
  animation: pulse 1.5s infinite;
}

.status-dot.connected { background: #22c55e; animation: none; }
.status-dot.error { background: #ef4444; animation: none; }
.status-dot.transfer { background: #a855f7; animation: pulse 0.8s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.timer {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: #888;
}

/* Audio Levels */
.levels { margin-bottom: 16px; }

.level-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.level-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #888;
  width: 24px;
  text-transform: uppercase;
}

.level-bar {
  flex: 1;
  height: 6px;
  background: #12141c;
  border-radius: 3px;
  overflow: hidden;
}

.level-fill {
  height: 100%;
  width: 0%;
  background: #4a9eff;
  border-radius: 3px;
  transition: width 0.08s;
}

.level-fill.ai { background: #22c55e; }

/* Transcript */
.transcript {
  background: #12141c;
  border: 1px solid #2a2d3a;
  border-radius: 8px;
  padding: 12px;
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.6;
}

.transcript .token {
  display: inline;
}

.transcript .token.assistant { color: #22c55e; }
.transcript .token.user { color: #4a9eff; }

.transcript .divider {
  display: block;
  height: 1px;
  background: #2a2d3a;
  margin: 8px 0;
}

/* Transfer Banner */
.transfer-banner {
  background: #7c3aed;
  color: #fff;
  text-align: center;
  padding: 14px;
  border-radius: 8px;
  margin-top: 16px;
  font-weight: 600;
  animation: pulse 1s infinite;
}

/* Sessions Panel */
.sessions-panel {
  background: #1a1d27;
  border: 1px solid #2a2d3a;
  border-radius: 12px;
  padding: 24px;
}

.sessions-panel h2 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: #ccc;
}

.session-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #2a2d3a;
  font-size: 0.8rem;
}

.session-row:last-child { border-bottom: none; }

.session-name { color: #4a9eff; font-weight: 600; }
.session-duration { color: #888; }
.session-transfer {
  background: #7c3aed;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.session-normal {
  background: #22c55e;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.no-sessions { color: #555; font-size: 0.85rem; }

/* Error message */
.error-msg {
  background: #7f1d1d;
  color: #fca5a5;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}
