/* =========================
   LADDER – COMPETITIVE STYLE
========================= */

.ladder-wrapper {
  background: linear-gradient(180deg, #0e0e11, #14141a);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,.6);
  border: 1px solid rgba(255,255,255,.06);
}

/* TABLE */
.ladder-table {
  width: 100%;
  border-collapse: collapse;
  color: #fff;
  font-size: 0.95rem;
}

/* HEADER */
.ladder-table thead th {
  text-align: left;
  padding: 14px 12px;
  font-size: 0.75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #a9a9b3;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* ROWS */
.ladder-table tbody tr {
  transition: background .2s ease, transform .15s ease;
}

.ladder-table tbody tr:hover {
  background: rgba(255,255,255,.03);
  transform: scale(1.01);
}

/* CELLS */
.ladder-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  vertical-align: middle;
}

/* RANK COLUMN */
.rank-col {
  width: 60px;
  text-align: center;
  font-weight: 800;
  font-size: 1.1rem;
}

/* TEAM COLUMN */
.team-col {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-logo {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  background: #1c1c24;
}

.team-logo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f1f2a, #2a2a36);
}

.team-name {
  font-weight: 600;
  letter-spacing: .02em;
}

/* TEAM DETAIL */
.ladder-team-hero {
  background: linear-gradient(145deg, rgba(11, 21, 42, 0.9), rgba(6, 13, 26, 0.92));
  border: 1px solid rgba(119, 167, 255, 0.24);
  border-radius: 14px;
  padding: 20px;
}

.ladder-team-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ladder-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(111, 160, 249, 0.28);
  background: rgba(12, 25, 48, 0.76);
  color: #dbe9ff;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.ladder-meta-pill.action:hover {
  border-color: rgba(120, 210, 255, 0.7);
  color: #fff;
}

.ladder-team-logo-xl,
.ladder-team-logo-lg {
  object-fit: cover;
  background: #121b30;
  border: 1px solid rgba(117, 166, 255, 0.28);
}

.ladder-team-logo-xl {
  width: 94px;
  height: 94px;
  border-radius: 14px;
}

.ladder-team-logo-lg {
  width: 74px;
  height: 74px;
  border-radius: 12px;
}

.ladder-team-logo-xl.placeholder,
.ladder-team-logo-lg.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8cb9ff;
  font-size: 1.6rem;
}

.ladder-kpi-card {
  height: 100%;
  background: linear-gradient(145deg, rgba(10, 20, 40, 0.88), rgba(6, 12, 24, 0.92));
  border: 1px solid rgba(105, 153, 241, 0.24);
  border-radius: 12px;
  padding: 12px 14px;
}

.ladder-kpi-card .kpi-label {
  color: rgba(194, 215, 255, 0.82);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ladder-kpi-card .kpi-value {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 4px;
}

.ladder-panel {
  border: 1px solid rgba(111, 160, 249, 0.24);
  border-radius: 14px;
}

.ladder-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.ladder-summary-item {
  border: 1px solid rgba(98, 141, 214, 0.22);
  background: rgba(11, 22, 42, 0.56);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
}

.ladder-summary-item small {
  display: block;
  color: rgba(186, 209, 250, 0.8);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ladder-summary-item strong {
  font-size: 0.96rem;
}

.ladder-member-avatar {
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(45, 97, 189, 0.9), rgba(36, 131, 212, 0.86));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

/* STATS */
.points-col {
  text-align: right;
  font-weight: 800;
  color: #facc15; /* gold */
}

.wins-col {
  text-align: center;
  color: #22c55e;
  font-weight: 700;
}

.losses-col {
  text-align: center;
  color: #ef4444;
  font-weight: 700;
}

/* TOP 3 HIGHLIGHT */
.rank-1 {
  background: linear-gradient(
    90deg,
    rgba(250,204,21,.15),
    transparent
  );
}

.rank-2 {
  background: linear-gradient(
    90deg,
    rgba(203,213,225,.12),
    transparent
  );
}

.rank-3 {
  background: linear-gradient(
    90deg,
    rgba(251,146,60,.12),
    transparent
  );
}

/* EMPTY STATE */
.empty-ladder {
  padding: 30px;
  text-align: center;
  color: #9ca3af;
  font-style: italic;
}

/* MOBILE */
@media (max-width: 768px) {
  .wins-col,
  .losses-col {
    display: none;
  }

  .ladder-table thead th:nth-child(4),
  .ladder-table thead th:nth-child(5) {
    display: none;
  }

  .ladder-summary-grid {
    grid-template-columns: 1fr;
  }
}
