/* ======= GLOBAL STYLES ======= */
@font-face {
  font-family: 'Minecraftia-Regular';
  src: url('fonts/Minecraftia-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Minecraft-ten';
  src: url('fonts/MinecraftTen-VGORe.ttf') format('truetype');
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #0a0014;
  font-family: 'Minecraftia-Regular', sans-serif;
  z-index: 0;
}


.map-section {
  opacity: 0;
  transition: opacity 0.5s ease-in;
  pointer-events: none;  /* optionally prevent interaction while hidden */
}

.map-section.visible {
  opacity: 1;
  pointer-events: auto;
}



/* WHO'S ONLINE SECTION */

/* Collapsed state of the online section */
/* --- TOP BAR STYLE --- */
.online-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 12vh; /* full screen width */
  height: 7vh; /* collapsed height */
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* ✅ Safari-specific */
  border: 2px solid black;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: row; /* horizontal bar */
  align-items: center;
  padding: 0 1vh;
  overflow: hidden;
  transition: height 0.4s ease, width 0.4s ease;
  z-index: 100;
}

/* Expanded on hover */
.online-section:hover,
.online-section.active {
  width: 100vw;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* ✅ Safari-specific */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  overflow: visible;
}

/* --- TITLE --- */
.online-title {
  font-size: 2.5vh;
  margin: auto;
  font-family: 'Minecraft-ten';
  text-align: center;

  color: white;
  text-shadow:2px 2px 2px black;

  opacity: 1;
  transition: opacity 0.4s ease 0.2s;
}

.online-section:hover .online-title,
.online-section.active .online-title  {
  opacity: 1;
}

/* --- PLAYER CONTAINER ROW --- */
.online-box {
  display: flex;
  flex-direction: row; /* row of players */
  align-items: center;
  justify-content: flex-start;
  gap: 1vh;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease 0.2s;
  pointer-events: none;
}

.online-section:hover .online-box,
.online-section.active .online-box  {
  opacity: 1;
  pointer-events: auto;
}

/* --- PLAYER AVATAR CONTAINERS --- */
.player-container {
  position: relative;
  display: inline-block;
  image-rendering: pixelated;
  height: 5vh;
  width: 5vh;
  margin: 0 0.5vh;
}

/* Player head image border on hover */
.player-container img {
  border: 2px solid transparent;
  transition: border 0.1s ease;
}

.player-container:hover img {
  border: 0.5vh solid #00ff44;
}

/* --- TOOLTIP NAME BOX --- */
.player-name-box {
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 3px 6px;
  padding-top: 10px;
  border-radius: 6px;
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 10;
  white-space: nowrap;
}

/* Tooltip arrow (top of tooltip) */
.tooltip-tag {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #333;
}

/* Show tooltip on hover */
.player-container:hover .player-name-box {
  opacity: 1;
  visibility: visible;
}

/* --- NO PLAYERS MESSAGE --- */
.no-players-msg {
  font-size: 2vh;
  font-family: 'Minecraftia-Regular';
  color: #ff0000;
  text-shadow: 0px 0px 15px rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}

.online-box:has(.no-players-msg) {
  justify-content: center;
}
/*------------------------------------------------------*/








/* ======= HEADER ======= */
header {
  background-image: url("images/glass_256.png");
  background-position-y: -12.5vh;
  background-repeat: repeat;
  background-size: 12.5vh;
  image-rendering: pixelated;
  height: 25vh;
  position: relative;
  z-index: 1;

  display: flex; /* enable flexbox */
  
  align-items: center; /* vertical centering */
  justify-content: center; /* horizontal centering */
  text-align: center;
  font-family: 'Minecraft-ten';
}

.outside {
  background-image: url("images/minecraftlandscape02.PNG");
  background-size:100vw;
  background-position-y: -5vh ;

  background-attachment: fixed;
  image-rendering:optimizeSpeed;
  margin: 0;
}

.title {
  font-size: 12vh;
  margin: 0;
  color: white;
  text-shadow: 2px 2px 8px black;

  /* Remove this so flexbox centers it properly */
  padding-top: 0;
}



/*=== NAV BAR ===*/




.button-background {
  background-image: url(images/spruce_256.png);
  background-size: auto;
  image-rendering: pixelated;
  background-repeat: repeat;

  position: sticky;
  top: 0vh;
  background-color: #1a1a1a;
  background-size: 7vh;
  height: 7vh;

  z-index: 900; /* ← Add this */
}


.nav-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3vw;
  flex-wrap: nowrap;
  padding-top: 1.2vh;
}

.nav-btn {
  font-family: 'Minecraftia-Regular';
  padding: 0.5em 1em;
  padding-bottom: 0.07em;
  color: #fff;
  text-shadow: 2px 2px rgb(48, 48, 48);
  text-decoration: none;
  text-align: center;

  background-color: #707070;
  background-image: url("images/bgbtn.png");
  image-rendering: pixelated;
  background-size: cover;
  background-repeat: no-repeat;
  
  border-top: 2px solid rgba(255, 255, 255, 0.493);
  border-left: 2px solid rgba(255, 255, 255, 0.493);
  border-right: 2px solid rgba(0, 0, 0, 0.493);
  border-bottom: 2px solid rgba(0, 0, 0, 0.493);
  box-shadow: none;
  transition: none;

  display: inline-block;
  justify-content: center;
  align-items: center;

  cursor: pointer;
  font-size: 1.5vh;

  width: 15vh;
  height: 4.5vh;
}

.nav-btn:hover {
  box-shadow: inset 0 0 0 1000px rgba(77, 110, 255, 0.432);
  border-top: 2px solid rgba(211, 222, 255, 0.493);
  border-left: 2px solid rgba(211, 222, 255, 0.493);
  border-right: 2px solid rgba(0, 0, 0, 0.493);
  border-bottom: 2px solid rgba(0, 0, 0, 0.493);
  color: rgb(253, 255, 161);
  background-color: transparent;
}

.nav-btn:active {
  box-shadow: inset 0 0 0 1000px rgba(47, 85, 252, 0.432);
  border-bottom: 2px solid rgba(211, 222, 255, 0.493);
  border-right: 2px solid rgba(211, 222, 255, 0.493);
  border-left: 2px solid rgba(0, 0, 0, 0.493);
  border-top: 2px solid rgba(0, 0, 0, 0.493);
  color: rgb(241, 235, 144);
  position: relative;
  top: 2px;
  left: 2px;
  background-color: transparent;
}





#loading-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  color: white;
  text-shadow: 2px 2px 5px black;
  z-index: 1000;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease;
  white-space: nowrap;
}

/* Animate the ellipsis dots after "Loading map" */
#loading-message::after {
  overflow: hidden;
  display: inline-block;
  vertical-align: bottom;
  animation: ellipsis steps(4, end) 900ms infinite;
  content: "\2026"; /* Unicode for … (ellipsis) */
  width: 0;
  margin-left: 0.2em;
}

/* Keyframes for the dot animation */
@keyframes ellipsis {
  to {
    width: 1em;
  }
}




/* LIVE MAP SECTION */
.map-section {
  padding: 0;
  flex: 1 1 auto;
  background-color: #0a0014;
  text-align: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 7vh); /* Full viewport minus navbar and margin */
}



.map-container {
  position: relative;  /* needed for absolute child */
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}


.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: relative;
  z-index: 1; /* Behind the loading message */
}



.map-container{
margin-top: 1.170vh;
margin-bottom: 1.170vh;
}




.map-overlay {
  position: absolute;
  top: 25vw;
  left: 45vw;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px;
  padding-bottom: 2px;
  border-radius: 4px;
  pointer-events: none;
  font-size: 14px;
  display: none;
}

.map-container.active .map-overlay {
  display: none;
}


@media (max-width: 1350px) {
 
  .online-section{
    top:unset;
    bottom: 0;
    
    width: 11vw; /* full screen width */
    height: 6vw; /* collapsed height */
    padding: 0 1vw;
  
  }

  .online-title{
    font-size: 2.25vw;
  }

  .no-players-msg {
  font-size: 1.8vw;
}

.player-name-box {
    top: auto;
    bottom: 120%; /* Move tooltip above the player */
  }
  
  .tooltip-tag {
    top: auto;
    bottom: -6px; /* Position the arrow below the tooltip */
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333; /* Flip the arrow to point down */
    border-bottom: none;
  }
  
}

@media (max-width: 996px) {
 /*--- WHO'S ONLINE SECTION---*/

  .online-box{
    gap: 0.5vw;
  }

  .no-players-msg {
    font-size: 2.5vw;
    margin-bottom: -0.5vw;
  }

  .player-name-box {
    top: auto;
    bottom: 120%; /* Move tooltip above the player */
  }
  
  .tooltip-tag {
    top: auto;
    bottom: -6px; /* Position the arrow below the tooltip */
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333; /* Flip the arrow to point down */
    border-bottom: none;
  }

  .player-container {
  height: 4vh;
  width: 4vh;
  margin-top: 0;
}

.player-container:hover img {
  border: 0.5vw solid #00ff44; /* Change this to whatever color you'd like */
}


.button-background{
  background-size: 10vw;
  height: 15vw;
}

.nav-buttons {
  gap: 0.8vw;
  padding-top: 3.5vw;
}

  .nav-btn {
    padding: 0.7em 1em;
    
    font-size: 2.4vw;

    height: 8vw;
    width: 19vw;
    
  }
  

}








/* Make events stack vertically on EVEN SMALLER screens */
@media (max-width: 712px) {


/*--- WHO'S ONLINE SECTION---*/
.online-section {
  padding: 0vw;
  width: 25vw;
  height: 15vw;
}


.online-title{
  font-size: 5vw;
  margin-top: 2vw;
  padding-left: 1.5vw;
}


  .online-box{
    gap: 0.3vw;
  }

  .no-players-msg {
    font-size: 3.5vw;
    margin-bottom: unset;
  }

  .player-container {
    height: 9vw;
    width: 9vw;
    margin-top: 0;
  }

.player-container:hover img {
  border: 0.6vw solid #00ff44; /* Change this to whatever color you'd like */
}

/*--------------------------*/

.title{
  font-size: 20vw;
  margin: 0;
 
  padding-top: 22vw;
}

header {
  background-position-y: -20vw ;
  background-size: 25vw;
  height: 55vw;
  z-index: 1;
}

.outside {

  background-position-y: 3vw ;
}



.nav-btn {
  width: 12vw;
  height: 12vw;
  padding: 0;
  position: relative;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn span {
  display: none;
}

.nav-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-size: 9vw;
  background-position: center;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  filter: brightness(1); /* default (white) */
  z-index: 2;
}

.nav-btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  transition: background-color 0s ease;
  z-index: 1;
}

/* Hover: blue tint */
.nav-btn:hover::before {
  filter: brightness(0) saturate(100%) invert(85%) sepia(100%) saturate(250%) hue-rotate(1deg) brightness(110%) contrast(105%);
}

/* Active: darker blue tint */
.nav-btn:active::before {
  filter: brightness(0) saturate(100%) invert(85%) sepia(100%) saturate(250%) hue-rotate(1deg) brightness(95%) contrast(110%);
}

.nav-btn:hover::after {
  background-color: rgba(77, 110, 255, 0.4);
}

.nav-btn:active::after {
  background-color: rgba(47, 85, 252, 0.6);
}

.nav-btn:active {
  color: rgb(241, 235, 144);
  position: relative;
  top: 2px;
  left: 2px;
}

/* Map the icons to each button */
.home-btn::before {
  background-image: url("vectors/home.png");
}
.events-btn::before {
  background-image: url("vectors/events.png");
}
.map-btn::before {
  background-image: url("vectors/map.png");
}
.highlights-btn::before {
  background-image: url("vectors/highlights.png");
}
.downloads-btn::before {
  background-image: url("vectors/downloads.png");
}

/* Navigation container */
.nav-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7.5vw;
  flex-wrap: wrap;
  padding-top: 3vw;
}

/* Background container */
.button-background {
  background-size: 15vw;
  height: 20vw;
}

}