:root {
  --charcoal: #0d0d1a;
  --deep: #1a1a2e;
  --orange: #e94560;
  --gold: #f5a623;
  --green: #2d6a4f;
  --cream: #f0e6d3;
  --ember: #c73e1d;
  --smoke: #3a3a5c;
}

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

body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--charcoal);
  color: var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, .cinzel { font-family: 'Cinzel', serif; }

@keyframes flicker {
  0%, 100% { opacity: 1; text-shadow: 0 0 10px #e94560, 0 0 40px #c73e1d, 0 0 80px #f5a623; }
  50% { opacity: 0.95; text-shadow: 0 0 5px #e94560, 0 0 20px #c73e1d, 0 0 60px #f5a623; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(233,69,96,0.4), 0 0 60px rgba(233,69,96,0.1); }
  50% { box-shadow: 0 0 30px rgba(233,69,96,0.7), 0 0 80px rgba(233,69,96,0.3); }
}

@keyframes torch-snuff {
  0% { opacity: 1; filter: brightness(1); }
  50% { opacity: 0.6; filter: brightness(0.5) grayscale(0.5); }
  100% { opacity: 0.3; filter: brightness(0.3) grayscale(1); }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes confetti-fall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dramatic-reveal {
  0% { opacity: 0; transform: scale(0.8); filter: blur(10px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

.animate-slide-up { animation: slide-up 0.5s ease-out forwards; }
.animate-fade-in { animation: fade-in 0.4s ease-out forwards; }
.animate-dramatic { animation: dramatic-reveal 0.8s ease-out forwards; }
.animate-flicker { animation: flicker 2s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-snuff { animation: torch-snuff 1.5s ease-out forwards; }

.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confetti-fall linear forwards;
  z-index: 9999;
  pointer-events: none;
}

.bg-cinematic {
  background: linear-gradient(180deg, #0d0d1a 0%, #1a1a2e 30%, #2a1a0e 70%, #0d0d1a 100%);
}

.torch-border {
  border-image: linear-gradient(to bottom, var(--gold), var(--orange), var(--ember)) 1;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--smoke);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--orange);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--gold);
}

input[type="text"], input[type="number"], select, textarea {
  background: rgba(58,58,92,0.5);
  border: 1px solid rgba(240,230,211,0.2);
  color: var(--cream);
  padding: 8px 12px;
  border-radius: 6px;
  font-family: 'Source Sans 3', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
  border-color: var(--orange);
}

input[type="color"] {
  -webkit-appearance: none;
  border: 2px solid rgba(240,230,211,0.3);
  border-radius: 6px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 2px;
  background: transparent;
}

input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 4px; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--charcoal); }
::-webkit-scrollbar-thumb { background: var(--smoke); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

.vote-reveal {
  display: inline-block;
  padding: 4px 12px;
  margin: 2px;
  border-radius: 4px;
  font-weight: 700;
  animation: slide-up 0.3s ease-out forwards;
}