@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap");

body {
  margin: 0;
  background-color: #0a0a12;
  font-family: "Orbitron", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: radial-gradient(
      circle at 20% 30%,
      rgba(100, 20, 150, 0.15) 0%,
      transparent 30%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(100, 20, 150, 0.15) 0%,
      transparent 30%
    );
}

.card-container {
  position: relative;
  min-height: 100vh;
  width: 100%;
}

.card {
  width: min(90%, 250px);
  height: 350px;
  position: absolute;
  perspective: 1000px;
  cursor: pointer;
  filter: drop-shadow(0 0 10px rgba(138, 43, 226, 0.7));
  transition: all 0.3s ease;
}

.card:hover {
  filter: drop-shadow(0 0 20px rgba(138, 43, 226, 0.9));
  transform: translateY(-5px);
}

.inner-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.card.flipped .inner-card {
  transform: rotateY(180deg);
}

.front,
.back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  backface-visibility: hidden;
  border: 2px solid #8a2be2;
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.7),
    inset 0 0 15px rgba(138, 43, 226, 0.3);
}

.front {
  background-size: cover;
  background-position: center;
  background-color: #1a1a2e;
  display: flex;
  justify-content: center;
  align-items: center;
}

.front::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 18px;
  background: linear-gradient(45deg, #8a2be2, #9400d3, #4b0082);
  z-index: -1;
  animation: borderGlow 3s linear infinite;
}

.back {
  background-color: #121225;
  color: #e0d6ff;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  text-align: center;
}

.back::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 18px;
  background: linear-gradient(45deg, #8a2be2, #9400d3, #4b0082);
  z-index: -1;
  animation: borderGlow 3s linear infinite;
}

.back h2 {
  color: #b388ff;
  text-shadow: 0 0 10px rgba(179, 136, 255, 0.7);
  margin-bottom: 1rem;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

.back p {
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  line-height: 1.5;
}

.card1 {
  top: 10%;
  left: 10%;
}
.card2 {
  top: 30%;
  left: 60%;
}
.card3 {
  top: 60%;
  left: 20%;
}
.card4 {
  top: 90%;
  left: 55%;
}
.card5 {
  top: 120%;
  left: 20%;
}

@keyframes borderGlow {
  0% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.7;
  }
}

.neon-circle {
  position: fixed;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.3;
  z-index: -1;
}

.circle1 {
  width: 300px;
  height: 300px;
  background: #8a2be2;
  top: 10%;
  left: 5%;
  animation: float 15s ease-in-out infinite;
}

.circle2 {
  width: 500px;
  height: 500px;
  background: #4b0082;
  bottom: 10%;
  right: 5%;
  animation: float 20s ease-in-out infinite reverse;
}

@keyframes float {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(50px, 50px);
  }
  100% {
    transform: translate(0, 0);
  }
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(10, 10, 18, 0.7) 1px, transparent 1px);
  background-size: 100% 2px;
  pointer-events: none;
  z-index: 1000;
  animation: scanline 10s linear infinite;
}

@keyframes scanline {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 100%;
  }
}

.button-home {
  width: 35px;
  height: 35px;
  padding: 20px;
  font-size: 16px;
  position: fixed;
  bottom: 20px;
  right: 20px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
  z-index: 1000;
  background-color: transparent;
  box-shadow: 0 0 10px #8a2be2, 0 0 20px #8a2be2 inset;
}

.button-home:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px #8a2be2, 0 0 60px #8a2be2;
  background: linear-gradient(45deg, #8a2be2, #8a2be2, #8a2be2);
}

.button-home:hover img {
  opacity: 1;
}

.button-home img {
  opacity: 0;
  transition: opacity 0.3s ease;
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

@media (max-width: 900px) {
  .card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 1rem;
  }

  .card {
    position: static !important;
    animation: none !important;
    transform: none !important;
    margin: 0;
  }

  .card:hover {
    transform: none;
  }
}

@media (max-width: 768px) {
  .card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem 1rem;
  }

  .card {
    position: static;
    transform: none !important;
    animation: none !important;
    margin: 0 auto;
  }

  .card:hover {
    transform: none;
  }
}
