* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #070914;
  font-family: 'DejaVu Sans', system-ui, -apple-system, sans-serif;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-root {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: calc(100vh * 9 / 16);
  max-height: calc(100vw * 16 / 9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stage-root canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.hud-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  container-type: size;
}

.hidden {
  display: none !important;
}

.hud-card {
  background: rgba(11, 15, 29, 0.72);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* TikTok top safe margin >= 9.5%, right margin >= 15% */
.hud-top {
  position: absolute;
  top: 10%;
  left: 3%;
  right: 16%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hud-tabela {
  padding: 10px 14px;
  border-color: rgba(242, 194, 48, 0.5);
}

.hud-micro {
  font-size: clamp(9px, 2cqw, 14px);
  letter-spacing: 0.05em;
  color: #cbd5e1;
  font-weight: 700;
}

.hud-stop-main {
  font-size: clamp(16px, 4.1cqw, 28px);
  font-weight: 900;
  color: #f2c230;
  margin-top: 2px;
}

.hud-stop-next {
  font-size: clamp(11px, 2.4cqw, 16px);
  color: #e2e8f0;
  margin-top: 2px;
}

.hud-stop-vip {
  font-size: clamp(10px, 2.2cqw, 15px);
  color: #38bdf8;
  font-weight: 700;
  margin-top: 3px;
}

.hud-bars {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hud-bar-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hud-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: clamp(10px, 2.1cqw, 14px);
  font-weight: 700;
}

.hud-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  overflow: hidden;
}

.hud-progress-fill {
  height: 100%;
  width: 0%;
  background: #f2c230;
  transition: width 0.25s ease;
}

.hud-speech {
  position: absolute;
  top: 27%;
  left: 4%;
  right: 17%;
  padding: 10px 14px;
  background: rgba(255, 252, 240, 0.92);
  color: #0f172a;
  border-color: #f2c230;
  font-size: clamp(12px, 2.8cqw, 19px);
  font-weight: 800;
  line-height: 1.3;
}

.hud-vote {
  position: absolute;
  top: 34.5%;
  left: 4%;
  right: 17%;
  padding: 10px 14px;
  background: rgba(185, 28, 28, 0.88);
  border-color: #fca5a5;
  color: #fff;
  text-align: center;
  font-size: clamp(12px, 2.7cqw, 18px);
  font-weight: 900;
}

.hud-streak {
  position: absolute;
  top: 40%;
  left: 4%;
  padding: 8px 14px;
  background: rgba(234, 88, 12, 0.9);
  border-color: #fed7aa;
  font-size: clamp(12px, 2.6cqw, 18px);
  font-weight: 900;
}

.hud-celebration {
  position: absolute;
  top: 46%;
  left: 8%;
  right: 18%;
  padding: 14px 18px;
  text-align: center;
  white-space: pre-line;
  background: rgba(15, 23, 42, 0.88);
  border-color: #facc15;
  font-size: clamp(14px, 3.2cqw, 22px);
  font-weight: 900;
  color: #facc15;
}

.hud-ceremony {
  position: absolute;
  top: 42%;
  left: 6%;
  right: 18%;
  padding: 14px 16px;
  border-color: #facc15;
}

.hud-ceremony-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: clamp(12px, 2.5cqw, 17px);
  font-weight: 700;
}

/* Bottom-right telemetry avoids bottom-left TikTok chat (0..38%) and right buttons (15%) */
.hud-footer {
  position: absolute;
  bottom: 18%;
  right: 16%;
  width: 44%;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hud-pax {
  font-size: clamp(14px, 3.3cqw, 22px);
  font-weight: 900;
  color: #38bdf8;
}

.hud-signal {
  position: absolute;
  top: 10px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.85);
  font-size: 11px;
  font-weight: 800;
}

.hud-perf {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(9, 13, 28, 0.68);
  font-size: 10px;
  color: #94a3b8;
  font-weight: 700;
}

.hud-safeguides {
  position: absolute;
  inset: 0;
  border-top: 9.4% solid rgba(239, 68, 68, 0.16);
  border-right: 14.8% solid rgba(239, 68, 68, 0.16);
}

.hud-safeguides::after {
  content: 'TikTok Güvenli Alan Dışı (Sohbet)';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 37.5%;
  height: 35%;
  background: rgba(239, 68, 68, 0.2);
  border-top: 2px dashed #ef4444;
  border-right: 2px dashed #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fecaca;
  text-align: center;
}

.hud-loading {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 20, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.hud-loading-box {
  width: 78%;
  padding: 20px;
  border-radius: 16px;
  border: 1.5px solid rgba(242, 194, 48, 0.55);
  background: #0f162b;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
