@import url('https://fonts.googleapis.com/css2?family=Amaranth&family=PT+Sans:wght@400;700&display=swap');

:root {
  --ink: #263137;
  --muted: #6c7678;
  --paper: #f3f3f3;
  --panel: #ffffff;
  --orange: #e05e36;
  --orange-dark: #c94d2a;
  --green: #42a77e;
  --line: #dde2df;
  --shadow: 0 18px 50px rgba(38, 49, 55, .13);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body {
  background: radial-gradient(circle at 12% 8%, #fff 0, var(--paper) 42%, #e5ebe7 100%);
  color: var(--ink);
  font-family: 'PT Sans', sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }

.app-shell {
  min-height: 100vh;
  padding: 28px clamp(18px, 4vw, 64px) 44px;
}

.app-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto 24px;
  max-width: 1180px;
}

.brand { align-items: center; display: flex; gap: 12px; }
.brand img { height: 42px; width: 142px; }
.brand p { color: var(--muted); font-size: 15px; margin: 0; }

.connection {
  align-items: center;
  color: var(--green);
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
}
.connection::before {
  background: var(--green);
  border-radius: 50%;
  content: '';
  height: 8px;
  width: 8px;
}

.workspace {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 18px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 1180px;
  overflow: hidden;
}

.video-grid {
  background: #20292c;
  display: grid;
  gap: 2px;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
  min-height: min(64vh, 650px);
  padding: 2px;
}

.video-card {
  background: #303b3e;
  min-height: 360px;
  overflow: hidden;
  position: relative;
}
.video-card video { height: 100%; object-fit: cover; width: 100%; }
.video-card.remote video { transform: scaleX(-1); }
.video-card.local { background: #394649; }
.video-card.local video { transform: scaleX(-1); }

.video-label {
  background: rgba(20, 28, 30, .72);
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  left: 18px;
  padding: 7px 12px;
  position: absolute;
  top: 18px;
}

.empty-state {
  align-items: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: absolute;
  text-align: center;
}
.empty-state .mark {
  align-items: center;
  background: var(--orange);
  border-radius: 18px;
  display: flex;
  font-family: Amaranth, sans-serif;
  font-size: 38px;
  height: 74px;
  justify-content: center;
  margin-bottom: 18px;
  width: 74px;
}
.empty-state h1 { font-family: Amaranth, sans-serif; font-size: clamp(26px, 3vw, 38px); font-weight: 400; margin: 0 0 8px; }
.empty-state p { color: #cbd4d2; margin: 0; max-width: 300px; }

.controls {
  align-items: center;
  background: #fff;
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 20px;
}

.button {
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  min-height: 44px;
  padding: 0 22px;
}
.button.primary { background: var(--orange); color: #fff; }
.button.primary:hover { background: var(--orange-dark); }
.button.secondary { background: #edf1ef; color: var(--ink); }
.button.secondary:hover { background: #e0e8e4; }
.button.icon { min-width: 48px; padding: 0 14px; }
.button:disabled { cursor: default; opacity: .48; }

.status-bar {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 20px;
}
.status { color: var(--muted); font-size: 14px; }
.status strong { color: var(--ink); }
.hint { color: var(--muted); font-size: 13px; }

@media (max-width: 760px) {
  .app-shell { padding: 18px 12px 28px; }
  .app-header { align-items: flex-start; }
  .brand { align-items: flex-start; flex-direction: column; gap: 4px; }
  .brand p { display: none; }
  .video-grid { grid-template-columns: 1fr; min-height: 0; }
  .video-card { min-height: 42vh; }
  .video-card.local { min-height: 28vh; }
  .controls { flex-wrap: wrap; }
  .controls .primary { flex: 1 1 100%; order: -1; }
  .status-bar { align-items: flex-start; flex-direction: column; gap: 5px; }
  .hint { display: none; }
}
