@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght=400;700;900&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif; 
}

body, html {
  height: 100%;
  overflow: hidden;
  background-color: #000;
}

.container {
  display: flex;
  width: 100%;
  height: 100vh;
  position: relative;
}

.side {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: opacity 0.5s ease;
}

.content-top {
  height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
}

.content-bottom {
  height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding-top: 60px; 
  padding-bottom: 85px; 
  text-align: center;
}

@keyframes liquidBackground {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes liquidBarInverted {
  0% { background-position: 100% 50%; }
  50% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.gta-side {
  background: linear-gradient(135deg, #1d3cdc, #5d24a3, #cb1a85, #f1693c);
  background-size: 400% 400%;
  animation: liquidBackground 12s ease infinite;
}

.zelda-side {
  background: linear-gradient(135deg, #8c6f2d, #caaa57, #594418, #caaa57);
  background-size: 400% 400%;
  animation: liquidBackground 12s ease infinite;
}

.progress-left {
  background: linear-gradient(135deg, #1d3cdc, #5d24a3, #cb1a85, #f1693c);
  background-size: 400% 400%;
  animation: liquidBarInverted 12s ease infinite;
}

.progress-right {
  background: linear-gradient(135deg, #8c6f2d, #caaa57, #594418, #caaa57);
  background-size: 400% 400%;
  animation: liquidBarInverted 12s ease infinite;
}

.title {
  color: #fff;
  font-size: 2.2rem;
  font-weight: 900; 
  letter-spacing: 2px;
  line-height: 1.2;
  text-transform: uppercase;
}

.countdown {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700; 
}

.vote-btn {
  background-color: #fff;
  color: #000;
  border: none;
  border-radius: 0; 
  height: 50px;
  width: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 900;       
  cursor: pointer;
  letter-spacing: 1px;
  transition: transform 0.2s, opacity 0.3s ease, background-color 0.3s, color 0.3s, border 0.3s;
}

.vote-btn:hover {
  transform: scale(1.05);
}

.progress-bar-container {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  z-index: 10;
  padding: 0 40px;
}

.total-votes-label {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 8px;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.progress-bar {
  display: flex;
  width: 100%;
  height: 45px;
  border: 1.5px solid #fff; 
  border-radius: 0; 
}

.progress-left, .progress-right {
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 1px;
  white-space: nowrap;
  transition: width 0.5s ease; 
  min-width: 120px;
  overflow: visible !important;
}

.footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.75); 
  padding: 15px 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20;
}

.disclaimer {
  color: #aaa;
  font-size: 0.68rem; 
  line-height: 1.5;
  text-align: center;
  max-width: 1100px; 
  font-weight: 400;
}

/* --- 📱 VERSÃO RESPONSIVA INTELIGENTE PARA CELULARES --- */
@media (max-width: 768px) {
  .container { 
    flex-direction: column; 
    height: 100dvh !important; /* Força o uso do Viewport Dinâmico para ignorar barras do navegador */
    overflow: hidden;
  }
  
  /* Corrige o sumiço do disclaimer: fixa na base real e visível do ecrã */
  .footer { 
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 50px !important;
    padding: 0 15px !important; 
    background-color: rgba(0, 0, 0, 0.85) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 20 !important;
  }

  .disclaimer { 
    font-size: 0.52rem !important; 
    line-height: 1.4 !important; 
    max-width: 100% !important;
  }

  /* Garante simetria matemática perfeita: metades idênticas descontando o rodapé */
  .side {
    height: calc((100dvh - 50px) / 2) !important;
    flex: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important; 
    align-items: center !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    gap: 12px !important;
  }
  
  .content-top, .content-bottom {
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
  }

  .title { 
    font-size: 1.35rem !important; 
    letter-spacing: 1px !important; 
    font-weight: 900 !important; 
  }
  
  .countdown { 
    font-size: 1.05rem !important; 
  }
  
  .vote-btn { 
    width: 180px !important; 
    height: 44px !important; 
    font-size: 0.85rem !important; 
  }
  
  /* CORREÇÃO DA BARRA: Isola a estrutura para que o retângulo trave 50% na linha divisória */
  .progress-bar-container { 
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100dvh - 50px) !important;
    padding: 0 !important;
    transform: none !important;
    z-index: 10 !important;
    pointer-events: none; /* Impede que a caixa invisível bloqueie cliques nos botões */
  }
  
  .progress-bar { 
    position: absolute !important;
    top: 50% !important; 
    left: 20px !important;
    right: 20px !important;
    width: calc(100% - 40px) !important;
    height: 35px !important; 
    transform: translateY(-50%) !important; 
    pointer-events: auto;
  }
  
  /* CORREÇÃO DO TOTAL: Flutua acima da barra de forma independente com respiro garantido */
  .total-votes-label { 
    position: absolute !important;
    width: 100% !important;
    text-align: center !important;
    left: 0 !important;
    top: calc(50% - 32px) !important; /* Posicionado acima da barra respeitando a distância exata */
    font-size: 0.65rem !important; 
    letter-spacing: 1px !important; 
    margin-bottom: 0 !important; 
    text-transform: uppercase !important;
  }
  
  .progress-left, .progress-right { 
    font-size: 0.75rem !important; 
    min-width: 85px !important; 
    overflow: visible !important; 
    white-space: nowrap !important;
  }
}