/* ============ Bolão da Copa 2026 — tema "Estádio à noite" ============ */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Sora:wght@400;500;600;700;800&family=Saira+Condensed:wght@600;700&display=swap');

:root {
  --pitch-950: #03100a;
  --pitch-900: #04150d;
  --pitch-850: #06231a;
  --card: #0b2419;
  --card-2: #0e2e21;
  --line: #18553a;
  --gold: #fde047;
  --gold-2: #f59e0b;
  --gold-deep: #b45309;
  --accent: #f43f5e;
  --accent-2: #e11d8f;
  --green: #34d399;
  --text: #f3f8f4;
  --muted: #93a89c;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --font-display: 'Anton', system-ui, sans-serif;
  --font-score: 'Saira Condensed', sans-serif;
  --font-body: 'Sora', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(900px 380px at 15% -8%, rgba(250, 204, 21, 0.13), transparent 60%),
    radial-gradient(820px 360px at 88% -6%, rgba(34, 211, 238, 0.10), transparent 60%),
    radial-gradient(1200px 600px at 50% 120%, rgba(16, 185, 129, 0.10), transparent 55%),
    linear-gradient(170deg, var(--pitch-850) 0%, var(--pitch-900) 45%, var(--pitch-950) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* faixas de gramado sutis */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; opacity: 0.4;
  background: repeating-linear-gradient(95deg, transparent 0 78px, rgba(255, 255, 255, 0.012) 78px 156px);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }
.hidden { display: none !important; }

/* ============ Header ============ */
header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(4, 18, 12, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(24, 85, 58, 0.6);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand .ball { font-size: 26px; filter: drop-shadow(0 0 8px rgba(253, 224, 71, 0.5)); animation: spin 9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand h1 {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(17px, 2.4vw, 23px);
  letter-spacing: 0.5px; line-height: 1;
}
.brand h1 span { color: var(--gold); }
nav { display: flex; gap: 4px; margin-left: auto; }
nav button {
  background: transparent; color: var(--muted); font-weight: 600; font-size: 14px;
  padding: 9px 14px; border-radius: 10px; transition: 0.18s;
}
nav button:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
nav button.active { color: var(--pitch-950); background: var(--gold); }
.auth-box { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; background: var(--card-2); }

.btn {
  background: linear-gradient(95deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 800; font-size: 14px; padding: 10px 18px; border-radius: 11px;
  box-shadow: 0 8px 22px rgba(225, 29, 143, 0.32); transition: 0.18s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(225, 29, 143, 0.45); }
.btn.gold { background: linear-gradient(95deg, var(--gold), var(--gold-2)); color: var(--pitch-950); box-shadow: 0 8px 22px rgba(245, 158, 11, 0.32); }
.btn.ghost { background: rgba(255, 255, 255, 0.06); color: var(--text); box-shadow: none; border: 1px solid var(--line); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

main { max-width: 1080px; margin: 0 auto; padding: clamp(18px, 4vw, 34px) clamp(14px, 4vw, 28px) 80px; }

/* ============ Hero / Cofre ============ */
.hero {
  position: relative; text-align: center; padding: 30px 20px 34px; margin-bottom: 30px;
  border-radius: 24px; overflow: hidden;
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(253, 224, 71, 0.16), transparent 70%),
    linear-gradient(160deg, #0a2a1d, #061a12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  box-shadow: var(--shadow);
}
.hero .label { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--green); font-weight: 700; }
.hero .cofre-title { margin-top: 16px; font-size: 13px; color: var(--muted); letter-spacing: 1px; }
.cofre-value {
  font-family: var(--font-display); font-size: clamp(46px, 11vw, 92px); line-height: 0.95; letter-spacing: 0.5px;
  color: var(--gold); text-shadow: 0 3px 26px rgba(250, 204, 21, 0.4); font-weight: 400;
}
.cofre-value small { font-size: 0.42em; opacity: 0.85; }
.cofre-bar { height: 14px; max-width: 460px; margin: 14px auto 0; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.cofre-bar > div {
  height: 100%; width: 70%; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), #fffbe6, var(--gold-2));
  background-size: 200% 100%; animation: shimmer 2.6s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.hero .sub { margin-top: 10px; color: var(--muted); font-size: 14px; }
.hero .sub b { color: var(--text); }

/* ============ Section heading ============ */
.sec-head { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 18px; }
.sec-head h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(22px, 4vw, 30px); letter-spacing: 0.5px; }
.sec-head .pill { font-size: 12px; font-weight: 700; color: var(--gold); border: 1px solid var(--line); padding: 3px 10px; border-radius: 99px; }

/* ============ Match cards ============ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.match {
  background: linear-gradient(165deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35); position: relative; overflow: hidden;
  animation: rise 0.5s both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.match .top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: 0.6px; color: var(--green); font-weight: 700; text-transform: uppercase; }
.match .top .stage { color: var(--muted); }
.dot { color: var(--green); }
.dot.closed { color: var(--muted); }
.teams { display: flex; align-items: center; justify-content: space-between; margin: 16px 4px 14px; gap: 8px; }
.team { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: 1; }
.flag { font-size: 38px; line-height: 1; }
.flag img { width: 42px; height: 30px; object-fit: cover; border-radius: 4px; }
.team .name { font-weight: 700; font-size: 14px; text-align: center; }
.vs { font-family: var(--font-display); color: var(--gold); font-size: 18px; }
.match .score { font-family: var(--font-score); font-size: 30px; font-weight: 700; color: var(--text); }
.countdown { text-align: center; font-size: 12px; color: var(--muted); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.countdown b { color: var(--gold); }
.match .cta { width: 100%; }
.match.finished { opacity: 0.92; }
.result-badge { display: inline-block; font-size: 11px; font-weight: 700; color: var(--pitch-950); background: var(--green); padding: 3px 9px; border-radius: 99px; }

/* ============ Decisão Final ============ */
.final-hero {
  border-radius: 20px; padding: 22px; margin-bottom: 20px;
  background: linear-gradient(100deg, #3a2206, #1a1206); border: 1px solid var(--gold-deep);
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.final-hero .trophy { font-size: 46px; filter: drop-shadow(0 0 14px rgba(253, 224, 71, 0.45)); }
.final-hero h2 { font-family: var(--font-display); font-weight: 400; color: var(--gold); font-size: 26px; }
.final-hero p { color: #d9c9a6; font-size: 14px; max-width: 460px; }

/* ============ Forms / fields ============ */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; letter-spacing: 0.3px; }
select, input[type=number], input[type=text] {
  width: 100%; background: var(--pitch-950); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px; font-family: inherit; font-size: 15px;
}
.stepper { display: flex; align-items: center; gap: 14px; justify-content: center; }
.stepper button { width: 40px; height: 40px; border-radius: 10px; background: var(--pitch-950); border: 1px solid var(--line); color: var(--gold); font-size: 22px; font-weight: 700; }
.stepper .val { font-family: var(--font-score); font-size: 34px; min-width: 38px; text-align: center; }
.score-row { display: flex; align-items: center; justify-content: space-around; gap: 10px; }
.score-row .vs { font-size: 22px; }

/* ============ Modal ============ */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(2, 10, 7, 0.74); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade 0.2s;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 440px; background: linear-gradient(165deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow);
  max-height: 92vh; overflow-y: auto; animation: pop 0.24s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop { from { transform: scale(0.94) translateY(10px); opacity: 0; } }
.modal h3 { font-family: var(--font-display); font-weight: 400; font-size: 22px; margin-bottom: 4px; }
.modal .close { float: right; background: rgba(255,255,255,0.06); color: var(--muted); width: 32px; height: 32px; border-radius: 9px; font-size: 18px; }
.modal .price-tag { display: inline-block; background: var(--gold); color: var(--pitch-950); font-weight: 800; padding: 4px 12px; border-radius: 99px; font-size: 14px; margin: 8px 0 14px; }

/* PIX box */
.pix-box { text-align: center; }
.pix-qr { background: #fff; padding: 12px; border-radius: 14px; display: inline-block; margin: 6px auto 12px; min-width: 180px; min-height: 180px; }
.pix-qr svg { display: block; width: 200px; height: 200px; }
.copia { display: flex; gap: 8px; margin: 10px 0; }
.copia input { font-size: 12px; }
.pix-hint { font-size: 13px; color: var(--muted); line-height: 1.5; }
.pix-hint b { color: var(--gold); }
.pending-note { background: rgba(245, 158, 11, 0.12); border: 1px solid var(--gold-deep); border-radius: 12px; padding: 12px; font-size: 13px; color: #e8d6ad; margin-top: 6px; }

/* ============ Leaderboard ============ */
.board { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.board th, .board td { padding: 13px 14px; text-align: left; font-size: 14px; }
.board th { background: var(--pitch-850); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; }
.board tr { border-top: 1px solid rgba(24, 85, 58, 0.4); }
.board .rank { font-family: var(--font-score); font-size: 20px; font-weight: 700; width: 44px; }
.board .rank.r1 { color: var(--gold); } .board .rank.r2 { color: #cbd5e1; } .board .rank.r3 { color: #d6924a; }
.board .who { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.board .won { font-family: var(--font-score); font-size: 18px; color: var(--green); text-align: right; }

/* ============ My bets ============ */
.mybet { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }
.mybet .pl { font-family: var(--font-score); font-size: 22px; color: var(--gold); }
.mybet .info { flex: 1; }
.mybet .info .t { font-weight: 700; font-size: 14px; }
.mybet .info .s { font-size: 12px; color: var(--muted); }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.badge.pending { background: rgba(245, 158, 11, 0.18); color: var(--gold); }
.badge.paid { background: rgba(52, 211, 153, 0.18); color: var(--green); }
.badge.win { background: var(--gold); color: var(--pitch-950); }
.badge.lose { background: rgba(255,255,255,0.06); color: var(--muted); }

/* ============ Empty / login ============ */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-size: 46px; margin-bottom: 12px; }
.login-card { max-width: 380px; margin: 40px auto; text-align: center; background: linear-gradient(165deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); }
.login-card h2 { font-family: var(--font-display); font-weight: 400; font-size: 26px; margin-bottom: 6px; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: #fff; color: #1f2328; font-weight: 700; padding: 12px; border-radius: 11px; margin-top: 16px; font-size: 15px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--pitch-950); border: 1px solid var(--gold-deep); color: var(--text); padding: 12px 20px; border-radius: 12px; z-index: 200; box-shadow: var(--shadow); font-size: 14px; animation: pop 0.2s; }
.toast.err { border-color: var(--accent); }

footer { text-align: center; color: var(--muted); font-size: 12px; padding: 26px; line-height: 1.7; }
footer a { color: var(--gold); }
