:root {
  --speed: 1;
}

body {
  background-color: black;
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow:visible;
  color: white;
  background-size: 88px 88px;
  background-image: radial-gradient(circle, #ffffff2a 1px, rgba(255, 255, 255, 0.035) 1px);
  background-attachment: fixed;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Black w/ opacity */
  z-index: 12; /* Below the side panel */
  cursor: pointer;
  display: none; /* Hidden by default */
}

#setup {
  width: 45%;
  height: 35%;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #f9f9f9;
  border-radius: 30px;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
  z-index: 13;
  display: flex; /* Enable flexbox for positioning children */
  flex-direction: row; /* Arrange children in a row */
}

#splitCont {
  width: 30%; /* Adjust as needed */
  height: 100%;
  background-color: #020202;
  margin-left: auto; /* Push it to the right */
  border-radius: 0 30px 30px 0; /* Apply right side rounding */
}

/* If you have other content inside #setup that should take up the left space */
#setup > *:not(#splitCont) {
  flex-grow: 1; /* Allow other elements to take up remaining space */
}

#headText {
  padding-left: 5%;
  color: rgba(0, 0, 0, 0.746);
}

.launchScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: black;
  background-size: 88px 88px;
  background-image: radial-gradient(circle, #ffffff2a 1px, rgba(255, 255, 255, 0.035) 1px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9;
  /* Make sure it overlays */
}

.start {
  animation: exit 2s ease-out forwards;
  animation-delay: 10s;
}

@keyframes exit {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.iframe-container {
  position: absolute;
  width: 100%;
  height: 100%;
 
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  overflow: hidden;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

.floatText {
  font-family: Arial, Helvetica, sans-serif;
  padding: 20px;

  opacity: 0%;
  left: 50%;
  animation: fadeAfter 2s ease-in-out forwards;
  animation-delay: 8s;
  position: absolute;
  transform: translate(-50%, -50%)
}

@keyframes fadeAfter {

  0% {
    opacity: 0;
    top: 100%;
  }

  100% {
    opacity: 1;
    top: 95%;
  }
}

.loader {
  border: 3px solid #f3f3f36f;
  /* Light grey */
  border-top: 3px solid #020202;
  /* Blue */
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.animated-image {
  position: absolute;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: fadeAndRise 4s ease-in-out forwards;

  /* Improved sizing logic */
  width: 5%;
  /* Use viewport width units for viewport-relative scaling */
  min-width: 60px;
  /* Absolute minimum size */
  max-width: 300px;
  /* Absolute maximum size */
  height: auto;
  /* Maintain aspect ratio */
}

/* Desktop-specific adjustments */
@media screen and (min-width: 1024px) {
  .animated-image {
    width: 10vw;
    /* Slightly smaller relative size */
  }
}

/* Mobile-first fallback */
@media screen and (max-width: 480px) {
  .animated-image {
    width: 25vw;
    /* Larger relative size on mobile */
    max-width: 200px;
    /* Smaller absolute maximum */
  }
}

/* Background canvas */
#dotCanvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}



@keyframes fadeAndRise {
  0% {
    opacity: 0;
    top: 50%;
  }

  33% {
    opacity: 0.9;
    top: 50%;
  }

  100% {
    opacity: 1;
    top: 20%;
  }
}


.animated-profile {
  position: absolute;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: fadeAndRise 6s ease-in-out forwards;

  /* Improved sizing logic */
  width: 5%;
  /* Use viewport width units for viewport-relative scaling */
  min-width: 60px;
  /* Absolute minimum size */
  max-width: 300px;
  /* Absolute maximum size */
  height: auto;
  /* Maintain aspect ratio */
}

/* Desktop-specific adjustments */
@media screen and (min-width: 1024px) {
  .animated-profile {
    width: 10vw;
    /* Slightly smaller relative size */
  }
}

/* Mobile-first fallback */
@media screen and (max-width: 480px) {
  .animated-profile {
    width: 25vw;
    /* Larger relative size on mobile */
    max-width: 200px;
    /* Smaller absolute maximum */
  }
}

.profile {
  top: 25%;
  left: 50%;
  position: absolute;
}

.img-prf {
  border-radius: 10px;
}

.info-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 15px;
  border-radius: 20px;
  margin: 10px auto;
  width: fit-content;
  animation: badgePop 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55) 1.5s forwards;
}

@keyframes badgePop {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

.content {
  top: 20%;
  left: 20%;
  width: 54%;
  padding-left: 3%;
  padding-right: 3%;
  padding-bottom: 3%;
  position: absolute;
  background-color: #5050503b;
  border-radius: 20px;
  z-index: 3;
  backdrop-filter: blur(8px);
  transition: box-shadow 0.3s;

}

.content:hover {
  box-shadow: 0 12px 20px rgba(255, 255, 255, 0.1);
}

.content a {
  color: white;
  font-family: montserrat, sans-serif;
}

.rejoin {
  transform: translateX(50%);
  position: absolute;
  border-radius: 20px;
  font-weight: 600;
  padding: 2px 10px;
  font-family: montserrat, sans-serif;
}

.achievement {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 1;
  color: rgba(255, 255, 255, 0.273);
  background-color: #5050503b;
  border-radius: 10px;
  padding-left: 5px;
  padding-right: 5px;
  top: 90%;
  animation: award 1s ease-in-out forwards;
}

@keyframes award {
  0% {
    opacity: 0;
    top: 115%;
  }

  50% {
    opacity: 1;
  }
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
  max-width: 800px;
  margin: auto;
  position: relative;
  /* Make it a stacking context */
}

.game-card {
  background: linear-gradient(145deg, #1a1a1a, #292929);
  border-radius: 16px;
  padding: 5px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;

  display: flex;
  flex-direction: column;

  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: scale(1);
  transition: transform 0.3s ease;
  /* Smooth scale transition */
  aspect-ratio: 1 / 1; /* Make it a square */
}

.info {
  display: flex;
  gap: 1vw;
  margin-bottom: 2vw;
  flex-wrap: wrap;
  margin-top: 3%;
  justify-content: center;
}

.info-card {
  width: 29%;
  height: 120px;
  background: linear-gradient(145deg, #1a1a1a, #292929);
  border-radius: 16px;
  padding: 5px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: scale(1);
  transition: transform 0.3s ease;
  /* Smooth scale transition */
}

.info-card:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 12px 24px rgba(255, 255, 255, 0.1);
  filter: brightness(1.1);
}

.info-card ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  margin-bottom: 10px;
}

.info-card h2 {
  color: white;
  font-size: 1.2rem;
  margin-left: 30px;
  margin-right: 330px;
  margin-bottom: 10px;
}

.info-card p {
  color: rgba(255, 255, 255, 0.581);
  font-size: 1rem;
  margin-left: 20px;
  margin-right: 20px;
}

.game-card:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 0px 12px rgba(255, 255, 255, 0.601);
  filter: brightness(1.005);
}

.game-title {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  padding: 10px 15px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 5px;
  display: none;
  opacity: 0;
}

.focused {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 0px 12px rgba(255, 255, 255, 0.801);
  filter: brightness(1.005);
  outline: none; /* Remove default focus outline */
  border-radius: 12px;
}



.game-title p {
  color: white;
  opacity: 1;

}

.game-button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.hmbutton {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  color: #020202;
  background-color: rgba(255, 255, 255, 0.912);
  padding: 8px;
  border-radius: 12px;
}

.hmbutton a {
  color: #020202;
  text-decoration: none;
}

.game-button img {
  width: 145px;
  height: 145px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease, filter 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}



.game-name {
  margin-top: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.95rem;
}

/* Navbar */
.navbar {
  position: absolute;
  height: 10%;
  width: 100%;
  position: sticky;
  top: 0;
  background-color: rgb(0, 0, 0);
  padding: 10px 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 10;
  display: flex;
  justify-content: center;
}

.home {
  background-image: linear-gradient(black, white);
  width: 100%;
  height: 50%;

}

.section1 {
  padding-top: 40%;
}

.home-button img {
  display: flex;
  height: 40%;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.2s;
}

.home-button img:hover {
  transform: scale(1.05);
}

.gameLaunch {
  position: absolute;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: fadeExit 4s ease-in-out forwards;
  top: 50%;
  /* Improved sizing logic */
  min-width: 60px;
  /* Absolute minimum size */
  max-width: 300px;
  /* Absolute maximum size */
  height: auto;
  /* Maintain aspect ratio */
  z-index: 2;

}

.gameLaunchBG {
  position: absolute;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: fadeExit2 4s ease-in-out forwards;
  top: 50%;
  /* Improved sizing logic */
  min-width: 60px;
  /* Absolute minimum size */
  max-width: 300px;
  /* Absolute maximum size */
  height: auto;
  /* Maintain aspect ratio */
  z-index: 1;
}

@keyframes fadeExit {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.3);
    /* 1% larger */
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
  }

  60% {
    opacity: 0;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.8));
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
    /* shrink to nothing */
  }
}

@keyframes fadeExit2 {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 1;
   
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
  }

  60% {
    opacity: 0;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.8));
  }

  100% {
    opacity: 0;
  
  }
}

.xbox {
  height: 10%;
  width: 100%;
  position: sticky;
  top: 0;
  background-color: rgb(0, 0, 0);
  padding: 30px 50px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: flex;
  justify-content: left;
}


.home-but img {
  height: 40%;
  cursor: pointer;
  transition: transform 0.2s;
}

.xbox-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 32px;
  color: #fff;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  position: relative;
  z-index: 10;
}



.home-icon {
  width: 36px;
  height: 36px;
}


.navbar-center {
  display: flex;
  gap: 32px;
}

.nav-icon {
  font-size: 1.3em;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
  border-radius: 50%;
  border-color: white;
  transition: all 0.3s ease;
  display: inline-flex;
  /* Use inline-flex for centering inside the circle */
  align-items: center;
  justify-content: center;

}

.nav-icon {

  transition: all 0.3s ease;
  /* Smooth transition for hover effect */
}


.nav-icon:hover {
  opacity: 1;
  /* Make the icon visible when hovered */
  background-color: rgba(0, 0, 0, 0.1);
  /* Light background circle */
}

/* Make icons fade in when hovered */
.nav-icon:hover {
  transform: scale(1.1);
  /* Slightly increase size on hover */
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}



.clock {
  font-size: 1.1em;
  letter-spacing: 1px;
}

.tiles {
  display: flex;
  gap: 1vw;
  margin-bottom: 2vw;
  flex-wrap: wrap;
  margin-top: 10%;
  margin-left: 3.5%;
  justify-content: left;
}

.search-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 1;
  color: rgba(255, 255, 255, 0.273);
  background-color: #5050503b;
  border-radius: 10px;
  padding-left: 5px;
  padding-right: 5px;
  top: 5%;
  animation: search 3s ease-in-out forwards;
}
@keyframes search {
  0% {
    opacity: 0;
    top: 0%;
  }

  10% {
    opacity: 1;
    top: 5%;
  }
  90%{
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.important {
  width: 90.5%;
  height: 100px;
  background: linear-gradient(180deg, #dfdbdb3a, #2929291b);
  border-radius: 16px;
  padding: 5px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: scale(1);
  transition: box-shadow 0.3s ease;

}
.important:hover {
  transition: box-shadow 0.3s ease;

  box-shadow: 0 12px 24px rgba(255, 255, 255, 0.1);
  filter: brightness(1.1);
}

.panel {
  background: linear-gradient(180deg, #dfdbdb3a, #2929291b);
  padding: 5px;

  width: 18%;
  height: 90%;
  
}
.side-panel {
  border-radius: 12px;
  height: 80%;
  width: 18%;
  position: fixed;
  z-index: 13;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
  margin-left: -45%;
  margin-top: 5%;
  margin-bottom: 5%;
}

.covers {
  width: 100%;
  height: 100%;
  background-color: #0202023b;
  animation: fadeIn 1s;

}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.side-panel a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 25px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.side-panel a:hover {
  color: #f1f1f1;
}

.side-panel .close-btn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

#main {
  transition: margin-left .5s;
  padding: 16px;
}

.open-button {
  font-size: 30px;
  cursor: pointer;
}

.side-menu {
  border-radius: 12px;
  height: 80%;
  width: 18%;
  position: fixed;
  z-index: 15;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
  margin-left: -45%;
  margin-top: 5%;
  margin-bottom: 5%;
}