* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0a0a0f;
  color: #eee;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}
header { text-align: center; margin-bottom: 16px; }
header h1 { font-size: 28px; }
header p { color: #888; font-size: 14px; margin-top: 4px; }

main {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
}

.stage {
  position: relative;
  width: 720px;
  max-width: 100%;
  aspect-ratio: 4/3;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
#video, #overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

/* Video meme overlays — full stage, di atas webcam */
.meme-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.4s;
  opacity: 1;
}
.meme-video.hidden { opacity: 0; pointer-events: none; display: none; }

#status-banner {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.6);
  color: #f9c74f;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 20;
}

.hud {
  background: #15151c;
  border-radius: 12px;
  padding: 16px;
  width: 300px;
  font-size: 14px;
  line-height: 1.5;
}
#gesture-label {
  font-size: 16px;
  color: #90be6d;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
}
.legend-item {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
  padding: 8px;
  background: #1e1e26;
  border-radius: 8px;
}
.legend-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #444;
}
.legend-item span { color: #aaa; font-size: 12px; }
