:root {
  --pitch-green: #1a7a4a;
  --trophy-gold: #f5c518;
  --press-navy: #1b2a4a;
  --chaos-red: #e63946;
  --crowd-yellow: #ffc300;
  --newsprint: #f4ecd8;
  --dark: #202226;
  --text-dark: #111111;
  --gray: #6b7280;
  --white: #ffffff;
  --brand-blue: #011597;
}

/* Reset e Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Archivo', sans-serif;
}

body {
  background-color: var(--newsprint);
  color: var(--text-dark);
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('bg.png');
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* Telas (SPA flow) */
.screen {
  display: none;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  animation: fadeIn 0.3s ease;
  z-index: 1;
}

.screen.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

h1, h2, h3 { 
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 800; 
  text-transform: uppercase; 
  letter-spacing: -0.5px; 
  color: var(--press-navy);
}

.text-center { text-align: center; }
.hidden { display: none !important; }

/* Top Bar */
.top-bar {
  background: var(--white);
  padding: 1rem;
  border-bottom: 2px solid var(--dark);
  z-index: 10;
}

.top-bar-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.stat-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--newsprint);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 2px solid var(--dark);
}

@media (max-width: 600px) {
  .stat-box { flex-direction: column; gap: 0.2rem; padding: 0.4rem 0.6rem; align-items: center; justify-content: center; }
  .stat-value { font-size: 1rem; }
}

.stat-label, .stat-icon { 
  color: var(--gray); 
  font-size: 0.8rem; 
  text-transform: uppercase; 
  font-weight: 700; 
  font-family: 'Big Shoulders Display', sans-serif;
}

.stat-value { 
  font-weight: 800; 
  font-size: 1.2rem; 
  color: var(--dark); 
  font-family: 'JetBrains Mono', monospace;
}

/* Botões */
.btn {
  border: 2px solid var(--dark);
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s ease;
  font-family: 'Big Shoulders Display', sans-serif;
  box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.15);
}

.btn:hover:not(:disabled) {
  transform: rotate(-1deg) scale(1.02);
}

.btn:active { transform: scale(0.95); box-shadow: 0px 0px 0px 0px rgba(0,0,0,0.15); transform: translateY(4px) translateX(4px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--brand-blue); color: var(--white); }
.btn-secondary { background: transparent; color: var(--press-navy); }

.btn-block { width: 100%; display: block; margin-top: 1rem; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.9rem; }

.btn-pulse { animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.15); }
  50% { box-shadow: 8px 8px 0px 0px rgba(1,21,151,0.4); transform: translateY(-2px) translateX(-2px); }
  100% { box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.15); }
}

.btn-pix { background: var(--pitch-green); color: var(--white); }

.btn-twitter {
  background: #000;
  color: #fff;
  border-color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.btn-twitter:hover {
  background: #1a1a1a;
  color: #fff !important;
  border-color: #555;
  transform: rotate(-1deg) scale(1.02);
}
.btn-pulse-green { animation: heartbeat 1.8s infinite ease-in-out; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.15); }
  15% { transform: scale(1.04); box-shadow: 0 0 15px rgba(26,122,74,0.6), 4px 4px 0px 0px rgba(0,0,0,0.15); }
  30% { transform: scale(1); box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.15); }
  45% { transform: scale(1.04); box-shadow: 0 0 15px rgba(26,122,74,0.6), 4px 4px 0px 0px rgba(0,0,0,0.15); }
  60% { transform: scale(1); box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.15); }
}

/* Tela 1: Intro */
.intro-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
  background-color: transparent;
  background-image: radial-gradient(var(--gray) 1px, transparent 1px);
  background-size: 20px 20px;
}

.logo-box { margin-bottom: 2rem; }
.game-title { font-size: 5rem; color: var(--press-navy); line-height: 1; font-family: 'Big Shoulders Display', sans-serif; font-weight: 900;}
.game-logo { width: 100%; max-width: 400px; height: auto; display: block; margin: 0 auto; }
@media (max-width: 600px) { .game-logo { max-width: 240px; } }
.game-subtitle { font-size: 1.5rem; color: var(--brand-blue); font-weight: 600; margin-top: 0.5rem; }
.intro-text { max-width: 400px; color: var(--text-dark); line-height: 1.5; margin-bottom: 2rem; font-size: 1.1rem; }

.team-creation { width: 100%; max-width: 300px; margin-bottom: 2rem; }
.team-creation input {
  width: 100%;
  padding: 1rem;
  border-radius: 8px;
  border: 2px solid var(--dark);
  background: var(--white);
  color: var(--text-dark);
  font-size: 1.2rem;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  font-family: 'Big Shoulders Display', sans-serif;
  box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.08);
}
.team-creation input:focus { outline: none; border-color: var(--pitch-green); }

/* Main Content Wrapper */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: 90px; 
}

.section-header { text-align: center; margin-bottom: 1rem; }
.section-header h2 { color: var(--press-navy); margin-bottom: 0.2rem; }
.section-header p { color: var(--gray); font-size: 0.9rem; }

@media (min-width: 768px) {
  #screen-tactics .main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
      "header header"
      "controls pitch"
      "bench pitch";
    gap: 1rem 2rem;
  }
  #screen-tactics .section-header { grid-area: header; }
  #screen-tactics .tactic-controls { grid-area: controls; align-self: start; }
  #screen-tactics .pitch-section { grid-area: pitch; }
  #screen-tactics .bench-section { grid-area: bench; }
}

/* TÁTICA E FORMAÇÃO */
.tactic-controls {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  margin-bottom: 1.5rem; background: var(--white); padding: 1rem; border-radius: 8px; border: 2px solid var(--dark);
  box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.08);
}
.tactic-controls label { font-weight: 700; color: var(--gray); text-transform: uppercase; font-size: 0.9rem; font-family: 'Big Shoulders Display', sans-serif; }
.tactic-controls select {
  background: var(--newsprint); color: var(--text-dark); border: 2px solid var(--dark);
  padding: 0.5rem; border-radius: 6px; font-weight: 700; font-size: 1rem;
}

.pitch-container { position: relative; width: 100%; max-width: 400px; margin: 0 auto; aspect-ratio: 2/3; }
.pitch {
  background: var(--pitch-green); border: 6px solid #c2b280; border-radius: 12px;
  width: 100%; height: 100%; position: relative; overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 8px 8px 0px 0px rgba(0,0,0,0.08);
}
.pitch-clip {
  position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
  width: 80px; height: 20px; border: 2px solid var(--dark);
  border-radius: 4px; box-shadow: 2px 2px 0px rgba(0,0,0,0.2); z-index: 10;
  background: linear-gradient(to bottom, #e4e4e7, #a1a1aa);
}
.pitch::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  height: 2px; background: rgba(255,255,255,0.4);
}
.pitch::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 60px; height: 60px; border: 2px solid rgba(255,255,255,0.4);
  border-radius: 50%; transform: translate(-50%, -50%);
}

.player-node {
  position: absolute; width: 44px; height: 44px;
  transform: translate(-50%, -50%); display: flex; flex-direction: column;
  justify-content: center; align-items: center; border-radius: 50%;
  border: 2px solid var(--dark); box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
}
.node-ovr { font-weight: 800; font-size: 1.1rem; color: var(--white); font-family: 'JetBrains Mono', monospace; }
.node-name {
  position: absolute; bottom: -22px; background: var(--press-navy); color: var(--white);
  padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; font-weight: 600;
  white-space: nowrap; border: 1px solid var(--dark); font-family: 'Big Shoulders Display', sans-serif; text-transform: uppercase;
}

.tactic-bonuses {
  display: flex; flex-direction: row; justify-content: center; gap: 1rem; margin-top: 1rem;
}
.bonus-tag { background: var(--white); border: 2px solid var(--dark); padding: 0.5rem; border-radius: 6px; font-size: 0.8rem; font-weight: 700; box-shadow: 2px 2px 0px rgba(0,0,0,0.1); color: var(--press-navy); }

.bench-section { margin-top: 2rem; background: transparent; padding: 1rem; }

/* TELA DRAFT */
.draft-team-card {
  background: var(--white);
  border: 2px solid var(--dark);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 8px 8px 0px 0px rgba(0,0,0,0.08);
}
.draft-team-card h2 { color: var(--press-navy); margin-bottom: 0.5rem; font-size: 2rem; }
.draft-team-card p { color: var(--dark); font-weight: 700; }

.draft-controls {
  display: flex;
  align-items: center;
}

/* Lista Vertical de Draft */
.market-list-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.market-item {
  background: var(--white);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  border: 2px solid var(--dark);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.08);
}

.market-item.disabled {
  opacity: 0.6; filter: grayscale(100%); background: #e5e7eb;
}

.mi-ovr {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; justify-content: center; align-items: center;
  border-radius: 6px; font-weight: 800; font-size: 1.1rem; color: var(--dark);
  border: 2px solid var(--dark); font-family: 'JetBrains Mono', monospace;
}

.mi-info { flex: 1; min-width: 0; }
.mi-name { font-weight: 700; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--press-navy); font-family: 'Big Shoulders Display', sans-serif; text-transform: uppercase; }
.mi-pos { font-size: 0.8rem; font-weight: 800; background: var(--press-navy); color: white; padding: 2px 6px; border-radius: 4px; display: inline-block; font-family: 'Big Shoulders Display', sans-serif; border: 1px solid var(--dark); margin-top: 2px;}

.mi-stats {
  display: flex;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--gray);
  flex-wrap: wrap;
  width: 100px;
  font-family: 'JetBrains Mono', monospace;
}
@media (max-width: 450px) { .mi-stats { display: none; } }

.mi-cost { font-weight: 800; color: var(--dark); font-size: 1rem; margin-right: 0.5rem; font-family: 'JetBrains Mono', monospace; }

/* OVR Colors */
.ov-gold { background: var(--trophy-gold); }
.ov-silver { background: #e2e8f0; }
.ov-bronze { background: #f97316; }
.ov-plain { background: #cbd5e1; }

/* Drafted Preview Inferior */
.drafted-preview {
  position: fixed;
  bottom: 0; left: 0; width: 100%;
  background: var(--newsprint);
  border-top: 2px solid var(--dark);
  padding: 0.5rem 1rem;
  z-index: 20;
  box-shadow: 0px -4px 0px 0px rgba(0,0,0,0.05);
}

.drafted-slots {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-top: 10px;
  padding-bottom: 10px;
  justify-content: flex-start;
  scroll-snap-type: x mandatory;
}
@media (min-width: 600px) { .drafted-slots { justify-content: center; } }

.drafted-slot {
  scroll-snap-align: center;
  min-width: 50px;
  height: 60px;
  background: var(--white);
  border: 2px solid var(--dark);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 0.7rem;
  flex-shrink: 0;
  box-shadow: 2px 2px 0px 0px rgba(0,0,0,0.08);
}
.drafted-slot.empty { opacity: 0.7; border: 2px dashed var(--gray); background: transparent; box-shadow: none; }
.slot-pos { font-weight: 800; font-family: 'Big Shoulders Display', sans-serif; color: var(--gray); }
.slot-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45px; color: var(--press-navy); }
.slot-ovr { color: var(--dark); font-weight: bold; font-family: 'JetBrains Mono', monospace; }
.slot-cost { font-size: 0.65rem; color: var(--dark); margin-top: 2px; font-weight: 800; }

/* TELA TEMPORADA */
.season-layout { display: flex; flex-direction: column; gap: 1.5rem; }

.next-match-card { background: var(--white); border-radius: 12px; padding: 1.5rem; border: 2px solid var(--dark); text-align: center; box-shadow: 8px 8px 0px 0px rgba(0,0,0,0.08); }
.match-teams { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.team-badge { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; width: 100px; }
.badge-logo { font-size: 3rem; }
.team-badge span { font-weight: 800; font-size: 1.2rem; font-family: 'Big Shoulders Display', sans-serif; color: var(--press-navy); text-transform: uppercase;}
.match-vs { font-weight: 900; color: var(--dark); font-size: 1.5rem; font-family: 'Big Shoulders Display', sans-serif; }
.match-actions { display: flex; gap: 0.8rem; }

.broadcast-panel { background: var(--newsprint); border-radius: 12px; padding: 1.5rem; border: 2px solid var(--dark); box-shadow: 8px 8px 0px 0px rgba(0,0,0,0.08); }
.scoreboard {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--white); padding: 1rem; border-radius: 8px; font-weight: 800; font-size: 1.2rem; margin-bottom: 1rem;
  border: 2px solid var(--dark);
}
.scoreboard span { font-family: 'Big Shoulders Display', sans-serif; color: var(--press-navy); text-transform: uppercase; font-size: 1.5rem;}
.scoreboard .score-numbers { font-size: 2.5rem; color: var(--dark); font-family: 'JetBrains Mono', monospace; }
.match-events { height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.8rem; font-size: 0.95rem; padding-right: 0.5rem; }
.match-event { background: var(--white); padding: 0.8rem; border-radius: 8px; border: 2px solid var(--dark); border-left: 6px solid var(--pitch-green); animation: fadeIn 0.3s ease; box-shadow: 2px 2px 0px rgba(0,0,0,0.05); color: var(--text-dark); }

.season-alerts { display: flex; flex-direction: column; gap: 0.8rem; }
.event-card { background: var(--white); padding: 1rem; border-radius: 12px; border: 2px solid var(--dark); border-left: 8px solid; animation: fadeIn 0.5s ease; box-shadow: 8px 8px 0px 0px rgba(0,0,0,0.08); color: var(--text-dark); }
.event-positive { border-left-color: var(--pitch-green); }
.event-negative { border-left-color: var(--chaos-red); }
.event-neutral { border-left-color: var(--trophy-gold); }

.standings-panel { background: var(--white); border-radius: 12px; padding: 1.5rem; border: 2px solid var(--dark); box-shadow: 8px 8px 0px 0px rgba(0,0,0,0.08); }
.standings-panel h3 { margin-bottom: 1rem; font-size: 1.5rem; }
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-family: 'JetBrains Mono', monospace; color: var(--text-dark); }
th, td { padding: 0.8rem 0.4rem; text-align: center; border-bottom: 2px solid var(--dark); }
td:nth-child(2), th:nth-child(2) { text-align: left; }
th { color: var(--press-navy); font-weight: 800; font-family: 'Big Shoulders Display', sans-serif; font-size: 1.1rem; }
.my-team td { background: var(--trophy-gold); font-weight: 800; color: var(--dark); }
.z4 td { color: var(--chaos-red); font-weight: 700; }
.z4-separator { background: var(--chaos-red); color: white; font-weight: 800; font-size: 0.8rem; padding: 0.4rem !important; letter-spacing: 1px; font-family: 'Big Shoulders Display', sans-serif; text-transform: uppercase; }
.z4-danger-line td { background: repeating-linear-gradient(45deg, var(--crowd-yellow), var(--crowd-yellow) 10px, var(--dark) 10px, var(--dark) 20px) !important; color: transparent !important; height: 15px; padding: 0 !important; border: none; }

/* TELA RESULTADOS */
.results-content {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  height: 100%; padding: 2rem; text-align: center; background-color: transparent;
}
.final-title { font-size: clamp(2.2rem, 8vw, 4rem); margin-bottom: 0.5rem; color: var(--press-navy); font-weight: 900; }
.final-desc { font-size: 1.2rem; color: var(--text-dark); max-width: 400px; margin-bottom: 2rem; line-height: 1.5; }

.final-stats-card {
  background: linear-gradient(135deg, #facc15 0%, #ca8a04 100%);
  border-radius: 16px; padding: 0.8rem;
  border: 4px solid var(--white);
  box-shadow: 0px 10px 20px rgba(0,0,0,0.3), inset 0 0 0 4px var(--dark);
  width: 100%; max-width: 350px; margin-bottom: 2rem;
  position: relative; overflow: hidden;
}
.final-stats-card::after {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: linear-gradient(to bottom right, rgba(255,255,255,0) 40%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 60%);
  transform: rotate(45deg); pointer-events: none;
}
.f-card-inner {
  background: var(--white); border: 2px solid var(--dark); border-radius: 8px; padding: 1.5rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; position: relative; z-index: 1;
}
.final-team-name-header {
  grid-column: 1 / -1; font-size: 2.2rem; color: var(--press-navy); font-weight: 900; font-family: 'Big Shoulders Display', sans-serif; text-transform: uppercase; margin-bottom: 0.5rem; border-bottom: 2px dashed var(--gray); padding-bottom: 0.5rem; text-align: center; line-height: 1.1;
}
.f-footer-brand {
  grid-column: 1 / -1; margin-top: 0.5rem; font-size: 0.8rem; color: var(--gray); font-family: 'Big Shoulders Display', sans-serif; text-align: center; text-transform: uppercase; font-weight: 700;
}
.f-stat { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.f-label { color: var(--gray); font-size: 0.9rem; font-weight: 700; text-transform: uppercase; font-family: 'Big Shoulders Display', sans-serif;}
.f-value { font-size: 2.2rem; font-weight: 800; color: var(--dark); font-family: 'JetBrains Mono', monospace;}

/* Modal */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(32,34,38,0.8); backdrop-filter: blur(4px);
  display: flex; justify-content: center; align-items: center; z-index: 100;
}
.modal-box { background: var(--white); border: 2px solid var(--dark); border-radius: 12px; padding: 2rem; width: 90%; max-width: 400px; text-align: left; box-shadow: 12px 12px 0px 0px rgba(0,0,0,0.15); border-left: 8px solid var(--trophy-gold); }
#modal-interactive .modal-box { border-left: 2px solid var(--dark); }
.modal-box h3, .modal-box h2 { margin-bottom: 1rem; color: var(--press-navy); font-size: 2.2rem; line-height: 1; }
.modal-box p { color: var(--text-dark); font-size: 1rem; margin-bottom: 1.5rem; line-height: 1.5; }
#modal-interactive .modal-box p { color: var(--text-dark) !important; font-weight: 600; }
.modal-actions { display: flex; justify-content: center; gap: 1rem; }

#confetti-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 999; display: none; }

/* Remove Button para os Draftados */
.drafted-slot { position: relative; }
.slot-remove {
  position: absolute;
  top: -8px; right: -8px;
  background: var(--chaos-red);
  color: white;
  border: 2px solid var(--dark);
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 12px; font-weight: bold;
  display: flex; justify-content: center; align-items: center;
  cursor: pointer;
  z-index: 5;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}

.app-version-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  color: var(--gray);
  font-size: 0.9rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  z-index: 10;
}

.creator-badge {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: var(--white);
  color: var(--press-navy);
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px solid var(--dark);
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
  z-index: 9999;
  box-shadow: 4px 4px 0px 0px rgba(0,0,0,0.15);
  font-family: 'Big Shoulders Display', sans-serif;
  text-transform: uppercase;
  transition: transform 0.2s, box-shadow 0.2s;
}
.creator-badge:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px 0px rgba(0,0,0,0.15);
}
@media (max-width: 600px) {
  .creator-badge {
    bottom: auto;
    top: 16px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
  .creator-badge:hover {
    transform: translateX(calc(-50% - 2px)) translateY(-2px);
  }
}

/* --- Novas Classes de UI/UX --- */
.tabular-nums { font-variant-numeric: tabular-nums; }

.final-stats-card.f-card-relegated {
  background: linear-gradient(135deg, #9ca3af 0%, #4b5563 100%);
}
.final-stats-card.f-card-relegated .f-card-inner {
  background: #e5e7eb;
}
.final-stats-card.f-card-relegated .final-team-name-header { color: var(--chaos-red); text-decoration: line-through; }

@keyframes errorShake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); border-color: var(--chaos-red); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); border-color: var(--dark); }
}
.error-shake { animation: errorShake 0.3s ease-in-out; }

.draft-flash {
  background-color: var(--pitch-green) !important;
  color: var(--white) !important;
  border-color: var(--pitch-green) !important;
  transition: all 0.15s ease;
}

@media (max-width: 600px) {
  .match-events { height: 120px; }
  .modal-box h3, .modal-box h2 { font-size: 1.6rem; }
}

@media (max-width: 400px) {
  .f-value { font-size: 1.8rem; }
  .f-label { font-size: 0.85rem; }
  .final-stats-card { padding: 0.5rem; margin-bottom: 1rem; }
  .f-card-inner { padding: 1rem; gap: 0.5rem; }
  .final-team-name-header { font-size: 1.6rem; margin-bottom: 0.2rem; padding-bottom: 0.2rem; }
  .f-stat { gap: 0; }
  .final-desc { margin-bottom: 1rem; font-size: 1rem; }
}

/* --- Novas Classes: Grids, Ghost Slots e Box Score --- */
.btn-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.grid-btn {
  background: var(--white);
  border: 2px solid var(--dark);
  border-radius: 6px;
  padding: 0.5rem 0.8rem;
  font-weight: 800;
  color: var(--press-navy);
  cursor: pointer;
  box-shadow: 2px 2px 0px 0px rgba(0,0,0,0.1);
  transition: all 0.1s ease;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  flex: 1;
  text-align: center;
}
.grid-btn:hover {
  transform: scale(1.02);
}
.grid-btn.active {
  background: var(--press-navy);
  color: var(--white);
  box-shadow: none;
  transform: translateY(2px) translateX(2px);
}

.empty-slot {
  background: transparent !important;
  border: 2px dashed rgba(255,255,255,0.6) !important;
  box-shadow: none !important;
}

@media (min-width: 768px) {
  .draft-main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
  }
  .drafted-preview {
    display: none;
  }
}

#screen-season .main-content {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
#screen-season .main-content::-webkit-scrollbar {
  display: none;
}

.draft-box-score-container {
  background: var(--white);
  border: 2px solid var(--dark);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 8px 8px 0px 0px rgba(0,0,0,0.08);
  height: fit-content;
}

.box-score-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px dashed var(--gray);
  padding-bottom: 0.5rem;
}

.box-score-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.box-score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.bs-pos {
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--press-navy);
  width: 50px;
}

.bs-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--gray);
  font-weight: bold;
  flex: 1;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bs-name.filled {
  color: var(--dark);
}
