/* ================================
   FECHA BANNER
================================ */

.fecha-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, rgba(245,197,24,0.10), rgba(245,197,24,0.04));
  border: 1px solid rgba(245,197,24,0.25);
  border-radius: 14px;
  padding: 18px 24px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
  min-height: 68px;
  transition: opacity 0.3s ease;
}

/* línea de acento izquierda */
.fecha-banner::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #f5c518, rgba(245,197,24,0.3));
  border-radius: 4px 0 0 4px;
}

.fecha-banner--loading {
  pointer-events: none;
}

/* skeleton del banner mientras carga */
.fecha-skeleton {
  width: 60%;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.05) 25%,
    rgba(255,255,255,0.10) 50%,
    rgba(255,255,255,0.05) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.fecha-banner__icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.fecha-banner__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.fecha-banner__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #f5c518;
  opacity: 0.75;
}

.fecha-banner__titulo {
  font-size: 20px;
  font-weight: 700;
  color: #f5e27a;
  line-height: 1.1;
}

.fecha-banner__rango {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 1px;
}

.fecha-banner__nota {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  font-style: italic;
}

.fecha-banner__pill {
  margin-left: auto;
  flex-shrink: 0;
  background: rgba(245,197,24,0.15);
  border: 1px solid rgba(245,197,24,0.3);
  color: #f5c518;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ================================
   IFRAME LAZY LOADER
================================ */

.iframe-wrapper {
  position: relative;
  width: 100%;
  min-height: 200px;
  border-radius: 10px;
  overflow: hidden;
}

.iframe-wrapper iframe {
  width: 100%;
  border: none;
  border-radius: 10px;
  display: block;
  /* ocultamos hasta que cargue */
  opacity: 0;
  transition: opacity 0.4s ease;
}

.iframe-wrapper iframe.loaded {
  opacity: 1;
}

/* skeleton de la tabla */
.iframe-skeleton {
  position: absolute;
  inset: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.iframe-skeleton.hidden {
  opacity: 0;
}

.sk-row {
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.sk-row.sk-header {
  height: 38px;
  background: linear-gradient(90deg,
    rgba(245,197,24,0.06) 25%,
    rgba(245,197,24,0.12) 50%,
    rgba(245,197,24,0.06) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

/* desfase entre filas */
.sk-row:nth-child(2) { animation-delay: 0.1s; }
.sk-row:nth-child(3) { animation-delay: 0.2s; }
.sk-row:nth-child(4) { animation-delay: 0.3s; }
.sk-row:nth-child(5) { animation-delay: 0.4s; }
.sk-row:nth-child(6) { animation-delay: 0.5s; }
.sk-row:nth-child(7) { animation-delay: 0.6s; }

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 600px) {
  .fecha-banner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
  }

  .fecha-banner__pill {
    margin-left: 0;
  }

  .fecha-banner__titulo {
    font-size: 17px;
  }
}

/* ================================
   MATCHES SECTION
================================ */

.matches-section {
  margin-top: 32px;
}

/* Header con título + navegación en una sola línea */
.matches-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: rgba(245,197,24,0.06);
  border: 1px solid rgba(245,197,24,0.15);
  border-radius: 12px;
}

.matches-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: center;
  flex: 1;
}

.matches-header-fase {
  font-size: 16px;
  font-weight: 700;
  color: #f5c518;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.matches-header-date {
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.nav-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1px solid rgba(245,197,24,0.35);
  border-radius: 8px;
  background: rgba(245,197,24,0.08);
  color: #f5c518;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover {
  background: rgba(245,197,24,0.2);
  border-color: rgba(245,197,24,0.6);
}

.nav-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

/* Grid exterior: hasta 6 en una fila */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px;
}

/* Card: columna — fila de datos arriba, link abajo */
.match-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s, background 0.2s;
  min-width: 0;
}

.match-card:hover {
  border-color: rgba(245,197,24,0.3);
  background: rgba(255,255,255,0.06);
}

.match-card--pending {
  opacity: 0.65;
}

/* Fila superior: jugadorA — score — jugadorB, todos en la misma línea */
.match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 6px;
}

.match-team {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.match-team--right {
  text-align: right;
}

.match-player {
  font-size: 15px;
  font-weight: 600;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.match-country {
  font-size: 12px;
  color: #f5c518;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Marcador centrado verticalmente respecto a los nombres */
.match-score {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 1px;
}

.section > div {
    padding: 16px;
}


.score-chip {

    background: #f5c518;

    color: #111;

    font-weight: 800;

    font-size: 16px;

    padding: 4px 12px;

    border-radius: 6px;

    box-shadow: 0 3px 8px rgba(75, 72, 60, 0.35);

}

.score-chip--pending {
  background: transparent;
  color: rgb(245, 197, 24);
  font-size: 10px;
  padding: 2px 2px;
  border: 1px solid rgba(245, 197, 24,0.9);
}

/* Link abajo, separado por borde sutil */
.match-footer {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 6px;
  display: flex;
  justify-content: center;
  min-height: 18px; /* altura reservada aunque no haya link */
}

.video-link {
  color: #f44336;
  text-decoration: none;
  font-size: 13px;
  line-height: 1;
  transition: color 0.2s;
  font-weight: bold;
}

.video-link:hover {
  color: #ff6b6b;
  text-decoration: none;
}

/* Mobile: 2 columnas */
@media (max-width: 700px) {
  .matches-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .matches-header {
    padding: 10px 14px;
  }
  .matches-header-fase {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .matches-header {
    padding: 10px 14px;
  }
  .matches-header-fase {
    font-size: 14px;
  }
  .match-player {
    font-size: 13px;
  }
}

/* ================================
   TABLA DE POSICIONES
================================ */

.standings-table-wrap {
    margin-top: 4px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}

/* Header: logo + título */
.standings-header {
    background: #305496;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px;
    border-bottom: 2px solid #1e3a6e;
}

.standings-header-logo {
    height: 90px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.standings-header-title {
    text-align: right;
    line-height: 1.2;
}

.standings-header-div {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.standings-header-sub {
    font-size: 11px;
    font-weight: 700;
    color: #f5c518;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.standings-scroll {
    overflow-x: auto;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}

/* Cabecera de columnas */
.standings-table thead tr {
    background: #1c3566;
}

.standings-table thead th {
    padding: 7px 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #f5c518;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.standings-table thead th.st-name {
    text-align: left;
    padding-left: 10px;
}

/* Filas */
.standings-table tbody tr {
    border-bottom: 1px solid rgba(0,0,0,0.15);
    transition: filter 0.15s;
}

.standings-table tbody tr:last-child {
    border-bottom: none;
}

.standings-table tbody tr:hover {
    filter: brightness(1.1);
}

/* Fila sin color especial: alternar levemente */
.standings-table tbody tr.st-default:nth-child(even) {
    background: #fff;
}

.standings-table tbody td {
    padding: 7px 8px;
    text-align: center;
    color: #000;
    white-space: nowrap;
    font-size: 13px;
}

.standings-table tbody td.st-name {
    text-align: left;
    padding-left: 10px;
    font-weight: 600;
    color: #000;
}

/* Posición */
.st-pos {
    width: 28px;
    font-weight: 700;
    color: #000;
    font-size: 12px;
}

/* Puntos: destacados */
.st-pts {
    font-weight: 800;
    font-size: 14px;
    color: #f5c518;
}

/* Diferencia */
.st-dif {
    font-weight: 700;
}

/* Filas con color especial: texto oscuro para contraste */
.st-row--colored td {
    color: #000 !important;
}
.st-row--colored .st-pts {
    color: #1e3a6e !important;
}
.st-row--colored .st-pos {
    color: #000 !important;
}
.st-row--colored td.st-name {
    color: #000 !important;
}

/* Leyenda inferior */
.standings-legend {
    background: #1c3566;
    padding: 6px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #94a3b8;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.standings-empty {
    color: #64748b;
    font-size: 13px;
    text-align: center;
    padding: 20px 0;
    background: #305496;
}

/* ================================
   BOTÓN COMPARTIR TABLA
================================ */

.standings-share-bar {
    background: #1c3566;
    padding: 8px 10px;
    display: flex;
    justify-content: center;
}

.standings-share-btn {
    background: transparent;
    border: 1px solid rgba(245,197,24,0.35);
    color: #f5c518;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    letter-spacing: 0.4px;
}

.standings-share-btn:hover {
    background: rgba(245,197,24,0.12);
    border-color: rgba(245,197,24,0.7);
}

/* ================================
   MODAL DE PREVIEW / COMPARTIR
================================ */

#share-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.82);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    box-sizing: border-box;
    animation: lbFadeIn 0.2s ease;
}

#share-modal-box {
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 24px 60px rgba(0,0,0,0.7);
    animation: lbZoomIn 0.22s ease;
}

#share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
}

#share-modal-close {
    background: rgba(255,255,255,0.07);
    border: none;
    color: #94a3b8;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

#share-modal-close:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

#share-modal-img {
    width: 100%;
    display: block;
    max-height: 70vh;
    object-fit: contain;
    background: transparent;
}

#share-modal-actions {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.share-action-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: #e5e7eb;
}

.share-action-btn:hover {
    background: rgba(255,255,255,0.1);
}

.share-action-btn--primary {
    background: #f5c518;
    color: #0a0f1c;
    border-color: #f5c518;
}

.share-action-btn--primary:hover {
    background: #fde047;
    border-color: #fde047;
}

@media (max-width: 480px) {
    #share-modal-actions {
        flex-direction: column;
    }
}

.match-image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;

    z-index: 9999;
}

.match-image-modal.show {
    opacity: 1;
    visibility: visible;
}

.match-image-modal img {
    max-width: 95vw;
    max-height: 90vh;

    object-fit: contain;

    border-radius: 10px;

    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.match-image-close {
    position: absolute;

    top: 20px;
    right: 25px;

    width: 42px;
    height: 42px;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.12);
    color: white;

    font-size: 22px;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: background 0.2s ease;
}

.match-image-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

body.modal-open {
    overflow: hidden;
}

/* ================================
   OBSERVACIÓN DE PARTIDO
================================ */
 
.match-obs {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.3;
    display: block;
    margin-top: 3px;
    text-align: center;
}