/* ======= 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:#0f1121;
  font-family: 'Minecraftia-Regular', sans-serif;
}



#download-section {
  opacity: 0;
  transition: opacity 0.5s ease-in;
  visibility: hidden;
}

.page-loaded #download-section {
  opacity: 1;
  visibility: visible;
}




/* 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: 1000;
}

/* 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 {
  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';
}


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

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



/*=== NAV BAR ===*/
.button-background {
  position: sticky;
  top: 0;
  background-color:#00d970;
  background-size: 7vh;
  height: 7vh;

  z-index: 999; /* ← 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: #303030;
  text-decoration: none;
  text-align: center;

  background-color: #BFBFBF;
  
  border-top: 2px solid #EFEFEF;
  border-left: 2px solid #EFEFEF;
  border-right: 2px solid #626061;
  border-bottom: 2px solid #626061;
  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 #297d1b;
  border-top: 2px solid #38c530;
  border-left: 2px solid #38c530;
  border-right: 2px solid #0e4a0a;
  border-bottom: 2px solid #0e4a0a;
  color: rgb(255, 255, 255);
  background-color: transparent;
}

.nav-btn:active {
  box-shadow: inset 0 0 0 1000px #226716;
  border-bottom: 2px solid #0e4a0a;
  border-right: 2px solid #0e4a0a;
  border-left: 2px solid #38c530;
  border-top: 2px solid #38c530;
  color: rgb(255, 255, 255);
  position: relative;
  top: 2px;
  left: 2px;
  background-color: transparent;
}





/* ======= BUTTONS ======== */
#download-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem; /* space between buttons */
  margin-top: 2rem; /* optional spacing from top */
  flex-wrap: wrap; /* allows wrapping on small screens */
}


.button-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.svg-container {
  width: 20vh;
  margin-bottom: 0.5rem;
  cursor: pointer;
  pointer-events: auto; /* ensure clicks are not blocked */
}

.svg-container svg {
  width: 100%;
  height: auto;
  fill: currentColor; /* optionally apply color from CSS */
}



/* Optional: style both buttons similarly */
#modpack-button,
#download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  background-color: #00d970;
  color: rgb(0, 0, 0);
  border: none;
  border-radius: 12px;
  padding: 15px;
  padding-top: 20px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  height: 3.5rem;
  width: 26rem;
  font-family: 'Minecraftia-Regular';
}





  /* Style <a> to look like your buttons */
  .button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #00d970;
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    width: 26rem;
    height: 3.5rem;
    font-family: 'Minecraftia-Regular';
  }
  .button-link:hover {
    background-color: #65ff8e;
    transform: translateY(-2px);
  }
  .button-link:active {
    background-color: #009347;
    transform: translateY(0);
  }


  
#modpack-button:hover,
#download-button:hover {
  background-color: #65ff8e;
  transform: translateY(-2px);
}

#modpack-button:active,
#download-button:active {
  background-color: #009347;
  transform: translateY(0);
}


#download-button svg {
  width: 1.5em;
  height: 1.5em;
  fill: currentColor;
}





p{
  padding-bottom: 20px;
}

#platform-icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5em;
  color: #000000;
  padding-bottom: 9px;
}

#instructions {
  text-align: center; /* center image horizontally */
  margin-top: 10vh;
}
#instructions img {
  width: 60vw;        /* keep aspect ratio */
  max-width: 2000px;
  display: inline-block; /* for centering */
  border: 50px;
  border:3px solid white;
  border-radius: 5px ;
  
}








@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 {
  padding-top: 1.2vw;
  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;
  }

}

/* Make events stack vertically on smaller screens */
@media (max-width: 996px) {
  /*--- WHO'S ONLINE SECTION---*/

.online-section{ 
    width: 15vw; /* full screen width */
    height: 10vw; /* collapsed height */
  }

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

  .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.6vw;
  padding-top: 3.5vw;
}

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

    height: 8vw;
    width: 19vw;
    
  }
    
#modpack-button,
#download-button,
.button-link {
  height: 5rem;
  width: 50vw;
  padding: 1rem;
  padding-bottom: 0;
  font-size: 1rem;
  flex-direction: row;
  white-space: normal;
  text-align: center;
}


}








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

  .title {
    font-size: 16vw;
  }

  header {
    height: 50vw;
    z-index: 1;
  }

  /*--- 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;
  }

  /* ==== NAV BUTTONS with icon layers ==== */
 .nav-btn {
  position: relative;
  overflow: hidden;
  width: 12vw;
  height: 12vw;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 2px solid #EFEFEF;
  border-left: 2px solid #EFEFEF;
  border-right: 2px solid #626061;
  border-bottom: 2px solid #626061;
}

.nav-btn span {
  display: none;
}

/* Icon Layer */
.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;
  z-index: 2;

  /* Default color: #303030 */
  filter: brightness(0) saturate(100%) invert(20%) sepia(3%) saturate(18%) hue-rotate(314deg) brightness(96%) contrast(90%);
}

/* Hover & Active: white */
.nav-btn:hover::before,
.nav-btn:active::before {
  filter: brightness(0) saturate(100%) invert(100%);
}

/* Hover/Active background layer */
.nav-btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  z-index: 1;
}

.nav-btn:hover::after {
  background-color: rgba(41, 125, 27, 0.5); /* match green */
}

.nav-btn:active::after {
  background-color: rgba(34, 103, 22, 0.6);
}



/*
.nav-btn:hover::before {
    filter: brightness(0) saturate(100%) invert(36%) sepia(96%) saturate(673%) hue-rotate(71deg) brightness(88%) contrast(97%);
  }

  .nav-btn:active::before {
    filter: brightness(0) saturate(100%) invert(26%) sepia(97%) saturate(682%) hue-rotate(74deg) brightness(85%) contrast(92%);
  }
*/


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

  .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");
  }

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

  .svg-container {
    width: 40vw;
  }

  #modpack-button,
  #download-button,
  .button-link {
    width: 85vw;
    height: auto;
    padding: 1rem;
    padding-bottom: 0;
    font-size: 4vw;
    flex-direction: row;
    white-space: normal;
    text-align: center;
  }

  #platform-icon {
    margin-right: 0.5em;
    display: inline-block;
    flex-shrink: 0;
  }

  #download-text {
    word-wrap: break-word;
    white-space: normal;
    overflow-wrap: break-word;
    text-align: center;
  }
}
