/* ═══════════════════════ COPA 2026 - ESTILOS ═══════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --verde-grama: #1b5e20;
  --verde-claro: #4caf50;
  --amarelo-ouro: #ffd700;
  --amarelo-escuro: #c8a600;
  --azul-ceu: #1565c0;
  --azul-claro: #42a5f5;
  --branco: #ffffff;
  --cinza: #f5f5f5;
  --texto: #1a1a1a;
  --sombra: 0 8px 32px rgba(0,0,0,0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg, #e8f5e9 0%, #c8e6c9 30%, #a5d6a7 60%, #66bb6a 100%);
  min-height: 100vh;
  color: var(--texto);
  overflow-x: hidden;
  position: relative;
}

/* ═══════════ FUNDO CAMPO DE FUTEBOL ═══════════ */
body::before {
  content: '';
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
  background: 
    linear-gradient(180deg, transparent 0%, rgba(27,94,32,0.1) 40%, rgba(27,94,32,0.3) 100%),
    repeating-linear-gradient(90deg, transparent 0px, rgba(255,255,255,0.03) 2px, transparent 4px, transparent 60px),
    radial-gradient(ellipse at 50% 120%, rgba(255,215,0,0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Linhas do campo */
body::after {
  content: '';
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 800px;
  height: 60%;
  border-left: 2px solid rgba(255,255,255,0.15);
  border-right: 2px solid rgba(255,255,255,0.15);
  border-bottom: 2px solid rgba(255,255,255,0.2);
  border-radius: 0 0 10px 10px;
  pointer-events: none;
  z-index: 0;
}

/* ═══════════ CONTAINER ═══════════ */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
  position: relative;
  z-index: 1;
}

/* ═══════════ HEADER ═══════════ */
.header-copa {
  background: linear-gradient(135deg, var(--verde-grama) 0%, var(--verde-claro) 50%, var(--amarelo-ouro) 100%);
  color: white;
  padding: 20px;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: var(--sombra);
  position: relative;
  overflow: hidden;
}

.header-copa::before {
  content: '⭐';
  position: absolute;
  font-size: 80px;
  top: -20px;
  left: -10px;
  opacity: 0.2;
  animation: float 3s ease-in-out infinite;
}

.header-copa::after {
  content: '⭐';
  position: absolute;
  font-size: 60px;
  bottom: -10px;
  right: -5px;
  opacity: 0.15;
  animation: float 3s ease-in-out 1.5s infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.header-copa h1 {
  font-size: 2rem;
  font-weight: 900;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  margin-bottom: 4px;
}

.header-copa .subtitulo {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.9;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ═══════════ TABS ═══════════ */
.tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.9);
  border-radius: 16px;
  padding: 4px;
  margin-bottom: 20px;
  box-shadow: var(--sombra);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab {
  flex: 1;
  min-width: fit-content;
  padding: 12px 16px;
  border: none;
  background: transparent;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tab.active {
  background: linear-gradient(135deg, var(--verde-grama), var(--verde-claro));
  color: white;
  box-shadow: 0 4px 12px rgba(27,94,32,0.3);
}

/* ═══════════ CARDS ═══════════ */
.card {
  background: rgba(255,255,255,0.95);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--sombra);
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.card-grupo {
  border-left: 4px solid var(--amarelo-ouro);
}

/* ═══════════ GRUPOS ═══════════ */
.grupo-header {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--verde-grama);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 8px;
}

.time-row:hover {
  background: #f0f7f0;
}

.time-row:last-child {
  border-bottom: none;
}

.time-bandeira {
  font-size: 1.5rem;
  margin-right: 8px;
}

.time-nome {
  font-weight: 600;
  font-size: 0.9rem;
  flex: 1;
}

.time-ranking {
  font-size: 0.7rem;
  color: #999;
  font-weight: 500;
}

/* ═══════════ ESTÁDIOS ═══════════ */
.estadio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.estadio-icone {
  font-size: 2rem;
}

.estadio-info h4 {
  font-weight: 700;
  font-size: 0.95rem;
}

.estadio-info p {
  font-size: 0.75rem;
  color: #666;
}

/* ═══════════ PALPITES ═══════════ */
.palpite-input {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.palpite-input input {
  width: 50px;
  padding: 10px;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: inherit;
  transition: all 0.3s;
}

.palpite-input input:focus {
  border-color: var(--amarelo-ouro);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,215,0,0.2);
}

.palpite-vs {
  font-weight: 800;
  font-size: 1rem;
  color: #999;
}

.btn-palpite {
  background: linear-gradient(135deg, var(--amarelo-ouro), var(--amarelo-escuro));
  color: #333;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.btn-palpite:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255,215,0,0.4);
}

.btn-palpite.salvo {
  background: var(--verde-claro);
  color: white;
}

/* ═══════════ BOTÃO INSTALAR ═══════════ */
.btn-instalar {
  background: linear-gradient(135deg, var(--azul-ceu), var(--azul-claro));
  color: white;
  border: none;
  padding: 16px;
  border-radius: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
  margin-bottom: 12px;
  transition: all 0.3s;
  display: none;
}

.btn-instalar:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(21,101,192,0.4);
}

/* ═══════════ CONFETTI ═══════════ */
.confetti {
  position: fixed;
  z-index: 999;
  pointer-events: none;
  animation: confetti-fall 2s ease-out forwards;
}

@keyframes confetti-fall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ═══════════ RESPONSIVO ═══════════ */
@media (max-width: 600px) {
  .header-copa h1 { font-size: 1.5rem; }
  .tabs { gap: 2px; padding: 2px; }
  .tab { padding: 10px 12px; font-size: 0.7rem; }
  .time-nome { font-size: 0.8rem; }
}

@media (min-width: 768px) {
  .container { padding: 24px; }
  .grupos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .grupos-grid .card { margin-bottom: 0; }
}

@media (min-width: 1024px) {
  .grupos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ═══════════ SIDEBAR VS CODE STYLE ═══════════ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 60px;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255,255,255,0.08);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  transition: width 0.3s;
  overflow: hidden;
}

.sidebar:hover {
  width: 160px;
}

.sidebar-icons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 0 8px;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border: none;
  background: transparent;
  color: #888;
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
  width: 100%;
  transition: all 0.2s;
  white-space: nowrap;
}

.sidebar-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.sidebar-btn.active {
  background: rgba(255,215,0,0.15);
  color: #ffd700;
}

.sidebar-btn .material-symbols-outlined {
  font-size: 22px;
  flex-shrink: 0;
}

.sidebar-label {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
}

.sidebar:hover .sidebar-label {
  opacity: 1;
}

/* Ajuste do container para o menu lateral */
.container {
  margin-left: 60px;
}

@media (max-width: 768px) {
  .sidebar {
    width: 50px;
  }
  .container {
    margin-left: 50px;
  }
}