:root {
  --bg: #0e1116;
  --card: #171c24;
  --card2: #1f2630;
  --line: #2a323d;
  --txt: #e7ecf3;
  --mut: #8b97a7;
  --acc: #2ecc71;
  --acc2: #f1c40f;
  --danger: #e74c3c;
  --blue: #3498db;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--txt);
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.4;
}
.hidden { display: none !important; }
button {
  font: inherit; cursor: pointer; border: none; border-radius: 10px;
  background: var(--acc); color: #06210f; font-weight: 700; padding: 11px 14px;
}
button:active { transform: scale(0.97); }
button.ghost { background: transparent; color: var(--mut); border: 1px solid var(--line); font-weight: 600; }
button.sec { background: var(--card2); color: var(--txt); border: 1px solid var(--line); }
button.danger { background: var(--danger); color: #fff; }
input, select {
  font: inherit; width: 100%; padding: 11px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card2); color: var(--txt); margin: 6px 0;
}
.err { color: var(--danger); font-size: 13px; min-height: 16px; margin: 6px 0 0; }
.pill { background: var(--card2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.pill.round { color: var(--acc2); }

/* LOGIN */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px 22px; width: 100%; max-width: 360px; }
.login-card h1 { margin: 0 0 4px; font-size: 26px; }
.login-card .sub { color: var(--mut); margin: 0 0 18px; }
.login-card button { width: 100%; margin-top: 8px; }
.hint { color: var(--mut); font-size: 12px; text-align: center; margin: 12px 0 0; }
.monty { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 14px 0 6px; }
.monty-abre { margin: 0 0 8px; font-weight: 700; color: var(--acc2); font-size: 13.5px; }
.monty ul { margin: 0; padding-left: 18px; }
.monty li { font-size: 12.5px; color: var(--txt); margin-bottom: 6px; line-height: 1.4; }
.monty-fecha { margin: 8px 0 0; font-size: 12.5px; color: var(--mut); font-style: italic; }

/* HEADER + NAV */
header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.hdr-left { display: flex; gap: 8px; align-items: center; }
.hdr-right { display: flex; gap: 8px; align-items: center; }
header button.ghost { padding: 6px 10px; font-size: 13px; }
nav#tabs { display: flex; overflow-x: auto; gap: 4px; padding: 8px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 53px; z-index: 4; }
nav#tabs button { background: transparent; color: var(--mut); border: 1px solid transparent; border-radius: 999px; padding: 8px 12px; font-weight: 600; white-space: nowrap; font-size: 14px; }
nav#tabs button.active { background: var(--card2); color: var(--txt); border-color: var(--line); }

main { padding: 12px; max-width: 640px; margin: 0 auto; }

/* CARDS / GAMES */
.game { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.game-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.game-teams { font-weight: 700; font-size: 16px; }
.flag { height: 14px; width: auto; vertical-align: -2px; border-radius: 2px; margin-right: 1px; }
.game-meta { color: var(--mut); font-size: 12px; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.badge.scheduled { background: #20303f; color: var(--blue); }
.badge.live { background: #3a2020; color: #ff7a7a; }
.badge.finished { background: #1f3526; color: var(--acc); }
.score-row { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 8px 0; }
.score-row input { width: 60px; text-align: center; font-size: 20px; font-weight: 700; }
.score-x { color: var(--mut); font-weight: 700; }
.result-final { text-align: center; font-size: 22px; font-weight: 800; margin: 6px 0; }
.zebra-tag { background: #3a2c10; color: var(--acc2); display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.row-actions { display: flex; gap: 8px; margin-top: 8px; }
.row-actions button { flex: 1; }
.muted { color: var(--mut); font-size: 13px; }
.palpite-list { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.palpite-list .pl { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.pl .pts { color: var(--acc); font-weight: 700; }
.plays { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.play-chip { font-size: 12px; background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }

/* RANKING */
.rank { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rank .r { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.rank .r:last-child { border-bottom: none; }
.rank .pos { width: 26px; font-weight: 800; color: var(--mut); }
.rank .nm { flex: 1; font-weight: 600; }
.rank .r.me { background: #14241a; }
.rank .pts { font-weight: 800; color: var(--acc); }
.rank .cc { color: var(--mut); font-size: 12px; }

/* CARTAS */
.cardx { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.cardx .ct { display: flex; align-items: center; gap: 10px; }
.cardx .ic { font-size: 26px; }
.cardx .nm { font-weight: 800; }
.cardx .qt { margin-left: auto; background: var(--acc2); color: #3a2c00; font-weight: 800; border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.cardx .ds { color: var(--mut); font-size: 13px; margin-top: 6px; }
.cardx button { margin-top: 10px; width: 100%; }

/* VOTACAO */
.vote-opt { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.vote-opt.sel { border-color: var(--acc); background: #13241a; }
.vote-opt .nm { flex: 1; font-weight: 600; }
.vote-opt .vc { color: var(--mut); font-size: 13px; }

/* FEED */
.feed-item { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; display: flex; gap: 10px; }
.feed-item .fi { font-size: 18px; }
.feed-item .ft { font-size: 14px; }

/* MODAL */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.modal-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px 18px 0 0; width: 100%; max-width: 640px; padding: 20px; max-height: 88vh; overflow-y: auto; }
.modal-card h3 { margin: 0 0 12px; }
.modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.modal-actions button { flex: 1; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--card2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px; z-index: 30; box-shadow: 0 8px 30px rgba(0,0,0,.4); max-width: 90%; }

h2.section { font-size: 16px; margin: 6px 2px 12px; color: var(--mut); text-transform: uppercase; letter-spacing: .5px; }
.empty { color: var(--mut); text-align: center; padding: 30px; }

/* REGRAS */
.regras-hero { text-align: center; background: linear-gradient(160deg, #1d2a20, #171c24); border: 1px solid var(--line); border-radius: 16px; padding: 22px 16px; margin-bottom: 14px; }
.regras-hero .apito { font-size: 34px; }
.regras-hero h1 { margin: 6px 0 2px; font-size: 22px; }
.regras-hero .canal { color: var(--mut); font-size: 13px; margin: 0; }
.r-titulo { font-size: 17px; margin: 18px 2px 8px; }
.bloco { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.bloco p { margin: 0 0 10px; }
.bloco p:last-child { margin-bottom: 0; }
.r-lista { margin: 0; padding-left: 20px; }
.r-lista li { margin-bottom: 6px; }
.formula { display: inline-block; background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; font-size: 13px; }
.destaque { background: #3a2c10; border: 1px solid #5a4416; border-radius: 10px; padding: 10px; color: #ffe9a8; }
.miudo { color: var(--mut); font-size: 12.5px; }
.cartas-grid { display: grid; gap: 8px; margin-top: 10px; }
.regra-carta { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.rc-top { display: flex; align-items: center; gap: 8px; }
.rc-ic { font-size: 20px; }
.rc-ds { color: var(--mut); font-size: 13px; margin-top: 4px; }
.bloco.final { background: linear-gradient(160deg, #1d2230, #171c24); text-align: center; font-style: italic; }
.assinatura { text-align: center; color: var(--txt); background: var(--card); border: 1px dashed var(--line); border-radius: 12px; padding: 16px; margin: 14px 0 8px; line-height: 1.7; }
