:root {
  color-scheme: dark light;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #0f172a;
  --bg-panel: rgba(15, 23, 42, 0.85);
  --bg-light: rgba(255, 255, 255, 0.06);
  --text: #f8fafc;
  --text-muted: #cbd5f5;
  --accent: #38bdf8;
  --danger: #f87171;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(145deg, #0f172a, #1e293b 55%, #020617 100%);
  color: var(--text);
}

.page,
.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.page--intro {
  display: grid;
  gap: 1.25rem;
  background: var(--bg-panel);
  border-radius: 1.25rem;
  margin-top: 6vh;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35);
}

.app__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.app__subtitle {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

.status {
  background: var(--bg-light);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.consent,
.call,
.recording {
  background: var(--bg-panel);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
  margin-bottom: 1.5rem;
}

.join {
  display: grid;
  gap: 1rem;
  background: var(--bg-panel);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
  margin-top: 2rem;
}

.join-form {
  display: grid;
  gap: 0.85rem;
}

.join-form__label {
  font-weight: 600;
}

.join-form__controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.join-form__input {
  flex: 1 1 260px;
  min-width: 200px;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.join-form__input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.join-form__hint {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.9rem;
}

.consent__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 0.75rem;
  background: var(--bg-light);
  color: var(--text);
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(56, 189, 248, 0.18);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--accent);
  color: #0f172a;
}

.btn--danger {
  background: var(--danger);
}

.video-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}

.video-grid__item {
  position: relative;
  background: #020617;
  border-radius: 1rem;
  overflow: hidden;
  min-height: 220px;
}

.video-grid__item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.video-grid__label {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  background: rgba(15, 23, 42, 0.7);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.call__controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.recording {
  display: grid;
  gap: 0.75rem;
}

.recording__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.16);
  color: #fecaca;
}

.recording__indicator {
  display: inline-flex;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #f87171;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.7);
  animation: pulse 1.2s infinite alternate;
}

@keyframes pulse {
  from {
    opacity: 0.4;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 720px) {
  .app__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .consent,
  .call,
  .recording,
  .join {
    padding: 1.5rem;
  }
}
