/* ══════════════════════════════════════════
   MARDEM NA COPA — Bolão 2026
   style.css
══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --g:  #006633;
  --g2: #004d26;
  --g3: #e8f5ee;
  --o:  #c9952a;
  --o2: #fff8e6;
  --bg: #f2f2ef;
  --w:  #ffffff;
  --b1: #e2e2da;
  --b2: #c0c0b8;
  --b3: #888880;
  --txt:  #1a1a16;
  --txt2: #55554e;
  --red:  #c0392b;
  --r:  6px;
  --rl: 14px;
  --fd: 'Oswald', sans-serif;
  --fb: 'Inter', sans-serif;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.13);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--fb);
  background: var(--bg);
  color: var(--txt);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── TIPOGRAFIA ── */
h1,h2,h3 { font-family: var(--fd); font-weight: 700; letter-spacing: .03em; }

/* ── HEADER ── */
.site-header {
  background: var(--g);
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  max-width: 640px; margin: 0 auto;
  padding: .75rem 1rem;
  display: flex; align-items: center; gap: .75rem;
}
.header-logo { font-family: var(--fd); font-size: 1.25rem; font-weight: 700; color: #fff; letter-spacing: .05em; text-decoration: none; flex: 1; display: flex; align-items: center; gap: .5rem; }
.header-logo img { display: block; }
.header-logo span { font-size: .7rem; display: block; color: rgba(255,255,255,.6); font-family: var(--fb); letter-spacing: .02em; font-weight: 400; margin-top: 1px; }
.header-nav { display: flex; gap: 6px; }
.nav-icon-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: rgba(255,255,255,.75); text-decoration: none; font-size: 10px;
  padding: 4px 8px; border-radius: var(--r); transition: .14s;
}
.nav-icon-btn:hover, .nav-icon-btn.on { color: #fff; background: rgba(255,255,255,.15); }
.nav-icon-btn .ico { font-size: 1.2rem; }

/* ── CONTAINER ── */
.container { max-width: 640px; margin: 0 auto; padding: 1rem; }

/* ── CARDS ── */
.card {
  background: var(--w); border-radius: var(--rl);
  border: 1px solid var(--b1); box-shadow: var(--shadow);
  overflow: hidden;
}
.card-head {
  background: var(--g); color: #fff;
  padding: .85rem 1rem;
  font-family: var(--fd); font-size: 1rem; font-weight: 700; letter-spacing: .04em;
  display: flex; align-items: center; gap: .5rem;
}
.card-body { padding: 1rem; }

/* ── BOTÕES ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .75rem 1.25rem;
  border: 1.5px solid var(--b1); border-radius: var(--r);
  background: var(--w); color: var(--txt);
  font-family: var(--fb); font-size: .875rem; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: .14s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--b2); background: var(--bg); }
.btn.primary { background: var(--g); color: #fff; border-color: var(--g); }
.btn.primary:hover { background: var(--g2); }
.btn.gold { background: var(--o); color: #fff; border-color: var(--o); }
.btn.full { width: 100%; }
.btn.sm { padding: .45rem .85rem; font-size: .8rem; }
.btn.danger { background: var(--red); color: #fff; border-color: var(--red); }

/* ── FORMULÁRIOS ── */
.form-group { margin-bottom: .85rem; }
.form-group label { display: block; font-size: .8rem; font-weight: 600; color: var(--txt2); margin-bottom: .3rem; letter-spacing: .03em; text-transform: uppercase; }
.form-control {
  width: 100%; padding: .7rem .9rem;
  border: 1.5px solid var(--b1); border-radius: var(--r);
  background: var(--w); color: var(--txt);
  font-family: var(--fb); font-size: 1rem;
  outline: none; transition: .14s;
  -webkit-appearance: none;
}
.form-control:focus { border-color: var(--g); box-shadow: 0 0 0 3px rgba(0,102,51,.1); }
.form-hint { font-size: .75rem; color: var(--b3); margin-top: .25rem; }

/* ── ALERTS ── */
.alert { padding: .75rem 1rem; border-radius: var(--r); font-size: .875rem; margin-bottom: .85rem; }
.alert.success { background: var(--g3); color: var(--g2); border: 1px solid #a8d8b8; }
.alert.error   { background: #fdf0f0; color: var(--red); border: 1px solid #f5c0c0; }
.alert.info    { background: var(--o2); color: #7a5a10; border: 1px solid #e8d090; }
.alert.gold    { background: #fff8e6; color: #8a6300; border: 1px solid var(--o); }

/* ── JOGO CARD (palpite) ── */
.jogo-card {
  background: var(--w); border: 1px solid var(--b1); border-radius: var(--rl);
  margin-bottom: .75rem; overflow: hidden; box-shadow: var(--shadow);
}
.jogo-card.encerrado { opacity: .75; }
.jogo-meta {
  background: var(--bg); border-bottom: 1px solid var(--b1);
  padding: .45rem .85rem;
  font-size: .72rem; color: var(--b3); font-weight: 600; letter-spacing: .04em;
  display: flex; justify-content: space-between; align-items: center;
}
.jogo-meta .fase-badge {
  background: var(--g); color: #fff;
  padding: 2px 8px; border-radius: 20px; font-size: .65rem; letter-spacing: .05em;
}
.jogo-body {
  display: flex; align-items: center; gap: .5rem;
  padding: .85rem .75rem;
}
.jogo-time { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.jogo-time .flag { font-size: 2rem; }
.jogo-time .nome { font-size: .72rem; font-weight: 600; text-align: center; color: var(--txt2); line-height: 1.2; }
.jogo-placar { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.placar-inputs { display: flex; align-items: center; gap: 6px; }
.gol-inp {
  width: 44px; height: 44px; text-align: center;
  font-family: var(--fd); font-size: 22px; font-weight: 700;
  border: 2px solid var(--b1); border-radius: var(--r);
  background: var(--w); color: var(--txt); outline: none; transition: .13s;
  -moz-appearance: textfield; -webkit-appearance: none;
}
.gol-inp::-webkit-outer-spin-button, .gol-inp::-webkit-inner-spin-button { -webkit-appearance: none; }
.gol-inp:focus { border-color: var(--g); box-shadow: 0 0 0 3px rgba(0,102,51,.12); }
.gol-inp:disabled { background: var(--bg); color: var(--b2); cursor: default; }
.gol-inp.ok { background: var(--g3); border-color: var(--g); }
.gol-sep { font-family: var(--fd); font-weight: 700; font-size: 18px; color: var(--b2); }

/* resultado real vs palpite */
.resultado-real { display: flex; align-items: center; gap: 8px; font-family: var(--fd); font-size: 1.4rem; font-weight: 700; color: var(--txt); }
.placar-badge { padding: 4px 10px; border-radius: var(--r); font-size: .72rem; font-weight: 600; margin-top: 4px; }
.badge-exato  { background: #d4edda; color: #1a6b31; }
.badge-res    { background: #fff3cd; color: #856404; }
.badge-miss   { background: #f8d7da; color: #842029; }

/* ── RANKING ── */
.rank-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem; border-bottom: 1px solid var(--b1);
  text-decoration: none; color: var(--txt); transition: .12s;
}
.rank-row:last-child { border-bottom: none; }
.rank-row:hover { background: var(--bg); }
.rank-pos { font-family: var(--fd); font-size: 1.1rem; font-weight: 700; color: var(--b3); min-width: 28px; text-align: center; }
.rank-pos.gold   { color: #c9952a; }
.rank-pos.silver { color: #8a8a8a; }
.rank-pos.bronze { color: #a0522d; }
.rank-avatar { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--fd); font-size: 1.1rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.rank-info { flex: 1; min-width: 0; }
.rank-nome { font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-sub  { font-size: .75rem; color: var(--b3); }
.rank-pts  { font-family: var(--fd); font-size: 1.3rem; font-weight: 700; color: var(--g); }

/* ── PERFIL CARD ── */
.perfil-hero {
  background: linear-gradient(135deg, var(--g) 0%, var(--g2) 100%);
  padding: 2rem 1.25rem; text-align: center; color: #fff;
}
.perfil-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fd); font-size: 2rem; font-weight: 700;
  margin: 0 auto 1rem; border: 3px solid rgba(255,255,255,.3);
}
.perfil-nome { font-family: var(--fd); font-size: 1.6rem; font-weight: 700; letter-spacing: .04em; }
.perfil-pos  { font-size: .85rem; color: rgba(255,255,255,.7); margin-top: .25rem; }
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: .6rem; padding: 1rem; }
.stat-box { background: var(--bg); border-radius: var(--r); padding: .75rem .5rem; text-align: center; }
.stat-val { font-family: var(--fd); font-size: 1.5rem; font-weight: 700; color: var(--g); }
.stat-lbl { font-size: .68rem; color: var(--b3); margin-top: 2px; letter-spacing: .03em; text-transform: uppercase; }

/* ── TABS ── */
.tabs { display: flex; border-bottom: 2px solid var(--b1); margin-bottom: 1rem; }
.tab-btn { flex: 1; padding: .65rem; font-size: .85rem; font-weight: 600; color: var(--b3); background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: .13s; }
.tab-btn.on { color: var(--g); border-bottom-color: var(--g); }
.tab-pane { display: none; }
.tab-pane.on { display: block; }

/* ── MISC ── */
.divider { height: 1px; background: var(--b1); margin: 1rem 0; }
.text-center { text-align: center; }
.text-muted  { color: var(--b3); font-size: .875rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.gap-row { display: flex; gap: .75rem; }
.gap-row > * { flex: 1; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 600; }
.chip.green { background: var(--g3); color: var(--g2); }
.chip.gold  { background: var(--o2); color: #7a5610; }
.chip.gray  { background: var(--bg); color: var(--b3); border: 1px solid var(--b1); }

/* ── FIGURINHA / STICKER CARD (Copa 2026) ── */
.sticker-card {
  position: relative;
  background: linear-gradient(135deg, #0a3da0 0%, #159c4a 100%);
  border-radius: 20px;
  padding: 1.25rem;
  min-height: 360px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.sticker-card::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(255,255,255,.18) 0%, transparent 35%),
    radial-gradient(circle at 85% 75%, rgba(255,255,255,.10) 0%, transparent 40%);
  pointer-events: none;
}
.sticker-badge {
  position: absolute; top: 14px; left: 14px;
  width: 52px; height: 52px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
  z-index: 2;
}
.sticker-flag {
  position: absolute; top: 14px; right: 16px;
  font-size: 2.6rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
  z-index: 2;
  line-height: 1;
}
.sticker-photo {
  width: 150px; height: 150px;
  border-radius: 50%;
  border: 6px solid #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  overflow: hidden;
  margin-top: 1.5rem;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
  z-index: 2;
  background: var(--g);
}
.sticker-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sticker-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fd); font-size: 3rem; font-weight: 700; color: #fff;
}
.sticker-ribbon {
  position: relative;
  z-index: 2;
  background: #fff;
  width: 100%;
  border-radius: 14px;
  padding: .75rem 1rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.sticker-nome {
  display: block;
  font-family: var(--fd);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--txt);
}
.sticker-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: .4rem;
  flex-wrap: wrap;
}
.sticker-stat {
  font-size: .78rem;
  font-weight: 600;
  color: var(--txt2);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ── ADMIN ── */
.admin-badge { background: #c0392b; color: #fff; padding: 2px 8px; border-radius: 4px; font-size: .7rem; font-weight: 700; }

/* ── LOADING ── */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--b1); border-top-color: var(--g); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TOAST ── */
#toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--txt); color: #fff; padding: .7rem 1.5rem; border-radius: 30px; font-size: .875rem; font-weight: 500; z-index: 999; pointer-events: none; transition: transform .3s ease; white-space: nowrap; }
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.ok   { background: var(--g); }
#toast.warn { background: var(--o); }
