/* Pantalla de información de torneo (reutiliza la base visual de booking.css) */
.tn-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 18px; scrollbar-width: none; display: flex; flex-direction: column; gap: 12px; }
.tn-scroll::-webkit-scrollbar { display: none; }

.tn-hero { position: relative; height: 230px; border-radius: 18px; overflow: hidden; flex-shrink: 0; border: 1.5px solid var(--bk-line); animation: bkRise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%); }
.tn-hero-img { position: absolute; inset: 0; background: var(--img) center/cover; animation: tnZoom 9s ease-out both; }
@keyframes tnZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.tn-hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(11, 12, 14, 0.95) 100%); }
.tn-hero-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tn-badge { font-size: 10px; font-weight: 800; letter-spacing: 0.06em; padding: 5px 11px; border-radius: 999px; color: #8CFF6B; background: rgba(50, 199, 54, 0.22); border: 1.5px solid #32C736; backdrop-filter: blur(6px); }
.tn-prize { font-size: 12px; font-weight: 900; color: #F59E0B; background: rgba(0, 0, 0, 0.75); padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(245, 158, 11, 0.5); }
.tn-hero-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; color: #fff; }
.tn-hero-bottom small { font-size: 10.5px; font-weight: 800; letter-spacing: 0.18em; color: #8CFF6B; }
.tn-hero-bottom h2 { margin-top: 4px; font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 27px; line-height: 1.05; }

.tn-count { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--bk-accent); background: linear-gradient(135deg, rgba(50, 199, 54, 0.18), rgba(50, 199, 54, 0.04)); animation: bkRise 0.5s 0.1s both; }
.tn-count > span { font-size: 11px; font-weight: 800; letter-spacing: 0.2em; color: var(--bk-muted); }
.tn-count strong { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 40px; line-height: 1; color: var(--bk-accent); }
.tn-count strong b { font-weight: 900; }
.tn-count em { font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: 0.16em; color: var(--bk-text); }
.tn-count .tn-soon { font-size: 18px; font-style: normal; letter-spacing: 0.08em; }

.tn-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tn-fact { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; background: var(--bk-card); border: 1.5px solid var(--bk-line); }
.tn-fact i { color: var(--bk-accent); font-size: 16px; margin-bottom: 4px; }
.tn-fact small { font-size: 9.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bk-muted); }
.tn-fact strong { font-size: 14px; line-height: 1.25; }

.tn-block { padding: 14px 16px; border-radius: 16px; background: var(--bk-card); border: 1.5px solid var(--bk-line); }
.tn-block h3 { margin-bottom: 8px; font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: 14px; letter-spacing: 0.08em; color: var(--bk-accent); padding-left: 10px; border-left: 3px solid var(--bk-accent); }
.tn-block p { font-size: 13px; line-height: 1.55; color: var(--bk-muted); }
.tn-block p + p { margin-top: 8px; }
.tn-block .tn-lead { color: var(--bk-text); font-weight: 600; font-size: 14px; }
.tn-points { list-style: none; display: grid; gap: 9px; }
.tn-points li { position: relative; padding-left: 26px; font-size: 13px; line-height: 1.4; color: var(--bk-text); }
.tn-points li::before { content: '\f058'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 0; top: 0; color: var(--bk-accent); }
.tn-note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1.5px dashed var(--bk-accent); font-size: 12.5px; line-height: 1.45; color: var(--bk-muted); }
.tn-note i { color: var(--bk-accent); margin-top: 2px; }
.tn-note strong { color: var(--bk-text); word-break: break-all; }
.tn-tba { text-align: center; font-size: 11.5px; color: var(--bk-muted); padding-bottom: 4px; }

.tn-scroll .tn-fact, .tn-scroll .tn-block, .tn-scroll .tn-note, .tn-scroll .tn-tba { animation: bkRise 0.5s calc(var(--i, 0) * 60ms + 200ms) cubic-bezier(0.16, 1, 0.3, 1) both; }

/* Tarjetas del listado */
.tn-detail-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; padding: 9px 14px; border-radius: 12px; border: 1.5px solid var(--km-stroke); background: transparent; color: var(--km-lime); font-weight: 800; font-size: 12.5px; cursor: pointer; transition: all 0.2s; }
.tn-detail-btn:hover { border-color: var(--km-lime); background: rgba(50, 199, 54, 0.1); }
[data-theme="light"] .tn-detail-btn { color: #14702A; }
[data-theme="light"] .tn-badge { color: #8CFF6B; }
[data-theme="light"] .upcoming-tournaments-grid h4 { color: #0F1A13 !important; }

/* ---- Multimedia de torneos: video sobre la portada y galería con visor ---- */
.tournament-banner-wrapper { overflow: hidden; }
.tournament-banner-video,
.tn-hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 0.7s ease; pointer-events: none;
}
.tournament-banner-video.is-playing,
.tn-hero-video.is-playing { opacity: 1; }

.tn-count-chip {
  margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-style: normal;
  font-size: 10px; font-weight: 800; letter-spacing: 0.04em;
  color: #8CFF6B; background: rgba(50, 199, 54, 0.18);
}

.tn-gallery {
  display: flex; gap: 10px; margin: 0 -16px; padding: 2px 16px 8px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.tn-gallery::-webkit-scrollbar { display: none; }
.tn-gal-item {
  position: relative; flex: 0 0 auto; width: 150px; height: 108px; padding: 0;
  overflow: hidden; border: 1.5px solid var(--bk-line); border-radius: 14px;
  background: #0d1510; cursor: pointer; scroll-snap-align: start;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.tn-gal-item:hover { border-color: rgba(140, 255, 107, 0.5); }
.tn-gal-item:active { transform: scale(0.97); }
.tn-gal-item img,
.tn-gal-item video { display: block; width: 100%; height: 100%; object-fit: cover; }
.tn-gal-item small {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 9px 6px;
  overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10px; font-weight: 700; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
}
.tn-gal-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  font-size: 12px; color: #fff; background: rgba(0, 0, 0, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.75); padding-left: 2px;
}

/* booking.css fuerza «position: relative; z-index: 1» a todo hijo de .bk-root con un selector muy específico. */
.tn-viewer {
  position: absolute !important; inset: 0; z-index: 60 !important;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(5, 7, 6, 0.97); animation: tnViewerIn 0.22s ease both;
}
@keyframes tnViewerIn { from { opacity: 0; } to { opacity: 1; } }
.tn-viewer-stage {
  flex: 1; width: 100%; min-height: 0; display: grid; place-items: center;
  padding: 64px 12px 8px;
}
.tn-viewer-stage img,
.tn-viewer-stage video {
  max-width: 100%; max-height: 100%; border-radius: 12px; object-fit: contain; background: #000;
}
.tn-viewer-close,
.tn-viewer-nav {
  position: absolute; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 50%;
  color: #fff; background: rgba(0, 0, 0, 0.55); cursor: pointer; font-size: 15px;
}
.tn-viewer-close { top: 14px; right: 14px; }
.tn-viewer-nav { top: 50%; transform: translateY(-50%); }
.tn-viewer-nav.is-prev { left: 8px; }
.tn-viewer-nav.is-next { right: 8px; }
.tn-viewer-close:hover,
.tn-viewer-nav:hover { background: rgba(50, 199, 54, 0.35); }
.tn-viewer-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 6px 18px calc(16px + env(safe-area-inset-bottom));
  font-size: 12px; font-weight: 700; color: #fff;
}
.tn-viewer-foot p { margin: 0; }
.tn-viewer-foot span { color: #8CFF6B; white-space: nowrap; }

/* Tarjeta «En curso» sin torneo: se oculta su contenido y se muestra el mensaje bilingüe. */
#tournament-card-live[data-ea-empty="1"] > * { display: none !important; }
#tournament-card-live[data-ea-empty="1"]::before { content: attr(data-ea-msg); display: block; padding: 36px 18px; text-align: center; color: var(--km-neutral); font-size: 13px; }

/* ==========================================================================
   ESTADO INTELIGENTE DE EQUIPO PARA INSCRIPCIÓN A TORNEOS
   ========================================================================== */
.tourney-team-state-card {
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  background: var(--km-surface-variant, #15181b);
  border: 1.5px solid var(--km-stroke, rgba(255, 255, 255, 0.1));
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeIn 0.3s ease;
}
.tourney-team-state-card.state-no-team {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(15, 17, 20, 0.95) 100%);
}
.tourney-team-state-card.state-incomplete {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(15, 17, 20, 0.95) 100%);
}
.tourney-team-state-card.state-ready {
  border-color: rgba(50, 199, 54, 0.5);
  background: linear-gradient(135deg, rgba(50, 199, 54, 0.12) 0%, rgba(15, 17, 20, 0.95) 100%);
}

.tt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.tt-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tt-badge.warn {
  background: rgba(245, 158, 11, 0.2);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.tt-badge.orange {
  background: rgba(249, 115, 22, 0.2);
  color: #FB923C;
  border: 1px solid rgba(249, 115, 22, 0.4);
}
.tt-badge.green {
  background: rgba(50, 199, 54, 0.2);
  color: #32C736;
  border: 1px solid rgba(50, 199, 54, 0.4);
}

.tt-count-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tt-count-pill.warn {
  color: #F59E0B;
  border-color: rgba(245, 158, 11, 0.4);
}
.tt-count-pill.green {
  color: #32C736;
  border-color: rgba(50, 199, 54, 0.4);
}

.tt-title {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  margin: 0;
}
.tt-desc {
  font-size: 11.5px;
  color: var(--km-neutral, #94A3B8);
  line-height: 1.45;
  margin: 0;
}

.tt-team-headline {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tt-crest {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.tt-crest.ready {
  border-color: rgba(50, 199, 54, 0.6);
  background: rgba(50, 199, 54, 0.15);
}
.tt-team-name {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  margin: 0;
}
.tt-team-sub {
  font-size: 11px;
  color: var(--km-neutral, #94A3B8);
  display: block;
}

.tt-guide-box {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 3px solid #F59E0B;
}
.tt-guide-title {
  font-size: 11px;
  font-weight: 800;
  color: #F59E0B;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tt-guide-steps {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tt-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: #CBD5E1;
  line-height: 1.35;
}
.tt-step-num {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.25);
  color: #F59E0B;
  font-size: 10px;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.tt-actions-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.btn-tt-create {
  flex: 1;
  min-width: 140px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #32C736;
  color: #0B0C0E;
  font-weight: 900;
  font-size: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-tt-create:active { transform: scale(0.97); }

.btn-tt-invite {
  flex: 1;
  min-width: 160px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #25D366;
  color: #FFFFFF;
  font-weight: 900;
  font-size: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
  transition: transform 0.15s ease;
}
.btn-tt-invite:active { transform: scale(0.97); }

.btn-tt-link {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
  font-weight: 700;
  font-size: 11.5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-tt-link:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.btn-tt-link-small {
  background: none;
  border: none;
  color: var(--km-neutral, #94A3B8);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
}
.btn-tt-link-small:hover { color: #fff; }

.tt-ready-note {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(50, 199, 54, 0.1);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11px;
  color: #CBD5E1;
}

.btn-sm-tourney {
  padding: 8px 12px;
  border-radius: 8px;
  background: #32C736;
  color: #0B0C0E;
  font-weight: 800;
  font-size: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

