/* css/styles.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 50%, #1a472a 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

/* Copos de nieve (los genera JS con .snowflake) */
.snowflake {
  position: fixed;
  top: -10px;
  color: white;
  font-size: 1em;
  opacity: 0.8;
  pointer-events: none;
  animation: fall linear infinite;
  z-index: 1;
}

@keyframes fall {
  to {
    transform: translateY(100vh);
  }
}

/* Luces navideñas en el fondo */
.christmas-lights {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  display: flex;
  justify-content: space-around;
  z-index: 2;
}

.light {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  animation: blink 1.5s infinite;
}

.light:nth-child(1) {
  background: #ff6b6b;
  animation-delay: 0s;
}
.light:nth-child(2) {
  background: #4ecdc4;
  animation-delay: 0.3s;
}
.light:nth-child(3) {
  background: #ffe66d;
  animation-delay: 0.6s;
}
.light:nth-child(4) {
  background: #95e1d3;
  animation-delay: 0.9s;
}
.light:nth-child(5) {
  background: #ff6b6b;
  animation-delay: 1.2s;
}
.light:nth-child(6) {
  background: #4ecdc4;
  animation-delay: 0s;
}
.light:nth-child(7) {
  background: #ffe66d;
  animation-delay: 0.3s;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 20px currentColor;
  }
  50% {
    opacity: 0.3;
  }
}

.container {
  width: 90%;
  max-width: 500px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 250, 250, 0.98) 100%
  );
  padding: 40px 30px;
  border-radius: 25px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset;
  position: relative;
  z-index: 10;
  animation: slideIn 0.6s ease-out;
  border: 3px solid #c41e3a;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Adornos decorativos en las esquinas */
.container::before,
.container::after {
  content: "🎄";
  position: absolute;
  font-size: 2.5em;
  animation: rotate 3s ease-in-out infinite;
}

.container::before {
  top: -15px;
  left: -15px;
}

.container::after {
  top: -15px;
  right: -15px;
  animation-delay: 1.5s;
}

@keyframes rotate {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(15deg);
  }
}

h1 {
  text-align: center;
  color: #c41e3a;
  margin-bottom: 30px;
  font-size: 2.2em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

h1::before {
  content: "🎅";
  margin-right: 10px;
}
h1::after {
  content: "🎁";
  margin-left: 10px;
}

form {
  margin-bottom: 30px;
}

label {
  display: block;
  margin-bottom: 10px;
  color: #2d5a3d;
  font-weight: bold;
  font-size: 1.1em;
}

input {
  width: 100%;
  padding: 15px;
  margin: 10px 0 20px 0;
  font-size: 16px;
  border: 3px solid #4ecdc4;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: white;
}

input:focus {
  outline: none;
  border-color: #c41e3a;
  box-shadow: 0 0 15px rgba(196, 30, 58, 0.3);
  transform: scale(1.02);
}

button {
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(135deg, #c41e3a 0%, #8b1429 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(196, 30, 58, 0.4);
  position: relative;
  overflow: hidden;
}

button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover::before {
  width: 300px;
  height: 300px;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(196, 30, 58, 0.5);
}

button:active {
  transform: translateY(-1px);
}

.result {
  text-align: center;
  margin-top: 30px;
  padding: 25px;
  background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
  border-radius: 15px;
  border: 3px dashed #c41e3a;
  animation: resultAppear 0.5s ease-out;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.result.pending {
  background: linear-gradient(135deg, #f0f0f0 0%, #fafafa 100%);
  border-style: solid;
  border-color: #e2a3a3;
  color: #333;
}

@keyframes resultAppear {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.result h2 {
  color: #2d5a3d;
  margin-bottom: 15px;
  font-size: 1.5em;
}

.result p {
  font-size: 1.8em;
  font-weight: bold;
  color: #c41e3a;
  margin: 10px 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  animation: nameBounce 1s ease-in-out;
}

.result .hint {
  font-size: 1em;
  color: #2d5a3d;
  margin-top: 15px;
}

/* Animación del nombre */
@keyframes nameBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-10px);
  }
  50% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(-5px);
  }
}

/* Elementos decorativos flotantes */
.decoration {
  position: fixed;
  font-size: 2em;
  opacity: 0.6;
  animation: float 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(10deg);
  }
}

.decoration:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}
.decoration:nth-child(2) {
  top: 60%;
  right: 10%;
  animation-delay: 1s;
}
.decoration:nth-child(3) {
  bottom: 20%;
  left: 15%;
  animation-delay: 2s;
}
.decoration:nth-child(4) {
  top: 40%;
  right: 20%;
  animation-delay: 1.5s;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 30px 20px;
  }
  h1 {
    font-size: 1.8em;
  }
  .result p {
    font-size: 1.5em;
  }
}

/* Mensaje flash admin */
.admin-flash {
  width: 90%;
  max-width: 500px;
  margin: 20px auto 0 auto;
  padding: 12px 16px;
  background: #fff7e6;
  border: 2px solid #ffd580;
  border-radius: 8px;
  text-align: center;
  color: #6b3e00;
  z-index: 20;
}

/* Botón admin */
.admin-btn {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #ffd166;
  border: none;
  cursor: pointer;
  font-weight: bold;
}
.admin-btn:hover { filter: brightness(0.95); }
