:root {
  /* Paleta Zero Clubismo */
  --zc-primary: #e5095d; /* Rosa Choque / Magenta */
  --zc-primary-glow: rgba(229, 9, 93, 0.5);
  --zc-bg-dark: #240033;
  --zc-bg-darker: #11001A;
  --zc-card-bg: #3b1152;
  --zc-card-border: #5a1f7a;
  --zc-text: #ffffff;
  --zc-text-muted: #cba1e3;
  
  /* Status Colors */
  --zc-correct: #00e050;
  --zc-correct-glow: rgba(0, 224, 80, 0.4);
  --zc-wrong: #ff1e46;
  --zc-wrong-glow: rgba(255, 30, 70, 0.4);
  
  --font-main: 'Outfit', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

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

body {
  font-family: var(--font-main);
  background: radial-gradient(circle at top center, #6b147d 0%, var(--zc-bg-dark) 40%, var(--zc-bg-darker) 100%);
  color: var(--zc-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* --- HEADER --- */
.zc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  background: rgba(17, 0, 26, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--zc-card-border);
}

.logo {
  font-size: 2.5rem;
  font-weight: 900;
  display: flex;
  transform: skew(-10deg);
  letter-spacing: -2px;
}
.logo .z { color: var(--zc-primary); }
.logo .c { color: #fff; margin-left: 2px; }

.header-text {
  text-align: center;
}
.header-text h1 {
  font-size: 2rem;
  color: var(--zc-text);
  letter-spacing: 2px;
  line-height: 1;
}
.header-text p {
  font-size: 0.8rem;
  color: var(--zc-primary);
  font-weight: 600;
  letter-spacing: 3px;
  margin-top: 4px;
}

.social-links {
  display: flex;
  gap: 15px;
}
.social-btn {
  color: var(--zc-text);
  transition: all 0.3s ease;
}
.social-btn:hover {
  color: var(--zc-primary);
  transform: scale(1.1);
}

/* --- MAIN CONTAINER --- */
.game-container {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 5%;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* --- GAME HEADER HUD --- */
.game-header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(82, 23, 115, 0.6), rgba(17, 0, 26, 0.8));
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--zc-card-border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.theme-title {
  text-align: center;
  font-size: 1.2rem;
  color: var(--zc-text-muted);
  font-weight: 400;
}
.theme-title span {
  display: block;
  font-size: 2rem;
  color: var(--zc-text);
  font-weight: 800;
  margin-top: 5px;
  text-transform: uppercase;
  text-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(17, 0, 26, 0.6);
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--zc-card-border);
}

.score-board, .lives-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--zc-text-muted);
  letter-spacing: 1px;
}
.value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--zc-correct);
  text-shadow: 0 0 10px var(--zc-correct-glow);
}

.lives-icons {
  display: flex;
  gap: 8px;
}
.life {
  width: 25px;
  height: 25px;
  background-color: var(--zc-card-border);
  border-radius: 50%;
  transition: all 0.3s ease;
}
.life.active {
  background-color: var(--zc-primary);
  box-shadow: 0 0 15px var(--zc-primary-glow);
}
.life.lost {
  background-color: var(--zc-wrong);
  opacity: 0.3;
}

/* --- PLAYERS GRID --- */
.players-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  perspective: 1000px;
}

.player-card {
  background: var(--zc-card-bg);
  border: 2px solid var(--zc-card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  position: relative;
  overflow: hidden;
}

.player-card:hover {
  transform: translateY(-5px);
  border-color: var(--zc-primary);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5), inset 0 0 15px rgba(229, 9, 93, 0.1);
}

.player-card:active {
  transform: scale(0.95);
}

/* Estados do Card */
.player-card.correct {
  background: linear-gradient(135deg, #00802e, var(--zc-correct));
  border-color: var(--zc-correct);
  color: #000;
  pointer-events: none;
  box-shadow: 0 0 20px var(--zc-correct-glow);
  transform: scale(1.02);
}

.player-card.wrong {
  background: linear-gradient(135deg, #a00020, var(--zc-wrong));
  border-color: var(--zc-wrong);
  color: #fff;
  pointer-events: none;
  animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
  box-shadow: 0 0 20px var(--zc-wrong-glow);
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* --- MODAL --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--zc-bg-dark);
  border: 2px solid var(--zc-card-border);
  padding: 3rem;
  border-radius: var(--radius-lg);
  text-align: center;
  max-width: 400px;
  width: 90%;
  transform: translateY(50px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}
.modal-overlay.show .modal-content {
  transform: translateY(0) scale(1);
}

.modal-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}
#modal-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.modal-content.win {
  border-color: var(--zc-correct);
  box-shadow: 0 0 50px var(--zc-correct-glow);
}
.modal-content.win #modal-title { color: var(--zc-correct); }

.modal-content.lose {
  border-color: var(--zc-wrong);
  box-shadow: 0 0 50px var(--zc-wrong-glow);
}
.modal-content.lose #modal-title { color: var(--zc-wrong); }

#modal-message {
  color: var(--zc-text-muted);
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.zc-button {
  background: var(--zc-primary);
  color: #fff;
  border: none;
  padding: 15px 30px;
  font-size: 1.2rem;
  font-weight: 800;
  font-family: var(--font-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-transform: uppercase;
}
.zc-button:hover {
  background: #ff1c73;
  box-shadow: 0 5px 20px var(--zc-primary-glow);
  transform: translateY(-2px);
}

/* --- GAME NAVIGATION --- */
.game-nav-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  background: rgba(17, 0, 26, 0.8);
  padding: 1rem;
  border-bottom: 1px solid var(--zc-card-border);
}

.nav-btn {
  background: transparent;
  color: var(--zc-text-muted);
  border: 2px solid transparent;
  padding: 10px 20px;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.nav-btn:hover {
  color: var(--zc-text);
  background: rgba(255,255,255,0.05);
}

.nav-btn.active {
  color: #fff;
  border-color: var(--zc-primary);
  background: rgba(229, 9, 93, 0.1);
  box-shadow: 0 0 15px var(--zc-primary-glow);
}

/* --- CONECTE OS CLUBES JOGO --- */
.connect-game-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
  background: rgba(36, 0, 51, 0.4);
  padding: 3rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

.connect-game-board::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(229, 9, 93, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.connect-instruction {
  font-size: 1.2rem;
  color: var(--zc-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  line-height: 1.5;
  z-index: 1;
  position: relative;
  margin-bottom: 5px;
}

.clubs-display {
  display: flex;
  justify-content: center;
  gap: 15px;
  width: 100%;
  flex-wrap: wrap;
}

.club-slot {
  background: rgba(20, 0, 30, 0.7);
  border: 1px solid var(--zc-card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  min-width: 130px;
  text-align: center;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(10px);
  position: relative;
  color: var(--zc-text-muted);
  overflow: hidden;
}

.club-slot::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(229, 9, 93, 0.2) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.club-slot:hover {
  transform: translateY(-5px);
  border-color: var(--zc-primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(0,0,0,0.5), inset 0 0 15px rgba(229, 9, 93, 0.1);
}

.club-slot:hover::before {
  opacity: 1;
}

.club-slot.matched {
  background: linear-gradient(135deg, #02b043, #00e050);
  border-color: #00ff55;
  color: #001a08;
  box-shadow: 0 0 25px rgba(0, 224, 80, 0.5);
  transform: scale(1.08);
  font-weight: 900;
}

.club-slot.matched::after {
  content: '✓';
  position: absolute;
  top: 5px; right: 10px;
  font-size: 1rem;
  color: rgba(0,0,0,0.3);
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  z-index: 10;
}

.zc-input {
  width: 100%;
  padding: 1.2rem 1.5rem;
  font-family: var(--font-main);
  font-size: 1.3rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.zc-input:focus {
  border-color: var(--zc-primary);
  box-shadow: 0 0 20px var(--zc-primary-glow), inset 0 2px 10px rgba(0,0,0,0.5);
  background: rgba(20, 0, 30, 0.8);
}

.autocomplete-results {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--zc-bg-darker);
  border: 2px solid var(--zc-primary);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  /* Altura responsiva: cabe sempre acima do teclado virtual (40dvh = 40% da viewport visível) */
  max-height: min(280px, 40dvh);
  overflow-y: auto;
  /* Mobile/iOS: impede que o scroll do dropdown propague pra página */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  z-index: 99999 !important;
  list-style: none;
  box-shadow: 0 15px 40px rgba(0,0,0,0.9);
  display: none;
}

.autocomplete-results.show {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.autocomplete-results li {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--zc-card-border);
  cursor: pointer;
  transition: background 0.2s ease;
}

/* Destaque do trecho que casou com o que o usuário digitou (estilo playfootball) */
.autocomplete-results li strong {
  color: var(--zc-primary);
  font-weight: 900;
}

.autocomplete-results li:last-child {
  border-bottom: none;
}

.autocomplete-results li:hover {
  background: var(--zc-card-bg);
}

.result-name {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.result-desc {
  font-size: 0.8rem;
  color: var(--zc-text-muted);
  margin-top: 5px;
}

/* --- TOP 100 JOGO --- */
.top100-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  width: 100%;
}

.top100-slot {
  background: rgba(20, 0, 30, 0.7);
  border: 1px solid var(--zc-card-border);
  border-radius: 6px;
  padding: 8px 5px;
  text-align: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60px;
}

.top100-slot .rank {
  font-size: 0.9rem;
  color: var(--zc-text-muted);
  font-weight: 800;
}

.top100-slot .info {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  font-weight: 600;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top100-slot.revealed {
  background: linear-gradient(135deg, #02b043, #00e050);
  border-color: #00ff55;
  box-shadow: 0 0 15px rgba(0, 224, 80, 0.5);
  transform: scale(1.05);
  z-index: 2;
}

.top100-slot.revealed .rank {
  color: #001a08;
}

.top100-slot.revealed .info {
  color: #000;
  font-weight: 900;
}

/* --- NUMERAÇÃO JOGO --- */
.num-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.num-slot {
  background: rgba(20, 0, 30, 0.7);
  border: 2px solid var(--zc-card-border);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--zc-text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.num-slot:hover {
  transform: translateY(-3px);
  border-color: var(--zc-primary);
  color: #fff;
  box-shadow: 0 5px 15px var(--zc-primary-glow);
}

.num-slot.active {
  border-color: #fff;
  color: #000;
  background: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.num-slot.revealed {
  background: linear-gradient(135deg, #02b043, #00e050);
  border-color: #00ff55;
  color: #001a08;
  cursor: default;
  transform: scale(1);
  box-shadow: 0 0 15px rgba(0, 224, 80, 0.5);
}

.num-slot .player-name-tooltip {
  position: absolute;
  bottom: -35px;
  background: #000;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
  border: 1px solid var(--zc-primary);
}

.num-slot.revealed:hover .player-name-tooltip {
  opacity: 1;
}

/* --- TIMELINE JOGO --- */
.timeline-history {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}

.timeline-history::-webkit-scrollbar {
  width: 5px;
}
.timeline-history::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
.timeline-history::-webkit-scrollbar-thumb {
  background: var(--zc-primary);
  border-radius: 10px;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  background: rgba(255,255,255,0.05);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  border-left: 4px solid var(--zc-primary);
  opacity: 0.8;
  animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 0.8; transform: translateY(0); }
}

.timeline-item .year {
  font-weight: 800;
  color: var(--zc-text-muted);
}

.timeline-item .country {
  font-weight: 900;
  color: #00ff55;
  text-shadow: 0 0 10px rgba(0,255,85, 0.4);
}

.timeline-item.skipped .country {
  color: #00f0ff;
  text-shadow: 0 0 10px rgba(0,240,255, 0.4);
  font-style: italic;
}

.timeline-item.skipped {
  border-left-color: #00f0ff;
}

/* --- JOGO MATA-MATA --- */
.matamata-board {
  display: flex;
  width: 100%;
  gap: 20px;
  justify-content: center;
}

.team-column {
  flex: 1;
  max-width: 350px;
  background: var(--zc-card);
  border: 1px solid var(--zc-card-border);
  border-radius: var(--radius-md);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-title {
  text-align: center;
  font-family: var(--font-header);
  color: var(--zc-primary);
  font-size: 1.4rem;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 5px;
}

.slots-divider {
  text-align: center;
  font-size: 0.8rem;
  font-weight: bold;
  color: #fff;
  opacity: 0.5;
  margin: 10px 0 5px 0;
  letter-spacing: 2px;
}

.slots-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.matamata-slot {
  background: rgba(0,0,0,0.3);
  border: 1px dashed rgba(255,255,255,0.2);
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  padding: 0 15px;
  color: var(--zc-text-muted);
  font-style: italic;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.matamata-slot.filled {
  background: rgba(0, 255, 85, 0.1);
  border: 1px solid #00ff55;
  color: #fff;
  font-style: normal;
  font-weight: bold;
  text-transform: uppercase;
  text-shadow: 0 0 5px rgba(0,255,85, 0.5);
  animation: popSlot 0.3s ease;
}

@keyframes popSlot {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); border-color: #fff; background: rgba(0,255,85, 0.3); }
  100% { transform: scale(1); }
}

/* Remove espinners arrows do input number */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
input[type=number] {
    -moz-appearance: textfield;
}

/* --- NAVEGAÇÃO / NAV BAR --- */
.game-nav-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 15px 5%;
  background: rgba(17, 0, 26, 0.9);
  border-bottom: 1px solid var(--zc-card-border);
  flex-wrap: nowrap;
}

.nav-btn {
  background: var(--zc-card-bg);
  color: var(--zc-text);
  border: 1px solid var(--zc-card-border);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-btn:hover {
  background: rgba(229, 9, 93, 0.2);
  border-color: var(--zc-primary);
}

.nav-btn.active {
  background: var(--zc-primary);
  color: #fff;
  border-color: var(--zc-primary);
  box-shadow: 0 0 10px var(--zc-primary-glow);
}

/* Fix sticky para HUD do 15x3 */
#game-15x3 .game-header {
  position: sticky;
  top: 0px;
  z-index: 100;
  background: var(--zc-bg-dark);
  padding: 10px 0;
}

#game-15x3 .hud {
  box-shadow: 0 15px 30px rgba(0,0,0,0.8);
}

/* Espaço para resultados do search dropdown (Quem Revelou, Conecte, Timeline) não serem cortados na web ou mobile */
.connect-game-board, .timeline-board {
  padding-bottom: 250px;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .players-grid { grid-template-columns: repeat(3, 1fr); }
  .hud { flex-direction: column; gap: 15px; align-items: center !important; }
  .matamata-board { flex-direction: column; }
  .team-column { max-width: 100%; }
  
  /* Ajuste top 100 - Reduz columns e corta scalings pra não empurrar tela */
  .top100-grid { grid-template-columns: repeat(5, 1fr); }
  .top100-slot.revealed { transform: none; box-shadow: none; }
}

@media (max-width: 768px) {
  /* Opção B: Nav bar com scroll horizontal no dedo */
  .game-nav-bar {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 15px;
  }
  .game-nav-bar::-webkit-scrollbar {
    display: none;
  }

  .connect-game-board, .timeline-board {
    padding: 10px;
  }
  
  .search-container {
    flex-direction: column;
    align-items: center;
  }
  
  /* Mobile: dropdown vira bottom-sheet — fixado acima do teclado virtual,
     ocupando a largura inteira da tela. JS ajusta `bottom` em runtime
     conforme o teclado abre/move via visualViewport.resize.
     Resolve o impasse "ou vejo o nome do jogador, ou vejo o dropdown". */
  .autocomplete-results.show {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0; /* sobrescrito por JS conforme teclado */
    width: 100% !important;
    max-width: none !important;
    max-height: min(45dvh, 320px);
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
    border: 2px solid var(--zc-primary) !important;
    border-bottom: none !important;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.95) !important;
    z-index: 100000 !important;
  }
}

@media (max-width: 600px) {
  .zc-header { flex-direction: column; gap: 10px; }
  .logo { font-size: 2rem; }
  .players-grid { grid-template-columns: repeat(2, 1fr); }
  .theme-title span { font-size: 1.5rem; }
  
  .game-header { text-align: center; }
  .matamata-slot { padding: 0 10px; font-size: 0.8rem; }
  .timeline-row { flex-direction: column; gap: 5px; text-align: center; }
  .zc-input, .zc-button { width: 100% !important; max-width: none; }
  
  .gols-card { min-width: 100% !important; padding: 15px; }
  
  .top100-grid { grid-template-columns: repeat(4, 1fr); }
  
  /* Força center na timeline hud e remove desalinhamento */
  #game-timeline .hud { justify-content: center !important; align-items: center !important; }
}

@media (max-width: 400px) {
  .players-grid { grid-template-columns: 1fr; }
  
  .hud { padding: 10px; }
  .score-board { flex-direction: column; align-items: center; }
  .score-board .label { margin-bottom: 5px; }
}

/* ===================================================================
   HOME — DESAFIOS DE HOJE
=================================================================== */
#game-home {
  padding: 30px 20px 100px;
  max-width: 1100px;
  margin: 0 auto;
}

.home-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.home-streak {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 165, 0, 0.12);
  border: 1px solid rgba(255, 165, 0, 0.4);
  padding: 10px 18px;
  border-radius: var(--radius-md);
}
.home-streak-icon { font-size: 1.6rem; }
.home-streak-count {
  font-family: var(--font-header);
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffb347;
}
.home-streak-label {
  font-size: 0.75rem;
  color: var(--zc-text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.home-date {
  font-family: var(--font-header);
  font-size: 1.2rem;
  color: #fff;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.home-countdown {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.home-countdown-label {
  font-size: 0.7rem;
  color: var(--zc-text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.home-countdown-time {
  font-family: var(--font-header);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--zc-primary);
  letter-spacing: 2px;
}

.home-title {
  font-family: var(--font-header);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 3px;
  text-align: center;
  color: #fff;
  margin: 10px 0 4px;
  text-shadow: 0 0 20px var(--zc-primary-glow);
}
.home-sub {
  text-align: center;
  color: var(--zc-text-muted);
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.home-card {
  background: var(--zc-card-bg);
  border: 2px solid var(--zc-card-border);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
}
.home-card:hover {
  transform: translateY(-4px);
  border-color: var(--zc-primary);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 20px rgba(229, 9, 93, 0.2);
}
.home-card-name {
  font-family: var(--font-header);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}
.home-card-theme {
  color: var(--zc-text-muted);
  font-size: 0.85rem;
  min-height: 1.2em;
}
.home-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}
.home-card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Estado: pendente */
.home-card.pending .home-card-status { color: #00f0ff; }

/* Estado: completo (vitória) */
.home-card.done-win {
  border-color: var(--zc-correct, #20e070);
  background: linear-gradient(180deg, rgba(32,224,112,0.12), var(--zc-card-bg));
}
.home-card.done-win .home-card-status { color: var(--zc-correct, #20e070); }

/* Estado: completo (derrota) */
.home-card.done-loss {
  border-color: var(--zc-wrong, #ff1c73);
  background: linear-gradient(180deg, rgba(255,28,115,0.10), var(--zc-card-bg));
  opacity: 0.95;
}
.home-card.done-loss .home-card-status { color: var(--zc-wrong, #ff1c73); }

/* Badge "JOGADO" no canto */
.home-card.played::after {
  content: 'JOGADO';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.6rem;
  letter-spacing: 1px;
  background: rgba(0,0,0,0.5);
  padding: 3px 8px;
  border-radius: 3px;
  color: #fff;
  font-weight: 800;
}

.home-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}
.home-share-btn { letter-spacing: 1px; }

/* Toast simples */
.zc-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid var(--zc-primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 9999;
  animation: toastIn 0.3s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 600px) {
  .home-top { justify-content: center; }
  .home-countdown { align-items: center; }
  .home-title { font-size: 1.6rem; }
}

/* ===================================================================
   GAME TOPBAR — voltar + regras (dentro de cada jogo)
=================================================================== */
#game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: var(--zc-card-bg);
  border-bottom: 1px solid var(--zc-card-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

#game-back-btn {
  background: transparent;
  color: var(--zc-text-muted);
  border: 1px solid var(--zc-card-border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
#game-back-btn:hover {
  color: #fff;
  border-color: var(--zc-primary);
  background: rgba(229, 9, 93, 0.15);
}

#game-rules-text {
  flex: 1;
  text-align: center;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--zc-text-muted);
  letter-spacing: 0.3px;
}

/* Spacer invisível pra simetrizar o layout (mesma largura do botão) */
#game-topbar-spacer {
  display: inline-block;
  min-width: 90px;
}

@media (max-width: 600px) {
  #game-topbar {
    flex-direction: column;
    gap: 6px;
    padding: 8px 12px;
  }
  #game-topbar-spacer { display: none; }
  #game-rules-text {
    font-size: 0.75rem;
    line-height: 1.3;
  }
}

