/* ========================================================
   ===== GLOBAL STYLES =====
   ======================================================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  cursor: url("img/minecraft-cursor.png"), auto;
}

/* FUENTE GLOBAL */
body, h1, h2, h3, h4, h5, h6, p, a, li, span, div, button {
  font-family: 'Press Start 2P', cursive;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  position: relative;
  color: #f5f5f5;
  line-height: 1.6;
  font-family: 'Press Start 2P', cursive;
}

/* Contenedor del fondo con overlay */
body::after {
  content: "";
  position: fixed; /* fijo para que cubra toda la pantalla */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("img/Fondo.png") no-repeat center center;
  background-size: cover;
  z-index: -2; /* detrás de todo */
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 0, 62, 0.5); /* overlay solo sobre el fondo */
  z-index: -1; /* entre el fondo y el contenido */
}

:root {
  --purple: #9b59b6;
  --dark-purple: #2c003e;
  --light-purple: #d8b4ff;
  --pink: #ff6ec7;
  --gold: #ffd700;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ========================================================
   ===== HEADER =====
   ======================================================== */
.main-header {
  background-color: var(--dark-purple);
  padding: 25px 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-header h1 {
  color: var(--gold);
  font-size: 1.8rem;
}

.main-header h1 a {
  color: var(--gold);
  text-decoration: none;
  cursor: pointer;
}

nav ul {
  list-style: none;
  display: flex;
  font-size: 0.8rem;
  gap: 18px;
}

nav a {
  text-decoration: none;
  color: var(--light-purple);
  font-weight: bold;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

nav a:hover {
  color: var(--pink);
  text-shadow: 0 0 5px var(--pink);
}

.main-header.sticky {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(44, 0, 62, 0.95);
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  z-index: 1000;
}

/* ========================================================
   ===== HERO SECTION =====
   ======================================================== */
.hero {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: url("img/FondoHero.png") no-repeat center center/cover;
  display: flex;
  justify-content: center;
  align-items: center;

  /* Difuminado solo abajo */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 65%, rgba(0,0,0,0) 100%);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: cover;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 65%, rgba(0,0,0,0) 100%);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: cover;
}


.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(2px); /* difumina la imagen de fondo */
  z-index: 0; /* atrás de tu contenido */
}

.hero * {
  position: relative;
  z-index: 1; /* contenido encima del blur */
}


#heroCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 999;
  text-align: center;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 0 10px;
}

.hero-content h2 {
  font-weight: 900;
  font-size: 1.4rem;
  color: #ffffff;
  text-shadow: 6px 6px 0 #000, 0 0 10px #8c00ff, 0 0 20px #b446f0;
  animation: glow 0.7s infinite alternate, float 3s ease-in-out infinite alternate;
}

/* Fix: IP siempre visible */
.hero-ip {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0); }
}

@keyframes glow {
  0% { text-shadow: 2px 2px 0 #000, 0 0 10px #8c00ff, 0 0 20px #b446f0; }
  100% { text-shadow: 2px 2px 0 #000, 0 0 15px #ff6ec7, 0 0 25px #ffd700; }
}

.hero-buttons {
  display: flex;
  gap: 25px;
}

.hero-content .btn {
  display: inline-block;
  width: 180px;
  padding: 15px 0;
  text-align: center;
  font-weight: bold;
  border-radius: 6px;
  border: 2px solid var(--gold);
  background-color: var(--gold);
  color: #2c003e;
  box-shadow: 3px 3px 0 var(--pink);
  transition: all 0.3s ease;
  text-decoration: none;
  outline: none;
}

.hero-content .btn:hover {
  transform: scale(1.05) rotate(-1deg);
  background-color: var(--light-purple);
  box-shadow: 5px 5px 0 var(--pink);
}

/* ========================================================
   ===== FEATURES SECTION =====
   ======================================================== */

.features h2 {
  text-align: center;
  color: #fff;
  margin-bottom: 30px;
  padding: 40px 0;
}

.cards, .cards2 {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* ========================================================
   ===== VOTACIONES SECTION =====
   ======================================================== */

.votaciones h2 {
  text-align: center;
  color: #fff;
  margin-bottom: 50px;
  font-family: 'Press Start 2P', cursive;
  font-size: 1.5rem;
  text-shadow: 2px 2px 0 #000, 0 0 10px #8c00ff;
}

/* Grid para las votaciones */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ========================================================
   ===== CARD VOTACION - estilo difuminado =====
   ======================================================== */
.card.votacion {
  position: relative;
  padding: 25px 20px;
  border-radius: 15px;
  text-align: center;
  color: white;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  overflow: hidden;

  /* Fondo semi-transparente con blur */
  background: rgba(44, 0, 62, 0.6);
  backdrop-filter: blur(6px);

  border: 1px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 6px 15px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.votacion::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.6; /* la imagen se ve tenue */
  z-index: 0;
  filter: blur(4px);
}

.card.votacion h3, .card.votacion p, .card.votacion .emoji {
  position: relative;
  z-index: 1;
}

.card.votacion .emoji {
  font-size: 2rem;
  margin-bottom: 10px;
}

.card.votacion h3 {
  font-family: 'Press Start 2P', cursive;
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 8px;
}

.card.votacion p {
  font-size: 0.9rem;
  color: var(--light-purple);
  margin: 0;
}

/* Hover */
.card.votacion:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 12px 25px rgba(0,0,0,0.6);
}

/* Animaciones de entrada */
.card.votacion {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}
.card.votacion.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hover mejorado y más fluido */
.card.votacion:hover {
  transform: translateY(-8px) scale(1.05); /* sube un poco más y agranda ligeramente */
  box-shadow: 0 15px 30px rgba(0,0,0,0.6); /* sombra más pronunciada */
  transition: transform 0.4s ease, box-shadow 0.4s ease; /* transición más suave */
}


.card.votacion.voto1::before { background-image: url("img/voto1.png"); }
.card.votacion.voto2::before { background-image: url("img/voto2.png"); }
.card.votacion.voto3::before { background-image: url("img/voto3.png"); }
.card.votacion.voto4::before { background-image: url("img/voto4.png"); }
.card.votacion.voto5::before { background-image: url("img/voto5.png"); }
.card.votacion.voto6::before { background-image: url("img/voto6.png"); }
.card.votacion.voto7::before { background-image: url("img/voto7.png"); }
.card.votacion.voto8::before { background-image: url("img/voto8.png"); }
.card.votacion.voto9::before { background-image: url("img/voto9.png"); }

.card.votacion {
  text-decoration: none; /* elimina subrayado */
}

.card.votacion * {
  text-decoration: none; /* elimina subrayado de cualquier elemento hijo */
}


/* ========================================================
   ===== FOOTER =====
   ======================================================== */
footer {
  background-color: var(--dark-purple); /* mismo color que el nav */
  color: #daadff; /* puedes ajustarlo si quieres que contraste */
  padding: 20px;
  text-align: center;
  font-size: 0.9rem;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

footer::before {
  content: none; /* eliminamos el overlay de la imagen y blur */
}

/* ========================================================
   ===== RESPONSIVE =====
   ======================================================== */
@media (max-width: 768px) {
  .votaciones h2 {
    font-size: 1.2rem;
  }
  .card.votacion {
    padding: 20px 15px;
  }
  .card.votacion h3 {
    font-size: 0.9rem;
  }
}

@media(max-width:520px){
  .hero { height:180px; }
}
