* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #0b0b0d;
  color: #f2f2f4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.center {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  text-align: center;
}

h1 { margin: 0; font-size: 28px; }
p { margin: 0; color: #a9a9b2; line-height: 1.5; }

.btn {
  display: block;
  width: 100%;
  max-width: 340px;
  padding: 16px 20px;
  border: 0;
  border-radius: 12px;
  background: #e5383b;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.btn.secondary { background: #2a2a31; }
.btn:disabled { opacity: .5; }

input.code {
  width: 100%;
  max-width: 340px;
  padding: 14px;
  border: 1px solid #3a3a44;
  border-radius: 12px;
  background: #16161a;
  color: #fff;
  font-size: 28px;
  letter-spacing: 6px;
  text-align: center;
}

.status {
  font-size: 16px;
  color: #a9a9b2;
  min-height: 1.5em;
}
.status.ok { color: #4ade80; }
.status.err { color: #f87171; }

/* TV ekranı */
.tv-code {
  font-size: 96px;
  font-weight: 700;
  letter-spacing: 8px;
  color: #fff;
}
.tv-lobby h1 { font-size: 40px; }
.tv-lobby p { font-size: 24px; }
.qr {
  padding: 14px;
  background: #fff;
  border-radius: 12px;
}
.qr img, .qr canvas { display: block; }

video.full {
  display: none;
  position: fixed;
  inset: 0;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
body.live video.full { display: block; }
body.live .tv-lobby { display: none; }

.fs-btn {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 10;
  padding: 14px 28px;
  border: 2px solid #fff;
  border-radius: 12px;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
html.fs .fs-btn { display: none; }

/* Kamera sayfası */
video.preview {
  width: 100%;
  max-width: 340px;
  border-radius: 12px;
  background: #000;
  display: none;
}
.setup.center { min-height: 0; padding: 0; width: 100%; }
body.streaming video.preview { display: block; }
body.streaming .setup { display: none; }
.live-controls { display: none; width: 100%; max-width: 340px; }
body.streaming .live-controls { display: block; }
.live-controls .btn + .btn { margin-top: 12px; }
