* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: #05070d;
  color: #e8eef8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow: hidden;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(900px 600px at 80% -10%, rgba(110, 231, 255, 0.12), transparent 60%),
    radial-gradient(800px 600px at 0% 110%, rgba(167, 139, 250, 0.14), transparent 60%), #05070d;
}

.pair-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 4vh 4vw;
  text-align: center;
}

.brand {
  color: #6ee7ff;
  font-size: clamp(14px, 1.4vw, 20px);
  font-weight: 800;
  letter-spacing: 0.5em;
  text-transform: uppercase;
}

.tagline {
  margin-top: 2vh;
  color: #8b98ad;
  font-size: clamp(15px, 1.6vw, 24px);
}

.code {
  margin: 3vh 0 2vh;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(64px, 13vw, 220px);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, #ffffff, #6ee7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform 1.2s ease;
}

.qr {
  width: clamp(140px, 16vw, 260px);
  height: auto;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
}

.url {
  margin-top: 2vh;
  color: #5d697c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(12px, 1.1vw, 18px);
}

.steps {
  margin-top: 1.4vh;
  color: #5d697c;
  font-size: clamp(11px, 1vw, 16px);
}

.owner {
  margin-top: 1.4vh;
  color: #6ee7ff;
  font-size: clamp(13px, 1.2vw, 20px);
}

.slide-screen {
  display: none;
  height: 100%;
  background: #000;
}

.tv-panes {
  display: grid;
  gap: 2px;
  width: 100%;
  height: 100%;
  background: #000;
}

.tv-panes[data-layout="1"] {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.tv-panes[data-layout="2"] {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
}

.tv-panes[data-layout="4"] {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.tv-pane {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: #000;
}

.tv-pane__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.tv-pane__loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #8b98ad;
  font-size: clamp(11px, 1vw, 15px);
  text-align: center;
}

.tv-pane__label {
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(5, 8, 14, 0.66);
  color: #dbe5f3;
  font-size: clamp(14px, 1.2vw, 24px);
  letter-spacing: 0.02em;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.status {
  position: fixed;
  left: 14px;
  top: 10px;
  color: #3f4a5a;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.status[data-kind="ok"] {
  color: #34d399;
}

.status[data-kind="warn"] {
  color: #fbbf24;
}

.status[data-kind="bad"] {
  color: #fb7185;
}

.invite {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2vh;
  padding: 4vh 4vw;
  background: rgba(2, 5, 10, 0.86);
  text-align: center;
}

.invite.is-visible {
  display: flex;
}

.invite__eyebrow {
  color: #6ee7ff;
  font-size: clamp(12px, 1.1vw, 20px);
  font-weight: 800;
  letter-spacing: 0.5em;
}

.invite__title {
  font-size: clamp(24px, 3vw, 52px);
  font-weight: 700;
}

.invite__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(64px, 11vw, 210px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, #ffffff, #6ee7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.invite__qr {
  width: clamp(160px, 18vw, 300px);
  height: auto;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
}

.invite__url {
  color: #8b98ad;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(12px, 1vw, 18px);
}

.invite__hint {
  color: #5d697c;
  font-size: clamp(11px, 0.95vw, 16px);
}

.tv-pane--empty {
  border: 1px dashed rgba(148, 163, 184, 0.22);
  background: #05070d;
}

.tv-pane__empty-label {
  color: #5d697c;
  font-size: clamp(12px, 1.1vw, 20px);
  letter-spacing: 0.08em;
}

.host-code {
  margin-top: 1vh;
  color: #8b98ad;
  font-size: clamp(13px, 1.1vw, 20px);
  letter-spacing: 0.08em;
}

.host-code span,
.invite__host span {
  color: #fbbf24;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.25em;
  letter-spacing: 0.14em;
}

.invite__host {
  color: #8b98ad;
  font-size: clamp(12px, 1vw, 18px);
  letter-spacing: 0.08em;
}
