:root { --bg:#15202B; --panel:#1C2733; --panel2:#22303C; --line:#38444D; --text:#E7E9EA; --dim:#8B98A5; --accent:#1D9BF0; --font:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--text); font-family: var(--font); line-height:1.45; }
a { color: var(--accent); }
.hero { text-align:center; padding:48px 16px 24px; }
.avatar { width:112px; height:112px; border-radius:50%; object-fit:cover; border:3px solid var(--accent); }
.hero h1 { margin:14px 0 6px; font-size:28px; }
.bio { max-width:560px; margin:0 auto 18px; color:var(--dim); white-space:pre-wrap; }
.links { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; max-width:640px; margin:0 auto; }
.links a.lnk { display:inline-flex; align-items:center; gap:8px; background:var(--brand,#4C8C86); border:1px solid rgba(255,255,255,.18); color:#fff; padding:9px 16px; border-radius:999px; text-decoration:none; font-weight:600; font-size:14px; transition:transform .12s, filter .12s; }
.links a.lnk:hover { transform:translateY(-1px); filter:brightness(1.12); }
.links a.lnk img { width:18px; height:18px; display:block; }
/* Estilos del botón de contacto/redes (se elige al crear el sitio): pills | icons | cards */
.links.style-icons a.lnk { padding:0; width:46px; height:46px; justify-content:center; }
.links.style-icons a.lnk span { display:none; }
.links.style-icons a.lnk img { width:22px; height:22px; }
.links.style-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); }
.links.style-cards a.lnk { border-radius:12px; flex-direction:column; padding:18px 10px; text-align:center; }
.links.style-cards a.lnk img { width:30px; height:30px; }
.contact { margin-top:16px; }
.contact .btn-accent { display:inline-flex; align-items:center; gap:8px; text-decoration:none; padding:12px 22px; font-size:15px; border-radius:999px; }
.contact img { width:18px; height:18px; }
#bg-layer { position:fixed; inset:0; z-index:-1; background-size:cover; background-position:center; pointer-events:none; opacity:0; }
.sortbtns { display:flex; gap:6px; flex-wrap:wrap; }
.sort-btn.active { border-color:var(--accent); color:var(--accent); }
main { max-width:1100px; margin:0 auto; padding:0 16px 60px; }
section { margin-top:40px; }
h2 { font-size:21px; margin:0 0 14px; }
.section-head { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.btn { background:var(--panel2); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:9px 14px; font-size:14px; cursor:pointer; }
.btn:hover { border-color:var(--accent); }
.btn-accent { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600; }
.muted { color:var(--dim); font-size:13px; }

.events { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; }
.event { background:var(--panel); border:1px solid var(--line); border-radius:12px; overflow:hidden; display:flex; flex-direction:column; }
.event img { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; background:var(--panel2); }
.event .ph { aspect-ratio:16/9; display:flex; align-items:center; justify-content:center; font-size:38px; background:var(--panel2); }
.event .body { padding:12px 14px 14px; display:flex; flex-direction:column; gap:6px; flex:1; }
.event h3 { margin:0; font-size:16px; }
.event .when { color:var(--accent); font-weight:600; font-size:13px; }
.event .desc { color:var(--dim); font-size:13px; }
.event .actions { margin-top:auto; display:flex; gap:8px; flex-wrap:wrap; position:relative; }
.event .actions a, .event .actions button { font-size:13px; }
.cal-menu { position:absolute; bottom:100%; left:0; background:var(--panel2); border:1px solid var(--line); border-radius:8px; padding:4px; display:flex; flex-direction:column; min-width:190px; z-index:5; box-shadow:0 8px 24px rgba(0,0,0,.4); }
.cal-menu a, .cal-menu button { background:none; border:0; color:var(--text); text-align:left; padding:8px 10px; border-radius:6px; text-decoration:none; cursor:pointer; font-size:13px; }
.cal-menu a:hover, .cal-menu button:hover { background:var(--bg); }
.past-title { margin:22px 0 10px; color:var(--dim); font-size:14px; }

.toolbar { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.toolbar input, .toolbar select, .modal input, .modal textarea { background:var(--panel2); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:9px 10px; font:inherit; }
.toolbar input { flex:1; min-width:180px; }
.counters { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.counter { background:var(--panel); border:1px solid var(--line); color:var(--text); border-radius:999px; padding:5px 12px; font-size:13px; cursor:pointer; }
.counter.active { border-color:var(--c, var(--accent)); background:color-mix(in srgb, var(--c, var(--accent)) 22%, var(--panel)); }
.game-list { display:flex; flex-direction:column; gap:10px; }
.game { display:grid; grid-template-columns:276px 1fr; gap:16px; align-items:center; background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:12px; }
.game img, .game .noimg { width:100%; height:auto; display:block; border-radius:6px; background:var(--panel2); }
.game .noimg { aspect-ratio:2/3; display:flex; align-items:center; justify-content:center; font-size:30px; }
.game h3 { margin:0 0 6px; font-size:17px; }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:6px; }
.chip { padding:3px 10px; border-radius:6px; font-size:12px; font-weight:600; }
.game .note { color:var(--dim); font-size:13px; white-space:pre-wrap; }
#more-games { display:block; margin:16px auto 0; }
.footer { text-align:center; color:var(--dim); font-size:12px; padding:24px; }

.modal { position:fixed; inset:0; background:rgba(0,0,0,.6); display:flex; align-items:center; justify-content:center; padding:16px; z-index:50; }
.modal[hidden] { display:none; }
.modal-box { position:relative; background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:20px; width:min(460px,100%); max-height:90vh; overflow:auto; }
.modal-box label { display:block; font-size:12px; color:var(--dim); margin:12px 0 4px; }
.modal-box input, .modal-box textarea { width:100%; }
.close { position:absolute; top:10px; right:12px; background:none; border:0; color:var(--dim); font-size:18px; cursor:pointer; }
.sg-results { margin-top:6px; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.sg-results:empty { display:none; }
.sg-results button { display:flex; align-items:center; gap:10px; width:100%; background:var(--panel2); border:0; border-bottom:1px solid var(--line); color:var(--text); padding:6px 10px; cursor:pointer; text-align:left; font:inherit; }
.sg-results button:hover { background:var(--bg); }
.sg-results img { width:60px; height:28px; object-fit:cover; border-radius:3px; }
@media (max-width:760px){ .game{ grid-template-columns:130px 1fr; } }
/* Ícono propio de un enlace (puede ser horizontal) */
.links a.lnk.lnk-custom img { width:auto; max-width:96px; height:20px; object-fit:contain; }
.links.style-icons a.lnk.lnk-custom { width:auto; min-width:46px; padding:0 12px; border-radius:23px; }
.links.style-icons a.lnk.lnk-custom img { height:24px; max-width:110px; }
.links.style-cards a.lnk.lnk-custom img { height:32px; max-width:130px; }
/* Carrusel "Jugando ahora" */
#playing { margin-top:28px; }
.car-nav { display:flex; gap:6px; }
.car-btn { width:38px; height:38px; padding:0; font-size:22px; line-height:1; }
.carousel { display:flex; gap:14px; overflow-x:auto; scroll-snap-type:x mandatory; padding:4px 2px 12px; scrollbar-width:thin; }
.pcard { flex:0 0 276px; scroll-snap-align:start; background:var(--panel); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.pcard img, .pcard .noimg { width:100%; aspect-ratio:460/215; object-fit:cover; display:block; }
.pcard .noimg { display:flex; align-items:center; justify-content:center; font-size:34px; background:var(--line); }
.pcard-body { padding:10px 12px; }
.pcard-body b { display:block; margin-bottom:6px; }
@media (max-width:640px) { .pcard { flex-basis:72vw; } }
/* Cuenta regresiva y EN VIVO */
.countdown { display:inline-flex; align-items:center; gap:6px; margin:6px 0 2px; padding:3px 10px; border-radius:999px; font-weight:700; font-size:13px; background:color-mix(in srgb, var(--accent) 18%, transparent); color:var(--accent); font-variant-numeric:tabular-nums; }
.countdown.is-live { background:#E0245E; color:#fff; letter-spacing:.04em; }
.live-dot { width:9px; height:9px; border-radius:50%; background:#fff; animation:livepulse 1.2s ease-in-out infinite; }
@keyframes livepulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.35; transform:scale(.7); } }
.event.event-live { outline:2px solid #E0245E; outline-offset:-2px; }
/* Patrocinadores: el contenido sigue centrado; en pantallas anchas los banners van en una
   columna a la derecha (con una columna vacía igual a la izquierda para no descentrar nada). */
.page-grid { display:block; }
.sponsors { padding:0 16px 40px; display:flex; flex-wrap:wrap; justify-content:center; gap:14px; max-width:1100px; margin:0 auto; }
.sponsors-title { flex-basis:100%; text-align:center; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted, #8b98a5); }
.sponsor { display:block; max-width:300px; background:none; border:none; }
.sponsor img { display:block; max-width:100%; height:auto; }
@media (min-width:1500px) {
  body.has-sponsors .page-grid { display:grid; grid-template-columns:260px minmax(0,1100px) 260px; justify-content:center; column-gap:28px; }
  body.has-sponsors .page-grid main { grid-column:2; max-width:none; margin:0; }
  body.has-sponsors .sponsors { grid-column:3; flex-direction:column; flex-wrap:nowrap; justify-content:flex-start; position:sticky; top:16px; align-self:start; padding:0; margin:0; max-height:calc(100vh - 32px); overflow-y:auto; scrollbar-width:none; }
  body.has-sponsors .sponsors-title { text-align:left; }
  body.has-sponsors .sponsor { max-width:260px; }
}
/* Botones para ver el directo */
.btn-watch, a.btn-watch:link, a.btn-watch:visited { display:inline-flex; align-items:center; gap:6px; background:var(--brand); color:#fff !important; text-decoration:none !important; border-color:transparent; font-weight:600; }
.btn-watch:hover { filter:brightness(1.1); }
.btn-watch img { width:16px; height:16px; }
