/* OtogeGarage 3D Interactive Controller Hero Styles (Light / White Theme) */
#og-3d-hero {
  position: relative;
  width: 100%;
  min-height: 640px;
  height: min(760px, 84vh);
  background: radial-gradient(circle at 50% 42%, #ffffff 0%, #f5f7fa 65%, #e9eef5 100%);
  border-radius: 20px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1d24;
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.09), inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
}

#og-3d-hero *,
#og-3d-hero *::before,
#og-3d-hero *::after {
  box-sizing: border-box;
}

#og-3d-hero canvas.og-hero-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  outline: none;
  cursor: grab;
  touch-action: none;
}

#og-3d-hero canvas.og-hero-canvas:active {
  cursor: grabbing;
}

#og-3d-hero[data-playing="true"] canvas.og-hero-canvas {
  cursor: pointer;
}

/* Top HUD Bar */
.og-hero-topbar {
  position: absolute;
  top: 20px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
  z-index: 10;
}

.og-hero-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(26, 29, 36, 0.1);
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  pointer-events: auto;
}

.og-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #e65c00;
}

.og-hero-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1a1d24;
}

.og-hero-subtitle {
  margin: 0;
  font-size: 12.5px;
  color: rgba(26, 29, 36, 0.68);
}

/* Game Score & Combo HUD (hidden via CSS; DOM elements remain for JS loop) */
#og-3d-hero .og-hero-scoreboard {
  display: none !important;
}

.og-hero-scoreboard {
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(26, 29, 36, 0.1);
  padding: 10px 18px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

#og-3d-hero[data-playing="true"] .og-hero-scoreboard,
#og-3d-hero[data-finished="true"] .og-hero-scoreboard {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Standalone Round Mute Toggle Button (Top-Right) */
.og-mute-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 16;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.88);
  color: #1a1d24;
  border: 1px solid rgba(26, 29, 36, 0.14);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.og-mute-btn:hover {
  background: #ffffff;
  border-color: #0284c7;
  transform: translateY(-1px);
}

.og-mute-btn:active {
  transform: translateY(0) scale(0.96);
}

.og-stat-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.og-stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(26, 29, 36, 0.56);
}

.og-stat-value {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #1a1d24;
  line-height: 1.15;
}

.og-stat-value.og-combo-val {
  color: #e65c00;
}

.og-stat-value.og-judge-val {
  min-width: 82px;
  text-align: right;
  font-size: 15px;
  letter-spacing: 0.06em;
}

.og-game-stop-btn {
  pointer-events: auto;
  background: rgba(26, 29, 36, 0.06);
  color: #1a1d24;
  border: 1px solid rgba(26, 29, 36, 0.15);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.og-game-stop-btn:hover {
  background: rgba(255, 61, 138, 0.14);
  border-color: #FF3D8A;
  color: #c91860;
}

/* Progress Bar inside Scoreboard */
.og-progress-track {
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 3px;
  background: rgba(26, 29, 36, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.og-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FF7A1A, #FF3D8A, #18B7FF);
  transition: width 0.1s linear;
}

/* Hotspot Info Card */
.og-hotspot-card {
  position: absolute;
  left: 24px;
  bottom: 84px;
  max-width: 310px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(26, 29, 36, 0.14);
  border-radius: 14px;
  padding: 14px 16px;
  z-index: 12;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.og-hotspot-card[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.og-hotspot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.og-hotspot-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0284c7;
  background: rgba(2, 132, 199, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
}

.og-hotspot-close {
  background: none;
  border: none;
  color: rgba(26, 29, 36, 0.55);
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
}

.og-hotspot-close:hover {
  color: #1a1d24;
}

.og-hotspot-title {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 700;
  color: #1a1d24;
}

.og-hotspot-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(26, 29, 36, 0.78);
}

/* Bottom Controls & Start Button */
.og-hero-bottombar {
  position: absolute;
  bottom: 20px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  pointer-events: none;
  z-index: 10;
}

.og-hero-hints {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  pointer-events: auto;
}

.og-hint-chip {
  display: none;
}

.og-view-btn {
  background: rgba(255, 255, 255, 0.88);
  color: #1a1d24;
  border: 1px solid rgba(26, 29, 36, 0.14);
  padding: 7px 13px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.og-view-btn:hover {
  background: #ffffff;
  border-color: #0284c7;
  color: #0284c7;
  transform: translateY(-1px);
}

/* Front-view Start Mini-Game CTA (Compact bottom-left pill) */
.og-start-cta-wrap {
  position: absolute;
  left: 24px;
  bottom: 20px;
  transform: translateY(14px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.2, 0.8, 0.3, 1), transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
  z-index: 15;
}

.og-start-cta-wrap[data-front="true"] {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#og-3d-hero[data-playing="true"] .og-start-cta-wrap {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(14px) scale(0.92) !important;
}

.og-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #FF7A1A 0%, #FF3D8A 100%);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(255, 61, 138, 0.34), 0 0 0 2px rgba(255, 255, 255, 0.85);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.18s ease;
}

.og-start-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px rgba(255, 61, 138, 0.48), 0 0 0 3px #ffffff;
}

.og-start-btn:active {
  transform: translateY(0) scale(0.98);
}

.og-start-icon {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 7px solid #ffffff;
}

/* Bottom-left Stop Button (replaces Start button while game is running) */
.og-stop-btn {
  position: absolute;
  left: 24px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #1a1d24;
  border: 1px solid rgba(26, 29, 36, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(14px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.2, 0.8, 0.3, 1), transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1), border-color 0.18s ease, box-shadow 0.18s ease;
  z-index: 15;
}

#og-3d-hero[data-playing="true"] .og-stop-btn {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#og-3d-hero[data-playing="true"] .og-stop-btn:hover {
  border-color: #1a1d24;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}

/* Floating Judgement Feedback Popup */
.og-floating-judge {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 20;
  text-align: center;
  opacity: 0;
}

.og-floating-judge.og-pop {
  animation: og-judge-pop 0.52s cubic-bezier(0.18, 0.88, 0.32, 1.15) forwards;
}

.og-floating-judge-text {
  display: block;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.98), 0 0 6px rgba(255, 255, 255, 0.95), 0 2px 6px rgba(15, 23, 42, 0.22);
}

.og-floating-judge-sub {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #0f172a;
  margin-top: 2px;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.98), 0 0 4px rgba(255, 255, 255, 0.95);
}

@keyframes og-judge-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.7);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -52%) scale(1.08);
  }
  75% {
    opacity: 1;
    transform: translate(-50%, -56%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -66%) scale(0.92);
  }
}

@media (max-width: 720px) {
  #og-3d-hero {
    min-height: 540px;
    height: 75vh;
    border-radius: 14px;
  }
  .og-hero-topbar {
    top: 12px;
    left: 12px;
    right: 60px;
    flex-direction: column;
    align-items: flex-start;
  }
  .og-mute-btn {
    top: 12px;
    right: 12px;
  }
  .og-hero-scoreboard {
    justify-content: space-between;
  }
  .og-hero-bottombar {
    bottom: 12px;
    left: 12px;
    right: 12px;
  }
  .og-hint-chip.og-hide-mobile {
    display: none;
  }
  .og-start-cta-wrap,
  .og-stop-btn {
    left: 12px;
    bottom: 12px;
  }
}
