.team-section {
  padding: 120px 20px;
  text-align: center;
}

.team-subtitle {
  margin-top: 15px;
  opacity: 0.8;
  color: #a855f7;
  font-size: 1.1em;
}

.team-grid {
  max-width: 1200px;
  margin: 60px auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 35px;
}

.team-card {
  position: relative;
  background: rgba(255,255,255,0.05);
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 0 30px rgba(0,179,255,0.3);
  transition: all 0.4s ease;
  transform-style: preserve-3d;
  cursor: pointer;
  border: 2px solid rgba(168, 85, 247, 0.3);
  overflow: hidden;
}

.team-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(168, 85, 247, 0.1),
    transparent
  );
  transform: rotate(45deg);
  transition: all 0.6s ease;
}

.team-card:hover::before {
  left: 100%;
}

.team-card:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow:
    0 0 50px rgba(0,179,255,0.6),
    0 0 80px rgba(168, 85, 247, 0.4);
  border-color: rgba(0, 179, 255, 0.6);
}

.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    rgba(0, 179, 255, 0.2),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.team-card:hover .card-glow {
  opacity: 1;
}

.team-card img {
  width: 100%;
  border-radius: 15px;
  margin-bottom: 15px;
  transition: transform 0.4s ease;
  position: relative;
  z-index: 1;
}

.team-card:hover img {
  transform: scale(1.05);
}

.team-card h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
}

.team-card p {
  position: relative;
  z-index: 1;
}

.magic-sparkle {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5em;
  opacity: 0.6;
  z-index: 2;
  pointer-events: none;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
}

.modal-content {
  background: linear-gradient(135deg, #0b1c3a, #020814);
  margin: 5% auto;
  padding: 0;
  border: 2px solid #00b3ff;
  border-radius: 25px;
  width: 90%;
  max-width: 700px;
  box-shadow:
    0 0 50px rgba(0, 179, 255, 0.5),
    0 0 100px rgba(168, 85, 247, 0.3);
  animation: modalSlideIn 0.4s ease;
  position: relative;
  overflow: hidden;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00b3ff, #a855f7, #00b3ff);
  background-size: 200% 100%;
  animation: gradientShift 3s ease infinite;
}

.close {
  color: #a855f7;
  position: absolute;
  right: 25px;
  top: 20px;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.close:hover,
.close:focus {
  color: #00b3ff;
  transform: rotate(90deg) scale(1.2);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 35px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 2px solid rgba(0, 179, 255, 0.3);
}

.modal-header img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid #00b3ff;
  box-shadow: 0 0 20px rgba(0, 179, 255, 0.6);
  object-fit: cover;
}

.modal-header-text h2 {
  margin: 0;
  color: #00b3ff;
  text-shadow: 0 0 10px rgba(0, 179, 255, 0.5);
}

.modal-header-text p {
  margin: 8px 0 0 0;
  opacity: 0.8;
  font-size: 1.1em;
}

.modal-body {
  padding: 35px;
}

.modal-section {
  margin-bottom: 30px;
}

.modal-section h3 {
  color: #a855f7;
  margin-bottom: 15px;
  font-size: 1.3em;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.activity-item,
.achievement-item {
  background: rgba(0, 179, 255, 0.1);
  padding: 12px 15px;
  border-radius: 10px;
  margin-bottom: 10px;
  border-left: 3px solid #00b3ff;
  transition: all 0.3s ease;
}

.activity-item:hover,
.achievement-item:hover {
  background: rgba(0, 179, 255, 0.2);
  transform: translateX(5px);
  box-shadow: 0 0 15px rgba(0, 179, 255, 0.3);
}

.value-item {
  background: rgba(168, 85, 247, 0.1);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 12px;
  border-left: 3px solid #a855f7;
  transition: all 0.3s ease;
}

.value-item:hover {
  background: rgba(168, 85, 247, 0.2);
  transform: translateX(5px);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.value-item strong {
  display: block;
  margin-bottom: 5px;
  color: #a855f7;
}

.value-item p {
  margin: 0;
  opacity: 0.9;
  line-height: 1.5;
}

/* Hover particles */
.hover-particle {
  position: fixed;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, #00b3ff, #a855f7);
  border-radius: 50%;
  pointer-events: none;
  animation: particleFloat 0.8s ease-out forwards;
  box-shadow: 0 0 10px rgba(0, 179, 255, 0.8);
  z-index: 9999;
}

/* Responsive design */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }

  .modal-header {
    flex-direction: column;
    text-align: center;
  }

  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}
