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

 html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    position: relative;
    background: rgba(255, 255, 255, 0); /* fallback */
    font-family: 'Minecraftia-Regular', sans-serif;

  }


#page-container {
  opacity: 0;
  transition: opacity 0.5s ease-in;
  visibility: hidden;
}

.page-loaded #page-container {
  opacity: 1;
  visibility: visible;
}
  .page-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

  canvas#portal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -999; /* ensures it's behind everything */
    width: 100vw;
    height: 100vh;
    display: block;
    pointer-events: none; /* ensures clicks go through */
  }



/* 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;
  align-items: center;      /* vertical centering */
  justify-content: center;  /* horizontal centering */
  text-align: center;
  font-family: 'Minecraft-ten';
  width: 100%;              /* ensure full width */
}



.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;
  padding-top: 2vh;
}



/*=== NAV BAR ===*/
.button-background{
  background-image:url(images/spruce_256.png);
  background-size: auto;
  image-rendering: pixelated;
  background-repeat: repeat;
  
  position: sticky;
  top: 0vh; /* distance from top of screen (top bar height) */
  z-index: 20; /* ensures it stays on top of other content */
  background-color: #1a1a1a; /* or whatever your background color is */

  background-size: 7vh;
  height: 7vh;

}

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




.button-box {
  justify-content: center;
  display: flex;
  align-items: center;
  margin: 0 auto; /* This centers it horizontally */
  margin-top: 1vh;
  width: fit-content; /* Ensures it doesn't stretch full width */
  padding: 10px;
  background: #3f3f3f63;
  backdrop-filter: blur(3px);
  border: 2px solid #ffffff;
  border-radius: 5px;


  position: sticky;
  top: 8vh;

  z-index: 999;
}



.nav-buttons2 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3vw;
  flex-wrap: nowrap;

  z-index: 999;

}





h2{
  text-align: center;
  color: #fff;
}




/*==== VIDEO SECTION ====*/

#video-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
  padding: 1em 0;
  margin: 0;
}

.video-item {
  width: 100%;
  max-width: 320px;
  
  text-align: center;
  
  background: #3f3f3f63;
  backdrop-filter: blur(3px);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;

  border-radius: 5px;
  border: 2px solid #ffffff3a;
  
  box-shadow: 3px 3px 10px white, -3px -3px 10px white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}



.video-item:hover {
  transform: scale(1.03);
}

.video-item img {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  display:block;
  image-rendering:pixelated ;
  object-fit: cover;
}

.video-title {
  margin: 0.5em 0;
  font-size: 1em;
  color: #fff;
  text-shadow: #000000 0px 0px 5px;
  font-weight: 500;
}


/* text styling */
.video-title a {
  text-decoration: none;
  color: inherit;
}






 /*==== PHOTO GALLERY ====*/

 #gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
  gap: 15px;
  margin: a;
}

#gallery img {
  width: 200px;
  height: 130px; /* fixed height */
  object-fit: cover; /* how the image is displayed in the box */
  margin: 10px;
  cursor: pointer;
  border-radius: 5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  border: 2px solid #ffffff3a;
  transition: transform 0.3s;
}

#gallery img:hover {
  transform: scale(1.05);
}




.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  transition: transform 0.2s ease;
  cursor: grab;
}


.modal-caption {
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 20px;
  position: absolute;
  bottom: 0;
  left: 0;
  max-width: 80%;
  box-sizing: border-box;
  text-align: left;
  gap: 2vh;
}

#captionAvatar {
  width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  vertical-align: middle;
}

#captionAuthor {
  display: inline-block;
  font-weight: bold;
  font-size: 1rem;
  line-height: 32px;
  vertical-align: middle;
  padding-top: 1vh;


}

#captionMessage {
  margin: 5px 0 0;
  font-size: 0.95rem;
  color: #ddd;
  line-height: 1.4;
}

#nameContainer{
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  gap: 1vh;

}

.modal.open {
  display: flex;
}

#modalImage {
  will-change: transform;
  transition: transform 0s;
  user-select: none;
  -webkit-user-drag: none;
  image-rendering: pixelated;
  transform-origin: top left;
  cursor: grab;  /* keep the grabbing cursor */
}

#imageModal {
  touch-action: manipulation; /* disables double-tap zoom on this element */
}


.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 0;
  width: 80px; /* Wider clickable area */
  height: 100vh;
  color: white;
  font-size: 40px;
  font-weight: bold;
  display: flex;
  align-items: center;  /* Vertically center the arrow */
  justify-content: center;
  user-select: none;
  background: rgba(0, 0, 0, 0); /* Transparent background */
  transition: background 0.2s ease;
}

.prev:hover, .next:hover {
  background: rgba(255, 255, 255, 0.1);
}

.prev { left: 0vw; }
.next { right: 0vw; }


  #zoomControls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 12px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
  }

  #zoomControls button {
    color: #fff;
    background: rgba(55, 55, 55, 0.5);
    border: none;
    padding: 10px 14px;
    font-size: 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  #zoomControls button:hover {
    background: #ddd;
  }

  #zoomControls button:active {
    background: #bbb;
  }



@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;
  }
  
}



/* Make events stack vertically on smaller screens */
@media (max-width: 996px) {
  .event-content {
    flex-direction: column;
    align-items: center;
  }
  .map-online-container{
    flex-direction: column;
    align-items: center;
  }
  .event-box,
  .event-info {
    width: 60vw;
    flex: none;
  }

  .section-title{
    font-size: 6vw;
    text-align: center;
  }

  .event-info {
    font-size: 3vw;
    text-align: center;
  }

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

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


.outside {

  background-position-y: 0vh ;
}

.button-box {
  top: 17vw;
}


.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;
    
  }
  
  .modal-caption {
    max-width: 50%;

  }
  
}








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

.title{
  font-size: 20vw;
}

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

.outside {
  background-position-y: 1vw ;
}




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

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


.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");
}
.photos::before {
  background-image: url("vectors/photos_black.png");
}
.videos::before {
  background-image: url("vectors/videos_black.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;
}




  .event-box {
    width: 50vw;
    border: 2px solid black;
    overflow: hidden;
    min-width: unset; 
    max-width: unset;
  }

  .event-info {
    width: 50vw;
    font-size: 3vw;  
    color: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    text-align: center;
    min-width: unset; 
    max-width: unset;
  }
  
    .modal-content {
      max-width: 65%;
      max-height: 65%;
      object-fit: contain;
      box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
      border-radius: 8px;
    }

  }