html {
    height: 100vh;
    overflow: hidden;
}
body {
    background: #111;
    margin: 0;
    font-family: 'Silkscreen', 'Arial Narrow', Arial, sans-serif;
    color: rgb(0, 0, 0);
    width: 100vw;
    height: 100vh;
    perspective: 1px;
    transform-style: preserve-3d;
    overflow-x: hidden;
    overflow-y: scroll;
    scrollbar-width: none;
  }
  body.loading {
    overflow: hidden;
  }
  .top-bar {
  width: 100%;
  height: 50px;
  background-color: black;
  position: relative;
  top: 0;
  left: 0;
  z-index: 10;
  font-family: 'Silkscreen', 'Arial Narrow', Arial, sans-serif;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  box-sizing: border-box; /* Ensures padding doesn't add extra width */
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.top-bar-right img {
  height: 30px;
  width: auto;
  border: none;
}


.top-bar-left {
  display: flex;
  align-items: center;
}

.top-bar-title {
  font-size: 1.5rem;
}



  .section1,.section2 {
    width: 100%;
    height:100vh;
    position:relative;
    transform-style: preserve-3d;
  }
  .section1::before {
    content: "";
    width: 100%;
    height: 100%;
    position: absolute;
    background: url("Img/Space\ Background.png") top center;
    background-size: cover;
    transform: translateZ(-1px) scale(4) translateY(-50px);
  }
  .section1 {
    height: 50vh;
  }
  .section2 {
    background-color: rgb(0, 0, 0);
    padding-top: 1vw;
    height:50vw;
  }
  .text {
    top:30%;
    left:50%;
    position: absolute;
    font-family: 'Franklin Gothic Heavy', 'Arial Narrow', Arial, sans-serif;
    font-size: 12vw;
    color: white;
    text-shadow:
  2px 2px 5px rgba(0, 0, 0, 0.3),
  5px 5px 70px rgba(255, 255, 255, 0.5);
    transform: scale(1,1.1) translate(-50%, 10%);
  }
  #loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #111;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease;
  }
  #loader-overlay.fade-out {
    opacity: 0;
  }
  
  #loader {
    width: 300px;
    height: 30px;
    border: 2px solid rgb(255, 221, 0);
    display: flex;
    align-items: center;
    background: #111;
    box-shadow:
    0 0 3px rgba(255, 221, 0, 0.5),
    0 0 6px rgba(255, 221, 0, 0.4),
    0 0 10px rgba(255, 221, 0, 0.3);
  }
  #loadingBar {
    height: 100%;
    width: 0;
    background: rgb(255, 221, 0);
    transition: width 2s ease-in-out;
    box-shadow:
    0 0 3px rgba(255, 221, 0, 0.5),
    0 0 6px rgba(255, 221, 0, 0.4),
    0 0 10px rgba(255, 221, 0, 0.3);
  }
  
  #game {
    display: none;
    position: relative;
    width: 100%;
    height: 100%;
  }
  
  .pixel {
    position: absolute;
    width: 15px;
    height: 15px;
    background: rgb(255, 221, 0);
    
  }
  
  .ball {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgb(0, 183, 255);
  }
  .paddle {
    position: absolute;
    bottom: 10px;
    width: 80px;
    height: 12px;
    background: rgb(255, 255, 255);
    border-radius: 6px;
  }
  .headingtext {
    color: white;font-size: 3rem; text-align: center; margin: 0% 0%; font-weight: 400; margin-bottom: 20vw;
  }
  .card-fan {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .card {
        width: 20vw;
        aspect-ratio: 1/1.4;
        background: #fff;
        position: absolute;
        transform-origin: bottom center;
        transform: translateX(-500px) scale(1); /* Start off-screen left */
        transform-style: preserve-3d;
        cursor: pointer;
        opacity: 0;
        transition: transform 0.6s ease, opacity 0.6s ease, z-index 0s;
        border-radius: 10px; /* Add border-radius here */
    }

    .card .front, .card .back {
      position: absolute;
      width: 100%;
      height: 100%;
      backface-visibility: hidden;
      -moz-backface-visibility: hidden;
      border-radius: 10px; /* Ensures both front and back have rounded corners */
      overflow: hidden;
      box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }

    .card .front {
      background: white;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .card .front {
      transform: rotateY(0deg);
    }

    .card .back {
      transform: rotateY(180deg);
    }
    .card .front img,
    .card .front video {
      width: 100%;
      height: 60%;
      object-fit: cover;
      transition: opacity 0.4s ease-in-out;
      backface-visibility: hidden;
      -moz-backface-visibility: hidden;
    }

    .card .front video {
      opacity: 1;
      position: absolute;
      top: 0;
      left: 0;
      z-index: 1
    }
    .card .front img {
        opacity: 1;
        width: 100%;
        object-fit: cover;
        position: absolute; /* Position it absolutely inside the front container */
        top: 0; /* Align the top of the image to the top of the container */
        left: 0; /* Align the left of the image to the left of the container */
        margin: 0; /* Ensure no margin is applied */
        z-index: 3;
    }

    .card .front h3 {
      margin: 10px 0 5px;
      font-size: 1.5vw;
      text-align: center;
    }

    .card .front p {
      font-size: 1.2vw;
      padding: 0 10px;
      text-align: center;
    }

    .card .back {
      background: #222;
      color: white;
      transform: rotateY(180deg);
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 20px;
      text-align: center;
      font-size: 1.2vw;
    }

    /* Fan-in animation.
       Each card carries its own --angle, --offset, --delay and --depth inline,
       so a fan can hold any number of cards. Previously these were eight
       hard-coded nth-child rules, which meant a fifth card stacked on top of
       the first. */
    .card-fan.fan-open .card {
      opacity: 1;
      z-index: var(--depth, 1);
      transform: rotate(var(--angle, 0deg)) translateX(var(--offset, 0));
      transition-delay: var(--delay, 0s);
    }

    /* Five-card fans need narrower cards to stay on screen. */
    .card-fan[data-count="5"] .card {
      width: 17vw;
    }
    @media (max-width: 900px) {
      .card-fan[data-count="5"] .card { width: 26vw; }
    }
    @media (max-width: 600px) {
      .card-fan[data-count="5"] .card { width: 31vw; }
    }

    /* Hover: scale and slightly lift */
    .card:hover {
      transform: scale(1.05) translateY(-10px) rotate(var(--angle)) translateX(var(--offset)) !important;
      z-index: 5 !important;
      transition: transform 0.3s ease;
    }

    /* Hover state: show video and hide image */
    .card:hover .front img {
      opacity: 0;
    }

    .card:hover .front video {
      opacity: 1;
      transition: opacity 0.4s ease-in-out;
    }

    /* Clicked (flip) */
    .card.active {
      transform: scale(1.2) rotateY(180deg) !important;
      z-index: 100 !important;  /* Ensure the flipped card stays on top */
      transition: transform 0.8s ease !important;
      transition-delay: 0s !important;
    }
  @media (max-width: 900px) {
    .card {
      width: 30vw;
    }
    .card .front h3 {
      margin: 1% 0;
      font-size: 2vw
    }
  
    .card .front p {
      font-size:2vw;
      margin: 0% 0%;
    }
    .card .back p{
      font-size:2.6vw;
    }
    .headingtext{
      margin-bottom: 30vw;
    }
    .section2 {
      height: 80vw;
    }
  }
  @media (max-width: 666px) {
    .headingtext{
      font-size: 3rem;
    }
    
  }
  @media (max-width: 600px) {
    .card {
      width: 35vw;
    }
    .card .front h3 {
      margin: 1% 0;
      font-size: 3vw
    }
  
    .card .front p {
      font-size:2vw;
      margin: 0% 0%;
    }
    .card .back p{
      font-size:3.2vw;
    }
  }
  @media (max-width: 500px) {
    .section2 {
      height: 120vw;
    }
  }