:root {
  color-scheme: dark;
  font-family: Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #10131a;
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
  position: fixed;
  inset: 0;
  z-index: 2;
}

#pose-canvas {
  width: 100%;
  height: 100%;
  display: block;
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

#webcam {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transform: scaleX(-1);
  z-index: 1;
}

#hud {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.hud-panel {
  position: fixed;
  top: 16px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid #3b4252;
  border-radius: 8px;
  padding: 12px;
  font-size: 28px;
}

.hud-panel-left {
  left: 16px;
}

.hud-panel-right {
  right: 16px;
}

#round-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 6;
  background: rgba(0, 0, 0, 0.42);
}

#round-overlay.visible {
  display: flex;
}

#round-overlay .overlay-card {
  width: min(92vw, 460px);
  padding: 24px 24px 20px;
  border-radius: 14px;
  border: 1px solid rgba(130, 146, 176, 0.9);
  background: rgba(10, 14, 22, 0.92);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  text-align: center;
}

#round-title {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.05;
}

#round-summary {
  margin: 0 0 18px;
  color: #d9e2f0;
  font-size: clamp(15px, 2.6vw, 19px);
}

#hands-warning {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 196, 0, 0.9);
  background: rgba(0, 0, 0, 1);
  color: #ffd54f;
  font-weight: 700;
  letter-spacing: 0.2px;
  z-index: 6;
  display: none;
  pointer-events: none;
}

#debug-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  min-width: 130px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(127, 140, 170, 0.85);
  background: rgba(0, 0, 0, 0.58);
  color: #dce4ef;
  font-size: 13px;
  line-height: 1.4;
  z-index: 5;
  pointer-events: auto;
}

#debug-panel strong {
  color: #ffffff;
}

.debug-toggle {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

#start-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid #657188;
  background: #1f2735;
  color: #e7ecf3;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
}

#start-btn:hover {
  background: #2a3447;
}

.cursor-label {
  position: fixed;
  transform: translate(-50%, -50%);
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
  z-index: 4;
}

.cursor-label.left {
  background: rgba(239, 83, 80, 0.85);
}

.cursor-label.right {
  background: rgba(0, 102, 255, 0.85);
}
