/* === Reset === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === Body Layout === */
body {
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(90deg, #290445 0%, #161616 100%);
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}

/* === Navbar === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #7c0bb1, #290445);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.6rem;
  color: #fff;
}

.logo img {
  height: 40px;
}

/* Navigation links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
}

.nav-links li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.3s, color 0.3s;
  user-select: none;
}

.nav-links li a:hover,
.nav-links li a.active {
  background-color: #f6de02;
  color: #290445;
}

/* Hamburger Menu Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

/* === Mobile Styles === */
@media (max-width: 768px) {
  /* Show hamburger */
  .menu-toggle {
    display: block;
  }

  /* Hide nav links by default on mobile */
  .nav-links {
    position: fixed;
    top: 60px;
    right: 0;
    width: 220px;
    background: linear-gradient(135deg, #7c0bb1, #290445);
    flex-direction: column;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    z-index: 1100;
  }

  /* Show nav when toggled */
  .nav-links.show {
    max-height: 500px; /* Adjust if you have many menu items */
    opacity: 1;
  }

  /* Mobile nav links style */
  .nav-links li {
    text-align: center;
    width: 100%;
  }

  .nav-links li a {
    padding: 16px 0;
    font-size: 1.1rem;
    display: block;
  }
}

/* === Footer Responsive === */
footer {
  padding: 16px;
  background: linear-gradient(135deg, #3a075a, #1e0032);
  text-align: center;
  color: #fbc7ff;
  font-size: 0.9rem;
  user-select: none;
}

@media (max-width: 768px) {
  footer {
    font-size: 0.8rem;
    padding: 12px;
  }
}

/* === Container === */
.container {
  flex-grow: 1;
  padding: 48px 32px 80px;
  max-width: 1280px;
  margin: 32px auto;
  text-align: center;
  width: 100%;
  user-select: none;
}

.container h1 {
  color: #00ff9f;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  text-shadow:
    0 0 3px #00ff9f,
    0 0 6px #00ffc8,
    0 0 12px #00ffc8;
  margin-bottom: 48px;
  animation: pulseScale 1.6s ease-in-out infinite alternate;
}

.container .title span {
  color: #fff;
  font-size: 2.4rem;
  font-weight: 200;
  letter-spacing: 6px;
  text-shadow:
    0 0 10px #0d0d0d,
    0 0 6px #acabac,
    0 0 6px #161113;
  display: block;
  margin-top: 16px;
}

/* === Animations === */
@keyframes pulseScale {
  0% {
    transform: scale(1);
    text-shadow:
      0 0 3px #00ff9f,
      0 0 6px #00ffc8,
      0 0 12px #00ffc8;
  }
  100% {
    transform: scale(1.07);
    text-shadow:
      0 0 8px #00ff9f,
      0 0 14px #00ffc8,
      0 0 20px #00ffc8;
  }
}

@keyframes slideUpFade {
  0% {
    transform: translateY(40px) scale(0.85);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* === Teams Grid === */
.teams {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px 36px;
  padding: 0 32px;
  margin: 48px auto 0;
  max-width: 1080px;
  justify-content: center;
}

/* === Team Card === */
.team-card {
  perspective: 1500px;
  cursor: pointer;
  position: relative;
  border-radius: 50%;
  overflow: visible;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  animation: slideUpFade 0.8s ease-out both;
}

.teams .team-card:nth-child(1) { animation-delay: 0.15s; }
.teams .team-card:nth-child(2) { animation-delay: 0.35s; }
.teams .team-card:nth-child(3) { animation-delay: 0.55s; }

/* Flip Animation */
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: transparent;
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
}

.team-card:hover .card-inner,
.team-card:focus-visible .card-inner {
  transform: rotateY(180deg);
}

/* Active Glowing Card */
.team-card.active {
  transform: scale(1.3);
  z-index: 20;
  box-shadow: 0 0 36px 18px #ff79c6;
  animation: glowPulse 2.5s infinite alternate;
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 0 18px 8px #ff79c6;
  }
  100% {
    box-shadow: 0 0 42px 14px #d65ca0;
  }
}

/* Front & Back Faces */
.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 28px;
  color: #fff;
  user-select: none;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

.card-front {
  background: linear-gradient(145deg, #3c0077, #4b007f);
  box-shadow:
    0 0 12px #8e2d68,
    inset 0 0 14px #5a0573;
}

.card-back {
  background: linear-gradient(145deg, #2a004d, #3d005a);
  transform: rotateY(180deg);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 1.15rem;
  color: #ff79c6;
  text-shadow: 0 0 10px #d65ca0;
  padding-top: 44px;
  gap: 18px;
  box-shadow:
    0 0 18px #ff79c6,
    inset 0 0 12px #8e2d68;
}

/* Team Logo */
.team-logo {
  max-width: 85%;
  max-height: 170px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.5),
    inset 0 0 12px #5a0573;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
  pointer-events: none;
}

.team-card:hover .team-logo {
  transform: scale(0.95);
}

.team-card.active .team-logo {
  transform: scale(1.4);
  box-shadow:
    0 0 18px 6px #ff79c6,
    0 0 54px 24px #d65ca0,
    0 0 110px 48px #8e2d68;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

/* Responsiveness */
/* Tablet */
@media (max-width: 900px) {
  .teams {
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 36px;
    max-width: 95vw;
  }

  .team-card {
    max-width: 280px;
  }

  .team-logo {
    max-height: 160px;
  }

  nav {
    padding: 16px 28px;
    font-size: 1.15rem;
  }

  nav ul {
    gap: 24px;
  }

  .container {
    padding: 36px 24px 64px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .teams {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 20px;
  }

  .team-card {
    max-width: 240px;
    margin: 0 auto;
  }

  .team-logo {
    max-height: 140px;
  }

  .container {
    padding: 24px 20px 48px;
  }
}
