.webcam-container {
  position: fixed;
  inset: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: #000;
  overflow: hidden;
}

.fullscreen-prompt {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.85);
}

.fullscreen-prompt button {
  padding: 20px 48px;
  border: none;
  border-radius: 12px;
  font-size: 32px;
  font-weight: 700;
  font-family: system-ui, sans-serif;
  cursor: pointer;
  background: #00ffcc;
  color: #000;
}

.fullscreen-prompt button:hover {
  background: #33ffd6;
}

.fullscreen-prompt button.skip {
  background: transparent;
  color: #888;
  font-size: 18px;
  padding: 8px 24px;
}

.fullscreen-prompt button.skip:hover {
  color: #ccc;
}

.webcam-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.pose-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.ar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  pointer-events: none;
  z-index: 150;
}

.judgment-glow {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  animation: glow-flash 0.5s ease-out forwards;
  background: radial-gradient(
    ellipse at 50% 50%,
    transparent 30%,
    var(--glow-color) 100%
  );
}

@keyframes glow-flash {
  0% { opacity: 0.7; }
  100% { opacity: 0; }
}

.difficulty-selector {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 40;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 280px;
  justify-content: flex-end;
}

.diff-btn {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #ccc;
  font-size: 13px;
  font-family: system-ui, sans-serif;
  cursor: pointer;
}

.diff-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.diff-btn-active {
  background: rgba(217, 70, 239, 0.4);
  border-color: #d946ef;
  color: white;
}

.detected-step {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 40;
  font-family: system-ui, sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #00ffcc;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 16px;
  border-radius: 8px;
  pointer-events: none;
}

.framing-line {
  position: fixed;
  bottom: 15%;
  left: 0;
  right: 0;
  height: 6px;
  background: #ff2222;
  box-shadow: 0 0 20px #ff0000, 0 0 40px #ff000080;
  z-index: 200;
  pointer-events: none;
}

.debug-status {
  position: fixed;
  bottom: calc(15% + 24px);
  left: 0;
  right: 0;
  z-index: 201;
  display: flex;
  justify-content: center;
  color: #fff;
  font-family: var(--font-family-display, system-ui, sans-serif);
  font-size: 44px;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 0 30px rgba(217, 70, 239, 0.8), 0 0 60px rgba(217, 70, 239, 0.4), 0 2px 8px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  padding: 0 2rem;
}

.gesture-label {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 96px;
  font-weight: 900;
  font-family: system-ui, sans-serif;
  color: #00ffcc;
  text-shadow: 0 0 30px #00ffcc, 0 0 60px #00ffcc80;
  z-index: 50;
  pointer-events: none;
}

.copy-log-btn {
  position: fixed;
  top: 20px;
  right: 70px;
  z-index: 100;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.7);
  color: #00ffcc;
  border: 1px solid #00ffcc;
  border-radius: 6px;
  cursor: pointer;
  font-family: system-ui, sans-serif;
  font-size: 14px;
}

.status {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 24px;
  z-index: 10;
  font-family: system-ui, sans-serif;
}

.status.error {
  color: #ff4444;
}

.transport-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  font-family: system-ui, sans-serif;
  transition: right 0.2s ease;
}

.transport-bar.settings-open {
  right: 320px;
}

.transport-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 4px;
  color: white;
  font-size: 14px;
  padding: 6px 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.transport-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.transport-btn.play-pause {
  font-size: 16px;
  padding: 6px 12px;
}

.transport-scrub {
  flex: 1;
  min-width: 0;
  height: 6px;
  cursor: pointer;
  accent-color: #0ff;
}

.transport-time {
  color: #aaa;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

/* YouTube attribution popup */
.yt-attr-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.yt-attr-popup {
  background: #1a1a2e;
  border: 1px solid rgba(217, 70, 239, 0.4);
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.yt-attr-popup p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  line-height: 1.5;
}

.yt-attr-close {
  padding: 8px 24px;
  border: 1px solid #d946ef;
  border-radius: 6px;
  background: rgba(217, 70, 239, 0.2);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.yt-attr-close:hover {
  background: rgba(217, 70, 239, 0.4);
}
