/* ===== Identidade "Estádio" — gramado à noite sob holofotes ===== */
:root {
  --pitch: #081710;
  --pitch-elevated: #10271b;
  --pitch-high: #173524;
  --line: #1e3c2c;
  --line-soft: #15301f;
  --grass: #21c25e;
  --grass-deep: #15813f;
  --gold: #ffc83d;
  --live: #ff5470;
  --chalk: #f2f7f3;
  --chalk-dim: #8fa89a;
  --chalk-faint: #5c7567;
  --silver: #c9d6ce;
  --bronze: #cd8b5a;
}

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

body {
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  color: var(--chalk);
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(33, 194, 94, 0.12), transparent 60%),
    linear-gradient(180deg, #0c2014 0%, var(--pitch) 45%, #050f0a 100%);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* Linha de campo decorativa */
body::before {
  content: "";
  position: fixed;
  left: 50%;
  top: 50%;
  width: 44vw;
  height: 44vw;
  max-width: 340px;
  max-height: 340px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(242, 247, 243, 0.035);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

#app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 20px; min-height: 100dvh; }

.anton { font-family: "Anton", sans-serif; letter-spacing: 0.5px; }
.kicker { font-size: 11px; font-weight: 600; letter-spacing: 2.5px; color: var(--gold); text-transform: uppercase; }

/* ===== Splash ===== */
.splash {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 24px; z-index: 5;
}
.logo { display: flex; flex-direction: column; align-items: center; line-height: 0.92; }
.logo span { font-family: "Anton", sans-serif; font-size: clamp(48px, 16vw, 72px); }
.logo-1 { color: var(--chalk); }
.logo-2 { color: var(--grass); }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--grass);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Header ===== */
.app-header { display: flex; align-items: flex-end; justify-content: space-between; padding: 14px 4px 18px; }
.app-header h1 { font-family: "Anton", sans-serif; font-size: 34px; font-weight: 400; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-family: "Anton", sans-serif;
  font-size: 14px; letter-spacing: 1px; color: var(--gold);
  background: var(--pitch-high); border: 1px solid var(--line);
  border-radius: 8px; padding: 4px 10px;
}

/* ===== Cards ===== */
.card {
  background: var(--pitch-elevated); border: 1px solid var(--line);
  border-radius: 20px; padding: 16px; margin-bottom: 12px;
}

/* ===== Tabs ===== */
.tabs { display: flex; gap: 8px; margin: 6px 0 16px; }
.tab {
  flex: 1; text-align: center; padding: 12px; border-radius: 14px; cursor: pointer;
  font-weight: 600; font-size: 14px; color: var(--chalk-dim);
  background: var(--pitch-elevated); border: 1px solid var(--line); transition: 0.15s;
}
.tab.active { color: var(--pitch); background: var(--grass); border-color: var(--grass); }

/* ===== Fixture ===== */
.fixture-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--chalk-dim); margin-bottom: 14px; }
.status { font-size: 9px; font-weight: 700; letter-spacing: 1px; padding: 2px 8px; border-radius: 20px; }
.status.live { color: var(--live); background: rgba(255, 84, 112, 0.15); }
.status.finished { color: var(--chalk-faint); background: rgba(92, 117, 103, 0.18); }

.match { display: grid; grid-template-columns: 1fr auto auto auto 1fr; align-items: center; gap: 8px; }
.team { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.team.away { align-items: flex-end; text-align: right; }
.crest { width: 44px; height: 44px; border-radius: 50%; background: var(--pitch-high); object-fit: contain; display: grid; place-items: center; font-family: "Anton", sans-serif; font-size: 14px; color: var(--chalk-dim); }
.team-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.vs { font-family: "Anton", sans-serif; font-size: 22px; color: var(--chalk-faint); }

.score-input {
  width: 48px; height: 56px; text-align: center; border-radius: 12px;
  background: var(--pitch); border: 1.5px solid var(--line); color: var(--chalk);
  font-family: "Anton", sans-serif; font-size: 26px; outline: none; transition: border-color 0.15s;
  -moz-appearance: textfield;
}
.score-input::-webkit-outer-spin-button, .score-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score-input:focus { border-color: var(--gold); }
.score-input:disabled { color: var(--chalk-faint); }
.locked-note { margin-top: 12px; text-align: center; font-size: 11px; color: var(--chalk-dim); background: var(--pitch); border-radius: 8px; padding: 8px; }

/* ===== Ranking ===== */
.rank-row { display: flex; align-items: center; gap: 14px; }
.rank-pos {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-family: "Anton", sans-serif; font-size: 18px; color: var(--chalk-dim);
  background: var(--pitch-high); border: 1px solid var(--line);
}
.rank-pos.gold { color: var(--gold); background: rgba(255, 200, 61, 0.18); border-color: var(--gold); }
.rank-pos.silver { color: var(--silver); background: rgba(201, 214, 206, 0.18); border-color: var(--silver); }
.rank-pos.bronze { color: var(--bronze); background: rgba(205, 139, 90, 0.18); border-color: var(--bronze); }
.rank-name { flex: 1; font-weight: 600; }
.rank-pts { font-family: "Anton", sans-serif; font-size: 26px; color: var(--gold); }
.rank-pts small { font-family: "Be Vietnam Pro", sans-serif; font-size: 11px; color: var(--chalk-dim); font-weight: 500; }

/* ===== Forms / Buttons ===== */
.center-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 80dvh; text-align: center; gap: 16px; padding: 0 12px; }
.tagline { color: var(--chalk-dim); font-size: 15px; max-width: 320px; }
input.text {
  width: 100%; padding: 14px; border-radius: 12px; background: var(--pitch-elevated);
  border: 1px solid var(--line); color: var(--chalk); font-size: 16px; font-family: inherit; outline: none;
}
input.text::placeholder { color: var(--chalk-faint); }
input.text:focus { border-color: var(--gold); }
input.text.code { font-family: "Anton", sans-serif; font-size: 22px; letter-spacing: 3px; text-align: center; text-transform: uppercase; }

.btn {
  width: 100%; padding: 15px; border-radius: 14px; border: none; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 15px;
  background: var(--grass); color: var(--pitch); transition: 0.15s;
}
.btn:disabled { background: var(--line-soft); color: var(--chalk-faint); cursor: default; }
.btn.ghost { background: transparent; color: var(--chalk-dim); font-weight: 500; }
.btn.invite { background: var(--gold); color: var(--pitch); margin-bottom: 16px; }
.btn-google { background: var(--chalk); color: var(--pitch); display: flex; align-items: center; justify-content: center; gap: 10px; }
.g-mark { width: 22px; height: 22px; border-radius: 50%; background: var(--grass-deep); color: var(--chalk); display: grid; place-items: center; font-family: "Anton", sans-serif; font-size: 13px; }

.error { color: var(--live); font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--pitch-high); border: 1px solid var(--line); color: var(--chalk); padding: 10px 18px; border-radius: 24px; font-size: 13px; font-weight: 600; z-index: 10; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.toast.show { opacity: 1; }

.section-label { font-size: 11px; font-weight: 600; letter-spacing: 2px; color: var(--chalk-faint); text-transform: uppercase; margin: 8px 4px 10px; }
.muted { color: var(--chalk-dim); font-size: 14px; text-align: center; padding: 32px 12px; }
.guest-bar { display: flex; align-items: center; gap: 10px; background: rgba(255, 200, 61, 0.08); border: 1px solid rgba(255, 200, 61, 0.3); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; font-size: 13px; }
.guest-bar b { color: var(--chalk); } .guest-bar span { flex: 1; color: var(--chalk-dim); }
.guest-bar a { color: var(--gold); font-weight: 700; cursor: pointer; text-decoration: none; }
