html,body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  font-family: system-ui, sans-serif;
  background-color: rgba(41,45,50,1);
  color: #222;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;    
}

* {
  -webkit-tap-highlight-color: transparent;
}

.estonia-regular {
  font-family: "Estonia", cursive;
  font-weight: 400;
  font-style: normal;
}

.glory {
  font-family: "Glory", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

.hidden {
display: none !important;
}



.display-flex {
display: flex;
}

/* PRE-INTRO SCREEN */
#pre-intro-screen {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
z-index: 2000;
}

#pre-intro-screen img {
width: 250px; /* adjust based on your animation */
height: auto;
opacity: 0.85;
animation: slowFadeIn 3s ease-in-out infinite alternate;
}

/* Gentle breathing-like opacity fade */
@keyframes slowFadeIn {
0% { opacity: 0.6; transform: scale(0.98); }
100% { opacity: 1; transform: scale(1.02); }
}

/* INTRO SCREEN */

#intro-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  flex-direction: column;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
  z-index: 1000;

  text-align: center;
  color: #B3B3B3;
  background-color: rgba(41,45,50,1);

}

img#site-logo {
width: 250px;
display: block;
margin: 0 auto 0 auto; /* centers horizontally, adds spacing below */
}

h1#site-name {
  font-size: 6em;
  line-height: 0.8em;
  text-align: center;
  margin-top: 0px;
  margin-bottom: 10px;
}

#intro-screen p {
  line-height: 1.5em;
  font-size: 18px;
  margin: 10px 0px;
}

#intro-screen button {
width: 210px;
padding: 0.5rem 0.5rem;
margin-top: 1rem;
margin-bottom: 3rem;
border: 1px solid #B3B3B3;;
border-radius: 0.5rem;
background-color: transparent;
font-size: 1rem;
cursor: pointer;
transition: background 0.2s, transform 0.1s;
color: #B3B3B3;
}

/* Smooth show/hide for intro screen without white flicker */
#intro-screen.hidden {
opacity: 0;
visibility: hidden;
}

#intro-screen.display-flex {
opacity: 1;
visibility: visible;
transition: opacity 0.3s ease-in;
}

/* ===== INTRO FOOTER ===== */
#intro-footer {
position: absolute;
bottom: 1.5rem;                   /* lifted slightly above bottom */
left: 0;
width: 100%;
display: flex;
justify-content: space-between;   /* left & right groups stay on one line */
align-items: flex-end;
padding: 0 3rem;                  /* equal side spacing (creates “margin”) */
box-sizing: border-box;
color: rgba(255, 255, 255, 0.85);
font-family: 'Glory', sans-serif;
font-size: 0.9rem;
z-index: 10;
}

/* Each section stacks its text above its logos */
#intro-footer .footer-left,
#intro-footer .footer-right {
display: flex;
flex-direction: column;
gap: 0.4rem;
}

#intro-footer .footer-left {
align-items: flex-start;
}

#intro-footer .footer-right {
align-items: flex-end;
}

/* Text label styling */
#intro-footer span {
font-weight: 400;
letter-spacing: 0.3px;
opacity: 0.9;
margin-bottom: 0.1rem;
}

/* Logos */
.footer-logo {
height: 36px;
opacity: 0.9;
transition: opacity 0.3s ease;
}

.footer-logo:hover {
opacity: 1;
}

/* Right section logos arranged horizontally */
#intro-footer .footer-right img + img {
margin-left: 0.8rem;
}

/* ===== NO SCROLLING: ensure full-screen intro ===== */
html, body {
height: 100%;
margin: 0;
overflow: hidden; /* prevents vertical scrolling */
}

/* Intro screen fills the viewport */
#intro-screen {
position: relative;
width: 100%;
height: 100vh;
overflow: hidden;
}




/* MAIN APP */
#main-app {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  text-align: center;
  background: white;
}

#map {
  width: 100%;
  height: 100%;
}

/*img.leaflet-tile {
  filter:blur(1px);
}*/

#controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 30px 20px;
  box-sizing: border-box;
  z-index: 1000;
  pointer-events: auto; /* lets map capture clicks except for buttons */
  background-color: transparent;
}

#controls button {
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  background: none; /* ensure image button has no background */
  padding: 0;
}

/* --- ICON STYLING & ANIMATION --- */
#controls button img {
  width: 150px;
  height: 150px;
  transition: opacity 0.25s ease, transform 0.25s ease;
  user-select: none;
  -webkit-user-drag: none;
}

/* Subtle fade & scale effect during image swap */
#controls button img.fade-scale {
  opacity: 0;
  transform: scale(0.9);
}

/* Optional: gentle pulse when active (playing) */
#controls button.playing img {
  animation: pulseGlow 2.5s ease-in-out infinite;
}


#notifications {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 9999;
  font-family: monospace;
}

.status-line {
  background: rgba(0, 0, 0, 0.45);
  color: white;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 13px;
  pointer-events: none;
  width: fit-content;
  transition: opacity 0.3s ease;
}

#location {
  color: #7fd8ff; /* light blue for live GPS updates */
}

#status {
  color: #ffd479; /* yellow for status notifications */
}


/* Haptics */

/* Fallback visual haptic feedback */
button.haptic-feedback {
transform: scale(0.94);
transition: transform 0.05s ease-out;
}

/* Dim Overlay */

#dim-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black; /* or rgba(0,0,0,1) for pure black */
  opacity: 0; /* starts transparent */
  pointer-events: none;
  z-index: 999;
  transition: opacity 0.1s linear; /* small lag to smooth flicker */
}

/* Zone overlay */

/* Zone Name Popup */
#zone-popup {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.65);
  color: white;
  padding: 20px 30px;
  border-radius: 12px;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  font-family: 'Glory', sans-serif;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#zone-popup.show {
  opacity: 0.8;
}

/* Optional: add a subtitle style for additional info */
#zone-popup .zone-subtitle {
  font-size: 14px;
  opacity: 0.8;
  margin-top: 8px;
  font-weight: 400;
}
