* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 50%, #f5f0ff 100%);
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
  text-align: center;
}

/* Header */
.header {
  margin-bottom: 30px;
}

.header h1 {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.header .subtitle {
  font-size: 13px;
  color: #64748b;
}

/* Agent avatar */
.agent-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  border: 3px solid #a5b4fc;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  position: relative;
}

.agent-avatar .pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #4f46e5;
  animation: pulse 2s ease-out infinite;
  opacity: 0;
}

.agent-avatar.speaking .pulse-ring {
  animation: pulse 1s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.agent-name {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 2px;
}

.agent-role {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 24px;
}

/* Timer */
#timer {
  font-size: 42px;
  font-weight: 300;
  color: #94a3b8;
  letter-spacing: 4px;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

#timer.active {
  color: #4f46e5;
}

/* Status */
.status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 30px;
}

#status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}

#status-dot.active {
  background: #4f46e5;
  box-shadow: 0 0 8px rgba(79, 70, 229, 0.5);
}

#status-text {
  font-size: 14px;
  color: #64748b;
}

/* Buttons */
.btn-group {
  margin-bottom: 30px;
}

.call-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
  font-size: 28px;
}

.call-btn:hover {
  transform: scale(1.05);
}

.call-btn:active {
  transform: scale(0.95);
}

#call-btn {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
}

#end-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.hidden {
  display: none !important;
}

/* Transcript log */
.transcript-container {
  text-align: left;
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.transcript-container h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  margin-bottom: 10px;
}

#transcript-log {
  font-size: 13px;
  line-height: 1.5;
}

.transcript-entry {
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 8px;
}

.transcript-entry.user {
  background: #eef2ff;
  color: #3730a3;
}

.transcript-entry.assistant {
  background: #f0fdf4;
  color: #166534;
}

.transcript-entry .role {
  font-weight: 600;
  margin-right: 4px;
}

.transcript-entry.partial {
  opacity: 0.65;
  font-style: italic;
}

/* Scrollbar */
.transcript-container::-webkit-scrollbar {
  width: 4px;
}

.transcript-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

/* Phone number overlay */
.phone-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.phone-overlay.hidden {
  display: none !important;
}

.phone-modal {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  width: 320px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.phone-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.phone-modal-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
}

#phone-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 22px;
  letter-spacing: 3px;
  text-align: center;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
  margin-bottom: 12px;
}

#phone-input:focus {
  border-color: #4f46e5;
}

#phone-input.valid {
  border-color: #22c55e;
}

.phone-submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-bottom: 8px;
}

.phone-submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.phone-submit-btn:not(:disabled):hover {
  opacity: 0.9;
}

.phone-submit-btn:not(:disabled):active {
  transform: scale(0.98);
}

.phone-skip-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
}

.phone-skip-btn:hover {
  color: #64748b;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .container {
    padding: 16px;
  }
  #timer {
    font-size: 36px;
  }
}
