* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, sans-serif; background: #1a1a2e; color: #e0e0e0; height: 100vh; display: flex; flex-direction: column; }

#setup {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; gap: 16px; padding: 20px;
}
#setup h1 { font-size: 32px; color: #fff; margin-bottom: 8px; }
#setup input, #setup button {
  font-size: 20px; padding: 12px 18px; border-radius: 8px; border: none; width: 320px;
}
#setup input { background: #16213e; color: #e0e0e0; border: 1px solid #334; }
#setup input::placeholder { color: #667; }
.btn-group { display: flex; gap: 8px; }
.btn-primary { background: #0f3460; color: #fff; cursor: pointer; width: auto; }
.btn-primary:hover { background: #1a4a80; }
.btn-primary:disabled { opacity: 0.4; cursor: default; }
.btn-danger { background: #c0392b; color: #fff; cursor: pointer; width: auto; }
.btn-danger:hover { background: #e74c3c; }
.btn-mute { background: #2c3e50; color: #fff; cursor: pointer; width: auto; }
.btn-mute:hover { background: #34495e; }
.btn-mute.muted { background: #e67e22; }
.btn-mute.muted:hover { background: #f39c12; }
.btn-share { background: #2980b9; color: #fff; cursor: pointer; width: auto; }
.btn-share:hover { background: #3498db; }
.btn-share.sharing { background: #27ae60; }
.btn-share.sharing:hover { background: #2ecc71; }

#call {
  display: none; flex: 1; flex-direction: column;
}
#call-status {
  font-size: 14px; color: #aaa; padding: 6px 12px; background: #16213e;
  text-align: center; flex-shrink: 0;
}
#videos {
  flex: 1; display: flex; gap: 4px; padding: 4px; background: #000; min-height: 0;
}
#videos video {
  flex: 1; min-width: 0; background: #111; border-radius: 4px; object-fit: cover;
}
#local-video { transform: scaleX(-1); }
#call-controls {
  display: flex; justify-content: center; gap: 12px; padding: 12px; background: #16213e;
  flex-shrink: 0;
}
#call-controls button {
  font-size: 18px; padding: 12px 24px; border-radius: 8px; border: none; cursor: pointer;
}

#status {
  font-size: 14px; color: #aaa; padding: 6px 12px; text-align: center;
  background: #16213e;
}

/* Recording */
.btn-record { background: #2c3e50; color: #fff; cursor: pointer; width: auto; }
.btn-record:hover { background: #34495e; }
.btn-record.recording { background: #c0392b; }
.btn-record:disabled { opacity: 0.4; cursor: default; }

.recording-indicator {
  display: none; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 16px; background: #1a1a2e; color: #e74c3c; font-weight: bold;
  font-size: 14px;
}
.recording-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #e74c3c;
  animation: pulse-dot 1.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.btn-small {
  font-size: 13px; padding: 4px 12px; border-radius: 6px; border: none;
  background: #2c3e50; color: #fff; cursor: pointer;
}
.btn-small:hover { background: #34495e; }
.btn-small.btn-danger { background: #c0392b; }
.btn-small.btn-danger:hover { background: #e74c3c; }

/* Consent modal */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7); display: none; align-items: center;
  justify-content: center; z-index: 1000;
}
.modal-content {
  background: #16213e; padding: 32px; border-radius: 12px; text-align: center;
  max-width: 400px; width: 90%;
}
.modal-content h2 { margin-bottom: 12px; color: #fff; }
.modal-content p { margin-bottom: 20px; color: #ccc; }
.modal-content .btn-group { justify-content: center; }

/* Recordings panel */
.btn-secondary {
  background: #2c3e50; color: #aaa; cursor: pointer; border: none;
  font-size: 16px; padding: 10px 20px; border-radius: 8px; margin-top: 8px;
}
.btn-secondary:hover { background: #34495e; color: #fff; }
.recordings-panel {
  position: fixed; top: 0; right: 0; width: 380px; height: 100%;
  background: #16213e; border-left: 1px solid #334; z-index: 900;
  display: none; flex-direction: column; overflow-y: auto;
}
.recordings-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid #334;
}
.recordings-header h2 { color: #fff; font-size: 18px; }
.recordings-empty { color: #667; text-align: center; padding: 40px 20px; }
.recording-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; border-bottom: 1px solid #222;
}
.recording-row:hover { background: #1a2744; }
.recording-partial { opacity: 0.7; }
.recording-info { display: flex; flex-direction: column; gap: 2px; }
.recording-date { color: #e0e0e0; font-size: 14px; }
.recording-meta { color: #888; font-size: 12px; }
.recording-actions { display: flex; gap: 6px; }

/* Safety number */
.safety-number-bar {
  display: none; align-items: center; justify-content: center; gap: 10px;
  padding: 6px 16px; background: #0a1628; color: #4ade80; font-size: 13px;
  font-family: monospace;
}
.safety-lock { font-size: 14px; }
.safety-number-display {
  font-family: monospace; font-size: 28px; letter-spacing: 4px;
  color: #4ade80; padding: 20px; background: #0a1628; border-radius: 8px;
  margin-bottom: 16px; line-height: 1.6;
}
.safety-hint { font-size: 12px; color: #888; margin-bottom: 16px; }
