/* ============================================
   ⚽ Tema Copa do Mundo 2026
   Ativado via worldcup-theme.js
   ============================================ */

/* ================================
   🏆 Badge Copa no Header
   ================================ */
.wc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px; /* Formato pílula mais elegante */
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
  background: linear-gradient(135deg, #009c3b 0%, #009c3b 40%, #ffdf00 60%, #ffdf00 100%);
  background-size: 200% 200%;
  color: #002776;
  box-shadow: 0 4px 12px rgba(0, 156, 59, 0.4);
  animation: wc-badge-glow 2.5s ease-in-out infinite, wc-badge-gradient 3s ease infinite;
  cursor: default;
  user-select: none;
}

.wc-badge-icon {
  filter: brightness(0) invert(15%) sepia(61%) saturate(3747%) hue-rotate(212deg) brightness(97%) contrast(105%);
  font-size: 1.05em;
}

@keyframes wc-badge-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes wc-badge-glow {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(0, 156, 59, 0.4);
  }
  50% {
    box-shadow: 0 2px 16px rgba(255, 223, 0, 0.6), 0 0 24px rgba(0, 156, 59, 0.3);
  }
}

/* ================================
   🎵 Ocultar Bitrate (enquanto tema ativo)
   ================================ */
body.wc-active #songBitrate {
  display: none !important;
}

/* ================================
   ⚽ Bola Rolando no Header
   ================================ */
.soccer-ball-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.soccer-ball {
  position: absolute;
  top: 50%;
  font-size: 1.25rem;
  line-height: 1;
  transform: translateY(-50%);
  animation: ball-roll 8s linear infinite;
  opacity: 0.85;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.soccer-ball:nth-child(2) {
  animation-delay: -4s;
  font-size: 1rem;
  opacity: 0.5;
}

@keyframes ball-roll {
  0% {
    left: -60px;
    transform: translateY(-50%) rotate(0deg);
  }
  100% {
    left: calc(100% + 60px);
    transform: translateY(-50%) rotate(720deg);
  }
}

/* Hide on mobile */
@media (max-width: 768px) {
  .soccer-ball-track {
    display: none;
  }
}

/* ================================
   🎊 Confetes Copa (verde/amarelo/azul)
   ================================ */
.confetti-copa-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}

/* Modo geral: confetes mais espaçados e menores */
.wc-general-mode .confetti-copa {
  width: 8px;
  height: 8px;
  animation-duration: 6s;
  opacity: 0.7;
}

/* Modo Brasil: confetes maiores e mais rápidos */
.wc-brazil-mode .confetti-copa {
  width: 11px;
  height: 11px;
  animation-duration: 3.5s;
  opacity: 1;
}

.confetti-copa {
  position: absolute;
  top: -20px;
  animation: confetti-copa-fall linear infinite;
}

.confetti-copa:nth-child(odd)  { border-radius: 50%; }
.confetti-copa:nth-child(even) { border-radius: 2px; }

/* Cores — Verde, Amarelo, Azul Brasil */
.cc-1  { left: 4%;  background: #009c3b; animation-delay: -0s;    animation-duration: 4.5s; }
.cc-2  { left: 10%; background: #ffdf00; animation-delay: -0.3s;  animation-duration: 5s;   }
.cc-3  { left: 17%; background: #002776; animation-delay: -0.7s;  animation-duration: 4.2s; }
.cc-4  { left: 24%; background: #009c3b; animation-delay: -1.0s;  animation-duration: 5.2s; }
.cc-5  { left: 31%; background: #ffdf00; animation-delay: -1.3s;  animation-duration: 4s;   }
.cc-6  { left: 38%; background: #002776; animation-delay: -1.7s;  animation-duration: 4.8s; }
.cc-7  { left: 45%; background: #00c64a; animation-delay: -0.2s;  animation-duration: 5.5s; }
.cc-8  { left: 52%; background: #ffe633; animation-delay: -0.6s;  animation-duration: 4.3s; }
.cc-9  { left: 59%; background: #1a3a9a; animation-delay: -1.1s;  animation-duration: 4.7s; }
.cc-10 { left: 66%; background: #009c3b; animation-delay: -1.5s;  animation-duration: 5.1s; }
.cc-11 { left: 73%; background: #ffdf00; animation-delay: -0.4s;  animation-duration: 4.6s; }
.cc-12 { left: 80%; background: #002776; animation-delay: -0.9s;  animation-duration: 5.3s; }
.cc-13 { left: 86%; background: #009c3b; animation-delay: -1.8s;  animation-duration: 4.1s; }
.cc-14 { left: 92%; background: #ffdf00; animation-delay: -0.1s;  animation-duration: 5.4s; }
.cc-15 { left: 97%; background: #002776; animation-delay: -1.4s;  animation-duration: 4.4s; }

/* Extra confetes para modo Brasil */
.cc-16 { left: 7%;  background: #ffdf00; animation-delay: -2.1s;  animation-duration: 3.8s; }
.cc-17 { left: 20%; background: #009c3b; animation-delay: -2.4s;  animation-duration: 3.5s; }
.cc-18 { left: 35%; background: #002776; animation-delay: -2.7s;  animation-duration: 3.9s; }
.cc-19 { left: 60%; background: #ffdf00; animation-delay: -2.2s;  animation-duration: 3.6s; }
.cc-20 { left: 75%; background: #009c3b; animation-delay: -2.9s;  animation-duration: 4.0s; }

/* Dobrando a quantidade do modo geral */
.cc-21 { left: 12%; background: #009c3b; animation-delay: -3.2s;  animation-duration: 4.8s; }
.cc-22 { left: 22%; background: #ffdf00; animation-delay: -1.5s;  animation-duration: 5.1s; }
.cc-23 { left: 32%; background: #002776; animation-delay: -4.6s;  animation-duration: 4.2s; }
.cc-24 { left: 42%; background: #009c3b; animation-delay: -2.8s;  animation-duration: 5.5s; }
.cc-25 { left: 50%; background: #ffdf00; animation-delay: -0.9s;  animation-duration: 4.0s; }
.cc-26 { left: 58%; background: #002776; animation-delay: -3.3s;  animation-duration: 4.9s; }
.cc-27 { left: 68%; background: #00c64a; animation-delay: -1.1s;  animation-duration: 5.3s; }
.cc-28 { left: 78%; background: #ffe633; animation-delay: -4.0s;  animation-duration: 4.4s; }
.cc-29 { left: 88%; background: #1a3a9a; animation-delay: -2.7s;  animation-duration: 4.7s; }
.cc-30 { left: 95%; background: #009c3b; animation-delay: -3.5s;  animation-duration: 5.0s; }

/* Extra confetes para modo Brasil (agora de 31 a 40) */
.cc-31 { left: 8%;  background: #ffdf00; animation-delay: -1.3s;  animation-duration: 3.8s; }
.cc-32 { left: 25%; background: #009c3b; animation-delay: -4.6s;  animation-duration: 3.5s; }
.cc-33 { left: 40%; background: #002776; animation-delay: -2.1s;  animation-duration: 3.9s; }
.cc-34 { left: 55%; background: #ffdf00; animation-delay: -0.8s;  animation-duration: 3.6s; }
.cc-35 { left: 70%; background: #009c3b; animation-delay: -3.4s;  animation-duration: 4.0s; }
.cc-36 { left: 85%; background: #ffdf00; animation-delay: -1.0s;  animation-duration: 3.7s; }
.cc-37 { left: 15%; background: #002776; animation-delay: -4.5s;  animation-duration: 3.9s; }
.cc-38 { left: 48%; background: #009c3b; animation-delay: -2.7s;  animation-duration: 3.5s; }
.cc-39 { left: 65%; background: #ffdf00; animation-delay: -0.2s;  animation-duration: 4.1s; }
.cc-40 { left: 90%; background: #002776; animation-delay: -3.9s;  animation-duration: 3.8s; }

/* Esconder extras no modo geral */
.wc-general-mode .cc-31,
.wc-general-mode .cc-32,
.wc-general-mode .cc-33,
.wc-general-mode .cc-34,
.wc-general-mode .cc-35,
.wc-general-mode .cc-36,
.wc-general-mode .cc-37,
.wc-general-mode .cc-38,
.wc-general-mode .cc-39,
.wc-general-mode .cc-40 {
  display: none;
}

@keyframes confetti-copa-fall {
  0% {
    top: -20px;
    opacity: 1;
    transform: translateX(0) rotate(0deg);
  }
  25% { transform: translateX(18px) rotate(90deg); }
  50% { transform: translateX(-12px) rotate(180deg); }
  75% { transform: translateX(22px) rotate(270deg); }
  100% {
    top: 100vh;
    opacity: 0.5;
    transform: translateX(-8px) rotate(360deg);
  }
}

/* Mobile: menos confetes */
@media (max-width: 768px) {
  .confetti-copa { width: 7px; height: 7px; }
  .cc-7, .cc-8, .cc-9, .cc-13, .cc-14, .cc-15 { display: none; }
}

/* ================================
   🏆 Countdown Copa
   ================================ */
.wc-countdown {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: auto;
  transition: opacity 0.5s ease;
}

.wc-countdown-inner {
  backdrop-filter: blur(16px) saturate(140%);
  background: linear-gradient(135deg,
    rgba(0, 39, 118, 0.85),
    rgba(0, 100, 40, 0.85)
  );
  border: 1px solid rgba(255, 223, 0, 0.35);
  border-radius: 12px;
  padding: 8px 18px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.5),
    0 0 1px rgba(255, 223, 0, 0.2) inset;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wc-countdown-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.wc-countdown-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #e4e4e7;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.wc-countdown-text .wc-lowercase {
  text-transform: lowercase;
}

.wc-countdown-text .wc-time {
  color: #ffdf00;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Modo jogo ao vivo */
.wc-countdown-text.wc-live {
  background: linear-gradient(90deg, #009c3b, #ffdf00, #009c3b);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: wc-live-shimmer 2s linear infinite;
}

@keyframes wc-live-shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

@media (max-width: 768px) {
  .wc-countdown {
    display: none !important;
  }
}

/* ================================
   🇧🇷 Glow Verde-Amarelo (Brasil Mode)
   ================================ */

/* Glow no liveIndicator */
.brazil-live-glow {
  animation: brazil-indicator-pulse 1.2s ease-in-out infinite !important;
  border-color: rgba(255, 223, 0, 0.6) !important;
}

@keyframes brazil-indicator-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 156, 59, 0.5),
                0 0 12px rgba(255, 223, 0, 0.2);
    border-color: rgba(255, 223, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(0, 156, 59, 0),
                0 0 20px rgba(255, 223, 0, 0.4);
    border-color: rgba(255, 223, 0, 0.8);
  }
}

/* Glow na capa do álbum */
.brazil-cover-glow {
  border-color: #ffdf00 !important;
  box-shadow:
    0 0 0 2px rgba(0, 156, 59, 0.6),
    0 0 20px rgba(255, 223, 0, 0.4),
    0 0 40px rgba(0, 156, 59, 0.2) !important;
  animation: brazil-cover-pulse 2s ease-in-out infinite;
}

@keyframes brazil-cover-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 2px rgba(0, 156, 59, 0.5),
      0 0 20px rgba(255, 223, 0, 0.3),
      0 0 40px rgba(0, 156, 59, 0.15);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(255, 223, 0, 0.7),
      0 0 28px rgba(255, 223, 0, 0.5),
      0 0 56px rgba(0, 156, 59, 0.3);
  }
}

/* Ondas do play button verdes */
.brazil-play-waves .play-button-waves::before,
.brazil-play-waves .play-button-waves::after {
  border-color: #009c3b !important;
}

/* ================================
   🔔 Toast Copa
   ================================ */
.wc-toast {
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 300;
  max-width: 320px;
  transform: translateX(calc(100% + 32px));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}

.wc-toast.visible {
  transform: translateX(0);
}

.wc-toast-inner {
  backdrop-filter: blur(20px) saturate(140%);
  background: linear-gradient(135deg,
    rgba(0, 39, 118, 0.92),
    rgba(0, 80, 35, 0.92)
  );
  border: 1px solid rgba(255, 223, 0, 0.4);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.wc-toast-inner:hover { opacity: 0.92; }

.wc-toast-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffdf00;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wc-toast-body {
  font-size: 0.78rem;
  font-weight: 500;
  color: #e4e4e7;
  line-height: 1.4;
}

.wc-toast-close {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  padding: 2px 4px;
}

.wc-toast-close:hover { color: rgba(255,255,255,0.8); }

@media (max-width: 640px) {
  .wc-toast {
    top: auto;
    bottom: 100px;
    right: 12px;
    left: 12px;
    max-width: none;
    transform: translateY(calc(100% + 20px));
  }
  .wc-toast.visible { transform: translateY(0); }
}
