:root {
  --azul: #0d3b66;
  --azul-2: #1e5b94;
  --laranja: #ff8c00;
  --laranja-2: #ffa733;
  --verde: #2dba6d;
  --vermelho: #e63946;
  --bg: #0a2540;
  --bg-2: #0d3b66;
  --card: #ffffff;
  --txt: #1a2533;
  --txt-mute: #6b7785;
  --borda: #e3e8ef;
  --shadow: 0 8px 24px rgba(0,0,0,.12);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--txt);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 980px; margin: 0 auto; padding: 0 16px; }

.topbar {
  background: rgba(13,59,102,.95);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--laranja);
  position: sticky; top: 0; z-index: 50;
}

.row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }

.brand { display: flex; align-items: baseline; gap: 8px; color: #fff; text-decoration: none; }
.brand .ball { font-size: 24px; }
.brand-name { font-weight: 800; font-size: 18px; }
.brand-sub { color: var(--laranja-2); font-size: 12px; font-weight: 600; }

.nav { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.nav a { color: #cdd9e6; text-decoration: none; font-size: 14px; font-weight: 600; padding: 6px 10px; border-radius: 6px; }
.nav a.ativo { color: #fff; background: rgba(255,140,0,.2); }
.nav a:hover { color: #fff; }

main { padding: 24px 16px 80px; min-height: calc(100vh - 200px); color: #fff; }

.hero {
  background: linear-gradient(135deg, var(--laranja) 0%, var(--laranja-2) 100%);
  color: #fff;
  padding: 32px 24px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.hero h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.1; font-weight: 900; }
.hero p { margin: 0 0 16px; font-size: 16px; opacity: .95; }
.hero .stats { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.hero .stat {
  background: rgba(255,255,255,.18); padding: 8px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 700;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff; color: var(--azul); border: 0;
  padding: 14px 22px; border-radius: 10px;
  font-size: 15px; font-weight: 800; text-decoration: none;
  cursor: pointer; transition: transform .1s ease, box-shadow .1s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--laranja); color: #fff; }
.btn-secondary { background: transparent; color: #fff; border: 2px solid #fff; box-shadow: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 13px; }

.card {
  background: var(--card); color: var(--txt);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.card h2 { margin: 0 0 12px; font-size: 20px; }

.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--borda);
  font-size: 15px;
  background: #fff;
  color: var(--txt);
}
.input:focus { outline: 2px solid var(--laranja); border-color: var(--laranja); }
.input-row { display: flex; gap: 10px; align-items: center; }

.label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--txt-mute); }

.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }
.alert-info { background: #e7f3ff; color: #0d3b66; border-left: 4px solid #0d3b66; }
.alert-erro { background: #ffe5e7; color: #b00020; border-left: 4px solid var(--vermelho); }
.alert-ok { background: #d6f5e3; color: #186b3e; border-left: 4px solid var(--verde); }

.jogo {
  background: #fff; color: var(--txt);
  border-radius: 12px; padding: 14px;
  margin-bottom: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.jogo-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--txt-mute); margin-bottom: 8px; }
.jogo-times { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.time { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.time-casa { justify-content: flex-end; text-align: right; }
.time-fora { justify-content: flex-start; }
.bandeira { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; }
.placar-input {
  width: 56px; padding: 10px 0; text-align: center;
  font-size: 22px; font-weight: 900;
  border: 2px solid var(--borda); border-radius: 8px; background: #f8fafc; color: var(--txt);
}
.placar-input:focus { outline: 2px solid var(--laranja); border-color: var(--laranja); }
.placar-input:disabled { background: #eef2f7; color: var(--txt-mute); }
.x { font-weight: 900; color: var(--txt-mute); padding: 0 8px; }

.jogo.encerrado { background: #f8fafc; }
.placar-real { background: var(--azul); color: #fff; padding: 4px 10px; border-radius: 6px; font-weight: 900; font-size: 18px; }
.pts {
  display: inline-block; padding: 3px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 800; margin-left: 6px;
}
.pts-5 { background: var(--verde); color: #fff; }
.pts-3 { background: #4caf50; color: #fff; }
.pts-2 { background: #ffc107; color: #000; }
.pts-0 { background: #e0e0e0; color: #555; }

.live-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: var(--vermelho); color: #fff; font-size: 10px; font-weight: 800;
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 50% { opacity: .5; } }

.rank-row {
  display: grid; grid-template-columns: 50px 1fr auto;
  gap: 10px; padding: 10px; border-bottom: 1px solid var(--borda);
  align-items: center;
}
.rank-row:last-child { border: none; }
.rank-row.minha { background: linear-gradient(90deg, #fff5e6, #fff); border-left: 4px solid var(--laranja); }
.rank-pos { font-weight: 900; font-size: 18px; color: var(--azul); text-align: center; }
.rank-pos.top1 { color: gold; }
.rank-pos.top2 { color: silver; }
.rank-pos.top3 { color: #cd7f32; }
.rank-nome { font-weight: 700; }
.rank-cidade { font-size: 12px; color: var(--txt-mute); }
.rank-pts { font-weight: 900; color: var(--azul); }

.rodape {
  text-align: center; padding: 24px 16px;
  font-size: 13px; color: rgba(255,255,255,.7);
}
.rodape a { color: var(--laranja-2); text-decoration: none; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1a2533; color: #fff; padding: 12px 20px; border-radius: 8px;
  font-size: 14px; box-shadow: var(--shadow); z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.toast.show { opacity: 1; }
.toast.ok { background: var(--verde); }
.toast.erro { background: var(--vermelho); }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 8px 14px; border-radius: 8px;
  background: rgba(255,255,255,.1); color: #fff;
  cursor: pointer; font-size: 13px; font-weight: 700; border: 0;
}
.tab.ativo { background: var(--laranja); }

.skel { background: linear-gradient(90deg, #1e3a5f, #2a4773, #1e3a5f); background-size: 200% 100%; animation: skel 1.5s infinite; border-radius: 8px; height: 60px; margin-bottom: 8px; }
@keyframes skel { 0% { background-position: 0 0; } 100% { background-position: -200% 0; } }

.patrocinador {
  background: rgba(255,255,255,.12);
  padding: 14px; border-radius: 10px;
  text-align: center; margin-bottom: 16px;
  border: 1px dashed rgba(255,255,255,.25);
}
.patrocinador small { color: rgba(255,255,255,.6); display: block; font-size: 11px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; }
.patrocinador strong { font-size: 18px; }

@media (max-width: 600px) {
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 14px; }
  .nav a { font-size: 12px; padding: 4px 8px; }
  .placar-input { width: 44px; font-size: 18px; }
  .container { padding: 0 12px; }
}
