:root {
  --bg0: #0b0f14;
  --bg1: #0f1720;
  --panel: rgba(255, 255, 255, 0.06);
  --panel2: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.65);
  --faint: rgba(255, 255, 255, 0.45);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #ffb86c;
  --accent2: #6ee7ff;
  --ok: #7cf7a2;
  --warn: #ffd36e;
  --shadow: rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 15% 10%, rgba(255, 184, 108, 0.16), transparent 55%),
    radial-gradient(900px 600px at 85% 20%, rgba(110, 231, 255, 0.12), transparent 60%),
    radial-gradient(900px 900px at 50% 120%, rgba(255, 255, 255, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
}

.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 22px;
  display: grid;
  gap: 16px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.04));
  box-shadow: 0 18px 38px var(--shadow);
}

.brand-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 22px;
  line-height: 1.05;
}

.brand-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  padding: 8px 10px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.78);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 999px;
  font-weight: 700;
}

.panel {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 18px 38px var(--shadow);
}

.panel-title {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

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

.panelHead .panel-title {
  margin-bottom: 0;
}

.row {
  display: grid;
  grid-template-columns: 1.15fr 1fr auto auto;
  gap: 10px;
  align-items: end;
}

.field .label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.input:focus {
  border-color: rgba(255, 184, 108, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 184, 108, 0.16);
}

.checkField .checkRow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
}

.checkField input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.btn {
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 184, 108, 0.35);
  background: linear-gradient(180deg, rgba(255, 184, 108, 0.22), rgba(255, 184, 108, 0.12));
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: transform 80ms ease, background 120ms ease, border-color 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 184, 108, 0.55);
  background: linear-gradient(180deg, rgba(255, 184, 108, 0.28), rgba(255, 184, 108, 0.14));
}

.btn:active {
  transform: translateY(0);
}

.btn.secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
}

.hint[data-kind="ok"] {
  color: var(--ok);
}

.hint[data-kind="warn"] {
  color: var(--warn);
}

.share {
  margin-top: 8px;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.shareLink {
  color: var(--faint);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}

.liveList {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

.liveItem {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.liveTitle {
  font-size: 14px;
  font-weight: 600;
}

.liveMeta {
  margin-top: 2px;
  color: var(--faint);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.liveActions {
  display: flex;
  gap: 6px;
}

.player {
  padding: 0;
}

.tv {
  position: relative;
  border-radius: 24px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(900px 500px at 10% 10%, rgba(255, 184, 108, 0.10), transparent 55%),
    radial-gradient(700px 500px at 90% 10%, rgba(110, 231, 255, 0.08), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.10));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.62);
}

.tv-glow {
  position: absolute;
  inset: -40px -20px -20px -20px;
  background:
    radial-gradient(350px 220px at 18% 22%, rgba(255, 184, 108, 0.18), transparent 70%),
    radial-gradient(320px 220px at 82% 26%, rgba(110, 231, 255, 0.14), transparent 72%);
  filter: blur(18px);
  opacity: 0.95;
  pointer-events: none;
}

.tv-frame {
  position: relative;
  border-radius: 18px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mount {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.archiveVideo {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.tv-scanlines {
  position: absolute;
  inset: 12px;
  border-radius: 12px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 1px,
    rgba(0, 0, 0, 0.00) 3px,
    rgba(0, 0, 0, 0.00) 6px
  );
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: 0.25;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 0;
  color: var(--faint);
  font-size: 12px;
}

@media (max-width: 900px) {
  .row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .share {
    grid-template-columns: 1fr;
  }
  .badge {
    display: none;
  }
  .foot {
    flex-direction: column;
  }
}
