/* ===========================
   Teams Page (teams.html)
   =========================== */

/* Page wrapper */
.teams-page{
  padding-top: 110px; /* navbar fixed */
  padding-bottom: var(--spacing-xl);
  min-height: 100vh;
  background: linear-gradient(180deg, var(--color-azul-oscuro), var(--color-rojo-oscuro));
}

/* Header */
.teams-header{
  text-align: center;
  margin-bottom: var(--spacing-lg);
}
.teams-description{
  margin-left: auto;
  margin-right: auto;
}

/* Toolbar */
.teams-toolbar{
  margin-top: var(--spacing-md);
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* ===========================
   Champion Banner
   =========================== */
.teams-champion-banner{
  margin: 1rem auto 0;
  max-width: 780px;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(252, 211, 77, 0.22);
  background: rgba(252, 211, 77, 0.08);
  color: rgba(255, 246, 231, 0.9);

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.teams-champion-label{
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-dorado);
}
.teams-champion-name{
  font-weight: 900;
  text-transform: uppercase;
}

/* ===========================
   Search
   =========================== */
.teams-search{
  display: flex;
  align-items: center;
  gap: 0.6rem;

  background: rgba(23, 23, 37, 0.75);
  border: 1px solid rgba(232, 74, 39, 0.25);
  border-radius: 10px;

  padding: 0.75rem 1rem;
  min-width: min(520px, 92vw);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.teams-search-icon{
  opacity: 0.75;
  font-size: 1.1rem;
}
.teams-search input{
  width: 100%;
  background: transparent;
  border: none;
  outline: none;

  color: var(--color-naranja-claro);
  font-family: var(--font-primary);
  font-size: 1rem;
}
.teams-search input::placeholder{
  color: rgba(255, 246, 231, 0.45);
}

.teams-count{
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 246, 231, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.12em;

  padding: 0.6rem 1rem;
  border: 1px solid rgba(255, 246, 231, 0.08);
  border-radius: 10px;
  background: rgba(49, 7, 10, 0.25);
}

/* ===========================
   Active nav link
   =========================== */
.nav-link-active{
  color: var(--color-naranja-claro);
}
.nav-link-active::after{
  width: 100%;
}

/* ===========================
   Grid
   =========================== */
.teams-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

/* ===========================
   Team Card
   =========================== */
.team-card{
  background: rgba(23, 23, 37, 0.65);
  border: 1px solid rgba(232, 74, 39, 0.18);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  transition: var(--transition-smooth);
}
.team-card:hover{
  transform: translateY(-6px);
  border-color: rgba(232, 74, 39, 0.45);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.team-card-top{
  padding: var(--spacing-md);
  background: linear-gradient(135deg, rgba(49, 7, 10, 0.65), rgba(23, 23, 37, 0.65));
  border-bottom: 1px solid rgba(255, 246, 231, 0.06);
  text-align: center;
}

.team-logo{
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin: 0 auto 0.75rem;
  filter: drop-shadow(0 12px 25px rgba(0, 0, 0, 0.35));
}

.team-badge{
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;

  color: var(--color-dorado);
  border: 1px solid rgba(252, 211, 77, 0.25);
  background: rgba(252, 211, 77, 0.08);

  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.team-name{
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-naranja-claro);
}

.team-meta{
  margin-top: 0.35rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.team-tag{
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 246, 231, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.team-dot{
  color: rgba(255, 246, 231, 0.25);
}

/* ===========================
   Roster
   =========================== */
.team-roster{
  padding: var(--spacing-md);
  display: grid;
  gap: 0.6rem;
}

/* Tag (izq) con prioridad + Nombre (der) que se adapta */
.team-player{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;

  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(255, 246, 231, 0.06);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.player-user.main{
  font-weight: 900;
  font-size: 1rem;
  color: var(--color-naranja-claro);

  border: 1px solid rgba(255, 246, 231, 0.12);
  background: rgba(23, 23, 37, 0.55);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;

  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-name.sub{
  justify-self: end;
  text-align: right;

  font-weight: 700;
  font-size: 0.78rem;
  color: rgba(255, 246, 231, 0.6);

  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===========================
   Empty state
   =========================== */
.teams-empty{
  margin-top: var(--spacing-lg);
  display: flex;
  justify-content: center;
}

.teams-empty-card{
  text-align: center;
  padding: var(--spacing-lg);
  border-radius: 14px;
  background: rgba(23, 23, 37, 0.65);
  border: 1px solid rgba(255, 246, 231, 0.08);
  max-width: 520px;
}

.teams-empty-icon{
  font-size: 2.2rem;
  opacity: 0.75;
  margin-bottom: 0.6rem;
}

.teams-empty-card h3{
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}
.teams-empty-card p{
  color: rgba(255, 246, 231, 0.6);
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px){
  .teams-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 520px){
  .team-player{
    grid-template-columns: 1fr;
    align-items: start;
  }

  .player-name.sub{
    justify-self: start;
    text-align: left;

    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}
