@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap');

:root {
  --bg: #0b1221;
  --panel: #dcdcdc;
  --accent-green: #00c853;
  --accent-orange: #ff9100;
  --accent-blue: #0091ea;
  --white: #ffffff;
  --black: #000000;
  --muted: #7a7a7a;
  --card-radius: 10px;

  --shadow-soft: 0 4px 10px rgba(0, 0, 0, 0.2);
  --shadow-hard: 0 8px 30px rgba(0, 0, 0, 0.5);

  --transition-fast: 0.2s ease;
  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 18px;
  --space-lg: 20px;
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base */
html, body {
  height: 100%;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(180deg, #071025, #0b1221);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
}

/* Cabeçalho */
.site-header {
  width: 100%;
  max-width: 1100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.site-header h1 {
  font-size: 20px;
  font-weight: 600;
}

.link-resultados {
  background: var(--panel);
  color: var(--black);
  padding: var(--space-xs) var(--space-md);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-fast);
}

.link-resultados:hover {
  background: var(--accent-blue);
  color: var(--white);
}

/* Estrutura principal */
.urna {
  width: 100%;
  max-width: 1100px;
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  justify-content: center;
}

/* Tela de votação */
.tela {
  background: linear-gradient(180deg, #0b1221, #142036);
  width: 640px;
  min-height: 420px;
  border-radius: var(--card-radius);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  border: 4px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-hard);
}

.display {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  justify-content: center;
  flex: 1;
}

.numero {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
}

.digito {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  border: none;
  background: #111;
  color: var(--white);
  font-size: 72px;
  text-align: center;
  padding: 8px;
  outline: none;
  box-shadow: inset 0 6px 18px rgba(0, 0, 0, 0.6);
}

/* Painel do candidato */
.pane-candidato {
  width: 300px;
  height: 320px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  font-size: 16px;
  text-align: center;
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.pane-candidato img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 6px;
  object-fit: cover;
  margin-top: 10px;
}

/* Painel lateral */
.painel__container {
  width: 360px;
  background: var(--panel);
  color: var(--black);
  border-radius: var(--card-radius);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  box-shadow: var(--shadow-hard);
}

.logo img {
  width: 130px;
  display: block;
  margin: 0 auto;
}

/* Teclado */
.teclado {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xs);
  justify-items: center;
}

.num {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  border: none;
  font-size: 28px;
  font-weight: 700;
  background: #111;
  color: var(--white);
  cursor: pointer;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.num:hover {
  filter: brightness(1.3);
  box-shadow: var(--shadow-soft);
}

.num:active {
  transform: translateY(2px);
}

.zero {
  grid-column: 2 / 3;
}

/* Botões de ação */
.painel__acoes {
  display: flex;
  gap: var(--space-xs);
  justify-content: center;
  flex-wrap: wrap;
}

.painel__acoes button {
  padding: var(--space-sm) var(--space-md);
  border-radius: 6px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.branco { background: var(--white); color: var(--black); }
.corrige { background: var(--accent-orange); color: var(--black); }
.confirma { background: var(--accent-green); color: var(--black); animation: blink 1.8s infinite ease-in-out; }

@keyframes blink {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.6) drop-shadow(0 0 8px rgba(255,255,255,0.5)); }
  100% { filter: brightness(1); }
}

/* Footer */
.site-footer { font-size: 12px; color: var(--muted); margin-top: var(--space-sm); }

/* Responsividade */
@media (max-width: 900px) {
  .urna { flex-direction: column; align-items: center; }
  .tela, .painel__container { width: 92%; }
  .digito { width: 90px; height: 90px; font-size: 56px; }
  .pane-candidato { width: 260px; height: 260px; font-size: 14px; }
}

@media (max-width: 600px) {
  .num { width: 70px; height: 70px; font-size: 24px; }
  .painel__acoes button { padding: 10px 14px; font-size: 12px; }
}

@media (max-width: 480px) {
  .digito { width: 70px; height: 70px; font-size: 48px; }
}
