/* Global styles extracted from index.html */
:root{
  --bg:#000; --main:#D6001C; --divider:rgba(255,255,255,.45);
  --shadow:0 8px 24px rgba(214,0,28,.25); --radius:18px; --btnText:#fff; --bracketLine:#D6001C;
}
:root[data-theme="alt"]{
  --bg:#D6001C; --main:#FFFFFF; --divider:rgba(255,255,255,.55);
  --shadow:0 8px 24px rgba(0,0,0,.25); --btnText:#D6001C; --bracketLine:#FFFFFF;
}
*{box-sizing:border-box} html,body{height:100%}
body{
  margin:0; background:var(--bg); color:var(--main);
  font:500 16px/1.4 Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; overflow-x:hidden;
}
a{color:var(--main); text-decoration:none}
.app{min-height:100dvh; display:grid; grid-template-rows:auto 1fr auto}

header{
  position:sticky; top:0; z-index:50; background:var(--bg); border-bottom:1px solid var(--divider);
  padding-top: env(safe-area-inset-top);
}
.topbar{display:flex; align-items:center; gap:12px; padding:12px 16px}

.logo img{height:40px; display:block}
.spacer{flex:1}
.top-actions{display:flex; align-items:center; gap:12px}
.theme-toggle{display:flex; align-items:center; gap:8px}
.shop-link{
  display:inline-grid; place-items:center; width:40px; height:40px;
  border:1px solid var(--divider); border-radius:12px; color:var(--main);
  background:transparent; transition:transform .2s ease, opacity .2s ease;
}
.shop-link:hover{transform:translateY(-1px); opacity:.9}
.shop-link svg{
  width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:2;
  stroke-linecap:round; stroke-linejoin:round;
}
.switch{position:relative; width:46px; height:26px}
.switch input{appearance:none; outline:none; width:100%; height:100%; background:#303030; border:1px solid var(--divider); border-radius:999px; cursor:pointer; transition:.25s}
.switch input:checked{background:#22c55e}
.switch input::after{content:""; position:absolute; top:2px; left:2px; width:22px; height:22px; background:#fff; border-radius:50%; transition:.25s}
.switch input:checked::after{left:calc(100% - 24px)}

main{padding:16px 16px 96px}
.grid{display:grid; gap:14px}
@media(min-width:960px){ main{max-width:1060px; margin:0 auto; padding:24px 0 120px} }

.card{background:rgba(214,0,28,.06); border:1px solid var(--divider); border-radius:var(--radius); box-shadow:var(--shadow); width:100%;}
:root[data-theme="alt"] .card{background:rgba(255,255,255,.06)}
.section-title{display:flex; align-items:center; justify-content:space-between; margin:2px 0 6px}
.section-title h2{margin:0; font-size:18px}

.home-hero{display:grid; gap:4px; place-items:center; padding-top:6px}
.home-hero img{display:block; height:auto; margin:0 auto}
.img-giant{width:min(92vw,980px)} .img-large{width:min(72vw,760px)}
@media(min-width:960px){ .img-giant{width:920px} .img-large{width:680px} }

.live-ticker{display:flex; gap:10px; overflow:auto; scroll-snap-type:x mandatory; padding:10px}
.live-empty{width:100%; padding:14px; text-align:center; border:1px dashed var(--divider); border-radius:12px; background:rgba(214,0,28,.05); font-weight:700}
:root[data-theme="alt"] .live-empty{background:rgba(255,255,255,.07)}

.news-filters{display:flex; gap:8px; padding:0 10px 2px; flex-wrap:wrap; background:transparent; border:0}
.news-filter-btn{
  border:1px solid var(--divider); background:transparent; color:var(--main);
  border-radius:999px; padding:6px 14px; font-weight:800; cursor:pointer; letter-spacing:.4px;
  transition:background .2s ease,color .2s ease,transform .2s ease; text-transform:uppercase;
}
.news-filter-btn:hover{transform:translateY(-1px)}
.news-filter-btn.active{background:var(--main); color:var(--btnText)}
.news-list{display:grid; gap:10px; padding:10px}
.news-empty{padding:16px; text-align:center; opacity:.85}
.news-item{
  display:grid; grid-template-columns:76px 1fr; gap:12px; align-items:center;
  background:rgba(214,0,28,.06); border:1px solid var(--divider); border-radius:14px; padding:10px
}
:root[data-theme="alt"] .news-item{background:rgba(255,255,255,.06)}
.news-thumb{width:76px; height:76px; border-radius:10px; overflow:hidden; background:#000; border:1px solid var(--divider)}
.news-thumb img{width:100%; height:100%; object-fit:cover; display:block; background:#000}
.news-thumb img.news-zoomable{cursor:zoom-in}
.news-title{font-weight:900; letter-spacing:.2px}
.news-meta{font-size:12px; opacity:.85}

.events-wrap{display:grid; gap:12px; padding:12px}
.events-topbar{display:flex; gap:8px; flex-wrap:wrap; align-items:center; justify-content:flex-start; padding:0 12px}
.event-filter-btn{
  border:1px solid var(--divider); background:transparent; color:var(--main);
  border-radius:999px; padding:6px 14px; font-weight:900; cursor:pointer; letter-spacing:.3px;
  transition:transform .2s ease, background .2s ease, color .2s ease;
}
.event-filter-btn:hover{transform:translateY(-1px)}
.event-filter-btn.active{background:var(--main); color:var(--btnText)}

.month-group{display:grid; gap:12px; margin:0 0 26px}
.month-pill{
  background:#121212; border-radius:10px; padding:8px 12px; font-weight:900; border:1px solid var(--divider);
  margin-top:6px;
}
:root[data-theme="alt"] .month-pill{background:#b30018}

event-card{
  background:#0b0b0b; border:1px solid var(--divider); border-radius:16px; padding:16px;
  display:grid; gap:12px; box-shadow:0 10px 20px rgba(0,0,0,.25)
}
:root[data-theme="alt"] .event-card{background:#b30018}

.event-head{display:grid; grid-template-columns:1fr 92px; gap:12px; align-items:start}
.event-type-logo{
  width:92px;
  height:62px;
  object-fit:contain;
  background:transparent;
  border:0;
  border-radius:0;
  justify-self:end;
  align-self:start;
  filter:none;
  transform-origin:top right;
}
.event-type-logo.bng-logo{transform:scale(1.16)}
@media(max-width:640px){
  .event-type-logo.bng-logo{transform:scale(1.1)}
}

.event-date{font-weight:800; font-size:18px}
.event-title{font-weight:900; font-size:24px; line-height:1.12}

.event-venue{display:flex; align-items:center; gap:10px}
.flag-mini{width:36px; height:24px; border-radius:4px; object-fit:cover; box-shadow:0 0 0 1px rgba(0,0,0,.35)}
.event-addr{opacity:.9} .event-cap{font-size:14px; opacity:.9}

.btn-grad{
  display:block; text-align:center; font-weight:900; padding:12px; border-radius:12px; border:none; cursor:pointer;
  background:linear-gradient(90deg,#ff7a3d,#d6001c); color:#fff; box-shadow:0 6px 18px rgba(214,0,28,.3);
}
.btn-block{width:100%;}
.btn-grad.btn-inscrito{background:linear-gradient(135deg,#16a34a,#15803d); color:#fff; box-shadow:0 6px 18px rgba(22,163,74,.35)}
.btn-grad.btn-closed{opacity:.6; cursor:not-allowed; background:linear-gradient(90deg,#cfd3d8,#a3a8ae); color:#0b0b0b; box-shadow:none; border:1px solid rgba(0,0,0,.08)}
.btn-grad.btn-orange{background:linear-gradient(90deg,#ff9c3c,#ff6b1a)}
.btn-ghost-link{
  display:inline-flex; align-items:center; justify-content:center; gap:6px; margin-top:10px;
  padding:10px 14px; border-radius:12px; border:1px solid var(--divider); color:var(--main);
  font-weight:800; text-transform:uppercase; letter-spacing:.3px
}

.players{background:rgba(214,0,28,.06); border:1px solid var(--divider); border-radius:var(--radius); overflow:hidden}
:root[data-theme="alt"] .players{background:rgba(255,255,255,.06)}
.player{display:grid; grid-template-columns:48px 36px 36px 1fr auto; gap:12px; align-items:center; padding:14px 12px}
.player+.player{border-top:1px solid var(--divider)}
.pos{justify-self:end; width:36px; text-align:right; font-weight:900; font-size:22px}
.flag{width:36px; height:24px; object-fit:cover; border-radius:3px; box-shadow:0 0 0 1px rgba(214,0,28,.3)}
:root[data-theme="alt"] .flag{box-shadow:0 0 0 1px rgba(255,255,255,.35)}
.name{font-weight:800; letter-spacing:.2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
@media(max-width:640px){ .players .player .name{white-space:normal; overflow:visible; text-overflow:clip; word-break:break-word;} }
.points{font-weight:900; font-size:18px}

.players-plain{background:rgba(214,0,28,.06); border:1px solid var(--divider); border-radius:var(--radius); overflow:hidden}
:root[data-theme="alt"] .players-plain{background:rgba(255,255,255,.06)}
.player-plain{display:grid; grid-template-columns:48px 1fr; gap:12px; align-items:center; padding:14px 12px}
.player-plain+.player-plain{border-top:1px solid var(--divider)}

.polo-icon{
  width:48px;
  height:48px;
  display:block;
  object-fit:contain;
  border-radius:8px;
  background:transparent;
  border:1px solid var(--divider);
}
.role{font-size:12px; opacity:.8; margin-top:2px}

.form{display:grid; gap:10px; padding:12px; width:100%; max-width:540px; margin:0 auto; border-radius:16px;}
.field{display:grid; gap:4px}
.field label{font-weight:800; font-size:14px}
.field input, .field select{
  background:#0b0b0b; border:1px solid var(--divider); border-radius:10px; padding:10px 12px;
  color:var(--main); outline:none; width:100%; font-size:15px;
}
:root[data-theme="alt"] .field input, :root[data-theme="alt"] .field select{background:#b30018}
.form.compact{padding:10px; gap:8px}
.form.compact .field input, .form.compact .field select{padding:9px; font-size:14px}
@media(max-width:640px){ .form{padding:10px; max-width:480px;} }
@media(max-width:480px){
  .form.compact{padding:8px; gap:8px}
  .form.compact .field label{font-size:13px}
  .form.compact .field input, .form.compact .field select{padding:9px; font-size:14px}
}

.btn{background:var(--main); border:0; color:var(--btnText); font-weight:900; padding:11px 16px; border-radius:12px; cursor:pointer}
.btn-ghost{background:transparent; color:#fff; border:1px solid var(--divider)}
.btn-red{display:inline-block; text-align:center; font-weight:900; padding:12px 16px; border-radius:12px; border:none; cursor:pointer; background:#D6001C; color:#fff}

.list-links{background:#0b0b0b; border:1px solid var(--divider); border-radius:16px; overflow:hidden}
:root[data-theme="alt"] .list-links{background:#b30018}
.list-links a{display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-top:1px solid var(--divider)}
.list-links a:first-child{border-top:0}
.chev{width:18px; height:18px; border:solid currentColor; border-width:0 2px 2px 0; transform:rotate(-45deg)}

nav.bottom{
  position:fixed; left:0; right:0; bottom:0; z-index:30; background:var(--bg); border-top:1px solid var(--divider);
  display:grid; grid-template-columns:repeat(4,1fr);
  padding:8px env(safe-area-inset-left) calc(8px + env(safe-area-inset-bottom)) env(safe-area-inset-right)
}
.tab{display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 2px; color:var(--main)}
.tab.active{color:var(--main); font-weight:700}
.tab svg{width:22px; height:22px; stroke:var(--main); fill:none; stroke-width:2}
.hide{display:none !important}
img{-webkit-touch-callout:none; -webkit-user-drag:none; -webkit-user-select:none; user-select:none; pointer-events:none;}

.chip{border:1px solid var(--divider); padding:2px 8px; border-radius:999px; font-size:12px}
.chip.active{font-weight:700}

groups-wrap{display:grid; gap:14px}
.group-card{padding:16px}
table.group{width:100%; border-collapse:collapse; table-layout:fixed}
table.group th, table.group td{border-bottom:1px solid var(--divider); padding:10px; text-align:left}
table.group th{font-weight:900; font-size:13px; opacity:.9}
table.group td.num{text-align:right; font-variant-numeric:tabular-nums}
.team-label{font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
@media (max-width:640px){ .team-label{white-space:normal; overflow:visible; text-overflow:clip; word-break:break-word} }
.muted{opacity:.7}

.points-card{padding:0; overflow:hidden}
.points-hero{
  padding:18px 16px;
  background:linear-gradient(135deg, rgba(214,0,28,.25), rgba(214,0,28,.05));
  border-bottom:1px solid var(--divider);
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.points-hero h3{margin:0; font-size:20px; letter-spacing:.4px}
.points-hero small{opacity:.85}
.points-grid{display:grid; gap:10px; padding:14px}
.points-row{
  display:grid; grid-template-columns:1fr auto; align-items:center; padding:14px;
  border:1px solid var(--divider); border-radius:14px;
  background:linear-gradient(90deg, rgba(214,0,28,.12), transparent);
  transition:transform .15s ease, box-shadow .15s ease;
}
:root[data-theme="alt"] .points-row{ background:linear-gradient(90deg, rgba(255,255,255,.12), transparent); }
.rp-title{display:flex; align-items:center; gap:10px; font-weight:900}
.rp-badge{
  display:inline-grid; place-items:center; width:44px; height:28px; border-radius:8px; color:#fff;
  font-weight:900; font-size:12px; background:linear-gradient(135deg,#ff7a3d,#d6001c);
  box-shadow:0 6px 16px rgba(214,0,28,.35);
}
.rp-points{font-weight:900; font-variant-numeric:tabular-nums; font-size:18px}
.rp-points::before{content:"+"}
.points-legend{display:flex; gap:8px; flex-wrap:wrap; padding:0 14px 14px}
.legend-pill{font-size:12px; border:1px solid var(--divider); border-radius:999px; padding:4px 10px; opacity:.9}

.partners-grid{display:grid; gap:14px; padding:12px}
@media(min-width:640px){ .partners-grid{grid-template-columns:repeat(3,1fr)} }
.partner-card{background:#0b0b0b; border:1px solid var(--divider); border-radius:16px; overflow:hidden; display:grid; gap:8px}
:root[data-theme="alt"] .partner-card{background:#b30018}
.partner-card img{
  width:100%;
  height:auto;
  display:block;
  object-fit:contain;
  background:transparent;
}
.partner-caption{padding:10px 12px; font-weight:800; letter-spacing:.2px}
.partner-sub{padding:0 12px 12px; opacity:.85; font-size:12px}

.event-videos-card{padding:18px}
.event-videos{display:grid; gap:16px}
@media(min-width:640px){ .event-videos{grid-template-columns:repeat(2,1fr);} }
.event-video-item{display:grid; gap:12px}
.event-video-thumb{width:100%; border-radius:14px; overflow:hidden; border:1px solid var(--divider); background:#000;}
.event-video-thumb img{width:100%; height:auto; display:block; object-fit:cover;}
.event-video-meta{display:flex; align-items:center; justify-content:space-between; gap:12px}
.event-video-title{font-weight:900; letter-spacing:.2px; font-size:14px}
.event-video-link{
  display:inline-flex; align-items:center; justify-content:center; padding:0 18px; height:38px; border-radius:10px;
  background:var(--main); color:var(--btnText); font-weight:900; letter-spacing:.4px; transition:transform .2s ease, opacity .2s ease;
}
.event-video-link:hover{transform:translateY(-1px); opacity:.9;}

.vertical-insc{border-radius:28px; max-width:560px; width:100%; margin:0 auto; display:flex; flex-direction:column; gap:12px; align-items:stretch; justify-content:flex-start; box-sizing:border-box;}
.event-actions{display:grid; gap:8px}
.consent-label{display:flex; align-items:flex-start; gap:8px; font-weight:800; white-space:normal; flex-wrap:wrap;}
.imptour-layout{position:relative; display:flex; flex-direction:column; align-items:center; width:100%;}
.insc-card{max-width:560px; margin:0 auto;}
.refresh-btn{
  background:transparent; border:1px solid var(--divider); color:var(--main);
  width:40px; height:40px; border-radius:10px; display:inline-grid; place-items:center; cursor:pointer;
  transition:transform .2s ease, opacity .2s ease;
}
.refresh-btn:hover{transform:translateY(-1px); opacity:.9}
.event-title-panel{display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap;}
.event-title-info{display:grid; gap:8px; min-width:220px; flex:1;}
.event-title-image{width:min(240px,45vw); height:auto; margin-left:auto; align-self:flex-start; object-fit:contain; background:transparent; border:0;}

.contact-card{gap:10px}
.contact-grid{display:grid; gap:10px}
.contact-row{display:flex; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--divider); border-radius:12px; background:rgba(214,0,28,.05)}
:root[data-theme="alt"] .contact-row{background:rgba(255,255,255,.06)}
.contact-icon{width:24px; height:24px; color:var(--main); flex-shrink:0}
.social-links{display:grid; gap:8px}
.social-row{display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--divider); border-radius:12px}
.download-actions{display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:flex-start; margin-top:6px}
.download-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 14px; border-radius:12px; font-weight:900;
  border:1px solid var(--divider); background:transparent; color:var(--main); cursor:pointer; text-decoration:none
}
.download-btn.primary{background:linear-gradient(90deg,#ff7a3d,#d6001c); color:#fff; border:none; box-shadow:0 6px 18px rgba(214,0,28,.35)}
.download-btn svg{width:20px; height:20px}

gallery-info{
  padding:12px 12px 0;
  font-weight:800;
  opacity:.9;
  letter-spacing:.2px;
}
gallery-info:empty{display:none}
gallery-sections{
  display:grid;
  gap:16px;
  padding:12px;
}
gallery-section{
  border:1px solid var(--divider);
  border-radius:16px;
  overflow:hidden;
  background:rgba(214,0,28,.05);
}
:root[data-theme="alt"] .gallery-section{
  background:rgba(255,255,255,.06);
}
gallery-section-head{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 14px 0;
}
gallery-section-head h3{
  margin:0;
  font-size:16px;
  font-weight:900;
  letter-spacing:.2px;
  text-transform:uppercase;
}
gallery-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:14px;
  padding:12px;
}
gallery-cell{
  width:100%;
  max-width:960px;
  margin:0 auto;
  border:1.5px solid #fff;
  border-radius:16px;
  background:#000;
  overflow:hidden;
}
gallery-cell.has-image{background:#000}
gallery-zoom-btn{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  margin:0;
  width:100%;
  display:block;
  cursor:zoom-in;
  pointer-events:auto;
}
gallery-zoom-btn:focus-visible{
  outline:2px solid #fff;
  outline-offset:4px;
}
gallery-cell img{
  width:100%;
  height:auto;
  object-fit:contain;
  display:block;
  background:#000;
}
gallery-cell img.gallery-zoomable{cursor:zoom-in}
gallery-empty-note{
  padding:12px 14px 14px;
  font-weight:800;
  opacity:.82;
  font-size:13px;
}

.indstats-card{padding:12px}
.indstats-wrap{
  border:1px solid var(--divider);
  border-radius:14px;
  overflow:auto;
  background:#0b0b0b;
}
:root[data-theme="alt"] .indstats-wrap{background:#b30018}
table.indstats{
  width:100%;
  min-width:640px;
  border-collapse:separate;
  border-spacing:0;
  font-variant-numeric:tabular-nums;
}
table.indstats thead th{
  position:sticky;
  top:0;
  z-index:1;
  background:linear-gradient(180deg, rgba(214,0,28,.35), rgba(214,0,28,.18));
  border-bottom:1px solid var(--divider);
  border-right:1px solid var(--divider);
  padding:12px 10px;
  font-size:12px;
  letter-spacing:.6px;
  text-transform:uppercase;
  text-align:center;
  font-weight:900;
  white-space:nowrap;
}
table.indstats thead th:first-child{text-align:left;padding-left:14px}
table.indstats thead th:last-child{border-right:0}
table.indstats tbody td{
  padding:12px 10px;
  border-bottom:1px solid var(--divider);
  border-right:1px solid var(--divider);
  text-align:center;
  background:rgba(255,255,255,.02);
}
table.indstats tbody tr:nth-child(even) td{background:rgba(255,255,255,.04)}
table.indstats tbody td:first-child{
  text-align:left;
  font-weight:800;
  padding-left:14px;
  min-width:200px;
}
table.indstats tbody td:last-child{border-right:0}
table.indstats tbody tr:last-child td{border-bottom:0}
.sortable{cursor:pointer; user-select:none}
.sortable:hover{background:rgba(255,255,255,.1)}

.calendar-card{padding:16px; display:grid; gap:14px}
.calendar-preview-wrap{
  width:100%;
  border:1px solid var(--divider);
  border-radius:14px;
  overflow:hidden;
  background:#000;
}
.calendar-preview-img{
  width:100%;
  height:auto;
  display:block;
  object-fit:contain;
}
.calendar-actions{display:flex; gap:10px; flex-wrap:wrap}

.poster-card{padding:16px}
.poster-wrap{
  width:min(360px, 100%);
  margin:0 auto;
  display:grid;
  gap:12px;
}
.poster-image{
  width:100%;
  height:auto;
  display:block;
  object-fit:contain;
  border:1px solid var(--divider);
  border-radius:14px;
  background:#000;
}
.poster-mystery{
  width:min(320px, 100%);
  margin:0 auto;
  aspect-ratio:2/3;
  border:2px solid #fff;
  border-radius:16px;
  background:#D6001C;
  display:grid;
  place-items:center;
}
.poster-mystery svg{
  width:56%;
  height:56%;
  stroke:#fff;
  fill:none;
  stroke-width:2.8;
}
.poster-actions{display:flex; justify-content:center}

.zoom-modal{
  position:fixed; inset:0; z-index:90;
  display:flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,.86);
  padding:18px;
}
.zoom-card{
  width:min(980px,96vw);
  display:grid;
  gap:12px;
}
.zoom-card img{
  width:100%;
  max-height:76dvh;
  object-fit:contain;
  border-radius:14px;
  border:1px solid var(--divider);
  background:#000;
}
.zoom-actions{display:flex; justify-content:center}
.zoom-actions .btn{min-width:150px}

.news-thumb img.news-zoomable,
.gallery-zoom-btn,
gallery-cell img.gallery-zoomable,
.calendar-preview-img,
.zoom-card img{pointer-events:auto}

.partner-themed{
  background: var(--bg);
  color: var(--main);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:16px; border-radius:16px; text-align:center;
}
.partner-themed img{
  background:transparent;
  padding:20px;
  max-width:100%;
  height:auto;
  display:block;
}
.partner-themed .partner-caption,
.partner-themed .partner-sub{ color: var(--main); }
