#contact {
  background-color: #121516;
  height: 100vh;
  display: flex;
}

.contact-caption {
  padding: 10vh;
  margin: 0;
  color: #e7e5e4;
}

.contact-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.social-links-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.social-links {
  position: relative;
  margin: 0;
  padding: 0;
  display: flex;
}

.social-links li {
  list-style: none;
}

.social-links li a {
  display: block;
  position: relative;
  width: 100px;
  height: 100px;
  line-height: 100px;
  font-size: 40px;
  text-align: center;
  text-decoration: none;
  color: #e7e5e4;
  margin: 0 30px;
  transition: 0.5s;
}

.social-links li a span {
  position: absolute;
  transition: transform 0.5s;
}

.social-links li a span:nth-child(1),
.social-links li a span:nth-child(3) {
  width: 100%;
  height: 3px;
  background: #e7e5e4;
}

.social-links li a span:nth-child(1) {
  top: 0;
  left: 0;
  transform-origin: right;
}

.social-links li a:hover span:nth-child(1) {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s;
}

.social-links li a span:nth-child(3) {
  bottom: 0;
  left: 0;
  transform-origin: left;
}

.social-links li a:hover span:nth-child(3) {
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s;
}

.social-links li a span:nth-child(2),
.social-links li a span:nth-child(4) {
  width: 3px;
  height: 100%;
  background: #404040;
}

.social-links li a span:nth-child(2) {
  top: 0;
  left: 0;
  transform: scale(0);
  transform-origin: bottom;
}

.social-links li a:hover span:nth-child(2) {
  transform: scale(1);
  transform-origin: top;
  transition: transform 0.5s;
}

.social-links li a span:nth-child(4) {
  top: 0;
  right: 0;
  transform: scale(0);
  transform-origin: top;
}

.social-links li a:hover span:nth-child(4) {
  transform: scale(1);
  transform-origin: bottom;
  transition: transform 0.5s;
}

/* Social media specific colors */
.social-links .imdb:hover {
  color: #f5c518;
}

.social-links .imdb:hover span {
  background: #f5c518;
}

.social-links .linkedin:hover {
  color: #0077b5;
}

.social-links .linkedin:hover span {
  background: #0077b5;
}

.social-links .github:hover {
  color: #333;
}

.social-links .github:hover span {
  background: #333;
}

.social-links .instagram:hover {
  color: #c32aa3;
}

.social-links .instagram:hover span {
  background: #c32aa3;
}

.social-links .gmail:hover {
  color: #ea4335;
}

.social-links .gmail:hover span {
  background: #ea4335;
}

/* Fix for default colors on load */
.social-links li a.imdb {
  color: #e7e5e4;
}

.social-links li a.linkedin {
  color: #e7e5e4;
}

.social-links li a.github {
  color: #e7e5e4;
}

.social-links li a.instagram {
  color: #e7e5e4;
}

.social-links li a.gmail {
  color: #e7e5e4;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
  #contact {
    height: auto;
    height: 100vh;
    padding: 0 0;
    flex-direction: column;
  }

  .contact-caption {
    padding: 5vh;
    font-size: 1.2rem;
    text-align: center;
  }

  .social-links-container {
    min-height: auto;
    padding: 0 15px;
  }

  .social-links {
    flex-direction: column;
    align-items: center;
  }

  .social-links li {
    margin-bottom: 30px; /* Increased from 20px for more spacing */
  }

  .social-links li a {
    width: 80px; /* Increased from 70px */
    height: 80px; /* Increased from 70px */
    line-height: 80px; /* Increased from 70px */
    font-size: 32px; /* Increased from 28px */
    margin: 0 15px;
  }
}

/* For very small screens */
@media screen and (max-width: 480px) {
  .contact-caption {
    font-size: 1rem;
    padding: 4vh 15px;
  }

  .social-links li {
    margin-bottom: 25px; /* Added gap between icons */
  }

  .social-links li a {
    width: 60px; /* Increased from 50px */
    height: 60px; /* Increased from 50px */
    line-height: 60px; /* Increased from 50px */
    font-size: 24px; /* Increased from 20px */
    margin: 0 10px;
  }
}

/* Add new breakpoint for very large mobile phones */
@media screen and (max-width: 480px) and (min-height: 700px) {
  .social-links li a {
    width: 70px;
    height: 70px;
    line-height: 70px;
    font-size: 28px;
  }

  .social-links li {
    margin-bottom: 35px; /* Larger gap for taller phones */
  }
}
