/* ==========================================================
   RE-REGISTER LOCAL CARTOON BANGERS CUSTOM TRUETYPE FONTS
   ========================================================== */
@font-face {
  font-family: 'Bangers';
  src: url('/public/fonts/Bangers-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  width: 100vw;
  height: 100vh;
  width: 100%;
  height: 100%;
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: #000000;
  color: #ffffff;
  overflow: hidden !important;
  position: relative;
}

.hidden {
  display: none !important;
}

/* WELCOME SPLASH OVERLAY PANE */
#intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  cursor: pointer;
}

.intro-content {
  text-align: center;
}

.logo-text {
  font-family: 'Bangers', cursive;
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: #e1ac51;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  text-shadow: 0 0 20px #ccdc30, 0 0 40px #ccdc30;
}

.logo-text.visible {
  opacity: 1;
}

.intro-subtext {
  font-family: 'Oooh Baby', cursive;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: #ffffff;
  margin-top: 10px;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.intro-subtext.visible {
  opacity: 1;
}

/* ==========================================================
   THE MASTER WIDESCREEN LETTERBOX APPARATUS CONTROLLER
   ========================================================== */
#main-content,
#map-animation-screen {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;

  aspect-ratio: 16 / 9 !important;
  width: 100vw !important;
  height: calc(100vw * 9 / 16) !important;

  max-width: calc(100vh * 16 / 9) !important;
  max-height: 100vh !important;

  background-color: #000000;
  overflow: hidden !important;
}

#main-content {
  display: block;
  z-index: 5;
}

#map-animation-screen {
  display: none;
  z-index: 20;
  place-items: center !important;
}

#map-animation-screen.active {
  display: grid !important;
}

#bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 1;
}

/* FLUID SCREEN HERO HEADER TEXT CHANNELS */
.main-page-title {
  position: absolute;
  top: clamp(10px, 4vh, 35px);
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Bangers', cursive;
  font-size: clamp(1.8rem, 6vw, 3.8rem) !important;
  color: #e1ac51;
  letter-spacing: 0.1rem;
  text-align: center;
  z-index: 15;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
  width: 90%;
  pointer-events: none;
}

.hud-firefly-img {
  position: absolute;
  width: clamp(40px, 8vw, 100px);
  height: auto;
  object-fit: contain;
  opacity: 0.95;
  filter: drop-shadow(0 0 12px #ccdc30);
  pointer-events: none;
}

.main-hud-pos {
  top: clamp(10px, 3vh, 30px);
  right: clamp(10px, 3vw, 30px);
  z-index: 15;
}

.data-hud-pos {
  top: clamp(10px, 3vh, 25px);
  right: clamp(10px, 3vw, 25px);
  z-index: 105;
}

#ui-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  background: rgba(0, 0, 0, 0.4);
  padding: 20px;
  z-index: 5;
}

.center-text-group {
  text-align: center !important;
  width: 100% !important;
  max-width: 550px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 6;
  margin-top: clamp(20px, 5vh, 40px);
}

/* 🟢 THE STROKE AND DROP SHADOW SOLUTION:
   Combines 4 micro-directional black outline shadow pixel parameters with a 
   soft 8px blur to make your main screen body typography copy pop off the canvas. */
.main-body-text {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.95rem, 2.2vw, 1.35rem) !important;
  font-weight: 500;
  line-height: 1.5;
  color: #ffffff;
  text-align: center !important;
  width: 100%;

  text-shadow:
    -1px -1px 0 #000000,
    1px -1px 0 #000000,
    -1px 1px 0 #000000,
    1px 1px 0 #000000,
    0px 4px 8px rgba(0, 0, 0, 0.95) !important;
}

.site-footer-copyright {
  position: absolute !important;
  bottom: clamp(6px, 2vh, 15px) !important;
  left: 0 !important;
  width: 100% !important;
  text-align: center !important;
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.5rem, 1.2vw, 0.75rem) !important;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  text-transform: none;
  letter-spacing: 0.02rem;
  pointer-events: none;
  z-index: 8;
  white-space: nowrap;
}

/* INTERACTIVE DISPLAY HUDS */
.audio-control-wrapper {
  position: absolute;
  top: clamp(10px, 3vh, 30px);
  left: clamp(10px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

#audio-toggle {
  background-color: #000000;
  border: 2px solid #e1ac51;
  width: clamp(36px, 6vw, 50px);
  height: clamp(36px, 6vw, 50px);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

#audio-toggle img {
  width: calc(45%);
  height: calc(45%);
}

.audio-label-text {
  font-family: 'Bangers', cursive;
  font-size: clamp(0.8rem, 2vw, 1.1rem) !important;
  color: #e1ac51;
  text-transform: uppercase;
}

.exit-container {
  position: absolute;
  bottom: clamp(10px, 4vh, 40px);
  left: clamp(10px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.exit-container button {
  background-color: #000000;
  border: 2px solid #ffffff;
  width: clamp(38px, 6.5vw, 55px);
  height: clamp(38px, 6.5vw, 55px);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 6px;
}

.exit-container button img {
  width: calc(40%);
  height: calc(40%);
}

.exit-message {
  font-family: 'Bangers', cursive;
  font-size: clamp(0.85rem, 2.2vw, 1.2rem) !important;
  color: #ffffff;
  text-transform: uppercase;
}

.arrow-container {
  position: absolute;
  bottom: clamp(10px, 4vh, 40px);
  right: clamp(10px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

#interactive-icon {
  background-color: #000000;
  border: 3px solid #e1ac51;
  width: clamp(60px, 10vw, 90px);
  height: clamp(60px, 10vw, 90px);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 6px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
}

#custom-arrow-img {
  width: calc(50%);
  height: calc(50%);
}

.action-message {
  font-family: 'Bangers', cursive;
  font-size: clamp(0.95rem, 2.5vw, 1.4rem) !important;
  color: #e1ac51;
  text-transform: uppercase;
}

/* WORLD MAP ARCHITECTURE VIEWPORTS */
#world-map-wrapper {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  transform: scale(1);
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1), transform-origin 1.2s ease-in-out;
}

#world-map-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
}

#scope-locator {
  position: absolute;
  width: clamp(30px, 5vw, 45px);
  height: clamp(30px, 5vw, 45px);
  border: 3px solid #ee3736;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  box-shadow: 0 0 15px #ee3736;
  display: none;
}

#scope-locator.active {
  display: block !important;
}

#scope-locator::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background-color: #ee3736;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* SPINNER */
#db-loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99;
}

.spinner-ring {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid #e1ac51;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.spinner-text {
  font-family: 'Bangers', cursive;
  font-size: 1.4rem;
  color: #e1ac51;
  text-transform: uppercase;
}

/* DATA CONTAINER PANELS */
#data-page-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000000 !important;
  z-index: 100;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

#data-page-screen.active {
  display: flex !important;
}

.data-card-grid {
  width: 100%;
  max-width: 600px;
  background: #111111;
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: clamp(15px, 4vw, 30px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 3vh, 25px);
  text-align: center;
  margin: auto !important;
}

/* CENTER-ALIGNED DATA TILES */
.data-row {
  display: flex;
  justify-content: center !important;
  align-items: center !important;
  width: 100%;
  text-align: center !important;
}

.row-one {
  gap: 15px;
}

.flag-img {
  width: clamp(45px, 8vw, 70px);
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.data-highlight-text {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 500;
  color: #ffffff;
  text-align: center !important;
}

.row-two {
  gap: 10px;
}

.label-prefix {
  font-family: 'Bangers', cursive;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: #ccdc30;
  letter-spacing: 0.05rem;
}

.data-normal-text {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 500;
  text-align: center !important;
}

.gallery-images-flex {
  display: flex;
  gap: 15px;
  width: 100%;
  justify-content: center;
}

.gallery-thumb {
  width: calc(50% - 8px);
  max-width: 220px;
  height: clamp(90px, 15vh, 140px);
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.factoids-box {
  width: 100%;
  background: #161616;
  border: 1px dashed rgba(225, 172, 81, 0.25);
  border-radius: 12px;
  padding: clamp(10px, 3vw, 18px);
  text-align: center !important;
}

.factoids-title {
  font-family: 'Bangers', cursive;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: #e1ac51;
  margin-bottom: 8px;
  text-transform: uppercase;
  text-align: center !important;
}

#factoids-list-wrapper {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center !important;
}

.factoid-item {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: #ffffff;
  opacity: 0.9;
  line-height: 1.4;
  text-align: center !important;
}

.return-home-group {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  justify-content: center;
}

.control-btn-home {
  background-color: #000000;
  border: 2px solid #e1ac51;
  border-radius: 50%;
  width: clamp(40px, 8vw, 55px);
  height: clamp(40px, 8vw, 55px);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.home-icon-svg {
  width: calc(45%);
  height: calc(45%);
}

.return-label-text {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 500;
  color: #ffffff;
  opacity: 0.8;
}

/* ==========================================================👶 HIGH-VISIBILITY RADAR BLINK ANIMATIONS========================================================== */
@keyframes kidsBlink {
  0% {
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(0.8);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.25);
    border-color: #ccdc30;
    box-shadow: 0 0 25px #ccdc30;
  }

  100% {
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(0.8);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.97);
    opacity: 0.7;
  }

  100% {
    transform: scale(1.03);
    opacity: 1;
  }
}

/* ==========================================================📱 TOTAL ENCLOSURE HANDHELD RESPONSIVE MEDIAS BREAKPOINTS========================================================== */
@media (max-width: 768px) {
  .data-card-grid {
    padding: 15px;
    gap: 12px;
    max-width: 92%;
  }

  .gallery-thumb {
    max-width: 100%;
    height: 95px;
    border-radius: 8px;
  }

  .factoids-box {
    padding: 10px;
  }

  .factoid-item {
    font-size: 0.82rem;
    line-height: 1.3;
  }
}

/* ==========================================================📱 STRICT VERTICAL PORTRAIT HUD COMPRESSION CONTROLLER========================================================== */
@media (max-width: 768px) and (orientation: portrait) {
  .center-text-group {
    margin-top: 10px !important;
    max-width: 90% !important;
  }

  /* Inherits your native black stroke and rich dropshadow outline properties smoothly onto small handheld screens */
  .main-body-text {
    font-family: 'Inter', sans-serif;
    font-size: 3.5vw !important;
  }

  #interactive-icon,
  .exit-container button,
  #audio-toggle {
    width: 40px !important;
    height: 40px !important;
    border-width: 2px !important;
    margin-bottom: 4px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5) !important;
  }

  #custom-arrow-img,
  .exit-container button img,
  #audio-toggle img {
    width: 18px !important;
    height: 18px !important;
  }

  .action-message,
  .exit-message,
  .audio-label-text {
    font-family: 'Bangers', cursive !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.02rem !important;
  }

  .hud-firefly-img {
    width: 40px !important;
    height: auto !important;
  }

  .exit-container,
  .arrow-container {
    bottom: 12px !important;
  }

  .exit-container {
    left: 15px !important;
  }

  .arrow-container {
    right: 15px !important;
  }

  .audio-control-wrapper {
    top: 12px !important;
    left: 15px !important;
  }

  .main-hud-pos {
    top: 12px !important;
    right: 15px !important;
  }

  .site-footer-copyright {
    position: fixed !important;
    bottom: 12px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    text-align: center !important;
    white-space: nowrap !important;
    opacity: 0.5;
    z-index: 9999 !important;
  }
}