/* =========================================================
   MURO ETERNO — estética de monumento / placas grabadas
   Paleta:
     --obsidiana:  #0f1012  (fondo principal)
     --piedra:     #1b1d21  (placas estándar)
     --piedra-2:   #232529  (placas hover)
     --oro:        #d8b26a  (Salón de la Fama)
     --bronce:     #9c7a4a  (acentos secundarios)
     --marfil:     #efe9dc  (texto sobre placas)
     --gris:       #8b8f96  (texto secundario)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&family=Baloo+2:wght@500;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --obsidiana: #0a0e1a;
  --piedra: #131a2c;
  --piedra-2: #1c2740;
  --oro: #d8b26a;
  --oro-brillo: #f0d494;
  --bronce: #9c7a4a;
  --marfil: #efe9dc;
  --gris: #8b93a8;
  --linea: #2a3654;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--obsidiana);
  background-image:
    radial-gradient(circle at 20% 0%, rgba(216,178,106,0.06), transparent 40%),
    radial-gradient(circle at 80% 10%, rgba(156,122,74,0.05), transparent 40%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.02 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><circle cx='24' cy='40' r='1' fill='white' opacity='0.55'/><circle cx='120' cy='90' r='1.3' fill='white' opacity='0.35'/><circle cx='200' cy='30' r='0.8' fill='white' opacity='0.5'/><circle cx='262' cy='150' r='1' fill='white' opacity='0.3'/><circle cx='60' cy='205' r='1.2' fill='white' opacity='0.45'/><circle cx='150' cy='255' r='0.9' fill='white' opacity='0.35'/><circle cx='285' cy='265' r='1' fill='white' opacity='0.3'/><circle cx='34' cy='125' r='0.7' fill='white' opacity='0.3'/><circle cx='230' cy='95' r='0.6' fill='white' opacity='0.4'/><circle cx='95' cy='15' r='0.9' fill='white' opacity='0.3'/></svg>");
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-size: auto, auto, auto, 320px 320px;
  color: var(--marfil);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
}

/* ---------- LOGO ---------- */
.logo-marca {
  width: 20px;
  height: 20px;
  display: block;
  margin: 0 auto 12px;
  filter: drop-shadow(0 4px 14px rgba(216,178,106,0.25));
}

/* ---------- ANIMACIONES DE ENTRADA (scroll reveal) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

a { color: inherit; }

.contenedor {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- HEADER / HERO ---------- */
header.hero {
  padding: 90px 0 60px;
  text-align: center;
  border-bottom: 1px solid var(--linea);
  position: relative;
  overflow: hidden;
}

#canvasEstrellas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

header.hero .contenedor {
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--oro);
  margin-bottom: 18px;
}

h1.titulo {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(38px, 6vw, 68px);
  margin: 0 0 18px;
  letter-spacing: 0.5px;
}

h1.titulo em {
  font-style: italic;
  color: var(--oro);
}

.linea-dorada {
  width: 70px;
  height: 2px;
  margin: 0 auto 28px;
  background: linear-gradient(90deg, transparent, var(--oro), transparent);
  background-size: 200% 100%;
  animation: brillo 3.5s ease-in-out infinite;
}
@keyframes brillo {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.subtitulo {
  color: var(--gris);
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 17px;
}

.cta-principal {
  display: inline-block;
  background: linear-gradient(180deg, var(--oro-brillo), var(--oro));
  color: #1b1500;
  font-weight: 700;
  text-decoration: none;
  padding: 16px 34px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 24px rgba(216,178,106,0.25);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cta-principal:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(216,178,106,0.35); }

/* ---------- SECCIONES ---------- */
section { padding: 70px 0; }

#muro {
  position: relative;
  min-height: 320px;
  overflow: hidden;
}
#canvasEstrellasWall {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ---------- MOSAICO ESTELAR (Wall) ---------- */
.constelacion-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 26px 30px;
  padding: 20px 10px 40px;
}

.estrella-nodo {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.estrella-nucleo {
  display: block;
  transition: transform .2s ease;
}
.estrella-nodo:hover .estrella-nucleo,
.estrella-nodo:focus-visible .estrella-nucleo { transform: scale(1.4) rotate(8deg); }

.estrella-svg { display: block; overflow: visible; }

/* Piedra: destello pequeño y tenue */
.tier-piedra .estrella-svg {
  width: 12px; height: 12px;
  filter: drop-shadow(0 0 4px rgba(210,215,225,0.7));
  animation: titilar-suave 3.4s ease-in-out infinite;
}

/* Plata: un poco más grande, brillo azulado */
.tier-plata .estrella-svg {
  width: 18px; height: 18px;
  filter: drop-shadow(0 0 6px rgba(169,216,234,0.85)) drop-shadow(0 0 12px rgba(169,216,234,0.4));
  animation: titilar-suave 2.8s ease-in-out infinite;
}

/* Oro: notablemente más grande, resplandor cálido */
.tier-oro .estrella-svg {
  width: 25px; height: 25px;
  filter: drop-shadow(0 0 8px rgba(216,178,106,0.9)) drop-shadow(0 0 16px rgba(216,178,106,0.45));
  animation: titilar-suave 2.3s ease-in-out infinite;
}

/* Diamante: la más grande, gema prismática con pulso de color */
.tier-diamante .estrella-svg {
  width: 34px; height: 34px;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.9)) drop-shadow(0 0 18px rgba(180,180,255,0.55));
  animation: pulso-diamante 2.2s ease-in-out infinite;
}

@keyframes titilar-suave {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}
@keyframes pulso-diamante {
  0%, 100% { opacity: 0.85; filter: drop-shadow(0 0 8px rgba(255,255,255,0.9)) drop-shadow(0 0 18px rgba(180,180,255,0.55)) hue-rotate(0deg); }
  50%      { opacity: 1; filter: drop-shadow(0 0 10px rgba(255,255,255,1)) drop-shadow(0 0 22px rgba(255,150,200,0.6)) hue-rotate(30deg); }
}
@media (prefers-reduced-motion: reduce) {
  .estrella-svg { animation: none !important; }
}

/* ---------- MODAL: revela el mensaje completo al tocar una estrella ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,7,14,0.78);
  backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  transition: opacity .2s ease;
}
.modal-overlay.visible { opacity: 1; }
.modal-caja {
  position: relative;
  max-width: 380px;
  width: 100%;
  transform: scale(0.92);
  transition: transform .2s ease;
}
.modal-overlay.visible .modal-caja { transform: scale(1); }
.modal-caja .placa { width: 100%; box-sizing: border-box; cursor: default; }
.modal-caja .placa::before { display: none; } /* sin la cinta de corcho dentro del modal, se ve más limpio */
.modal-cerrar {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--piedra-2);
  border: 1px solid var(--linea);
  color: var(--marfil);
  font-size: 14px;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-cerrar:hover { background: rgba(216,178,106,0.2); border-color: var(--oro); }

.encabezado-seccion {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--linea);
  padding-bottom: 16px;
}

.encabezado-seccion h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 32px;
  margin: 0;
}

.encabezado-seccion span {
  color: var(--gris);
  font-size: 13px;
  letter-spacing: 1px;
}

/* ---------- SALÓN DE LA FAMA ---------- */
.fama-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.placa-oro {
  position: relative;
  background: linear-gradient(160deg, #1c2540, #0f1424);
  border: 1px solid rgba(216,178,106,0.4);
  border-radius: 6px;
  padding: 26px 22px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(216,178,106,0.08), 0 10px 24px rgba(0,0,0,0.4);
  transition: transform .25s ease, box-shadow .25s ease;
}
.placa-oro:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px rgba(216,178,106,0.15), 0 16px 34px rgba(0,0,0,0.5);
}
.placa-oro::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(216,178,106,0.12) 50%, transparent 70%);
  pointer-events: none;
}
/* Esquinas grabadas, como una placa de metal real */
.placa-oro::after {
  content: "";
  position: absolute; inset: 6px;
  border: 1px solid rgba(216,178,106,0.18);
  border-radius: 3px;
  pointer-events: none;
}
.placa-oro .rango {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  color: var(--oro);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Medallas para el top 3 */
.medalla {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: #1b1500;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.25);
  z-index: 1;
}
/* Cintas de la medalla */
.medalla::before,
.medalla::after {
  content: "";
  position: absolute;
  top: 16px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 4px 0 4px;
  z-index: -1;
}
.medalla::before { left: 3px; transform: rotate(14deg); }
.medalla::after  { right: 3px; transform: rotate(-14deg); }

.medalla.oro-1 { background: linear-gradient(160deg, #f5dfa3, #c99a4f); box-shadow: 0 0 10px rgba(216,178,106,0.5); }
.medalla.oro-1::before,
.medalla.oro-1::after { border-color: #8a2b2b transparent transparent transparent; }

.medalla.plata-2 { background: linear-gradient(160deg, #d7f0fb, #8fcfe8); color: #133a4a; }
.medalla.plata-2::before,
.medalla.plata-2::after { border-color: #2f6f8f transparent transparent transparent; }

.medalla.bronce-3 { background: linear-gradient(160deg, #eceef0, #c3c6cb); color: #33363a; }
.medalla.bronce-3::before,
.medalla.bronce-3::after { border-color: #6a6d72 transparent transparent transparent; }
.placa-oro .nombre {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--oro-brillo);
  margin: 0 0 8px;
}
.placa-oro .mensaje {
  font-size: 14.5px;
  color: var(--marfil);
  margin: 0 0 14px;
}
.placa-oro .monto {
  font-size: 13px;
  color: var(--bronce);
  font-weight: 600;
}

/* ---------- MURO GENERAL DE PLACAS ---------- */
.muro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 34px 22px;
  padding: 10px 4px;
}

.placa {
  position: relative;
  border-radius: 10px;
  padding: 22px 18px 18px;
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
.placa::before {
  /* efecto de cinta pegada arriba */
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 54px;
  height: 20px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.3);
  transform: translateX(-50%) rotate(-3deg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  z-index: 1;
}
.placa:hover {
  transform: rotate(0deg) scale(1.045) translateY(-3px) !important;
  box-shadow: 0 14px 28px rgba(0,0,0,0.4);
  z-index: 2;
}

/* Paleta rotativa de colores, tipo notas de corcho — el toque divertido */
.placa:nth-child(5n+1) { background: #ffb4a2; transform: rotate(-2deg); }
.placa:nth-child(5n+2) { background: #ffd166; transform: rotate(1.4deg); }
.placa:nth-child(5n+3) { background: #8ee6c9; transform: rotate(-1.2deg); }
.placa:nth-child(5n+4) { background: #8ecae6; transform: rotate(2deg); }
.placa:nth-child(5n)   { background: #cdb4f6; transform: rotate(-1.6deg); }

/* Brillo diagonal al pasar el cursor, en los 4 niveles */
.placa::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, var(--brillo-color, rgba(255,255,255,0.5)) 50%, transparent 60%);
  background-position: -150% -150%;
  background-size: 250% 250%;
  transition: background-position .75s ease;
  pointer-events: none;
}
.placa:hover::after { background-position: 150% 150%; }

/* El "material" ahora es un acento: borde + resplandor propio, sin tocar el color de la nota */
.placa.tier-piedra { border: 2px solid rgba(0,0,0,0.12); }

.placa.tier-plata {
  border: 2px solid rgba(210,220,232,0.85);
  box-shadow: 0 0 10px rgba(210,220,232,0.25), 0 6px 16px rgba(0,0,0,0.35);
}
.placa.tier-plata:hover { box-shadow: 0 0 20px rgba(210,220,232,0.4), 0 14px 28px rgba(0,0,0,0.4); }

.placa.tier-oro {
  border: 2px solid rgba(216,178,106,0.9);
  box-shadow: 0 0 12px rgba(216,178,106,0.3), 0 6px 16px rgba(0,0,0,0.35);
}
.placa.tier-oro:hover { box-shadow: 0 0 24px rgba(216,178,106,0.45), 0 14px 28px rgba(0,0,0,0.4); }

.placa.tier-diamante {
  border: 2.5px solid transparent;
  border-image: linear-gradient(120deg, #ff9c9c, #ffe19c, #9cffc3, #9cc3ff, #dc9cff) 1;
  box-shadow: 0 0 14px rgba(200,200,255,0.35), 0 6px 16px rgba(0,0,0,0.35);
}
.placa.tier-diamante:hover { box-shadow: 0 0 26px rgba(200,200,255,0.5), 0 14px 28px rgba(0,0,0,0.4); }

.placa .nombre {
  font-family: 'Baloo 2', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #241a12;
  position: relative;
  z-index: 1;
}
.placa .mensaje {
  font-size: 14px;
  margin: 0 0 12px;
  font-weight: 500;
  color: #34281c;
  position: relative;
  z-index: 1;
}
.placa .meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  border-top: 1px dashed rgba(0,0,0,0.2);
  padding-top: 10px;
  font-weight: 600;
  color: #4a3a2b;
  position: relative;
  z-index: 1;
}
.placa a.enlace-marca {
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1.5px solid currentColor;
  font-weight: 700;
  color: #241a12;
  position: relative;
  z-index: 1;
}



.vacio {
  color: var(--gris);
  text-align: center;
  padding: 40px 0;
  font-size: 15px;
}

/* ---------- FOOTER ---------- */
footer {
  border-top: 1px solid var(--linea);
  padding: 34px 0;
  text-align: center;
  color: var(--gris);
  font-size: 13px;
}

/* ---------- FORMULARIO (publicar.php) ---------- */
.form-card {
  max-width: 560px;
  margin: 60px auto;
  background: var(--piedra);
  border: 1px solid var(--linea);
  border-radius: 8px;
  padding: 40px;
}
.form-card h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  margin-top: 0;
}
label {
  display: block;
  font-size: 13px;
  color: var(--gris);
  margin: 18px 0 6px;
}
input[type=text], input[type=number], input[type=url], textarea, select {
  width: 100%;
  background: var(--obsidiana);
  border: 1px solid var(--linea);
  border-radius: 4px;
  padding: 12px 14px;
  color: var(--marfil);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}
textarea { resize: vertical; min-height: 90px; }
.tipos { display: flex; gap: 10px; }
.tipos label {
  flex: 1;
  text-align: center;
  border: 1px solid var(--linea);
  border-radius: 4px;
  padding: 12px;
  cursor: pointer;
  margin: 0;
}
.tipos input { display: none; }
.tipos input:checked + span { color: var(--oro); font-weight: 700; }
.ayuda { font-size: 12px; color: var(--gris); margin-top: 6px; }
.monto-rapido { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.monto-rapido button {
  background: transparent;
  border: 1px solid var(--bronce);
  color: var(--oro);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
}
.monto-rapido button:hover { background: rgba(216,178,106,0.1); }
.btn-pagar {
  width: 100%;
  margin-top: 26px;
  background: linear-gradient(180deg, var(--oro-brillo), var(--oro));
  color: #1b1500;
  border: none;
  font-weight: 700;
  font-size: 15px;
  padding: 15px;
  border-radius: 4px;
  cursor: pointer;
}
.btn-pagar:disabled { opacity: 0.6; cursor: not-allowed; }
.mensaje-estado {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 14px;
  display: none;
}
.mensaje-estado.ok { display: block; background: rgba(72,166,110,0.12); color: #7fd9a0; border: 1px solid #2f5b40; }
.mensaje-estado.error { display: block; background: rgba(200,80,80,0.12); color: #f0a3a3; border: 1px solid #5b2f2f; }

/* ---------- CAJA DE PAGO (Yape/Plin) ---------- */
.caja-pago {
  background: var(--obsidiana);
  border: 1px dashed var(--linea);
  border-radius: 6px;
  padding: 16px;
  margin: 10px 0 4px;
  text-align: center;
}
.qr-img {
  max-width: 160px;
  width: 100%;
  border-radius: 4px;
  margin-bottom: 10px;
  background: #fff;
  padding: 6px;
}
input[type=file] {
  width: 100%;
  background: var(--obsidiana);
  border: 1px solid var(--linea);
  border-radius: 4px;
  padding: 10px;
  color: var(--gris);
  font-size: 13px;
}

/* ---------- VISTA PREVIA DEL ENLACE DE MARCA (estilo tipo WhatsApp/redes) ---------- */
.preview-marca {
  display: flex;
  gap: 10px;
  align-items: stretch;
  text-decoration: none;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  overflow: hidden;
  margin: 4px 0 10px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.preview-marca:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,0.25); }
.preview-marca img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(0,0,0,0.2);
}
.preview-texto {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 8px 10px 8px 0;
  min-width: 0;
}
.preview-texto strong {
  font-size: 13px;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-texto span {
  font-size: 11.5px;
  opacity: 0.85;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.preview-texto em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--oro);
  margin-top: 2px;
}
/* Dentro de las placas doradas (Salón de la Fama) el fondo es oscuro de por sí */
.placa-oro .preview-marca { background: rgba(0,0,0,0.35); border-color: rgba(216,178,106,0.25); color: var(--marfil); }
.placa-oro .preview-texto em { color: var(--oro); }
/* Dentro de las notas de colores (El Muro), texto oscuro para contraste */
.placa .preview-texto strong, .placa .preview-texto span { color: var(--marfil); }
.placa .preview-texto em { color: var(--oro); }

/* ---------- FOTO ADJUNTA AL MENSAJE ---------- */
.foto-mensaje {
  display: block;
  width: 100%;
  object-fit: cover;
  margin: 8px 0 12px;
}
/* Salón de la Fama: foto elegante con esquinas redondeadas */
.foto-fama {
  height: 150px;
  border-radius: 6px;
  border: 1px solid rgba(216,178,106,0.3);
}
/* El Muro: estilo "polaroid" divertido, ligeramente inclinada */
.foto-nota {
  height: 130px;
  border: 6px solid #fffdf8;
  border-bottom-width: 18px;
  border-radius: 2px;
  transform: rotate(-1.5deg);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* ---------- PUESTO #1: diseño exclusivo con brillo animado ---------- */
.placa-oro.puesto-uno {
  border: 1.5px solid rgba(240,212,148,0.8);
  animation: pulso-dorado 2.6s ease-in-out infinite;
  overflow: visible;
}
@keyframes pulso-dorado {
  0%, 100% { box-shadow: 0 0 0 1px rgba(216,178,106,0.15), 0 0 18px rgba(216,178,106,0.25), 0 10px 24px rgba(0,0,0,0.4); }
  50%      { box-shadow: 0 0 0 1px rgba(216,178,106,0.3), 0 0 34px rgba(216,178,106,0.55), 0 10px 24px rgba(0,0,0,0.4); }
}
.placa-oro.puesto-uno::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.35) 50%, transparent 65%);
  background-size: 250% 250%;
  animation: brillo-barrido 3.2s linear infinite;
  pointer-events: none;
}
@keyframes brillo-barrido {
  0%   { background-position: 120% -20%; }
  100% { background-position: -20% 120%; }
}
.corona {
  position: absolute;
  top: -20px;
  right: 10px;
  transform: rotate(10deg);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
  z-index: 2;
  animation: flotar-corona 3s ease-in-out infinite;
}
@keyframes flotar-corona {
  0%, 100% { transform: rotate(10deg) translateY(0); }
  50%      { transform: rotate(10deg) translateY(-5px); }
}
@media (prefers-reduced-motion: reduce) {
  .placa-oro.puesto-uno, .placa-oro.puesto-uno::after, .corona { animation: none; }
}

/* Brillo sutil y permanente para los puestos #2 y #3 (el #1 ya tiene el suyo propio) */
.placa-oro.glow-plata:not(.puesto-uno) { box-shadow: 0 0 0 1px rgba(210,220,232,0.2), 0 0 18px rgba(210,220,232,0.15), 0 10px 24px rgba(0,0,0,0.4); }
.placa-oro.glow-bronce:not(.puesto-uno) { box-shadow: 0 0 0 1px rgba(180,150,110,0.2), 0 0 16px rgba(180,150,110,0.15), 0 10px 24px rgba(0,0,0,0.4); }

/* ---------- ESTADÍSTICAS DE LA COMUNIDAD (header) ---------- */
.stats-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  padding: 10px 22px;
  border: 1px solid rgba(216,178,106,0.3);
  border-radius: 30px;
  background: rgba(216,178,106,0.06);
  font-size: 13.5px;
  color: var(--marfil);
  letter-spacing: 0.2px;
}
.stats-header strong { color: var(--oro-brillo); font-weight: 700; }
@media (max-width: 640px) {
  .stats-header { font-size: 12px; padding: 9px 16px; flex-wrap: wrap; justify-content: center; text-align: center; }
}

/* ---------- BUSCADOR ---------- */
.buscador-wrap { margin-bottom: 26px; }
#buscador {
  width: 100%;
  max-width: 360px;
  background: var(--piedra);
  border: 1px solid var(--linea);
  border-radius: 30px;
  padding: 11px 18px;
  color: var(--marfil);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}
#buscador:focus { outline: none; border-color: var(--oro); }
#buscador::placeholder { color: var(--gris); }

/* ---------- BOTONES DE REACCIÓN Y COMPARTIR ---------- */
.acciones-placa {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.btn-like, .btn-compartir {
  flex: 1;
  border: 1px solid rgba(216,178,106,0.35);
  border-radius: 20px;
  padding: 7px 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  font-family: 'Inter', sans-serif;
  background: rgba(21,16,12,0.55);
  color: var(--marfil);
  backdrop-filter: blur(2px);
}
.btn-like:hover {
  transform: scale(1.05);
  background: rgba(140,45,45,0.55);
  border-color: rgba(216,110,110,0.55);
}
.btn-like.reaccionado {
  background: rgba(140,45,45,0.65);
  border-color: #b23b3b;
}
.btn-like:disabled { cursor: default; opacity: 0.9; }
.btn-compartir:hover {
  transform: scale(1.05);
  background: rgba(216,178,106,0.35);
  border-color: var(--oro);
}

/* ---------- AVISO DE "TE HAN DESTRONADO" ---------- */
.aviso-destronado-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,7,14,0.75);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: aparecer-fondo .3s ease;
}
@keyframes aparecer-fondo { from { opacity: 0; } to { opacity: 1; } }

.aviso-destronado {
  background: linear-gradient(160deg, #1c2540, #0f1424);
  border: 1.5px solid rgba(216,178,106,0.5);
  border-radius: 10px;
  padding: 40px 34px;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 0 40px rgba(216,178,106,0.25), 0 20px 50px rgba(0,0,0,0.5);
  animation: entrar-aviso .35s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes entrar-aviso {
  from { transform: scale(0.9) translateY(10px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.aviso-corona {
  font-size: 44px;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 10px rgba(216,178,106,0.4));
}
.aviso-destronado h2 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--oro-brillo);
  font-size: 28px;
  margin: 0 0 14px;
}
.aviso-destronado p {
  font-size: 14.5px;
  color: var(--marfil);
  line-height: 1.6;
  margin: 0 0 10px;
}
.aviso-destronado .aviso-sub {
  color: var(--gris);
  font-size: 13px;
}
.aviso-botones {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.aviso-botones .cta-principal { width: 100%; box-sizing: border-box; }
.aviso-cerrar {
  background: none;
  border: none;
  color: var(--gris);
  font-size: 13px;
  cursor: pointer;
  padding: 6px;
}
.aviso-cerrar:hover { color: var(--marfil); }

/* ---------- TÉRMINOS DE USO / DOCUMENTO LEGAL ---------- */
.documento-legal {
  max-width: 720px;
  padding-top: 20px;
  padding-bottom: 70px;
}
.titulo-legal {
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  margin-bottom: 4px;
}
.fecha-legal {
  color: var(--gris);
  font-size: 13px;
  margin-bottom: 40px;
}
.documento-legal h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--oro);
  margin-top: 38px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--linea);
  padding-bottom: 8px;
}
.documento-legal p, .documento-legal li {
  font-size: 14.5px;
  color: #c9c6bd;
  line-height: 1.7;
}
.documento-legal ul { padding-left: 20px; }
.documento-legal strong { color: var(--marfil); }

/* ---------- ADMIN ---------- */
table.admin { width: 100%; border-collapse: collapse; font-size: 14px; }
table.admin th, table.admin td { border-bottom: 1px solid var(--linea); padding: 10px 8px; text-align: left; }
table.admin th { color: var(--gris); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.btn-mini { padding: 6px 12px; border-radius: 4px; border: 1px solid var(--linea); background: var(--piedra-2); color: var(--marfil); cursor: pointer; font-size: 12px; text-decoration: none; }
.btn-mini.aprobar { border-color: #2f5b40; color: #7fd9a0; }
.btn-mini.borrar { border-color: #5b2f2f; color: #f0a3a3; }

@media (max-width: 640px) {
  header.hero { padding: 60px 0 40px; }
  section { padding: 46px 0; }
  .form-card { padding: 26px; margin: 30px 16px; }
}
