:root{
  --bg:#0b0f14;
  --card:#111823;
  --text:#eaf0fb;
  --muted:#a7b3c6;
  --line:rgba(255,255,255,.10);
  --brand:#d90429;
  --shadow: 0 12px 32px rgba(0,0,0,.35);
  --r:18px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(217,4,41,.25), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(255,255,255,.06), transparent 55%),
    var(--bg);
  color:var(--text);
}

.wrap{width:min(1100px, 92%); margin:0 auto;}
.muted{color:var(--muted)}

.top{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(12px);
  background: rgba(11,15,20,.70);
  border-bottom: 1px solid var(--line);
}
.top__inner{
  display:flex; gap:14px; align-items:center; justify-content:space-between;
  padding:14px 0;
}
.brand{display:flex; align-items:center; gap:10px;}
.brand__logo{
  width:40px; height:40px; display:grid; place-items:center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), #ff2b52);
  box-shadow: var(--shadow);
}
.brand__txt strong{display:block; line-height:1}
.brand__txt span{display:block; font-size:12px; color:var(--muted); margin-top:3px}

.search{
  flex:1;
  max-width:520px;
  display:flex; align-items:center; gap:10px;
  border:1px solid var(--line);
  border-radius: 14px;
  padding:10px 12px;
  background: rgba(0,0,0,.18);
}
.search input{
  width:100%;
  border:0; outline:0;
  background:transparent; color:var(--text);
  font-size:14px;
}
.kbd{
  font-size:12px;
  color:var(--muted);
  border:1px solid var(--line);
  padding:4px 8px;
  border-radius: 10px;
  white-space:nowrap;
}

.nav{
  display:flex; gap:10px; flex-wrap:wrap;
  padding:0 0 12px;
}
.tab{
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color:var(--text);
  padding:8px 10px;
  border-radius:999px;
  cursor:pointer;
}
.tab.active{background: rgba(217,4,41,.18); border-color: rgba(217,4,41,.35)}

.main{padding:18px 0 34px}

.hero{
  display:grid;
  grid-template-columns: 1.4fr .6fr;
  gap:14px;
  margin-top:10px;
}
.lead{
  border:1px solid var(--line);
  border-radius: var(--r);
  overflow:hidden;
  background: rgba(255,255,255,.03);
  box-shadow: var(--shadow);
}
.lead img{width:100%; height:320px; object-fit:cover; background:#0f1520}
.lead__body{padding:14px}
.pill{
  display:inline-block;
  font-size:12px;
  border:1px solid rgba(255,255,255,.14);
  padding:4px 10px;
  border-radius:999px;
  margin-bottom:8px;
}
.lead h1{margin:0 0 8px; font-size:28px}
.meta{display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:10px}

.side{display:grid; gap:14px}
.box{
  border:1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255,255,255,.03);
  box-shadow: var(--shadow);
  padding:14px;
}
.box h3{
  margin:0 0 10px;
  font-size:13px;
  color:var(--muted);
  letter-spacing:.08em;
  text-transform:uppercase;
}

.list{list-style:none; padding:0; margin:0; display:grid; gap:10px}
.list button{
  width:100%;
  text-align:left;
  border:1px solid var(--line);
  background: rgba(0,0,0,.16);
  color:var(--text);
  border-radius: 14px;
  padding:10px;
  cursor:pointer;
}
.list button:hover{border-color: rgba(255,255,255,.18)}
.list small{display:block; margin-top:4px; color:var(--muted)}

.game{display:grid; gap:8px}
.game__row{display:flex; justify-content:space-between; align-items:center; gap:10px}

.btn{
  border:0;
  cursor:pointer;
  border-radius: 14px;
  padding:10px 12px;
  font-weight:700;
  background: linear-gradient(135deg, var(--brand), #ff2b52);
  color:white;
}
.btn--ghost{
  background: rgba(255,255,255,.06);
  border:1px solid var(--line);
}

/* ====== NOVO: Jogos (card + modal) ====== */
.games-card{
  border:1px solid var(--line);
  border-radius: var(--r);
  background: rgba(0,0,0,.10);
  box-shadow: var(--shadow);
  padding:12px;
}
.games-card__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.games-card__title{
  margin:0;
  font-size: 14px;
  color: var(--text);
  letter-spacing:.02em;
}
.games-card__body{
  display:grid;
  gap:10px;
}

.game-row{
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border:1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}
.game-row__main{
  display:flex;
  flex-direction:column;
  gap: 6px;
  min-width: 0;
}
.teams{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:baseline;
  font-weight:800;
}
.teams__vs{
  font-weight:600;
  opacity:.75;
}
.meta2{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  font-size:.92rem;
  color: var(--muted);
}
.badge{
  display:inline-flex;
  align-items:center;
  padding: 3px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background: rgba(0,0,0,.10);
  white-space: nowrap;
}
.score{
  align-self:center;
  font-weight:900;
  font-size: 1.05rem;
  white-space: nowrap;
}

.games-error{
  margin: 10px 2px 0;
  color: #ff7a90;
  font-size: .95rem;
}

/* skeleton */
.games-skeleton{ display:grid; gap:10px; }
.sk-line{
  height: 56px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.08), rgba(255,255,255,.03));
  background-size: 200% 100%;
  animation: shimmer 1.05s infinite linear;
}
@keyframes shimmer{
  0%{ background-position: 200% 0; }
  100%{ background-position: -200% 0; }
}

/* modal overlay (não conflita com <dialog.modal>) */
#gamesModal.modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
}
#gamesModal .modal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.62);
}
#gamesModal .modal__dialog{
  position:relative;
  width: min(920px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  margin: 12px auto;
  border-radius: 22px;
  overflow:hidden;
  border:1px solid var(--line);
  background: rgba(11,15,20,.92);
  color:var(--text);
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
}
#gamesModal .modal__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom:1px solid var(--line);
}
#gamesModal .modal__title{
  margin:0;
  font-size: 1.05rem;
}
#gamesModal .modal__content{
  padding: 12px 14px;
  overflow:auto;
  display:grid;
  gap: 18px;
}
#gamesModal .modal__sectionTitle{
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing:.08em;
  text-transform:uppercase;
}
#gamesModal .modal__list{
  display:grid;
  gap: 10px;
}
#gamesModal .modal__footer{
  padding: 12px 14px 14px;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

/* botão ícone do modal de jogos */
.btn--icon{
  width: 40px;
  height: 40px;
  padding: 0;
  display:grid;
  place-items:center;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border:1px solid var(--line);
  color: var(--text);
}

/* ====== Layout restante ====== */
.grid{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:14px;
}

.col__head{
  display:flex; justify-content:space-between; align-items:baseline;
  margin:8px 0 10px;
}
.cards{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
}
.card{
  border:1px solid var(--line);
  border-radius: var(--r);
  overflow:hidden;
  background: rgba(255,255,255,.03);
  box-shadow: var(--shadow);
}
.card img{width:100%; height:160px; object-fit:cover; background:#0f1520}
.card__b{padding:12px}
.card h4{margin:0 0 6px; font-size:16px}
.card p{margin:0 0 10px; color:var(--muted); line-height:1.5}
.card .row{display:flex; justify-content:space-between; align-items:center; gap:10px}

.olist{margin:0; padding-left:18px; display:grid; gap:10px}
.olist button{
  width:100%;
  text-align:left;
  border:0;
  background:transparent;
  color:var(--text);
  cursor:pointer;
}
.chips{display:flex; flex-wrap:wrap; gap:8px}
.chip{
  border:1px solid var(--line);
  background: rgba(0,0,0,.12);
  color:var(--text);
  padding:8px 10px;
  border-radius:999px;
  cursor:pointer;
}

.modal{
  width:min(860px, 92vw);
  border:1px solid var(--line);
  background: rgba(11,15,20,.92);
  color:var(--text);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding:0;
}
.modal::backdrop{background: rgba(0,0,0,.6)}
.modal__head{
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:12px;
  padding:14px 14px 10px;
  border-bottom:1px solid var(--line);
}
.icon{
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color:var(--text);
  border-radius: 12px;
  padding:8px 10px;
  cursor:pointer;
}
.modal__body{padding:12px 14px}
.modal__body img{
  width:100%; height:320px; object-fit:cover;
  border-radius: 18px;
  border:1px solid var(--line);
  margin-bottom:10px;
}
.leadtext{color:var(--muted); font-size:16px; line-height:1.6}
.content{line-height:1.7}
.modal__foot{
  display:flex; justify-content:flex-end; gap:10px;
  padding:12px 14px 14px;
  border-top:1px solid var(--line);
}

.foot{border-top:1px solid var(--line); padding:16px 0}

@media (max-width: 980px){
  .hero{grid-template-columns: 1fr}
  .grid{grid-template-columns: 1fr}
  .cards{grid-template-columns: 1fr}
  .search{display:none}
}

.top { -webkit-backdrop-filter: blur(12px); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top { background: rgba(11,15,20,.92); }
}

@media (max-width: 980px){
  .lead img { height: 220px; }
  .modal__body img { height: 220px; }

  .btn, .list button, .tab, .chip, .icon, .btn--icon { min-height: 44px; }

  .lead, .box, .card, .games-card { box-shadow: 0 8px 18px rgba(0,0,0,.28); }
}

@media (max-width: 520px){
  .game-row{ grid-template-columns: 1fr; }
  .score{ justify-self:start; }
}
