/* ======= 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;
    overflow: visible;
    background: rgba(255, 255, 255, 0); /* fallback */
    font-family: 'Minecraftia-Regular', sans-serif;
  }
  

.page-container {
  max-width: 1500px;
  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 */
  }




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






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

  position: sticky;
  top: 0;
  background-color: #1a1a1a;
  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: #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;
}



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





/* Timeline container with central vertical line */
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* Vertical timeline line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #757575;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* Each event row is a flex container, full width */
.event-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  margin: 2rem 0;
  position: relative;
}

/* Circle node on the timeline */
.event-row::before {
  content: '';
  position: absolute;
  top: 1rem;
  left: 50%;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  border: 3px solid #0a0014;
  transform: translateX(-50%);
  z-index: 2;
}

/* Left text card styling */
.event-text {
  flex: 0 0 45%;
  background: #1a0f3a;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 6px 18px rgba(10, 0, 20, 0.6);
  text-align: left;
  color: #ddd;
  position: relative;
  z-index: 1;
}

/* Arrow pointing from left card to timeline */
/* Arrow for .event-text - now on the LEFT side */
.event-text::after {
  content: '';
  position: absolute;
  top: 1rem;
  left: -20px; /* moved from right */
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 20px solid #1a0f3a; /* reversed direction */
}



/* Right image card styling */
.event-image {
  flex: 0 0 45%;
  background: #1a0f3a;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(10, 0, 20, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.event-image:active {
  transform: scale(0.98);
}

/* Arrow for .event-image - now on the RIGHT side */
.event-image::after {
  content: '';
  position: absolute;
  top: 1rem;
  right: -20px; /* moved from left */
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 20px solid #1a0f3a; /* reversed direction */
}

.event-text h2 {
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-size: 1.8rem;
  border-bottom: 2px solid #888;
  padding-bottom: 0.3rem;
  color: #a0eaff;
}

.event-text p {
  line-height: 1.6;
  font-size: 1.1rem;
  margin-top: 0;
  white-space: pre-wrap; /* preserve line breaks */
  color: #ddd;
}

.event-image img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  object-fit: contain;
}

/* Responsive: Mobile stacking and toggle behavior */
@media (max-width: 768px) {
  .timeline::before,
  .event-row::before,
  .event-image::after,
  .event-text::after {
    display: none;
  }

  .event-row {
    flex-direction: column;
    align-items: center;
  }

  .event-image,
  .event-text {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .event-image {
    cursor: pointer;
    position: relative;
    z-index: 2;
    border-radius: 10px;
  }

  .event-text {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 1rem;
    margin-top: -10px; /* overlap a bit with image */
    background: #1a0f3a; /* or your card bg */
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: 
      max-height 0.4s ease, 
      opacity 0.4s ease,
      margin-top 0.4s ease;
  }

  .event-row.expanded .event-text {
    max-height: 2000px; /* or whatever max you expect */
    opacity: 1;
    margin-top: 0;
    padding: 1rem;
  }
}









@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;
    gap: 1rem;
    padding: 2vh 4vw;
  }

  .event-box {
    width: 100%;
    align-items: center;
  }

  .event-box img{
    width: 100%;
  }

  .event-info {
    width: 100%;

    align-items: center;
    text-align: center;
    padding: 1rem;
    
    font-size: 3.5vw;

    opacity: 1;

  }

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

  #event-description {
    line-height: 1.6;
  }
  


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

  /*Mobile Map*/


  .live-map-title {
    font-size: 6vw;
  }

  .map-container {
  margin-bottom: 6vw; /* or whatever looks best */
}

.time-box {
  width: 20vw;
}

.number {
  font-size: 8vw;
}

.label {
  font-size: 3vw;
}


#calendar-section a#download-ics {
  font-size: 3vw;
  padding-top:3vw ;
}


}








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

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




   .map-container {
  margin-bottom: 9.8vw; /* or whatever looks best */
}

.live-map-title {
    font-size: 10vw;
  }


.time-box {
  width: 35vw;
}

.number {
  font-size: 12vw;
}

.label {
  font-size: 5vw;
}


#calendar-section a#download-ics {
  font-size: 4vw;
  padding-top:4vw ;
}

}
