body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}

.logo {
  position: absolute;
  top: 90px;
  left: 60px;
  font-size: 40px;
  font-weight: bold;
  color: #fff;
}

header {
  position: relative; 
  text-align: center;
  padding: 20px 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 100px;
  height: 100vh;
  background-image: url("./image/bubble_sort_bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

header h1 {
  margin: 0;
  font-size: 100px;
  opacity: 0; 
  animation: fade-in 2s forwards; 
  text-align: center;
  white-space: nowrap;
  font-family: 'sans-serif';

}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.vertical-line1:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.vertical-line1:after {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  width: 2px;
  height: 26%;
  background: #fff;
  z-index: 2;
  transform-origin: top;
  transform: scaleY(0);
  animation: animate1 1.5s forwards;
  animation-fill-mode: forwards;
}

@keyframes animate1 {
  0% {
    transform: translateY(-50%) scaleY(0);
    transform-origin: top;
  }
  100% {
    transform: translateY(0) scaleY(1);
    transform-origin: top;
  }
}

.vertical-line2:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.vertical-line2:after {
  content: '';
  position: absolute;
  top: 65%;
  left: 50%;
  width: 2px;
  height: 25%;
  background: #fff;
  z-index: 2;
  transform-origin: top;
  transform: scaleY(0);
  animation: animate2 1.5s forwards;
  animation-delay: 1s;
  animation-fill-mode: forwards;
}

@keyframes animate2 {
  0% {
    transform: translateY(-20%) scaleY(0);
    transform-origin: top;
  }
  100% {
    transform: translateY(0) scaleY(1);
    transform-origin: top;
  }
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  height: 50px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Source Sans Pro'
}

nav a {
  color: rgb(255, 255, 255);
  text-decoration: none;
  margin: 0 20px;
  font-size: 25px;
  transition: transform 0.3s;
  font-weight: bold;
}

nav a:hover {
  transform: scale(1.1);
}


section {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 100px;
  color: #000;
  text-align: center;
  cursor: pointer;
}

.sort-info {
  display: flex;
  align-items: flex-start;
  gap: 50px;
  flex-direction: column;
  justify-content: flex-start;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}


#bubble-sort .sort-info::before {
  content: '';
  position: absolute;
  top: -15%;
  left: -75%;
  width: 253%;
  height: 3px;
  background-color: #000;
  transform-origin: left;
  transform: scaleX(0);
  animation: animate-line 1s forwards;
  animation-delay: 1s;
}

@keyframes animate-line {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}


#selection-sort .sort-info::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -75%;
  width: 253%;
  height: 3px;
  background-color: #fff;
  transform-origin: left;
  transform: scaleX(0);
  animation: animate-line 1s forwards;
  animation-delay: 1s;
}

@keyframes animate-line {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}


#quick-sort .sort-info::before {
  content: '';
  position: absolute;
  top: -5%;
  left: -75%;
  width: 253%;
  height: 3px;
  background-color: #000;
  transform-origin: left;
  transform: scaleX(0);
  animation: animate-line 1s forwards;
  animation-delay: 1s;
}

@keyframes animate-line {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}


#insertion-sort .sort-info::before {
  content: '';
  position: absolute;
  top: -15%;
  left: -75%;
  width: 253%;
  height: 3px;
  background-color: #fff;
  transform-origin: left;
  transform: scaleX(0);
  animation: animate-line 1s forwards;
  animation-delay: 1s;
}

@keyframes animate-line {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

#pathfinder .sort-info::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -75%;
  width: 253%;
  height: 3px;
  background-color: #000;
  transform-origin: left;
  transform: scaleX(0);
  animation: animate-line 1s forwards;
  animation-delay: 1s;
}

@keyframes animate-line {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}


.sort-name {
  font-size: 65px;
  font-weight: bold;
  font-family: 'Sources Sans Pro';
  text-align: left;
  margin-left: -55%;
}

.sort-definition {
  font-size: 25px;
  line-height: 1.4;
  flex-grow: 1;
  margin-left: -67%;
  color: #000; 
  text-align: left; 
  width:500px;
}

.fade-out{
  opacity: 0;
  transition: opacity 0.5s ease-in;
}

.fade-out.appear{
  opacity: 1;
}

.try-link {
  font-size: 24px;
  background-color: black;
  color: white;
  padding: 12px 36px;
  border-radius: 5px;
  transition: transform 0.3s;
  position: relative;
  overflow: hidden;
  display: inline-block;
  letter-spacing: 2px;
  border-radius: 40px;
  background: linear-gradient(90deg, #000);
  font-weight: bold;
  align-self: flex-start;
  margin-left: -52%;
  margin-top: 30px;
}

.try-link::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  opacity: 0;
  transition: width 0.4s ease-out, height 0.4s ease-out, opacity 0.4s ease-out;
}

.try-link:hover::after {
  width: 300px;
  height: 300px;
  opacity: 1;
}

#bubble-sort {
  background-color: white; 
}
#bubble-sort .sort-name {
  color: black; 
}
#bubble-sort .sort-definition {
  color: black; 
}


#selection-sort {
  background-color: black; 
}
#selection-sort .sort-name {
  color: white; 
}
#selection-sort .sort-definition {
  color: white; 
}
#selection-sort .try-link{
  background-color: white;
  color: black;  
}
#selection-sort .try-link::after{
  background-color: rgba(255, 255, 255, 0.635);
}


#quick-sort {
  background-color: white; 
}
#quick-sort .sort-name {
  color: black; 
}
#quick-sort .sort-definition {
  color: black; 
}


#insertion-sort {
  background-color: black; 
}
#insertion-sort .sort-name {
  color: white; 
}
#insertion-sort .sort-definition {
  color: white; 
}
#insertion-sort .try-link{
  background-color: white;
  color: black;  
}
#insertion-sort .try-link::after{
  background-color: rgba(255, 255, 255, 0.635);
}


#pathfinder {
  background-color: white; 
}
#pathfinder .sort-name {
  color: black; 
}
#pathfinder .sort-definition {
  color: black; 
}


#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: none;
  width: 40px;
  height: 40px;
  background-color: #333;
  border-radius: 50%;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

#back-to-top img {
  width: 40px;
  height: 40px;
  display: block;
}

#back-to-top:hover {
  opacity: 0.8;
}
#back-to-top .tooltip {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-60%);
  background-color: #ffffff;
  color: black;
  padding: 0px 10px;
  font-size: 16px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
}

#back-to-top:hover .tooltip {
  opacity: 1.3;
}

#information {
  background-color: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30vh;
}

.information-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 60%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.information-logo {
  font-size: 40px;
  font-weight: bold;
  color: #000;
  font-family: 'Proxima Nova';
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.team-member {
  margin-bottom: 20px;
  font-size: 25px;
  color: #000;
}

.hidden{
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.5s, transform 1.5s;
}
.show{
  opacity: 1;
  transform: translateY(0);
}

.video-container {
  position: absolute;
  top: 50%;
  right: 10%;
  transform: translateY(-50%);
  width: 550px;
  height: auto; 
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-container {
  position: absolute;
  top: 50%;
  right: 10%;
  transform: translateY(-50%);
  width: 550px;
  height: auto; 
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

  