:root {
  --bg: #0d0f17;
  --panel: #151a26;
  --accent: #45c4b0;
  --text: #f5f7ff;
  --muted: #98a0b3;
}

* {
  box-sizing: border-box;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #1f2a3b, #0d0f17 60%);
  color: var(--text);
  min-height: 100vh;
}

.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.header h1 {
  margin: 0;
  font-size: 32px;
}

.header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.status {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(69, 196, 176, 0.15);
  color: var(--accent);
  font-weight: 600;
}

.mode {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

.switching {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.switching.hidden {
  display: none;
}

.switching .bar {
  position: relative;
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.switching .bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--accent);
  border-radius: inherit;
  animation: progressSweep 1.4s ease-in-out infinite;
}

@keyframes progressSweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(250%);
  }
}

.videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.video-card {
  background: var(--panel);
  padding: 18px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 280px;
}

.remote-videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  width: 100%;
  flex: 1;
}

.video-card h2 {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

video {
  width: 100%;
  border-radius: 16px;
  background: #000;
  flex: 1;
}

.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}

label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
}

button {
  background: var(--accent);
  color: #0c0f1b;
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 720px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }
}
