/* torneo.css — /torneo, /torneo/inscripcion y la pantalla de OBS del torneo.
   Usa las variables de la plantilla (style.css): --accent, --i12, --i28, --i5… */

/* ── Avatares: foto o inicial de color ── */
.tr-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; font: 700 16px 'Archivo', sans-serif; color: #fff; background: var(--i28); }
.tr-av--s { width: 28px; height: 28px; font-size: 12px; }
.tr-av--xl { width: 72px; height: 72px; font-size: 30px; }
.tr-av--vacio { background: none; border: 1px dashed var(--i28); color: var(--i5); }

/* ── Arriba: el torneo y los premios ── */
.tr-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: end; }
.tr-intro .h2 { margin: 8px 0 4px; }
.tr-juego { font-size: clamp(22px, 2.4vw, 32px); color: var(--accent); }
.tr-lead { max-width: 60ch; margin-top: 12px; color: var(--i7); font-size: 17px; line-height: 1.5; }
.tr-cupos { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; text-transform: uppercase; letter-spacing: .1em; color: var(--i7); }
.tr-cupos b { color: var(--accent); font-weight: 500; }
.tr-cupo-barra { height: 8px; margin-top: 12px; background: var(--i12); }
.tr-cupo-barra span { display: block; height: 100%; background: var(--accent); }
.tr-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 22px; }

.tr-premios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.tr-premio { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 16px; border: 1px solid var(--i28); overflow: hidden; }
.tr-premio b { font: 800 clamp(26px, 2.6vw, 40px) / 1 'Orbitron', sans-serif; }
.tr-premio-n { position: absolute; right: 8px; top: -14px; font: 900 84px / 1 'Orbitron', sans-serif; color: var(--i12); pointer-events: none; }
.tr-premio--1 { border-color: var(--accent); padding-top: 34px; }
.tr-premio--1 b { color: var(--accent); }
.tr-premio--2 { padding-top: 24px; }
.tr-premios-nota { grid-column: 1 / -1; letter-spacing: .12em; }

/* ── El podio ── */
.tr-podio-fila { display: flex; justify-content: center; align-items: flex-end; gap: clamp(10px, 3vw, 40px); margin-top: 24px; }
.tr-podio-lugar { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.tr-podio-lugar b { font: 700 20px 'Archivo', sans-serif; }
.tr-podio-escalon { display: grid; place-items: center; width: clamp(90px, 14vw, 160px); background: var(--i12); font: 900 40px 'Orbitron', sans-serif; color: var(--i5); }
.tr-podio-lugar--1 .tr-podio-escalon { height: 150px; background: var(--accent); color: #fff; }
.tr-podio-lugar--2 .tr-podio-escalon { height: 110px; }
.tr-podio-lugar--3 .tr-podio-escalon { height: 80px; }

/* ── La pelea en vivo ── */
.tr-vivo { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: clamp(20px, 3vw, 36px); border: 1px solid var(--accent); text-align: center; }
.tr-vivo-pelea { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 4vw, 60px); width: 100%; }
.tr-vivo-lado { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.tr-vivo-lado b { font: 700 clamp(18px, 2vw, 26px) 'Archivo', sans-serif; overflow-wrap: anywhere; }
.tr-vivo-lado small { color: var(--i5); }
.tr-vivo-marcador { display: flex; align-items: center; gap: 14px; font: 900 clamp(44px, 6vw, 84px) / 1 'Orbitron', sans-serif; color: var(--accent); }
.tr-vivo-marcador i { font-style: normal; color: var(--i28); font-size: .6em; }

/* ── Las peleas ── */
.tr-sec .sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; }
.tr-sec .sec-head .mono { letter-spacing: .12em; }
.tr-nota { margin-bottom: 14px; color: var(--i7); }
.tr-peleas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tr-peleas--chicas { margin-top: 14px; }
.tr-pelea { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--i28); min-width: 0; }
.tr-pelea.is-vivo { border-color: var(--accent); }
.tr-pelea-top { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--i5); letter-spacing: .08em; text-transform: uppercase; }
.tr-pelea-top .push { margin-left: auto; }
.tr-lado { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.tr-quien { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tr-quien b { font: 600 16px 'Archivo', sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-quien small { color: var(--i5); font-size: 13px; }
.tr-lado.is-gana .tr-quien b { color: var(--accent); }
.tr-lado.is-pierde { opacity: .55; }
.tr-rounds { font: 800 24px 'Orbitron', sans-serif; min-width: 28px; text-align: right; }
.tr-lado.is-gana .tr-rounds { color: var(--accent); }
.tr-apoyo { color: var(--i5); min-width: 34px; text-align: right; }
.tr-pron { margin: 0; }
.tr-pron-b { min-height: 36px; padding: 6px 12px; border: 1px solid var(--i28); background: none; color: var(--i7); font: 500 12px 'DM Mono', ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.tr-pron-b:hover { border-color: var(--accent); color: var(--accent); }
.tr-pron-b.is-mio { background: var(--accent); border-color: var(--accent); color: #fff; }
.tr-pron-b:disabled { opacity: .6; cursor: wait; }
.tr-pelea-mio { color: var(--accent); letter-spacing: .1em; }
.tr-msg { color: var(--accent); letter-spacing: .06em; text-transform: none; }
.tr-msg.is-error { color: #e5484d; }

/* ── Inscritos ── */
.tr-inscritos { display: flex; flex-wrap: wrap; gap: 10px; }
.tr-inscritos li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--i28); border-radius: 30px; }

/* ── Los grupos ── */
.tr-grupos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tr-grupo { padding: 14px; border: 1px solid var(--i28); min-width: 0; }
.tr-grupo h3 { color: var(--accent); margin-bottom: 8px; letter-spacing: .14em; }
.tr-tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tr-tabla th { font: 400 11px 'DM Mono', ui-monospace, monospace; letter-spacing: .1em; color: var(--i5); text-align: center; padding: 6px 4px; border-bottom: 1px solid var(--i28); }
.tr-tabla th:first-child { text-align: left; }
.tr-tabla td { padding: 7px 4px; text-align: center; border-bottom: 1px solid var(--i12); font-variant-numeric: tabular-nums; }
.tr-tabla td:first-child { display: flex; align-items: center; gap: 8px; text-align: left; min-width: 0; }
.tr-tabla tr.is-pasa td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.tr-tabla-alias { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.tr-pos { width: 18px; text-align: center; font: 500 12px 'DM Mono', ui-monospace, monospace; color: var(--i5); flex: none; }
.tr-resultados { margin-top: 18px; }
.tr-resultados summary { cursor: pointer; }

/* ── El cuadro ── */
.tr-cuadro { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.tr-ronda { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; min-width: 0; }
.tr-ronda h3 { color: var(--accent); letter-spacing: .12em; }
.tr-ronda-tercero { margin-top: 18px; }

/* ── Ranking y reglas ── */
.tr-ranking { display: flex; flex-direction: column; max-width: 560px; }
.tr-ranking li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--i12); flex-wrap: wrap; }
.tr-ranking .push { margin-left: auto; color: var(--accent); }
.tr-ranking li:first-child b { font-size: 18px; }
.tr-como { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; }
.tr-pasos { counter-reset: paso; display: flex; flex-direction: column; gap: 14px; }
.tr-pasos li { counter-increment: paso; position: relative; padding-left: 44px; line-height: 1.5; color: var(--i7); }
.tr-pasos li::before { content: counter(paso); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--accent); color: var(--accent); font: 700 14px 'Orbitron', sans-serif; }
.tr-pasos b { color: var(--ink, inherit); }
.tr-reglas ul, .tr-reglas-form ul { display: flex; flex-direction: column; gap: 8px; padding-left: 18px; list-style: disc; margin-top: 10px; color: var(--i7); line-height: 1.5; }
.tr-reglas-form summary { cursor: pointer; }

@media (max-width: 900px) {
  .tr-intro, .tr-como { grid-template-columns: minmax(0, 1fr); }
  .tr-cuadro { grid-template-columns: repeat(4, minmax(250px, 80vw)); }
}
@media (max-width: 560px) {
  .tr-premio { padding: 14px 10px; }
  .tr-premio-n { font-size: 60px; }
  .tr-vivo-marcador { gap: 8px; }
  .tr-av--xl { width: 56px; height: 56px; font-size: 24px; }
}

/* ── La pantalla de OBS (1280 × 720, fondo transparente) ── */
.tr-obs { margin: 0; width: 1280px; height: 720px; background: transparent; overflow: hidden; font-family: 'Archivo', sans-serif; color: #fff; }
.tr-obs-barra { position: absolute; left: 40px; right: 40px; bottom: 36px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; background: rgba(12, 11, 10, .92); border-top: 4px solid #C9502A; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.tr-obs-barra[hidden] { display: none; }
.tr-obs-lado { display: flex; align-items: center; gap: 16px; padding: 14px 20px; min-width: 0; }
.tr-obs-lado--b { justify-content: flex-end; text-align: right; }
.tr-obs-av .tr-av { width: 64px; height: 64px; font-size: 28px; }
.tr-obs-quien { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tr-obs-quien b { font-size: 30px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-obs-quien small { font: 400 15px 'DM Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .65); }
.tr-obs-r { font: 900 56px / 1 'Orbitron', sans-serif; color: #C9502A; min-width: 56px; text-align: center; }
.tr-obs-centro { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 22px; background: #C9502A; font: 400 13px 'DM Mono', monospace; letter-spacing: .12em; text-transform: uppercase; text-align: center; max-width: 260px; }
.tr-obs-centro b { font: 900 30px 'Orbitron', sans-serif; letter-spacing: .05em; }

/* ── Aire entre las secciones ── */
.tr-intro { padding-top: clamp(16px, 2vw, 28px); }
.tr-sec, .tr-podio, .tr-vivo-sec { margin-top: clamp(56px, 7vw, 104px); }
.tr-sec .sec-head { margin-bottom: clamp(18px, 2vw, 28px); }
.tr-sec:last-child { margin-bottom: clamp(56px, 7vw, 104px); }
.tr-podio .h2 { text-align: center; }
.tr-vivo-video { width: 100%; max-width: 960px; }
