/* ==========================================================================
   PDIKM Landing — Desktop / Public (>= 992px)
   Pola tetap: peta interaktif + pin hotspot + leaderboard + modal
   ========================================================================== */

:root {
  --pdikm-bg: #0a0e17;
  --pdikm-surface: rgba(15, 23, 42, 0.72);
  --pdikm-glass: rgba(255, 255, 255, 0.06);
  --pdikm-border: rgba(255, 255, 255, 0.12);
  --pdikm-accent: #ff4757;
  --pdikm-accent-soft: rgba(255, 71, 87, 0.35);
  --pdikm-gold: #ffc857;
  --pdikm-mint: #2ee59d;
  --pdikm-text: #f8fafc;
  --pdikm-muted: rgba(248, 250, 252, 0.65);
  --pdikm-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --pdikm-radius: 20px;
  --pdikm-font: var(--pdikm-font-body);
}

@media (min-width: 992px) {
  body.pdikm-landing-body {
    background: var(--pdikm-bg);
    font-family: var(--pdikm-font);
    overflow-x: hidden;
  }

  .mobile-game-wrapper {
    display: none !important;
  }

  .pdikm-desktop {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
  }

  /* Ambient background glow */
  .pdikm-desktop::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
      radial-gradient(ellipse 80% 50% at 20% 10%, rgba(255, 71, 87, 0.12), transparent 55%),
      radial-gradient(ellipse 60% 40% at 85% 80%, rgba(46, 229, 157, 0.08), transparent 50%);
    pointer-events: none;
    z-index: 0;
  }

  .pdikm-map-stage {
    position: relative;
    width: 100%;
    z-index: 1;
  }

  .container-map {
    position: relative;
    width: 100%;
  }

  .responsive-map-img {
    width: 100%;
    display: block;
    vertical-align: top;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
  }

  .pdikm-map-vignette {
    position: absolute;
    inset: 0;
    background:
      linear-gradient(180deg, rgba(10, 14, 23, 0.55) 0%, transparent 22%, transparent 78%, rgba(10, 14, 23, 0.65) 100%),
      linear-gradient(90deg, rgba(10, 14, 23, 0.35) 0%, transparent 18%, transparent 82%, rgba(10, 14, 23, 0.5) 100%);
    pointer-events: none;
    z-index: 2;
  }

  /* Hero title */
  .pdikm-hero {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    text-align: center;
    padding: 18px 36px;
    line-height: normal;
    background: var(--pdikm-surface);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid var(--pdikm-border);
    border-radius: 999px;
    box-shadow: var(--pdikm-shadow);
    animation: pdikmHeroIn 0.8s ease-out both;
  }

  .pdikm-hero h1 {
    margin: 0;
    font-family: var(--pdikm-font-display);
    font-size: clamp(1.1rem, 2vw, 1.65rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(135deg, #fff 0%, var(--pdikm-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .pdikm-hero p {
    margin: 4px 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.08em;
    color: var(--pdikm-muted);
  }

  @keyframes pdikmHeroIn {
    from {
      opacity: 0;
      transform: translateX(-50%) translateY(-16px);
    }
    to {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
  }

  /* Desktop quick actions */
  .pdikm-actions {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 14px;
    background: var(--pdikm-surface);
    backdrop-filter: blur(14px);
    border: 1px solid var(--pdikm-border);
    border-radius: 999px;
    box-shadow: var(--pdikm-shadow);
    animation: pdikmHeroIn 0.9s 0.15s ease-out both;
  }

  .pdikm-action-btn {
    border: none;
    cursor: pointer;
    padding: 10px 18px;
    border-radius: 999px;
    font-family: var(--pdikm-font);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    color: #fff;
    background: var(--pdikm-glass);
    border: 1px solid var(--pdikm-border);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  }

  .pdikm-action-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  }

  .pdikm-action-btn--primary {
    background: linear-gradient(135deg, var(--pdikm-accent), #ff6b81);
    border-color: transparent;
    box-shadow: 0 8px 28px var(--pdikm-accent-soft);
  }

  .pdikm-action-btn--gold {
    background: linear-gradient(135deg, #e6a800, var(--pdikm-gold));
    color: #1a1200;
    border-color: transparent;
  }

  /* Play: sembunyikan di desktop browser; tampil hanya saat PWA (standalone) */
  .pdikm-play-pwa-only {
    display: none !important;
  }

  /* Map pins */
  .pin-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
  }

  .map-pin {
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: pdikmPinIn 0.6s ease-out both;
  }

  .map-pin:hover {
    transform: scale(1.08);
  }

  .map-pin:focus-visible {
    outline: 2px solid var(--pdikm-gold);
    outline-offset: 4px;
  }

  @keyframes pdikmPinIn {
    from {
      opacity: 0;
      transform: translateY(12px) scale(0.85);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .pin-glow {
    fill: url(#pinGlowGradient);
    opacity: 0.85;
    filter: blur(2px);
  }

  .pin-pulse {
    fill: var(--pdikm-accent);
    opacity: 0.45;
    animation: pdikmPulse 2.4s ease-out infinite;
    pointer-events: none;
  }

  @keyframes pdikmPulse {
    0% {
      r: 12;
      opacity: 0.55;
    }
    100% {
      r: 42;
      opacity: 0;
    }
  }

  .pin-icon-img {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
    transition: filter 0.25s ease;
    overflow: visible;
  }

  .pin-icon-fo {
    width: 50px;
    height: 50px;
    margin: 0;
    padding: 0;
    line-height: 0;
  }

  .pin-icon-fo img {
    display: block;
    width: 50px;
    height: 50px;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
  }

  .map-pin:hover .pin-icon-img {
    filter: drop-shadow(0 6px 18px rgba(255, 200, 87, 0.55));
  }

  .pin-label {
    font-family: var(--pdikm-font);
    font-size: 11px;
    font-weight: 700;
    fill: #fff;
    letter-spacing: 0.02em;
    paint-order: stroke fill;
    stroke: rgba(0, 0, 0, 0.75);
    stroke-width: 3px;
  }

  /* Leaderboard panel → see assets/css/leaderboard/base.css */
}

@keyframes pdikmRowIn {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Modal hotspot — modern glass card + media play */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10080;
  padding: 0;
}

.pdikm-hotspot-modal.is-open {
  display: flex !important;
}

.pdikm-modal.modal-overlay {
  background: transparent;
}

.pdikm-hotspot-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 20, 0.72);
  backdrop-filter: blur(12px) saturate(1.2);
  animation: pdikmModalBg 0.35s ease;
}

.pdikm-hotspot-modal__card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 80vw;
  height: 80vh;
  max-width: 80vw;
  max-height: 80vh;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
  border: none;
  box-shadow:
    0 12px 40px rgba(15, 23, 42, 0.12),
    0 40px 100px rgba(0, 0, 0, 0.5);
  animation: pdikmModalIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center center;
}

.pdikm-hotspot-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.pdikm-hotspot-modal__close:hover {
  transform: scale(1.06);
  background: rgba(15, 23, 42, 0.65);
}

.pdikm-hotspot-modal__media {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #0f172a;
}

.pdikm-hotspot-modal__media-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.pdikm-hotspot-modal.is-playing .pdikm-hotspot-modal__play {
  display: none !important;
}

.pdikm-hotspot-modal.is-playing .pdikm-hotspot-modal__media-frame {
  display: block !important;
  visibility: visible !important;
  z-index: 5;
}

.pdikm-hotspot-modal.is-playing .pdikm-hotspot-modal__media-gradient {
  opacity: 0;
  pointer-events: none;
}

.pdikm-hotspot-modal.is-youtube-360 .pdikm-hotspot-modal__media-gradient {
  opacity: 0;
}

.pdikm-hotspot-modal__media-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.05) 0%,
    rgba(15, 23, 42, 0.15) 45%,
    rgba(15, 23, 42, 0.72) 100%
  );
  pointer-events: none;
}

.pdikm-hotspot-modal__media-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.pdikm-hotspot-modal__media-frame iframe,
.pdikm-hotspot-modal__youtube,
.pdikm-hotspot-modal__youtube iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.pdikm-hotspot-modal__youtube-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
}

.pdikm-hotspot-modal.is-youtube-360 .pdikm-hotspot-modal__youtube iframe {
  pointer-events: none;
}

.pdikm-hotspot-modal__youtube-drag {
  position: absolute;
  inset: 0 0 48px 0;
  z-index: 4;
  cursor: grab;
  touch-action: none;
  background: transparent;
}

.pdikm-hotspot-modal__youtube-drag.is-dragging {
  cursor: grabbing;
}

.pdikm-hotspot-modal__youtube-hint {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 52px;
  z-index: 5;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  text-align: center;
  font-size: 0.78rem;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.72);
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.pdikm-hotspot-modal__youtube-unmute {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(255, 71, 87, 0.92);
  box-shadow: 0 8px 24px rgba(255, 71, 87, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.pdikm-hotspot-modal__youtube-unmute:hover {
  transform: scale(1.04);
  background: rgba(255, 71, 87, 1);
}

.pdikm-hotspot-modal__youtube-unmute[hidden] {
  display: none !important;
}

.pdikm-hotspot-modal__seek {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 12px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.88) 100%);
  pointer-events: auto;
}

.pdikm-hotspot-modal__seek-time {
  flex: 0 0 auto;
  min-width: 2.5em;
  color: #f8fafc;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.pdikm-hotspot-modal__seek-time:last-child {
  text-align: right;
}

.pdikm-hotspot-modal__seek-range {
  flex: 1 1 auto;
  width: 100%;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #ff4757;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

.pdikm-hotspot-modal__seek-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.35);
}

.pdikm-hotspot-modal__seek-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: #ff4757;
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.28);
}

.pdikm-hotspot-modal__seek-range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.35);
}

.pdikm-hotspot-modal__seek-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: #ff4757;
}

.pdikm-hotspot-modal__aframe-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

.pdikm-hotspot-modal__aframe,
.pdikm-hotspot-modal__aframe a-scene {
  width: 100%;
  height: 100%;
}

.pdikm-hotspot-modal.is-file-360 .pdikm-hotspot-modal__aframe canvas {
  cursor: grab;
  touch-action: none;
}

.pdikm-hotspot-modal.is-file-360 .pdikm-hotspot-modal__aframe canvas:active {
  cursor: grabbing;
}

.pdikm-hotspot-modal.is-file-360 .pdikm-hotspot-modal__media-gradient {
  opacity: 0;
  pointer-events: none;
}

.pdikm-hotspot-modal__loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #e2e8f0;
  font-size: 0.95rem;
  background: #0f172a;
}

.pdikm-hotspot-modal__error {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1.25rem;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.35);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: center;
}

.pdikm-hotspot-modal__drive {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.pdikm-hotspot-modal__media-frame video,
.pdikm-hotspot-modal__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.pdikm-hotspot-modal__panorama,
.pdikm-hotspot-modal__media-frame .pnlm-container {
  width: 100%;
  height: 100%;
}

.pdikm-hotspot-modal__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--pdikm-accent, #ff4757), #ff6b81);
  box-shadow: 0 12px 40px rgba(255, 71, 87, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pdikm-hotspot-modal__play:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 16px 48px rgba(255, 71, 87, 0.55);
}

.pdikm-hotspot-modal__play-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  animation: pdikmPlayPulse 2s ease-out infinite;
}

.pdikm-hotspot-modal__play-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 3px;
}

.pdikm-hotspot-modal__body {
  flex: 0 0 auto;
  padding: 20px 24px 24px;
}

.pdikm-hotspot-modal__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  margin-bottom: 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pdikm-accent, #ff4757);
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.18);
}

.pdikm-hotspot-modal__title {
  font-family: var(--pdikm-font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
  line-height: 1.25;
}

.pdikm-hotspot-modal__desc {
  margin: 0;
  color: #64748b;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.65;
  max-height: 6.6em;
  overflow-y: auto;
}

.pdikm-hotspot-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pdikm-hotspot-modal__btn {
  flex: 1 1 auto;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border: none;
  border-radius: 14px;
  font-family: var(--pdikm-font);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pdikm-hotspot-modal__btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--pdikm-accent, #ff4757), #ff6b81);
  box-shadow: 0 8px 24px rgba(255, 71, 87, 0.28);
}

.pdikm-hotspot-modal__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 71, 87, 0.38);
}

.pdikm-hotspot-modal__btn--ghost {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.pdikm-hotspot-modal__btn--ghost:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

body.pdikm-modal-open {
  overflow: hidden;
}

/* Legacy modal selectors (backward compat) */
.pdikm-modal .modal-content {
  background: transparent;
  border-radius: 24px;
  overflow: visible;
  box-shadow: none;
  max-width: none;
}

.pdikm-modal .modal-header {
  display: none;
}

.pdikm-modal .modal-body {
  padding: 0;
}

.pdikm-modal .modal-body h4 {
  display: none;
}

.pdikm-modal .modal-body p {
  display: none;
}

.pdikm-modal .modal-close-btn {
  display: none;
}

@keyframes pdikmPlayPulse {
  0% {
    transform: scale(0.92);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.2);
    opacity: 0;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

@keyframes pdikmModalBg {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pdikmModalIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(24px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (min-width: 992px) and (display-mode: standalone) {
  .pdikm-play-pwa-only {
    display: inline-flex !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .responsive-map-img,
  .map-pin,
  .pdikm-hero,
  .pdikm-actions,
  .leaderboard-wrapper,
  .pin-pulse {
    animation: none !important;
    transition: none !important;
  }
}
