﻿:root { --bg:#050505; --label:#ffe94d; --label-text:#111; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: #fff; font-family: Arial, sans-serif; display: flex; justify-content: center; transition: opacity .14s ease; }
body.is-rotating { opacity: 0; }
.scene { position: relative; width: min(100vw, 1920px); aspect-ratio: 1920 / 4320; overflow: hidden; background: #000; }

.base,
.overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.base { z-index: 0; }
.overlay { z-index: 7; opacity: 0; transition: opacity .2s ease; pointer-events: none; }

.hotspot { position: absolute; z-index: 6; background: transparent; border: 0; padding: 0; cursor: pointer; border-radius: var(--rr, 42% 58% 49% 51% / 58% 44% 56% 42%); overflow: visible; }
.hotspot:focus-visible { outline: 2px dashed #fff; outline-offset: 2px; }

@keyframes hotspotPulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0), 0 0 0 0 rgba(255,255,255,0), inset 0 0 0 0 rgba(255,255,255,0), inset 0 0 0 0 rgba(255,255,255,0); }
  55% { box-shadow: 0 0 24px 9px rgba(255,255,255,.28), 0 0 54px 16px rgba(255,255,255,.18), inset 0 0 24px 9px rgba(255,255,255,.28), inset 0 0 54px 16px rgba(255,255,255,.18); }
  100% { box-shadow: 0 0 8px 3px rgba(255,255,255,.10), 0 0 18px 6px rgba(255,255,255,.06), inset 0 0 8px 3px rgba(255,255,255,.10), inset 0 0 18px 6px rgba(255,255,255,.06); }
}
.zone { --pulse-delay: 0s; }
.zone:nth-of-type(1) { --pulse-delay: -0.15s; }
.zone:nth-of-type(2) { --pulse-delay: -0.65s; }
.zone:nth-of-type(3) { --pulse-delay: -1.05s; }
.zone:nth-of-type(4) { --pulse-delay: -1.55s; }
.zone:nth-of-type(5) { --pulse-delay: -0.35s; }
.zone:nth-of-type(6) { --pulse-delay: -1.35s; }
.zone:nth-of-type(7) { --pulse-delay: -0.9s; }
.zone:not(.active) .hotspot { animation: hotspotPulse 3.4s cubic-bezier(.22,.61,.36,1) infinite, hotspotMorph 5.8s ease-in-out infinite alternate; animation-delay: var(--pulse-delay), calc(var(--pulse-delay) * .5); }
.zone:not(.active) .hotspot::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.20) 0%, rgba(255,255,255,.10) 45%, rgba(255,255,255,0) 85%); mix-blend-mode: screen; animation: hotspotInnerFog 3.4s cubic-bezier(.22,.61,.36,1) infinite; animation-delay: var(--pulse-delay); pointer-events: none; }
@keyframes hotspotInnerFog { 0%,100% { opacity: .12; } 55% { opacity: .62; } }

.tag {
  position: absolute;
  z-index: 9;
  padding: .35rem .65rem;
  background: var(--label);
  color: var(--label-text);
  border-radius: 999px;
  font-size: clamp(12px, 1.2vw, 22px);
  font-weight: 700;
  letter-spacing: .04em;
  opacity: 0;
  transform: translate(-50%, -95%);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

.zone.active .overlay { opacity: 1; }
.zone.active .hotspot {
  animation: none;
  background: rgba(255,255,255,.72);
  border-radius: 51px;
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  box-shadow: 0 0 0 6px rgba(255,255,255,.24);
}
.zone.active .hotspot::before {
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: 63px;
  background: rgba(255,255,255,.55);
  filter: blur(16px);
  opacity: .7;
  z-index: -1;
  pointer-events: none;
}
.zone.active .tag { opacity: 1; transform: translate(-50%, -110%); }

@keyframes hotspotMorph {
  0% { border-radius: var(--rr-a, 42% 58% 49% 51% / 58% 44% 56% 42%); transform: translate(0,0) rotate(0deg); }
  50% { border-radius: var(--rr-b, 62% 38% 68% 32% / 34% 66% 30% 70%); transform: translate(1.2%, -.9%) rotate(-1.4deg); }
  100% { border-radius: var(--rr-c, 35% 65% 31% 69% / 72% 28% 69% 31%); transform: translate(-1.0%, .9%) rotate(1.5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .zone:not(.active) .hotspot { animation: none; }
}

@media (max-width: 900px) {
  .zone:not(.active) .hotspot { animation-duration: 4.6s; }
  @keyframes hotspotPulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0), 0 0 0 0 rgba(255,255,255,0), inset 0 0 0 0 rgba(255,255,255,0), inset 0 0 0 0 rgba(255,255,255,0); }
    55% { box-shadow: 0 0 16px 6px rgba(255,255,255,.20), 0 0 34px 10px rgba(255,255,255,.12), inset 0 0 16px 6px rgba(255,255,255,.20), inset 0 0 34px 10px rgba(255,255,255,.12); }
    100% { box-shadow: 0 0 8px 3px rgba(255,255,255,.10), 0 0 18px 6px rgba(255,255,255,.06), inset 0 0 8px 3px rgba(255,255,255,.10), inset 0 0 18px 6px rgba(255,255,255,.06); }
  }
  .zone.active .hotspot { box-shadow: 0 0 0 4px rgba(255,255,255,.20); }
  .zone.active .hotspot::before { inset: -10px; border-radius: 57px; filter: blur(11px); opacity: .55; }
}

.modal,
.music-modal,
.archive-modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; }
.modal { background: rgba(0,0,0,.65); z-index: 100; padding: 20px; }
.music-modal { background: rgba(0,0,0,.72); z-index: 110; padding: 20px; }
.archive-modal { background: rgba(0,0,0,.8); backdrop-filter: blur(2px); z-index: 120; padding: 16px; }
.modal.open,
.music-modal.open,
.archive-modal.open { display: flex; }

.modal-card { position: relative; width: min(560px, 100%); background: #111; border: 1px solid #444; border-radius: 14px; padding: 20px; }
.modal-card h2 { margin-top: 0; }
.close-btn { margin-top: 12px; border: 0; border-radius: 8px; background: #ffe94d; color: #000; padding: 10px 14px; font-weight: 700; cursor: pointer; }
.modal-card .close-icon-btn {
  position: absolute;
  right: 12px;
  top: 10px;
  margin-top: 0;
  border: 2px solid rgba(255,233,77,.9);
  background: rgba(0,0,0,.82);
  color: #ffe94d;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(0,0,0,.35);
}
.modal-card .close-icon-btn:hover { background: rgba(255,233,77,.12); }
.modal-card .close-icon-btn svg { width: 18px; height: 18px; display: block; }

.music-card { width: min(760px, 100%); max-height: 86vh; overflow: auto; background: #101010; border: 1px solid #404040; border-radius: 14px; padding: 18px; }
.music-card h2 { margin: 0 0 12px; }
.music-list { display: grid; gap: 12px; }
.music-track { border: 1px solid #2f2f2f; border-radius: 10px; background: #0a0a0a; padding: 10px; }
.music-track-title { display:block; font-weight:700; margin-bottom: 8px; font-size: 14px; color: #f5f5f5; }
.music-track audio { width: 100%; accent-color: #ffe94d; }

.music-card { position: relative; }
.music-card .close-icon-btn {
  position: absolute;
  right: 12px;
  top: 10px;
  margin-top: 0;
  border: 2px solid rgba(255,233,77,.9);
  background: rgba(0,0,0,.82);
  color: #ffe94d;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(0,0,0,.35);
}
.music-card .close-icon-btn:hover { background: rgba(255,233,77,.12); }
.music-card .close-icon-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Keep browser-native media controls for reliability and visual consistency. */

.archive-modal-card { position: relative; width: min(980px, 84vw); height: min(78vh, 760px); border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,.18); background: #000; box-shadow: 0 24px 80px rgba(0,0,0,.6); }
.archive-frame { width: 100%; height: 100%; border: 0; display: block; background: #000; }

@media (orientation: landscape) {
  .scene {
    width: min(92vw, 720px);
    height: auto;
    aspect-ratio: 1920 / 4320;
  }
  .base,
  .overlay {
    object-fit: cover;
    object-position: 50% 50%;
  }
}
