/* =========================================================================
   JIG · Jogos Internos Geração — estilos
   ========================================================================= */

@font-face { font-display: swap; }

:root {
  --green: #00a551;
  --teal-deep: #1d777b;
  --teal-mid: #2da68a;
  --white: #ffffff;

  --bg-0: #05130f;
  --bg-1: #0a1e19;
  --bg-2: #0f2921;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);

  --ink: #f2fbf7;
  --muted: rgba(242, 251, 247, 0.62);
  --muted-2: rgba(242, 251, 247, 0.4);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 26px;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);

  --cat-1: var(--green);
  --cat-2: var(--teal-deep);
  --cat-3: var(--teal-mid);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}

img { display: block; max-width: 100%; }
button { font-family: inherit; }
input { font-family: inherit; }

::selection { background: var(--green); color: #04150f; }

/* scrollbar hide for pill rows */
.hscroll { display: flex; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.hscroll::-webkit-scrollbar { display: none; }

/* =========================================================================
   Shell
   ========================================================================= */
.page {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
}

/* =========================================================================
   Background fx (grid + blobs), fixed behind everything
   ========================================================================= */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(120% 70% at 50% -10%, #0f342a 0%, var(--bg-0) 55%);
}
.bg-grid {
  position: absolute;
  inset: -20% -20%;
  background-image:
    linear-gradient(rgba(45, 166, 138, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 166, 138, 0.12) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(65% 55% at 50% 18%, #000 0%, transparent 78%);
  animation: gridDrift 26s linear infinite;
  will-change: transform;
}
@keyframes gridDrift {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(46px, 46px, 0); }
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}
.bg-blob--1 { width: 380px; height: 380px; left: -120px; top: 40px; background: var(--green); }
.bg-blob--2 { width: 340px; height: 340px; right: -140px; top: 260px; background: var(--teal-deep); }
.bg-blob--3 { width: 300px; height: 300px; left: 20%; top: 640px; background: var(--teal-mid); opacity: 0.35; }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  z-index: 1;
  padding: 30px 22px 34px;
  text-align: center;
}

.hero-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}
.hero-brand img { height: 34px; width: auto; }
.hero-brand span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 100px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-bottom: 22px;
}
.hero-eyebrow b {
  background: var(--green);
  color: #04150f;
  font-weight: 700;
  border-radius: 100px;
  padding: 3px 9px;
  font-size: 11px;
}

.hero-trophy-wrap {
  position: relative;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  transform: translateY(var(--parallax-y, 0px));
  will-change: transform;
}
.hero-trophy-glow {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 165, 81, 0.55) 0%, rgba(29, 119, 123, 0.25) 45%, transparent 72%);
  filter: blur(6px);
  animation: trophyPulse 4.5s var(--ease) infinite;
}
@keyframes trophyPulse {
  0%, 100% { transform: scale(0.94); opacity: 0.85; }
  50% { transform: scale(1.06); opacity: 1; }
}
.hero-trophy-wrap img {
  position: relative;
  height: 250px;
  width: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.55));
  animation: trophyFloat 5s ease-in-out infinite;
  will-change: transform;
}
@keyframes trophyFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 11vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 4px 0 10px;
}
.hero-title .grad {
  background: linear-gradient(95deg, var(--green), var(--teal-mid) 55%, var(--teal-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 15.5px;
  color: var(--muted);
  margin: 0 0 26px;
  line-height: 1.5;
}
.hero-sub strong { color: var(--ink); font-weight: 600; }

/* stats row */
.stats-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 10px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  min-width: 74px;
}
.stat-chip b {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--green);
}
.stat-chip span {
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.hero-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 20px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.hero-refresh:hover { border-color: var(--green); color: var(--green); }
.hero-refresh:active { transform: scale(0.96); }
.hero-refresh svg { width: 14px; height: 14px; }

/* =========================================================================
   Sticky control bar (day tabs + search + filters)
   ========================================================================= */
.control-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 20, 16, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px 12px;
}

.day-tabs {
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.day-tab {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.day-tab b { font-size: 14px; font-weight: 700; }
.day-tab span { font-size: 9px; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.8; }
.day-tab.is-active {
  background: linear-gradient(95deg, var(--green), var(--teal-mid));
  border-color: transparent;
  color: #04150f;
  box-shadow: 0 8px 22px -8px rgba(0, 165, 81, 0.6);
}

.search-row { display: flex; gap: 8px; align-items: center; }
.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.search-box svg { width: 16px; height: 16px; color: var(--muted-2); flex: none; }
.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--ink);
  font-size: 14.5px;
}
.search-box input::placeholder { color: var(--muted-2); }

.filter-toggle {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.filter-toggle svg { width: 17px; height: 17px; }
.filter-toggle.has-active { border-color: var(--green); color: var(--green); }
.filter-toggle-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  display: none;
}
.filter-toggle.has-active .filter-toggle-dot { display: block; }

/* filter sheet */
.filter-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 10, 8, 0.6);
  z-index: 29;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.filter-sheet-backdrop.open { opacity: 1; pointer-events: auto; }

.filter-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: 640px;
  z-index: 30;
  background: var(--bg-1);
  border-top: 1px solid var(--line-strong);
  border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  transition: transform 0.35s var(--ease);
  max-height: 78vh;
  overflow-y: auto;
}
.filter-sheet.open { transform: translate(-50%, 0); }

.filter-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: var(--line-strong);
  margin: 0 auto 16px;
}
.filter-sheet h4 {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 10px;
}
.filter-sheet h4:first-of-type { margin-top: 0; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 14px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  font-size: 13.5px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s var(--ease);
}
.chip.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #04150f;
  font-weight: 600;
}

.filter-sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.btn-ghost, .btn-solid {
  flex: 1;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  -webkit-tap-highlight-color: transparent;
}
.btn-ghost { background: transparent; color: var(--muted); }
.btn-solid { background: linear-gradient(95deg, var(--green), var(--teal-mid)); color: #04150f; border: none; }

/* =========================================================================
   Schedule
   ========================================================================= */
.schedule { position: relative; z-index: 1; padding: 22px 16px 60px; }

.session-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  margin: 22px 0 12px;
  color: var(--muted);
}
.session-head:first-child { margin-top: 4px; }
.session-head svg { width: 15px; height: 15px; color: var(--teal-mid); flex: none; }
.session-head b { color: var(--ink); font-size: 14px; font-weight: 700; }
.session-head span { font-size: 12.5px; }

.game-list { display: flex; flex-direction: column; gap: 10px; }

.game-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), border-color 0.3s;
}
.game-card.in { opacity: 1; transform: translateY(0); }
.game-card:hover { border-color: var(--line-strong); }

.game-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.game-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
}
.cat-pill {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}
.mod-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 600;
}
.sexo-tag {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 100px;
}

.matchup { display: flex; align-items: center; gap: 10px; }
.team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.team.right { flex-direction: row-reverse; text-align: right; }
.team-code {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--panel-strong);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.team-flag { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.team-info { min-width: 0; }
.team-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-qualifier {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  color: var(--muted-2);
  white-space: nowrap;
}
.team.winner .team-code { background: var(--green); border-color: var(--green); color: #04150f; }
.team.winner .team-name { color: var(--green); }

.score-mid {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--muted-2);
  min-width: 54px;
  justify-content: center;
}
.score-x { opacity: 0.5; font-weight: 400; font-size: 12px; }
.score-num {
  width: 26px;
  text-align: center;
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  padding: 2px 0;
  border-bottom: 1px solid var(--line);
}

.loc-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted-2);
}
.loc-badge svg { width: 12px; height: 12px; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state svg { width: 40px; height: 40px; color: var(--muted-2); margin: 0 auto 14px; }
.empty-state p { margin: 0; font-size: 14.5px; }

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 20px 50px;
  border-top: 1px solid var(--line);
}
.footer img { height: 46px; margin: 0 auto 12px; }
.footer p { font-size: 12.5px; color: var(--muted-2); margin: 0; }
.footer .ed { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted); margin-top: 6px; }

/* links (future-proof) */
a { color: var(--teal-mid); text-decoration: none; }
a:hover { color: var(--green); }

@media (min-width: 640px) {
  .hero { padding-top: 48px; }
  .game-card { padding: 18px 20px; }
}
