/**
 * Team Detail Styles
 * Gatitas Mimosas
 * 
 * NOTA: Las variables CSS --team-primary, --team-secondary, etc.
 * se definen inline en la vista ya que dependen de valores de BD.
 */

/* Override Brand Colors Locally */
/* ... moved to bottom ... */

/* CSS Local Rediseñado */
.team-hero-v2 {
  padding-top: 140px;
  padding-bottom: 3rem;
  position: relative;
  text-align: center;
  background: linear-gradient(
    to bottom,
    var(--team-secondary),
    var(--team-tertiary)
  );
}

.big-team-logo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  border: 3px solid var(--team-primary);
  box-shadow: 0 0 60px var(--team-primary-alpha);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-hint {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.section-hint i {
  font-size: 1.2rem;
  color: var(--team-primary, var(--brand-pink));
}

/* GRIDS */
.grid-5-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.grid-center-wrap {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 4rem;
}

/* PLAYER CARDS (MAIN) */
.player-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
}

.player-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--team-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.card-media {
  height: 380px; /* Alto y estilizado */
  width: 100%;
  position: relative;
}

.card-media.small {
  height: 250px;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%); /* Efecto serio */
  transition: 0.4s;
}

.player-card:hover .card-media img {
  filter: grayscale(0%);
}

.role-icon {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 30px;
  background: var(--team-primary);
  color: black;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.card-details {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
  text-align: center;
}

.player-nick {
  font-size: 1.4rem;
  color: white;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
}

.player-role {
  font-size: 0.75rem;
  color: var(--team-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  display: block;
  margin-bottom: 5px;
}

/* STAFF CARDS */
.staff-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 50px;
  padding-right: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: 0.3s;
}

.staff-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--team-primary);
}

.staff-photo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.staff-info h3 {
  font-size: 1.1rem;
  margin: 0;
}

.staff-role {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

/* Responsividad */
@media (max-width: 900px) {
  .grid-5-cols {
    grid-template-columns: repeat(2, 1fr); /* En tablet 2 col */
  }
}

@media (max-width: 600px) {
  .grid-5-cols {
    grid-template-columns: 1fr; /* En movil 1 col */
  }
}

/* Modal Styles */
.player-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(8px);
}

.player-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.player-modal__content {
  background: linear-gradient(145deg, #1a0a12 0%, #0a0508 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  width: 100%;
  max-width: 900px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.player-modal__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  opacity: 0.7;
  transition: 0.2s;
}

.player-modal__close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.player-modal__grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 0;
}

/* Modal Left */
.player-modal__card-wrapper {
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-card-view {
  width: 100%;
  max-width: 280px;
  pointer-events: none; /* No hover effects inside modal */
  transform: none !important; /* Reset hover transforms */
}

.modal-card-view .card-media img {
  filter: none;
}

/* Modal Right */
.player-modal__info {
  padding: 3rem;
  display: flex;
  flex-direction: column;
}

#modalNickBig {
  font-family: var(--font-display);
  font-size: 3rem;
  margin: 0;
  line-height: 1;
  color: white;
  text-transform: uppercase;
}

.player-modal__subtitle {
  color: var(--team-primary);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  display: block;
}

.player-modal__bio h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

.bio-content {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  font-size: 1rem;
  margin-bottom: 2.5rem;
  max-height: 200px;
  overflow-y: auto;
}

/* Limitar tamaño de imágenes/gifs en la bio */
.bio-content img {
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
  border-radius: 8px;
  margin: 0.5rem 0;
  display: inline-block;
  object-fit: contain;
}

/* Social Links */
.player-modal__socials {
  margin-top: auto;
  display: flex;
  gap: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  color: white;
  font-weight: 600;
  transition: 0.2s;
}

.social-twitter {
  background: rgba(29, 161, 242, 0.15);
  color: #1da1f2;
}
.social-twitter:hover {
  background: rgba(29, 161, 242, 0.3);
}

.social-twitch {
  background: rgba(145, 70, 255, 0.15);
  color: #9146ff;
}
.social-twitch:hover {
  background: rgba(145, 70, 255, 0.3);
}

@media (max-width: 800px) {
  .player-modal {
    padding: 1rem;
    align-items: center; /* Center vertically */
    justify-content: center;
    backdrop-filter: blur(15px);
    overflow: hidden;
  }

  .player-modal__content {
    border-radius: 24px; /* All corners rounded */
    max-height: 85vh;
    width: 100%;
    max-width: 400px !important; /* Limit width */
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    background: #0f0f0f;
    overflow-x: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  }

  .player-modal__grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .player-modal__card-wrapper {
    padding: 2rem 1rem;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: radial-gradient(
      circle at center,
      rgba(255, 255, 255, 0.05),
      transparent 70%
    );
    min-height: auto;
  }

  .modal-card-view {
    max-width: 140px; /* Slightly smaller for centered view */
    margin: 0 auto;
  }

  .modal-card-view .card-media {
    height: 200px;
  }

  .player-modal__info {
    padding: 1.5rem;
    padding-bottom: 2rem;
  }

  #modalNickBig {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 0.5rem;
  }

  .player-modal__subtitle {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
  }

  .bio-content {
    text-align: center;
    max-height: none;
    font-size: 0.9rem;
  }

  .player-modal__socials {
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
  }

  .player-modal__close {
    top: 10px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 20;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Global Overrides */
.text-gold,
.section-title .text-gold {
  color: var(--team-primary) !important;
}
