[hidden] { display: none !important; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #000;
  color: #fff;
  overflow: hidden;
  cursor: none;
  user-select: none;
  font-family: "Segoe UI", system-ui, sans-serif;
}

body.setup {
  cursor: auto;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(37, 99, 235, 0.22), transparent 62%),
    linear-gradient(180deg, #070b14 0%, #0b1220 55%, #070b14 100%);
}

#setup {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  box-sizing: border-box;
}

#setup form {
  width: min(440px, 100%);
  display: grid;
  gap: 16px;
  padding: 36px 32px 28px;
  border-radius: 28px;
  background: rgba(10, 16, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.setup-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(180deg, #5b9dff 0%, #2563eb 100%);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.35);
}

.setup-mark svg { width: 32px; height: 32px; }

#setup h1 {
  margin: 0;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.setup-lead {
  margin: -6px 0 4px;
  text-align: center;
  color: rgba(203, 213, 225, 0.82);
  font-size: 1rem;
  line-height: 1.4;
}

#setup label {
  display: grid;
  gap: 8px;
}

#setup label > span {
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.95rem;
}

#setup input {
  width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
  font-size: 1.05rem;
}

#setup input::placeholder { color: rgba(203, 213, 225, 0.45); }

#setup input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.setup-token {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

#setup .setup-token input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.setup-token:focus-within {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

#toggle-token {
  flex: none;
  border: 0;
  padding: 8px 10px;
  color: #93c5fd;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}

#setup button[type="submit"] {
  margin-top: 4px;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(180deg, #3b8bff 0%, #1d6ef5 100%);
  box-shadow: 0 10px 24px rgba(29, 110, 245, 0.35);
}

#setup button[type="submit"]:hover { filter: brightness(1.06); }

#setup-message {
  margin: 0;
  color: #fca5a5;
  font-size: 0.95rem;
  line-height: 1.35;
}

#setup-message:empty { display: none; }

#stage {
  position: fixed;
  inset: 0;
  background: #000;
}

#image, #video, #weather, #waiting {
  position: fixed;
  top: 0;
  left: 50%;
  height: 100vh;
  width: min(100vw, calc(100vh * 9 / 16));
  transform: translateX(-50%);
}

#image, #video {
  object-fit: cover;
  background: #000;
}

#video::-webkit-media-controls,
#video::-webkit-media-controls-enclosure { display: none !important; }

#weather {
  display: grid;
  place-items: center;
  align-content: center;
  background: #102033;
  text-align: center;
  gap: 8px;
}

#weather strong { font-size: 12vw; font-weight: 600; line-height: 1; }
#weather span { font-size: 3vw; opacity: 0.85; }

#waiting {
  display: grid;
  place-items: center;
  margin: 0;
  font-size: 2vw;
  opacity: 0.7;
}

#qr-overlay {
  position: fixed;
  right: 3vw;
  bottom: 3vw;
  z-index: 5;
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
  max-width: min(28vw, 240px);
}

#qr-canvas {
  width: min(22vw, 200px);
  height: min(22vw, 200px);
  border-radius: 8px;
  background: #fff;
}

#qr-label {
  margin: 0;
  text-align: center;
  font-size: clamp(0.75rem, 1.6vw, 1rem);
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.92);
}
