/* ===================== VARIABLES ===================== */
:root {
  --rosa-fuerte: #FF1493;
  --rosa-medio: #FF69B4;
  --rosa-claro: #FFB6C1;
  --rosa-pastel: #FFC0CB;
  --dorado: #FFD700;
  --dorado-oscuro: #DAA520;
  --blanco: #FFFFFF;
  --negro: #1a1a1a;
  --gris-oscuro: #2d2d2d;
}

/* ===================== RESET & BASE ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--rosa-fuerte);
  min-height: 100vh;
  color: var(--blanco);
  overflow-x: hidden;
  position: relative;
}

/* ===================== PARALLAX ===================== */
.parallax-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.parallax-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  will-change: transform;
  transition: transform 0.1s ease-out;
}

/* Capa 1: Fondo gradiente */
.parallax-bg {
  background: linear-gradient(
    180deg,
    #FF1493 0%,
    #FF69B4 30%,
    #FFB6C1 60%,
    #FFC0CB 80%,
    #FFD1DC 100%
  );
  height: 150%;
}

/* Capa 2: Estrellas/brillos lejanos */
.parallax-stars {
  pointer-events: none;
}

.parallax-star {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: twinkle 2s ease-in-out infinite;
}

.parallax-star::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Capa 3: Partículas doradas */
.parallax-particles {
  pointer-events: none;
}

.parallax-particle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dorado), var(--dorado-oscuro));
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

/* Capa 4: Decoraciones (bolas de disco) */
.parallax-decor {
  pointer-events: none;
}

.disco-ball {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 215, 0, 0.6) 25%,
    rgba(255, 182, 193, 0.7) 50%,
    rgba(255, 255, 255, 0.8) 75%,
    rgba(255, 215, 0, 0.5) 100%
  );
  box-shadow:
    0 0 30px rgba(255, 215, 0, 0.4),
    0 0 60px rgba(255, 105, 180, 0.3),
    inset 0 0 20px rgba(255, 255, 255, 0.5);
  animation: disco-rotate 10s linear infinite;
}

.disco-ball::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 15%;
  width: 30%;
  height: 30%;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  filter: blur(5px);
}

@keyframes disco-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Líneas de brillo que caen */
.glitter-line {
  position: absolute;
  width: 2px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 215, 0, 0.8) 50%,
    transparent 100%
  );
  animation: glitter-fall 4s linear infinite;
}

@keyframes glitter-fall {
  0% { transform: translateY(-100%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

/* ===================== EFECTOS DE FONDO ===================== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.03) 2px,
      rgba(255, 255, 255, 0.03) 4px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.03) 2px,
      rgba(255, 255, 255, 0.03) 4px
    );
  pointer-events: none;
  z-index: 0;
}

/* Efecto cortina brillante */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg,
      rgba(255, 215, 0, 0.1) 0%,
      transparent 20%,
      transparent 80%,
      rgba(255, 215, 0, 0.1) 100%
    );
  pointer-events: none;
  z-index: 0;
}

/* Partículas brillantes */
.sparkles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--dorado);
  border-radius: 50%;
  animation: sparkle 3s infinite;
  box-shadow: 0 0 10px var(--dorado), 0 0 20px var(--dorado);
}

@keyframes sparkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0) translateY(0);
  }
  50% {
    opacity: 1;
    transform: scale(1) translateY(-20px);
  }
}

/* Confeti */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confetti-fall 4s linear forwards;
}

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

/* ===================== INVITACIÓN ===================== */
.invitation {
  position: relative;
  z-index: 2;
  max-width: 500px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}

/* Header */
.invitation-header {
  margin-bottom: 20px;
}

.subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 8px;
  font-weight: 300;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.age {
  font-family: 'Montserrat', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 5px;
  margin: 10px 0;
  text-shadow:
    0 0 20px var(--dorado),
    0 0 40px var(--dorado),
    2px 2px 0 var(--dorado-oscuro);
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow:
      0 0 20px var(--dorado),
      0 0 40px var(--dorado),
      2px 2px 0 var(--dorado-oscuro);
  }
  to {
    text-shadow:
      0 0 30px var(--dorado),
      0 0 60px var(--dorado),
      0 0 80px var(--dorado),
      2px 2px 0 var(--dorado-oscuro);
  }
}

/* Nombre */
.name-section {
  margin: 30px 0;
}

.name {
  font-family: 'Great Vibes', cursive;
  font-size: 5rem;
  font-weight: 400;
  color: var(--blanco);
  text-shadow:
    3px 3px 6px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(255, 255, 255, 0.5);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.9;
    text-shadow:
      3px 3px 6px rgba(0, 0, 0, 0.3),
      0 0 50px rgba(255, 255, 255, 0.8);
  }
}

/* Mensaje */
.message-section {
  margin: 30px 0;
}

.message {
  font-size: 1rem;
  letter-spacing: 6px;
  font-weight: 300;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Fecha */
.date-section {
  margin: 30px 0;
}

.date-box {
  display: inline-block;
  padding: 20px 40px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.date {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 4px;
  margin-bottom: 5px;
}

.time {
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--dorado);
}

/* Dirección */
.address-section {
  margin: 20px 0;
}

.address {
  font-size: 0.9rem;
  letter-spacing: 2px;
  opacity: 0.9;
  line-height: 1.6;
}

/* Te esperamos */
.waiting-section {
  margin: 30px 0;
}

.waiting {
  font-family: 'Pinyon Script', cursive;
  font-size: 2.5rem;
  color: var(--dorado);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* ===================== CUENTA REGRESIVA ===================== */
.countdown-section {
  margin: 40px 0;
  padding: 30px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 2px solid rgba(255, 215, 0, 0.3);
}

.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

.countdown-number {
  font-family: 'Montserrat', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--dorado);
  text-shadow:
    0 0 20px rgba(255, 215, 0, 0.5),
    0 0 40px rgba(255, 215, 0, 0.3);
  animation: pulse-number 1s ease-in-out infinite;
}

@keyframes pulse-number {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.countdown-label {
  font-size: 0.7rem;
  letter-spacing: 2px;
  margin-top: 5px;
  opacity: 0.8;
}

.countdown-separator {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dorado);
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.countdown-message {
  font-family: 'Pinyon Script', cursive;
  font-size: 1.5rem;
  color: var(--blanco);
  margin-top: 15px;
}

/* Celebración cuando llega a cero */
.countdown-section.celebration {
  animation: celebration-bg 0.5s ease-in-out infinite alternate;
}

@keyframes celebration-bg {
  from { background: rgba(255, 215, 0, 0.2); }
  to { background: rgba(255, 20, 147, 0.2); }
}

@media (max-width: 480px) {
  .countdown-number {
    font-size: 2rem;
  }

  .countdown-item {
    min-width: 50px;
  }

  .countdown-separator {
    font-size: 1.5rem;
  }

  .countdown-message {
    font-size: 1.2rem;
  }
}

/* ===================== BOTONES ===================== */
.btn-confirm,
.btn-upload,
.btn-directions,
.btn-submit {
  display: inline-block;
  padding: 15px 40px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-confirm {
  background: linear-gradient(135deg, var(--dorado), var(--dorado-oscuro));
  color: var(--negro);
  box-shadow:
    0 4px 15px rgba(255, 215, 0, 0.4),
    0 0 30px rgba(255, 215, 0, 0.2);
}

.btn-confirm:hover {
  transform: translateY(-3px);
  box-shadow:
    0 6px 20px rgba(255, 215, 0, 0.6),
    0 0 40px rgba(255, 215, 0, 0.4);
}

.btn-directions {
  background: rgba(255, 255, 255, 0.2);
  color: var(--blanco);
  border: 2px solid var(--blanco);
  margin-top: 15px;
}

.btn-directions:hover {
  background: var(--blanco);
  color: var(--rosa-fuerte);
}

.btn-upload {
  background: rgba(255, 255, 255, 0.2);
  color: var(--blanco);
  border: 2px solid var(--dorado);
  margin-bottom: 20px;
}

.btn-upload:hover {
  background: var(--dorado);
  color: var(--negro);
}

.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--rosa-fuerte), var(--rosa-medio));
  color: var(--blanco);
  margin-top: 10px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 20, 147, 0.4);
}

/* ===================== SECCIONES ===================== */
.section-title {
  font-size: 1.2rem;
  letter-spacing: 5px;
  margin-bottom: 20px;
  color: var(--dorado);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Mapa */
.map-section {
  margin: 50px 0;
  padding: 30px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 2px solid rgba(255, 215, 0, 0.3);
}

#map {
  width: 100%;
  height: 250px;
  border-radius: 15px;
  border: 3px solid rgba(255, 215, 0, 0.5);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Marcador corazón */
.heart-marker {
  font-size: 32px;
  color: var(--rosa-fuerte);
  text-shadow:
    0 0 10px rgba(255, 20, 147, 0.8),
    0 0 20px rgba(255, 20, 147, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.3);
  animation: heart-beat 1s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Popup del mapa */
.leaflet-popup-content-wrapper {
  background: linear-gradient(135deg, var(--rosa-fuerte), var(--rosa-medio));
  color: white;
  border-radius: 15px;
  border: 2px solid rgba(255, 215, 0, 0.5);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.leaflet-popup-content {
  margin: 15px;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
}

.leaflet-popup-content b {
  font-family: 'Great Vibes', cursive;
  font-size: 1.5rem;
  color: var(--dorado);
}

.leaflet-popup-tip {
  background: var(--rosa-medio);
}

.leaflet-popup-close-button {
  color: white !important;
}

/* ===================== ASISTENTES CONFIRMADOS ===================== */
.attendees-section {
  margin: 50px 0;
}

.attendees-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.attendee-card {
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border-radius: 15px;
  padding: 15px;
  border: 2px solid rgba(255, 215, 0, 0.2);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.attendee-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
}

.attendee-photo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin: 0 auto 10px;
  border: 3px solid var(--dorado);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 105, 180, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
}

.attendee-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attendee-photo .no-photo {
  font-size: 1.5rem;
}

.attendee-name {
  font-family: 'Great Vibes', cursive;
  font-size: 1.2rem;
  color: var(--blanco);
  margin-bottom: 8px;
}

.attendee-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  border-radius: 20px;
  font-size: 0.6rem;
  color: #22c55e;
  margin-bottom: 8px;
}

.attendee-status-icon {
  font-size: 0.7rem;
}

.attendee-points {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.points-icon {
  font-size: 1rem;
}

.points-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dorado);
}

.points-label {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
}

.attendees-empty {
  text-align: center;
  padding: 30px;
  opacity: 0.7;
  font-style: italic;
}

/* ===================== RANKING / PODIO ===================== */
.ranking-section {
  margin: 50px 0;
  padding: 30px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 2px solid rgba(255, 215, 0, 0.3);
}

/* Podio TOP 3 */
.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
  margin: 30px 0;
  padding: 20px 10px;
}

.podium-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.podium-place.first {
  order: 2;
}

.podium-place.second {
  order: 1;
}

.podium-place.third {
  order: 3;
}

.podium-crown {
  font-size: 1.5rem;
  animation: bounce-crown 1s ease-in-out infinite;
  margin-bottom: 5px;
}

@keyframes bounce-crown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.podium-photo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 105, 180, 0.3));
  border: 3px solid var(--dorado);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 8px;
}

.podium-place.first .podium-photo {
  width: 80px;
  height: 80px;
  border-width: 4px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.podium-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podium-photo span {
  font-size: 1.5rem;
}

.podium-place.first .podium-photo span {
  font-size: 2rem;
}

.podium-name {
  font-family: 'Great Vibes', cursive;
  font-size: 1rem;
  color: var(--blanco);
  margin-bottom: 5px;
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.podium-place.first .podium-name {
  font-size: 1.3rem;
  max-width: 110px;
}

.podium-points {
  font-size: 0.8rem;
  color: var(--dorado);
  font-weight: 600;
}

.podium-place.first .podium-points {
  font-size: 1rem;
}

.podium-base {
  margin-top: 10px;
  padding: 10px 20px;
  border-radius: 5px 5px 0 0;
  font-weight: 700;
  font-size: 1.2rem;
}

.podium-place.first .podium-base {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  padding: 15px 30px;
  height: 80px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.podium-place.second .podium-base {
  background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
  color: #000;
  height: 60px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.podium-place.third .podium-base {
  background: linear-gradient(135deg, #CD7F32, #8B4513);
  color: #fff;
  height: 45px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Lista de ranking */
.ranking-list {
  margin-top: 20px;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 215, 0, 0.1);
}

.ranking-position {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--dorado);
}

.ranking-item:nth-child(1) .ranking-position { background: linear-gradient(135deg, #FFD700, #FFA500); color: #000; }
.ranking-item:nth-child(2) .ranking-position { background: linear-gradient(135deg, #C0C0C0, #A0A0A0); color: #000; }
.ranking-item:nth-child(3) .ranking-position { background: linear-gradient(135deg, #CD7F32, #8B4513); color: #fff; }

.ranking-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.2);
  border: 2px solid rgba(255, 215, 0, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ranking-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-info {
  flex: 1;
}

.ranking-name {
  font-weight: 500;
  color: var(--blanco);
}

.ranking-medals {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.ranking-score {
  font-weight: 700;
  color: var(--dorado);
  font-size: 1.1rem;
}

.ranking-empty {
  text-align: center;
  padding: 30px;
  opacity: 0.7;
  font-style: italic;
}

/* ===================== MODAL JUEGO ===================== */
.game-modal-content {
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 2px solid var(--dorado);
  text-align: center;
}

.game-header {
  margin-bottom: 20px;
}

.game-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 10px;
  animation: pulse-game 1s ease-in-out infinite;
}

@keyframes pulse-game {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.game-header h3 {
  color: var(--dorado);
  font-size: 1.5rem;
  letter-spacing: 3px;
}

.game-name {
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  color: var(--blanco);
  margin: 15px 0;
}

.game-instruction {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
}

.game-select-player {
  margin: 20px 0;
}

.game-select-player label {
  display: block;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.7);
}

.game-select-player select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 2px solid var(--dorado);
  background: rgba(255, 255, 255, 0.1);
  color: var(--blanco);
  font-family: inherit;
  font-size: 1rem;
}

.game-select-player select option {
  background: #1a1a2e;
  color: var(--blanco);
}

.game-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-join-game {
  flex: 1;
  padding: 15px;
  background: linear-gradient(135deg, var(--dorado), var(--dorado-oscuro));
  color: var(--negro);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-join-game:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.btn-close-game {
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--blanco);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.game-joined {
  margin-top: 20px;
  padding: 20px;
  background: rgba(34, 197, 94, 0.2);
  border: 2px solid #22c55e;
  border-radius: 15px;
}

.game-joined .joined-icon {
  display: inline-flex;
  width: 50px;
  height: 50px;
  background: #22c55e;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  margin-bottom: 10px;
}

.game-joined p {
  color: #22c55e;
  font-weight: 600;
}

.game-joined .joined-hint {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  font-size: 0.9rem;
  margin-top: 5px;
}

/* ===================== MODAL RESULTADOS ===================== */
.results-modal-content {
  background: linear-gradient(145deg, #1a1a2e, #0f3460);
  border: 2px solid var(--dorado);
  max-width: 450px;
}

.results-header {
  text-align: center;
  margin-bottom: 25px;
}

.results-header h3 {
  font-size: 1.8rem;
  color: var(--dorado);
  margin-bottom: 10px;
}

.results-game-name {
  font-family: 'Great Vibes', cursive;
  font-size: 1.5rem;
  color: var(--blanco);
}

.results-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 15px;
  margin: 30px 0;
}

.result-place {
  text-align: center;
  animation: resultAppear 0.5s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

.result-place.second { order: 1; animation-delay: 0.3s; }
.result-place.first { order: 2; animation-delay: 0.6s; }
.result-place.third { order: 3; animation-delay: 0.1s; }

@keyframes resultAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-crown {
  font-size: 1.5rem;
  animation: bounce-crown 1s ease-in-out infinite;
}

.result-medal {
  font-size: 2rem;
  margin-bottom: 10px;
}

.result-place.first .result-medal {
  font-size: 2.5rem;
  animation: shine-medal 2s ease-in-out infinite;
}

@keyframes shine-medal {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

.result-photo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.2);
  border: 3px solid rgba(255, 215, 0, 0.5);
  margin: 0 auto 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-place.first .result-photo {
  width: 80px;
  height: 80px;
  border-color: var(--dorado);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.result-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-name {
  font-weight: 600;
  color: var(--blanco);
  margin-bottom: 5px;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-place.first .result-name {
  max-width: 100px;
  font-size: 1.1rem;
}

.result-position {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
}

.result-pts {
  margin-top: 5px;
  padding: 3px 10px;
  background: rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--dorado);
  font-weight: 600;
}

/* Celebración de ganador */
.winner-celebration {
  margin: 25px 0;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 105, 180, 0.2));
  border-radius: 15px;
  border: 2px solid var(--dorado);
  animation: winner-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes winner-pulse {
  from { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
  to { box-shadow: 0 0 40px rgba(255, 215, 0, 0.6); }
}

.winner-message {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dorado);
  margin-bottom: 10px;
}

.winner-emoji {
  display: inline-block;
  animation: bounce-emoji 0.5s ease-in-out infinite alternate;
}

@keyframes bounce-emoji {
  from { transform: translateY(0) rotate(-10deg); }
  to { transform: translateY(-10px) rotate(10deg); }
}

#winnerPosition {
  color: var(--blanco);
  font-size: 1.1rem;
}

.btn-close-results {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--dorado), var(--dorado-oscuro));
  color: var(--negro);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 20px;
}

/* Galería */
.gallery-section {
  margin: 50px 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 215, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item-media {
  position: relative;
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item .media-name {
  padding: 8px;
  background: rgba(0, 0, 0, 0.5);
  font-size: 0.75rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-item .video-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  color: white;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* Botones de acción de media */
.media-actions {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.6);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: none;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.75rem;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.action-btn.like-btn.active {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.action-btn.dislike-btn.active {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.action-btn.download-btn:hover {
  background: linear-gradient(135deg, var(--dorado), var(--dorado-oscuro));
}

.action-icon {
  font-size: 1rem;
}

.action-count {
  font-weight: 600;
  min-width: 14px;
  text-align: center;
}

/* Input con sesión activa */
.form-group.session-active input {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #22c55e;
}

.form-group.session-active::after {
  content: '✓ Sesión activa';
  display: block;
  font-size: 0.7rem;
  color: #22c55e;
  margin-top: 4px;
  text-align: center;
}

/* Empty state */
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  opacity: 0.7;
}

/* Footer */
.footer {
  margin-top: 50px;
  padding: 20px;
  font-size: 0.8rem;
  letter-spacing: 3px;
  opacity: 0.7;
}

/* ===================== MODALES ===================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: flex-start;
  align-items: center;
  padding: 20px;
  overflow-y: auto;
  flex-direction: column;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, var(--rosa-fuerte), var(--rosa-medio));
  padding: 40px 30px;
  border-radius: 20px;
  max-width: 400px;
  width: 100%;
  position: relative;
  text-align: center;
  border: 2px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  margin: auto;
  flex-shrink: 0;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--blanco);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.modal-close:hover {
  opacity: 1;
}

.modal-content h3 {
  font-size: 1.5rem;
  margin-bottom: 25px;
  letter-spacing: 2px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group input[type="text"] {
  width: 100%;
  padding: 15px 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--negro);
  text-align: center;
}

.form-group input[type="text"]::placeholder {
  color: #999;
}

.form-group input[type="file"] {
  display: none;
}

.file-label {
  display: block;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px dashed rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.file-label:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: var(--dorado);
}

/* Opciones de subida */
.upload-options {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.upload-option-btn {
  flex: 1;
  padding: 15px 10px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  color: var(--blanco);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-option-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: var(--dorado);
  transform: translateY(-2px);
}

.upload-option-btn.selected {
  background: rgba(255, 215, 0, 0.3);
  border-color: var(--dorado);
}

/* Estado de carga para upload */
.upload-status {
  text-align: center;
  padding: 30px 20px;
}

.upload-status .status-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 10px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.upload-status p {
  color: var(--blanco);
  font-size: 1rem;
  font-weight: 500;
}

/* Input foto de perfil para confirmación */
#confirmPhoto {
  display: none;
}

.photo-upload-label {
  display: block;
  cursor: pointer;
}

.photo-preview-circle {
  width: 100px;
  height: 100px;
  margin: 10px auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 3px dashed rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.3s ease;
}

.photo-preview-circle:hover {
  border-color: var(--dorado);
  background: rgba(255, 255, 255, 0.3);
}

.photo-preview-circle.has-photo {
  border-style: solid;
  border-color: var(--dorado);
}

.photo-preview-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-circle .photo-icon {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.photo-preview-circle .photo-text {
  font-size: 0.7rem;
  opacity: 0.8;
}

.preview-container {
  margin: 15px 0;
}

.preview-container img,
.preview-container video {
  max-width: 100%;
  max-height: 200px;
  border-radius: 10px;
}

.success-message {
  display: none;
}

.success-message.show {
  display: block;
}

.success-message .success-icon {
  display: inline-flex;
  width: 60px;
  height: 60px;
  background: var(--dorado);
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: var(--negro);
  margin-bottom: 15px;
}

.success-message p {
  font-size: 1.1rem;
  margin: 5px 0;
}

/* ===================== TARJETA WALLET ===================== */
.wallet-card {
  display: none;
  flex-direction: column;
  align-items: center;
  animation: cardAppear 0.8s ease-out;
}

.wallet-card.show {
  display: flex;
}

@keyframes cardAppear {
  0% {
    opacity: 0;
    transform: scale(0.5) rotateY(-180deg);
  }
  50% {
    transform: scale(1.1) rotateY(-90deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
  }
}

.wallet-card-inner {
  width: 320px;
  perspective: 1000px;
}

.wallet-front {
  position: relative;
  width: 100%;
  padding: 25px 20px;
  background: linear-gradient(
    145deg,
    #1a1a2e 0%,
    #16213e 30%,
    #0f3460 60%,
    #1a1a2e 100%
  );
  border-radius: 20px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(255, 215, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 215, 0, 0.3);
  overflow: hidden;
}

/* Efecto de brillo en la tarjeta */
.wallet-front::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 215, 0, 0.05) 50%,
    transparent 70%
  );
  animation: walletShine 3s ease-in-out infinite;
}

@keyframes walletShine {
  0%, 100% { transform: translateX(-100%) rotate(45deg); }
  50% { transform: translateX(100%) rotate(45deg); }
}

.wallet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.wallet-logo {
  font-size: 2rem;
  animation: sparkleRotate 2s ease-in-out infinite;
}

@keyframes sparkleRotate {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(10deg) scale(1.1); }
}

.wallet-event-type {
  background: linear-gradient(135deg, var(--dorado), var(--dorado-oscuro));
  color: var(--negro);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.wallet-title {
  text-align: center;
  margin: 20px 0;
  position: relative;
  z-index: 1;
}

.wallet-mis,
.wallet-anos {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 8px;
  color: rgba(255, 255, 255, 0.7);
}

.wallet-age {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--dorado), #fff, var(--dorado));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  letter-spacing: 5px;
}

/* Foto de perfil en credencial */
.wallet-photo-container {
  display: flex;
  justify-content: center;
  margin: 15px 0;
  position: relative;
  z-index: 1;
}

.wallet-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 105, 180, 0.3));
  border: 4px solid var(--dorado);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow:
    0 0 20px rgba(255, 215, 0, 0.4),
    0 0 40px rgba(255, 215, 0, 0.2);
}

.wallet-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wallet-photo span {
  font-size: 2.5rem;
}

.wallet-guest-name {
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  color: var(--blanco);
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
  text-align: center;
}

.wallet-details {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
  padding: 15px 0;
  border-top: 1px solid rgba(255, 215, 0, 0.2);
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  position: relative;
  z-index: 1;
}

.wallet-detail {
  text-align: center;
}

.wallet-label {
  display: block;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 2px;
  margin-bottom: 5px;
}

.wallet-value {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--dorado);
}

.wallet-location {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin: 15px 0;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

/* Estado de confirmación integrado */
.wallet-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
  border: 2px solid #22c55e;
  border-radius: 50px;
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.5s ease;
}

.wallet-status.show {
  opacity: 1;
  transform: translateY(0);
}

.status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #22c55e;
  border-radius: 50%;
  color: white;
  font-size: 0.9rem;
  font-weight: bold;
}

.status-text {
  font-size: 0.7rem;
  font-weight: 700;
  color: #22c55e;
  letter-spacing: 2px;
}

/* Botón descargar tarjeta */
.btn-download-card {
  margin-top: 20px;
  padding: 12px 30px;
  background: linear-gradient(135deg, var(--dorado), var(--dorado-oscuro));
  color: var(--negro);
  border: none;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.btn-download-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

/* Botón añadir al calendario */
.btn-add-calendar {
  margin-top: 20px;
  padding: 12px 30px;
  background: linear-gradient(135deg, var(--dorado), var(--dorado-oscuro));
  color: var(--negro);
  border: none;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.btn-add-calendar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.wallet-message {
  margin-top: 15px;
  font-family: 'Pinyon Script', cursive;
  font-size: 1.5rem;
  color: var(--blanco);
}

/* Responsive para tarjeta wallet */
@media (max-width: 380px) {
  .wallet-card-inner {
    width: 280px;
  }

  .wallet-age {
    font-size: 2.5rem;
  }

  .wallet-guest-name {
    font-size: 1.6rem;
  }

  .wallet-code-value {
    font-size: 1.4rem;
  }

  .stamp-inner {
    width: 110px;
    height: 110px;
  }

  .stamp-text {
    font-size: 0.75rem;
  }

  .stamp-check {
    font-size: 2rem;
  }
}

/* Modal media ampliado */
.media-modal .modal-close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
}

.media-modal-content {
  max-width: 90vw;
  max-height: 90vh;
}

.media-modal-content img,
.media-modal-content video {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 10px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 480px) {
  .name {
    font-size: 3.5rem;
  }

  .age {
    font-size: 3rem;
  }

  .waiting {
    font-size: 2rem;
  }

  .btn-confirm,
  .btn-upload,
  .btn-directions {
    padding: 12px 30px;
    font-size: 0.8rem;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .modal-content {
    padding: 30px 20px;
  }
}
