/* ==========================================================
   CSS SLIDE 1 (DETEKTIF MATEMATIKA: SPLDV)
   Misteri Nota Koperasi Sekolah - SMP Negeri 1 Sampang
   Guru: Suhardi, S.Pd.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@600;700&family=Poppins:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #050b14;
  font-family: 'Poppins', sans-serif;
}

/* Wrapper 16:9 responsive container */
.slide-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  overflow: hidden;
}

/* Kontainer 16:9 yang menjaga proporsi gambar tetap sempurna di semua ukuran layar/laptop/IFP */
.slide-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
}

/* Gambar Visual Master Slide 1 */
.slide-backdrop {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  animation: subtleZoomIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes subtleZoomIn {
  from {
    transform: scale(1.02);
    opacity: 0.8;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ==========================================================
   HOTSPOT TOMBOL "MULAI INVESTIGASI"
   ========================================================== */
.hotspot-investigasi {
  position: absolute;
  left: 49.2%;
  top: 87.5%;
  transform: translate(-50%, -50%);
  width: clamp(230px, 32%, 620px);
  height: clamp(60px, 14%, 150px);
  border-radius: 9999px;
  cursor: pointer;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Efek Cincin Radar Denyut Neon Emas/Kuning */
.pulse-radar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  border: 3px solid rgba(251, 191, 36, 0.85);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.7), inset 0 0 15px rgba(245, 158, 11, 0.4);
  animation: radarPulse 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  pointer-events: none;
}

.pulse-radar-ring-2 {
  position: absolute;
  inset: -14px;
  border-radius: 9999px;
  border: 2px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 35px rgba(217, 119, 6, 0.5);
  animation: radarPulse 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite 0.7s;
  pointer-events: none;
}

@keyframes radarPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.14);
    opacity: 0;
  }
}

/* Surface Touch Feedback */
.hotspot-surface {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.01);
  transition: all 0.2s ease;
}

.hotspot-investigasi:hover {
  transform: translate(-50%, -50%) scale(1.04);
}

.hotspot-investigasi:hover .hotspot-surface {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.6);
}

.hotspot-investigasi:active {
  transform: translate(-50%, -50%) scale(0.94);
}

/* Badge Label Helper di Bawah Tombol */
.touch-hint {
  position: absolute;
  bottom: 4px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(251, 191, 36, 0.6);
  color: #fef3c7;
  padding: 3px 12px;
  border-radius: 9999px;
  font-size: clamp(0.65rem, 0.9vw, 0.8rem);
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  pointer-events: none;
  animation: bounceHint 2s infinite ease-in-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

@keyframes bounceHint {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ==========================================================
   HOTSPOT INTERAKTIF NOTA KOPERASI
   ========================================================== */
.hotspot-nota {
  position: absolute;
  left: 67.1%;
  top: 67.6%;
  transform: translate(-50%, -50%);
  width: clamp(100px, 15.5%, 300px);
  height: clamp(140px, 32%, 350px);
  border-radius: 12px;
  cursor: pointer;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

/* Shimmer Highlight di atas Nota (Halus dan tidak mengganggu saat diam) */
.nota-shimmer {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 2px dashed rgba(56, 189, 248, 0);
  background: rgba(56, 189, 248, 0);
  opacity: 0;
  transition: all 0.3s ease;
}

.hotspot-nota:hover .nota-shimmer,
.hotspot-nota.active-clue .nota-shimmer {
  border-color: rgba(56, 189, 248, 0.8);
  background: rgba(56, 189, 248, 0.12);
  opacity: 1;
}

/* Balon Petunjuk Misteri Nota (Speech Bubble) */
.bubble-clue {
  position: absolute;
  top: -95px;
  left: 50%;
  transform: translateX(-50%) translateY(10px) scale(0.9);
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 2px solid #38bdf8;
  color: #f1f5f9;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: clamp(0.72rem, 1vw, 0.85rem);
  font-weight: 600;
  width: clamp(220px, 25vw, 320px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(56, 189, 248, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  z-index: 45;
}

.bubble-clue::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: #38bdf8 transparent transparent;
  display: block;
  width: 0;
}

.hotspot-nota:hover .bubble-clue,
.hotspot-nota.active-clue .bubble-clue {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}

/* ==========================================================
   TOMBOL KONTROL SUDUT (FULLSCREEN & REPLAY)
   ========================================================== */
.control-btn {
  position: absolute;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  z-index: 40;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.control-btn:hover {
  background: #0284c7;
  transform: scale(1.05);
  border-color: rgba(56, 189, 248, 0.6);
}

.control-btn:active {
  transform: scale(0.95);
}

.btn-fullscreen-top {
  top: 16px;
  right: 16px;
}

.btn-sound-top {
  top: 16px;
  left: 16px;
}

.btn-replay-bottom {
  bottom: 16px;
  left: 16px;
}

/* Layar Sentuh / Tablet Optimization */
@media (max-width: 768px) {
  .control-btn span {
    display: none;
  }
  .control-btn {
    padding: 8px;
    border-radius: 50%;
  }
}
