:root {
  --color-rojo: #781820;
  --color-negro: #050505;
  --color-blanco: #fdfdfd;
  --color-dorado: #d6a23a;
  --athlete-count: 5;
  --max-layout-width: 1300px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--color-negro);
  color: var(--color-blanco);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* CABECERA */
header {
  position: relative;
  padding: 1.8rem 1.6rem 2.4rem;
  background: var(--color-rojo);
  overflow: hidden;
}

/* LOGO GRANDE COMO MARCA DE AGUA */
.header-logo-bg {
  position: absolute;
  right: -10%;
  bottom: -40%;
  height: 220%;
  opacity: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 18px rgba(0, 0, 0, 0.5));
}

header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 55%, var(--color-negro) 55%);
  mix-blend-mode: multiply;
  opacity: 0.8;
  pointer-events: none;
}

.header-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-layout-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.header-text h1 {
  font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.3rem;
}

.header-text p {
  font-size: 0.95rem;
  opacity: 0.9;
}

.header-tag {
  text-align: right;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.9;
}

.header-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.header-selectors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.edition-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
}

.edition-label {
  opacity: 0.9;
  font-size: 0.8rem;
}

.edition-select {
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid var(--color-dorado);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: box-shadow 140ms ease, background 140ms ease;
}

.edition-select:hover {
  background: rgba(0, 0, 0, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.edition-select:focus-visible {
  box-shadow: 0 0 0 2px var(--color-dorado);
}

.edition-select option {
  background: #1a0407;
  color: #fff;
}

/* SELECTOR DE IDIOMA PRO (BOTONES CON BANDERAS) */
.lang-switcher {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.8rem;
}

.lang-label {
  opacity: 0.9;
}

.lang-buttons {
  display: flex;
  gap: 0.25rem;
}

.lang-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid #ffffff55;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 120ms ease-out,
    box-shadow 120ms ease-out,
    border-color 120ms ease-out,
    background 120ms ease-out,
    opacity 120ms ease-out;
  opacity: 0.7;
}

.lang-btn:hover {
  transform: translateY(-1px);
  border-color: var(--color-dorado);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
  opacity: 0.9;
}

.lang-btn.active {
  background: rgba(0, 0, 0, 0.7);
  border-color: var(--color-dorado);
  opacity: 1;
}

.lang-btn:focus-visible {
  outline: 2px solid var(--color-dorado);
  outline-offset: 2px;
}

/* INFO TORNEO */
.tournament-info {
  max-width: var(--max-layout-width);
  margin: 0.8rem auto 0;
  padding: 0.9rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid #ffffff33;
  background: linear-gradient(120deg, #000000dd 0%, #2a0509ee 55%, #000000dd 100%);
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
  gap: 0.7rem 1.3rem;
  font-size: 0.85rem;
}

.tournament-info-main {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.tournament-icon {
  width: auto;
  height: 68px;
  max-width: 75px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), filter 0.22s ease;
}

.tournament-icon:hover {
  transform: scale(1.08) translateY(-2px);
  filter: drop-shadow(0 8px 16px rgba(214, 162, 58, 0.45));
}

.tournament-info-texts {
  min-width: 0;
}

@media (max-width: 720px) {
  .tournament-info {
    grid-template-columns: 1fr;
  }
  .tournament-icon {
    height: 56px;
    max-width: 62px;
  }
}

.tournament-title {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.tournament-name {
  font-size: 1rem;
  font-weight: 600;
}

.tournament-meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.2rem;
}

.tournament-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  align-items: center;
}

.tournament-tag {
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.45);
  font-size: 0.78rem;
  color: #ededed;
  display: inline-flex;
  align-items: center;
  line-height: 1.3;
}

.tournament-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.tournament-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  font-family: inherit;
  transition: all 0.18s ease;
  line-height: 1.25;
}

.tournament-poules-btn,
.tournament-poster-btn,
.tournament-video-btn,
.tournament-referees-btn {
  background: linear-gradient(135deg, rgba(214, 162, 58, 0.2), rgba(120, 24, 32, 0.45));
  border: 1px solid rgba(214, 162, 58, 0.6);
  color: #ffd700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.tournament-poules-btn:hover,
.tournament-poster-btn:hover,
.tournament-video-btn:hover,
.tournament-referees-btn:hover {
  background: linear-gradient(135deg, rgba(214, 162, 58, 0.35), rgba(120, 24, 32, 0.7));
  border-color: #ffd700;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(214, 162, 58, 0.3);
}

.tournament-signup-btn {
  background: linear-gradient(135deg, #cfa84a, #f5d76e);
  color: #111;
  border: 1px solid #ffd700;
  box-shadow: 0 4px 12px rgba(245, 215, 110, 0.3);
}

.tournament-signup-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 215, 110, 0.5);
  color: #000;
}

.tournament-text {
  opacity: 0.9;
  line-height: 1.4;
}

/* SECCIÓN MAPA (COLAPSABLE) */
.map-section {
  max-width: var(--max-layout-width);
  margin: 0.4rem auto 0;
  padding: 0.5rem 0.6rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #ffffff22;
  background: #050505f0;
  transition: border-radius 160ms ease-out, padding 160ms ease-out, margin-top 160ms ease-out;
}

.map-section.expanded {
  border-radius: 1rem;
  padding: 0.8rem 1rem 1rem;
  margin-top: 0.8rem;
}

.map-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

#map-toggle {
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffffdd;
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition:
    background 140ms ease-out,
    transform 140ms ease-out,
    box-shadow 140ms ease-out;
}

#map-toggle-icon {
  font-size: 1rem;
}

#map-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

.map-toggle-hint {
  font-size: 0.72rem;
  opacity: 0.75;
}

.map-content {
  margin-top: 0.5rem;
  display: none;
}

.map-section.expanded .map-content {
  display: block;
}

.map-header h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.9;
  margin-bottom: 0.15rem;
}

.map-header p {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 0.4rem;
}

#academy-map {
  width: 100%;
  height: 260px;
  border-radius: 0.9rem;
  overflow: hidden;
}

.map-legend {
  font-size: 0.75rem;
  opacity: 0.75;
  margin-top: 0.35rem;
}



/* loader barra */
.loader-bar {
  max-width: var(--max-layout-width);
  margin: 0.5rem auto 0;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  color: #f5e9e9;
}

.loader-bar.hidden {
  display: none;
}

.loader-bar button {
  border-radius: 999px;
  border: 1px solid #ffffff55;
  background: transparent;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  color: inherit;
  cursor: pointer;
}

.loader-bar button:hover {
  border-color: var(--color-dorado);
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 1.2rem 1rem 2.5rem;
}

.layout {
  width: 100%;
  max-width: var(--max-layout-width);
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr);
  gap: 2rem;
}

@media (max-width: 840px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

/* FILTROS */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  align-items: center;
}

.filters-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.85;
}

.filter-group {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.78rem;
}

.filter-label {
  opacity: 0.85;
}

.filter-select,
.filter-input {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border-radius: 999px;
  border: 1px solid #ffffff33;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  min-width: 120px;
}

.filter-input {
  min-width: 150px;
}

.filter-select:focus-visible,
.filter-input:focus-visible {
  outline: 2px solid var(--color-dorado);
  outline-offset: 1px;
}

/* “Nube” de atletas */
.cloud-container {
  position: relative;
  border-radius: 1.6rem;
  padding: 1.4rem 1.5rem 2.3rem;
  background: radial-gradient(circle at 15% 0, #ffffff11 0, transparent 55%),
    radial-gradient(circle at 85% 100%, #ffffff0d 0, transparent 60%),
    #000000;
  overflow: hidden;
  border: 1px solid #ffffff26;
}

.cloud-container::before {
  content: "";
  position: absolute;
  inset: 15% 12%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, #ffffff25 0, transparent 60%),
    radial-gradient(circle at 70% 65%, #ffffff18 0, transparent 60%);
  opacity: calc(0.25 + (var(--athlete-count) / 50));
  transform: scale(calc(0.9 + (var(--athlete-count) / 60)));
  filter: blur(32px);
  z-index: 0;
  pointer-events: none;
}

/* 2 columnas	
    .athlete-cloud {
      position: relative;
      z-index: 1;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 1rem;
    }

    .athlete-bubble {
      position: relative;
      border: none;
      cursor: pointer;
      padding: 0.55rem 0.9rem 0.6rem;
      border-radius: 999px;
      background: linear-gradient(135deg, #ffffff11, #ffffff03);
      border: 1px solid #ffffff33;
      display: flex;
      align-items: center;
      gap: 0.55rem;
      backdrop-filter: blur(10px);
      color: inherit;
      transition:
        transform 140ms ease-out,
        box-shadow 140ms ease-out,
        border-color 140ms ease-out,
        background 140ms ease-out;
      min-width: min(46%, 220px);
      max-width: 260px;
    }*/

/* 3 columnas	*/

.athlete-cloud {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.athlete-bubble {
  position: relative;
  border: none;
  cursor: pointer;

  padding: 0.55rem 0.9rem 0.6rem;
  border-radius: 999px;

  background: linear-gradient(135deg, #ffffff11, #ffffff03);
  border: 1px solid #ffffff33;

  display: flex;
  align-items: center;
  gap: 0.55rem;

  backdrop-filter: blur(10px);
  color: inherit;

  transition:
    transform 140ms ease-out,
    box-shadow 140ms ease-out,
    border-color 140ms ease-out,
    background 140ms ease-out;

  /* === CLAVES PARA GRID DE 3 COLUMNAS === */
  width: 100%;
  min-width: 0;
  /* permite que grid la encoja */
  max-width: none;
  /* elimina el tope anterior */
}

@media (max-width: 1200px) {
  .athlete-cloud {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 1000px) {
  .athlete-cloud {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 560px) {
  .athlete-cloud {
    grid-template-columns: 1fr;
  }
}

.athlete-bubble:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.6);
  border-color: var(--color-dorado);
  background: linear-gradient(135deg, #ffffff18, #ffffff07);
}

.athlete-bubble:focus-visible {
  outline: 2px solid var(--color-dorado);
  outline-offset: 3px;
}

.bubble-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  border: 2px solid #ffffffaa;
  box-shadow: 0 0 0 2px #000000cc;
  background: #111111;
}

.bubble-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  display: block;
}

.bubble-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.bubble-name {
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.bubble-academy {
  font-size: 0.78rem;
  opacity: 0.8;
}

/* Panel detalle */
.detail-panel {
  border-radius: 1.6rem;
  background: linear-gradient(155deg, var(--color-rojo) 0, #2a0509 50%, #000000 100%);
  padding: 1.5rem 1.4rem 1.7rem;
  border: 1px solid #ffffff22;
  position: relative;
  overflow: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-dorado) rgba(0, 0, 0, 0.3);
}

@media (min-width: 841px) {
  .detail-panel {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    align-self: start;
  }
}

.detail-panel::after {
  content: "";
  position: absolute;
  right: -40%;
  bottom: -40%;
  width: 110%;
  height: 110%;
  background: linear-gradient(135deg, transparent 40%, #ffffff11 40%);
  opacity: 0.7;
  pointer-events: none;
}

.detail-inner {
  position: relative;
  z-index: 1;
}

.detail-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.8rem;
}

.detail-photo {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  overflow: hidden;
  object-fit: cover;
  object-position: 50% 22%;
  border: 3px solid #ffffffdd;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  cursor: zoom-in;
  background: #111111;
}

.detail-header h2 {
  font-size: 1.3rem;
  margin-bottom: 0.15rem;
}

.detail-academy {
  font-size: 0.9rem;
  opacity: 0.95;
}

.detail-rank {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-dorado);
  margin-top: 0.1rem;
}

.detail-summary {
  font-size: 0.82rem;
  margin-bottom: 0.7rem;
  color: var(--color-dorado);
  opacity: 0.95;
}

.detail-info {
  display: grid;
  gap: 0.8rem;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

/* Botones para secciones de la ficha (Formas / Experiencia) */
.detail-sections {
  margin-top: 0.7rem;
}

.detail-toggle-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.detail-toggle-btn {
  border-radius: 999px;
  border: 1px solid #ffffff33;
  background: rgba(0, 0, 0, 0.35);
  color: #ffffffdd;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.25rem 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition:
    background 120ms ease-out,
    border-color 120ms ease-out,
    transform 120ms ease-out,
    box-shadow 120ms ease-out;
}

.detail-toggle-btn .icon {
  font-size: 1rem;
}

.detail-toggle-btn.active {
  border-color: var(--color-dorado);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.detail-toggle-btn:not(.active) {
  opacity: 0.75;
}

.detail-section+.detail-section {
  margin-top: 0.6rem;
}

.detail-section.collapsed {
  display: none;
}

/* Bloque de FORMAS con iconos */
.formas-container {
  font-size: 0.8rem;
}

.formas-section {
  border-radius: 0.9rem;
  border: 1px solid #ffffff22;
  padding: 0.5rem 0.6rem 0.55rem;
  background: rgba(0, 0, 0, 0.4);
  margin-bottom: 0.5rem;
}

.formas-section-header {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}

.formas-section-title {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  opacity: 0.9;
}

.formas-section-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.forma-box {
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  font-size: 0.7rem;
  padding: 0.25rem 0.2rem;
  border-radius: 0.6rem;
  background: radial-gradient(circle at 30% 0%, #ffffff18 0, #000000aa 40%, #000000ee 100%);
  border: 1px solid #ffffff55;
  text-align: center;

}

.forma-box img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.forma-box span {
  white-space: nowrap;
}

/* Formas que el atleta no tiene aprobadas */
.forma-box.no-forma {
  opacity: 0.28;
  border-style: dashed;
}

/* Roles */
.forma-box.instructor {
  border-color: var(--color-dorado);
  box-shadow: 0 0 10px rgba(214, 162, 58, 0.7);
}

/* Técnico (T-) – borde wisteria */
.forma-box.tecnico {
  border-color: #c9a0dc;
  /* wisteria */
  box-shadow: 0 0 10px rgba(201, 160, 220, 0.7);
}

/* Formas en curso (C-) – estado intermedio */
.forma-box.cursando {
  opacity: 0.65;
  /* más visible que no-forma (0.28), menos que una completa */
  border-color: #ffffff99;
  /* borde claro pero sin brillo dorado/lila */
  box-shadow: none;
  /* sin glow */
}

.formas-subgroup {
  margin-bottom: 0.4rem;
}

.formas-subgroup-header {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  opacity: 0.9;
}

.formas-subgroup-header img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.formas-subgroup-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.formas-legend {
  font-size: 0.72rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}

.detail-forms-empty {
  font-size: 0.85rem;
  opacity: 0.8;
}

.detail-info dt {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  opacity: 0.8;
  margin-bottom: 0.1rem;
}

.detail-info dd {
  margin-left: 0;
  line-height: 1.4;
}

.exp-section {
  margin-top: 0.7rem;
}

.exp-section-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.85;
  margin-bottom: 0.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.exp-section.highlight .exp-section-title {
  color: var(--color-dorado);
}

.exp-star {
  font-size: 0.85rem;
}

.exp-list {
  margin-left: 1rem;
  font-size: 0.86rem;
  line-height: 1.4;
}

.exp-list li+li {
  margin-top: 0.15rem;
}

.detail-empty {
  font-size: 0.9rem;
  opacity: 0.8;
  text-align: center;
  margin-top: 1.5rem;
}

.detail-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  border: none;
  background: transparent;
  color: #ffffffcc;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  z-index: 2;
}

.detail-close:hover {
  color: #ffffff;
}

.hidden {
  display: none;
}

/* MODAL DE FOTO (ZOOM) */
.photo-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease-out;
  z-index: 50;
}

.photo-modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.photo-modal-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 1.2rem;
  border: 3px solid #ffffffdd;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
  cursor: zoom-out;
}

.photo-modal-close {
  position: fixed;
  top: 1.2rem;
  right: 1.4rem;
  border: none;
  background: transparent;
  color: #ffffffee;
  font-size: 2rem;
  cursor: pointer;
}

.photo-modal-close:hover {
  color: #ffffff;
}


/* === FOOTER: punch visual === */
footer#footer-text {
  position: relative;
  padding: 1.05rem 1.25rem 1.15rem;
  border-top: 1px solid #ffffff22;
  background:
    radial-gradient(circle at 15% 50%, rgba(214, 162, 58, 0.10) 0, transparent 55%),
    radial-gradient(circle at 85% 40%, rgba(120, 24, 32, 0.18) 0, transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.88) 100%);
  overflow: hidden;
}

footer#footer-text::before {
  content: "";
  position: absolute;
  inset: -40% -10%;
  background:
    radial-gradient(circle at 20% 70%, rgba(255, 255, 255, 0.06) 0, transparent 45%),
    radial-gradient(circle at 75% 30%, rgba(255, 255, 255, 0.04) 0, transparent 40%);
  filter: blur(26px);
  pointer-events: none;
}

#footer-text .footer-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-layout-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

#footer-text .footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

#footer-text .footer-title {
  color: #ffffffd6;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  opacity: 0.92;
}

#footer-text .footer-dev {
  color: var(--color-dorado);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  opacity: 0.9;
}

/* === POWERED BY · versión potente y equilibrada === */
#footer-text .powered {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;

  padding: 0.55rem 1.05rem;
  border-radius: 999px;

  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.04));
  border: 1px solid #ffffff3a;

  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.65),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);

  backdrop-filter: blur(12px);

  transition:
    background 160ms ease-out,
    border-color 160ms ease-out,
    box-shadow 160ms ease-out,
    transform 160ms ease-out;
}

/* TEXTO */
#footer-text .powered-text {
  font-size: 0.78rem;
  /* ⬅️ mucho más visible */
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffffffee;
  opacity: 0.95;
}

/* LOGO */
#footer-text .powered-logo {
  height: 30px;
  /* ⬅️ logo protagonista */
  width: auto;
  opacity: 1;
  filter:
    brightness(1.35) contrast(1.2) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
}

/* HOVER corporativo */
#footer-text .powered:hover {
  background: linear-gradient(135deg,
      rgba(120, 24, 32, 0.55),
      rgba(120, 24, 32, 0.35));
  border-color: #781820;
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(120, 24, 32, 0.6);
  transform: translateY(-2px);
}


/* móvil */
@media (max-width: 520px) {
  #footer-text .footer-content {
    justify-content: center;
    text-align: center;
  }

  #footer-text .powered {
    justify-content: center;
  }
}



/* Iconos del mapa con forma circular y borde */
.academy-marker-icon {
  border-radius: 999px;
  border: 2px solid #ffffffdd;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  background: #000;
  /* por si la imagen tiene transparencias */
}

/* En móviles / navegadores embebidos: X sutil pero visible de fondo */
@media (max-width: 768px),
(max-height: 750px) {
  .header-logo-bg {
    display: block;
    width: 62vw;
    /* un poco más grande */
    top: -22%;
    /* un pelín más abajo */
    right: -18%;
    /* un poco más hacia dentro */
    opacity: 0.12;
    /* más visible pero sigue siendo suave */
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.45));
  }
}

/* ========================================================
   SECCIÓN RESULTADOS
   ======================================================== */
.results-section {
  max-width: 1200px;
  margin: 1.5rem auto 0 auto;
  padding: 0 1rem;
}

.results-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.results-toggle-row button {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(120, 24, 32, 0.35));
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: #ffd700;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.results-toggle-row button:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.35), rgba(120, 24, 32, 0.5));
  border-color: #ffd700;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.25);
}

.results-toggle-hint {
  font-size: 0.78rem;
  color: #a0a0a0;
}

.results-content {
  display: none;
  margin-top: 1rem;
  background: rgba(14, 15, 19, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75);
}

.results-section.expanded .results-content {
  display: block;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 1rem;
}

.results-header h2 {
  font-size: 1.25rem;
  color: #fff;
  margin: 0 0 0.25rem 0;
}

.results-header p {
  font-size: 0.82rem;
  color: #8f92a0;
  margin: 0;
}

.results-tabs {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px;
  border-radius: 8px;
  gap: 4px;
}

.results-tab-btn {
  background: transparent;
  border: none;
  color: #aaa;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.results-tab-btn:hover {
  color: #fff;
}

.results-tab-btn.active {
  background: #781820;
  color: #fff;
  box-shadow: 0 2px 8px rgba(120, 24, 32, 0.6);
}

/* PODIUM */
.results-podium {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.podium-card {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.2rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.podium-card:hover {
  transform: translateY(-3px);
}

.podium-card.rank-1 {
  border-color: rgba(255, 215, 0, 0.6);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.15), rgba(20, 20, 25, 0.9));
  order: 2;
}

.podium-card.rank-2 {
  border-color: rgba(192, 192, 192, 0.5);
  background: linear-gradient(180deg, rgba(192, 192, 192, 0.12), rgba(20, 20, 25, 0.9));
  order: 1;
}

.podium-card.rank-3 {
  border-color: rgba(205, 127, 50, 0.5);
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.12), rgba(20, 20, 25, 0.9));
  order: 3;
}

.podium-medal {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.podium-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.podium-detail {
  font-size: 0.78rem;
  color: #bbb;
}

/* RESULTS TABLE */
.results-table-container {
  max-height: 520px;
  overflow-y: auto;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0d0e12;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.results-table-container::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.results-table-container::-webkit-scrollbar-track {
  background: #08090b;
  border-radius: 4px;
}

.results-table-container::-webkit-scrollbar-thumb {
  background: rgba(214, 162, 58, 0.4);
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.results-table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(214, 162, 58, 0.75);
}

.results-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.85rem;
}

.results-table th,
.results-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.results-table th {
  position: sticky;
  top: 0;
  background: #180508 !important; /* Totalmente opaco para que las filas no se transparenten */
  color: #ffd700;
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid rgba(214, 162, 58, 0.5);
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.75);
}

.results-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.results-table tbody tr:hover {
  background: rgba(214, 162, 58, 0.08);
}

.results-table .rank-cell {
  font-weight: 700;
  color: #ffd700;
  width: 75px;
  white-space: nowrap;
}

.results-table .name-cell {
  font-weight: 600;
  color: #f0f0f5;
}

/* ATHLETE DETAIL CARD - RESULTS BADGE */
.athlete-edition-results {
  margin: 0.8rem 0;
  padding: 0.65rem 0.9rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(120, 24, 32, 0.2));
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.athlete-results-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffd700;
  font-weight: 700;
}

.athlete-results-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.athlete-res-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  color: #eee;
}

.athlete-res-badge strong {
  color: #ffd700;
}

/* ========================================================
   CARTEL OFICIAL DEL TORNEO (POSTER)
   ======================================================== */

.detail-poster-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeIn 0.3s ease-out;
  padding: 0.5rem 0;
}

.detail-poster-header {
  margin-bottom: 0.8rem;
}

.detail-poster-badge {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #ffd700;
  background: rgba(214, 162, 58, 0.15);
  border: 1px solid rgba(214, 162, 58, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
}

.detail-poster-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.detail-poster-card {
  position: relative;
  max-width: 250px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.7),
    0 0 20px rgba(120, 24, 32, 0.35);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.detail-poster-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(214, 162, 58, 0.7);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.85),
    0 0 28px rgba(214, 162, 58, 0.4);
}

.detail-poster-img {
  width: 100%;
  height: auto;
  display: block;
}

.detail-poster-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
  padding: 1.5rem 0.8rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.detail-poster-card:hover .detail-poster-overlay {
  opacity: 1;
}

.detail-poster-zoom-icon {
  font-size: 1rem;
}

.detail-poster-zoom-text {
  font-size: 0.72rem;
  color: #ffd700;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ========================================================
   FOTO REAL DE PODIOS EN RESULTADOS
   ======================================================== */
.results-podium-photo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.8rem;
  animation: fadeIn 0.3s ease-out;
}

.podium-real-photo-card {
  position: relative;
  max-width: 720px;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(214, 162, 58, 0.45);
  background: #000;
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.75),
    0 0 24px rgba(214, 162, 58, 0.2);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.podium-real-photo-card:hover {
  transform: translateY(-3px);
  border-color: #ffd700;
  box-shadow:
    0 20px 44px rgba(0, 0, 0, 0.85),
    0 0 32px rgba(214, 162, 58, 0.45);
}

.podium-real-photo-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.podium-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.4) 65%, transparent 100%);
  padding: 1.8rem 1rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.podium-photo-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffd700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.podium-photo-hint {
  font-size: 0.75rem;
  color: #bbb;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ========================================================
   MODAL PARA VÍDEO PROMOCIONAL
   ======================================================== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.video-modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.video-modal-container {
  position: relative;
  z-index: 2;
  max-width: 860px;
  width: 100%;
  background: #0d0e14;
  border: 1px solid rgba(214, 162, 58, 0.5);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(214, 162, 58, 0.25);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.video-modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.video-modal-close:hover {
  background: #781820;
  border-color: #ffd700;
  transform: scale(1.08);
}

.video-modal-player-wrapper {
  position: relative;
  width: 100%;
  background: #000;
}

.video-modal-player-wrapper video {
  width: 100%;
  max-height: 70vh;
  display: block;
  outline: none;
}

.video-modal-info {
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.video-modal-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(214, 162, 58, 0.15);
  border: 1px solid rgba(214, 162, 58, 0.35);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.video-modal-title {
  margin: 0;
  font-size: 0.88rem;
  color: #ededed;
  font-weight: 600;
}

/* ========================================================
   SWITCHER DE MEDIOS EN PANEL DE DETALLE
   ======================================================== */
.detail-media-switcher {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 3px;
  gap: 4px;
  margin-bottom: 0.8rem;
}

.detail-media-tab {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #bbb;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.detail-media-tab:hover {
  color: #fff;
}

.detail-media-tab.active {
  background: linear-gradient(135deg, rgba(214, 162, 58, 0.35), rgba(120, 24, 32, 0.5));
  color: #ffd700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.detail-video-card {
  position: relative;
  max-width: 320px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(214, 162, 58, 0.4);
  background: #000;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7);
}

.detail-video-card video {
  width: 100%;
  display: block;
  outline: none;
}

.detail-video-fullscreen-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.5rem 0.8rem;
  background: rgba(20, 5, 8, 0.9);
  border: none;
  border-top: 1px solid rgba(214, 162, 58, 0.3);
  color: #ffd700;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.detail-video-fullscreen-btn:hover {
  background: rgba(214, 162, 58, 0.25);
  color: #fff;
}

/* ========================================================
   OPTIMIZACIONES RESPONSIVE PARA MÓVIL (<= 680px)
   ======================================================== */
@media (max-width: 680px) {
  /* Cabecera */
  header {
    padding: 1.25rem 1rem 1.4rem;
  }

  header::after {
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.8) 100%);
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .header-text {
    width: 100%;
  }

  .header-text p {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
  }

  .header-text h1 {
    font-size: 1.55rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
    margin: 0;
  }

  .header-controls {
    width: 100%;
    align-items: stretch;
    gap: 0.65rem;
  }

  .header-tag {
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    width: 100%;
  }

  #header-tag-top {
    font-size: 0.72rem;
    padding: 0.18rem 0.55rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 999px;
    border: 1px solid rgba(214, 162, 58, 0.45);
    color: #ffd700;
    font-weight: 700;
    letter-spacing: 0.06em;
    display: inline-block;
  }

  #header-tag-bottom {
    font-size: 0.72rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-block;
  }

  .header-selectors {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .edition-switcher {
    gap: 0.35rem;
    font-size: 0.78rem;
  }

  .edition-select {
    padding: 0.28rem 0.65rem;
    font-size: 0.78rem;
    max-width: 150px;
  }

  .lang-switcher {
    gap: 0.35rem;
    font-size: 0.78rem;
  }

  .lang-label {
    display: none;
  }

  .lang-buttons {
    gap: 0.25rem;
  }

  .lang-btn {
    width: 1.95rem;
    height: 1.95rem;
    font-size: 1.05rem;
  }

  /* Info torneo */
  .tournament-info {
    margin: 0.55rem 0.75rem 0;
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
    gap: 0.75rem;
  }

  .tournament-info-main {
    gap: 0.8rem;
  }

  .tournament-icon {
    height: 52px;
    max-width: 56px;
  }

  .tournament-title {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .tournament-name {
    font-size: 1.05rem;
    line-height: 1.25;
  }

  .tournament-description {
    font-size: 0.8rem;
    margin-top: 0.15rem;
    line-height: 1.35;
  }

  .tournament-meta {
    margin-top: 0.5rem;
    gap: 0.55rem;
  }

  .tournament-meta-tags {
    gap: 0.35rem;
  }

  .tournament-tag {
    font-size: 0.74rem;
    padding: 0.2rem 0.55rem;
  }

  .tournament-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    width: 100%;
  }

  .tournament-action-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 0.42rem 0.5rem;
    font-size: 0.76rem;
    box-sizing: border-box;
  }

  .tournament-signup-btn {
    grid-column: 1 / -1;
  }

  /* Sección mapa */
  .map-section {
    margin: 0.45rem 0.75rem 0;
    border-radius: 0.9rem;
    padding: 0.45rem 0.65rem;
  }

  .map-toggle-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  #map-toggle {
    width: 100%;
    justify-content: center;
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
  }

  .map-toggle-hint {
    text-align: center;
    font-size: 0.7rem;
    opacity: 0.75;
  }

  /* Contenido principal */
  main {
    padding: 0.8rem 0.75rem 2rem;
  }

  .layout {
    gap: 1.2rem;
  }

  /* Filtros */
  .filters {
    gap: 0.45rem;
    margin-bottom: 0.8rem;
  }

  .filters-title {
    width: 100%;
    font-size: 0.74rem;
    margin-bottom: 0.1rem;
  }

  .filter-group {
    flex: 1 1 calc(50% - 0.45rem);
    min-width: 130px;
    font-size: 0.75rem;
  }

  .filter-group:last-child {
    flex: 1 1 100%;
  }

  .filter-select,
  .filter-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-size: 0.76rem;
    padding: 0.25rem 0.55rem;
  }

  /* Nube y burbujas */
  .cloud-container {
    padding: 1rem 0.85rem 1.6rem;
    border-radius: 1.2rem;
  }

  .athlete-bubble {
    padding: 0.5rem 0.75rem;
    gap: 0.6rem;
  }

  .bubble-avatar {
    width: 42px;
    height: 42px;
  }

  .bubble-name {
    font-size: 0.92rem;
  }

  .bubble-academy {
    font-size: 0.74rem;
  }

  /* Panel detalle */
  .detail-panel {
    border-radius: 1.2rem;
    padding: 1.15rem 1rem 1.4rem;
  }

  .detail-media-switcher {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
  }

  .detail-media-tab {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.35rem 0.6rem;
    font-size: 0.74rem;
  }

  .detail-poster-card,
  .detail-video-card {
    max-width: 100%;
    margin: 0 auto;
  }

  /* Resultados */
  .results-section {
    padding: 0 0.75rem;
  }

  .results-content {
    padding: 0.9rem 0.75rem;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .results-tabs {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }

  .results-tab-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 380px) {
  .header-text h1 {
    font-size: 1.38rem;
  }

  .edition-select {
    max-width: 125px;
    font-size: 0.74rem;
  }

  .tournament-actions {
    grid-template-columns: 1fr;
  }
}
