* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: system-ui, sans-serif;
}

/* =========================
   HEADER / PATREON STYLE
========================= */
.header {
  padding: 40px 20px;
  background: #111;
  color: #fff;
  text-align: center;
}

.header h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.header p {
  opacity: .8;
}

/* =========================
   PAYMENTS
========================= */
.payments {
  padding: 30px 20px;
  background: #000;
  color: #fff;
  text-align: center;
}

.payments h2 {
  margin-bottom: 15px;
}

.payments .note {
  opacity: .7;
  font-size: 14px;
}

/* =========================
   GALLERY (TU CÓDIGO)
========================= */
.spacer {
  position: relative;
  width: 100%;
}

.gallery {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0;
}

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

.item {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  will-change: transform;        /* ← promueve a capa GPU */
  contain: layout style paint;   /* ← aísla el repintado */
}

.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================
   OVERLAY BUTTON
========================= */
.item button {
  position: absolute;
  /* Los subimos un poco más y les damos margen lateral */
  inset: auto 8px 8px 8px; 
  padding: 6px 4px;      /* Padding más reducido en desktop */
  font-size: 11px;       /* Fuente más pequeña y elegante */
  border: none;
  cursor: pointer;
  background: #000;
  color: #fff;
  opacity: .95;
  border-radius: 4px;
  letter-spacing: .5px;
  font-weight: 600;
  text-transform: uppercase;
  transition: all 0.2s ease;
  z-index: 6;            /* Por encima de la imagen */
}

/* Ajuste específico para MOVIL */
@media (max-width: 600px) {
  .item button {
    inset: auto 4px 4px 4px; /* Menos margen en móvil */
    padding: 4px 2px;      /* Muy compacto */
    font-size: 9px;        /* Fuente mínima legible */
    letter-spacing: 0;
    border-radius: 3px;
  }
}

.item button.unlock {
  background: #111;
}

.item button.view {
  background: #1f8f4a; 
}

.item button.view:hover {
  background: #26b060;
  transform: translateY(-1px);
}

/* =========================
   LOAD MORE
========================= */
.load-more {
  width: 100%;
  padding: 16px;
  border: none;
  background: #000;
  color: #fff;
  cursor: pointer;
}

/* =========================
   LIGHTBOX
========================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
}

.item img {
  pointer-events: auto;
  cursor: zoom-in;
}

.item {
  background: #e5e5e5; /* placeholder gris */
}

/* ---------- MODAL ---------- */
#modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999 !important;
}

/* --- MODAL BOX MÁS CUADRADO Y PRO --- */
#modal .box {
  background: #1a1a1a; /* Un gris muy oscuro en lugar de negro puro */
  padding: 40px;       /* Más aire interno */
  max-width: 400px;    /* Ancho controlado para que se vea más vertical/cuadrado */
  width: 90%;
  border-radius: 24px; /* Bordes más redondeados y modernos */
  color: #fff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); /* Sombra más suave y profunda */
  position: relative;
  text-align: center;  /* Centrar contenido para look premium */
  border: 1px solid rgba(255,255,255,0.1); /* Sutil borde brillante */
}

#modal .box h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  letter-spacing: -0.5px;
}

#modal .box p {
  opacity: 0.7;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 25px;
}

/* --- BOTONES DEL MODAL ESTILO APPLE/MODERNO --- */
#modal .box button {
  display: inline-block;
  width: auto;          /* Ya no ocupan todo el ancho */
  min-width: 160px;     /* Pero tienen un tamaño mínimo consistente */
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 5px;          /* Espacio entre botones si hay varios */
}

/* Botón Principal (Login/Send) */
#modal .box button:not([onclick*="closeModal"]):not([style*="opacity"]) {
  background: #1f8f4a; 
  color: white;
  box-shadow: 0 4px 15px rgba(31, 143, 74, 0.3);
}

#modal .box button:not([onclick*="closeModal"]):not([style*="opacity"]):hover {
  background: #26b060;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 143, 74, 0.4);
}

/* Botón Secundario / Cerrar */
#modal .box button[onclick*="closeModal"], 
#modal .box button[style*="opacity"] {
  background: rgba(255,255,255,0.1) !important;
  color: #ccc !important;
  opacity: 1 !important; /* Quitamos la opacidad del elemento y la ponemos en el fondo */
}

#modal .box button[onclick*="closeModal"]:hover {
  background: rgba(255,255,255,0.2) !important;
  color: #fff !important;
}

/* Input del modal */
#modal input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 20px;
  transition: border 0.3s;
}

#modal input:focus {
  border-color: #1f8f4a;
  outline: none;
}

/* 1. Reset específico para la X de cierre */
#modal .box button.modal-close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  width: 24px !important;       /* Ancho mínimo */
  height: 24px !important;      /* Alto mínimo */
  min-width: unset !important;  /* Elimina el mínimo de otros botones */
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  color: #888 !important;
  font-size: 20px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
}

#modal .box button.modal-close:hover {
  color: #fff !important;
  background: transparent !important;
}

/* 2. Ajuste para los botones de acción (Login, Enviar, etc.) */
#modal .box button:not(.modal-close) {
  width: auto !important;       /* Evita que ocupen todo el ancho */
  min-width: 140px;             /* Tamaño mínimo elegante */
  max-width: 200px;             /* No permite que se estiren demasiado */
  margin: 10px auto !important; /* Los centra horizontalmente */
  display: block;               /* Permite el centrado con el margin auto */
  padding: 10px 20px !important;
  border-radius: 8px;
  font-weight: 600;
}

#modal video {
  width:100%;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.video-modal.hidden {
  display: none;
}

.video-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
}

.video-box {
  position: relative;
  max-width: 900px;
  width: 95%;
  margin: auto;
  top: 50%;
  transform: translateY(-50%);
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.video-box video {
  width: 100%;
  height: auto;
  display: block;
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
}

#auth-area {
  margin-top: 16px;
}

.auth-user {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.auth-user span {
  font-size: 14px;
  opacity: .85;
}

.auth-btn {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.55);
  transition: all .2s ease;
}

/* LOGIN */
.auth-btn.primary {
  border-color: #1f8f4a;
  color: #fff;
}

.auth-btn.primary:hover {
  background: #1f8f4a;
  border-color: #1f8f4a;
  color: #fff;
}

/* LOGOUT */
.auth-btn.ghost {
  border-color: rgba(255,255,255,.5);
}

.auth-btn.ghost:hover {
  border-color: #fff;
  background: rgba(255,255,255,.08);
}

body {
  background: #000;
  color: #fff;
}

p {
  color: rgba(255,255,255,.85);
}

.note {
  color: rgba(255,255,255,.65);
}

input, select {
  background: #000;
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
}

input::placeholder {
  color: rgba(255,255,255,.5);
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.payment-card {
  background: #111;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}

.payment-card h3 {
  margin-bottom: 6px;
}

.payment-card p {
  font-size: 14px;
  opacity: .7;
  margin-bottom: 14px;
}

.benefits {
  list-style: none;
  max-width: 900px;
  margin: 28px auto 16px;
  padding: 0;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 18px;

  text-align: left;
}

@media (max-width: 768px) {
  .benefits {
    grid-template-columns: 1fr;
  }
}

.benefits li {
  padding: 8px 0;
  font-size: 15px;
  color: rgba(255,255,255,.9);
  display: flex;
  align-items: center;
  gap: 10px;
}

.benefits li::before {
  content: "✓";
  color: #2ecc71;
  font-weight: bold;
}

/* --- ANIMACIÓN DEL LOADER --- */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  margin-right: 8px; /* Espacio entre el loader y el texto */
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Estado deshabilitado del botón mientras carga */
#modal .box button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important; /* Evita que se mueva al hacer hover */
}

/* --- WATERMARK CON FONDO PROFESIONAL --- */
.watermark {
  position: absolute;
  top: 10px;
  left: 10px;
  
  /* Estética del contenedor */
  background: rgba(0, 0, 0, 0.5); /* Fondo negro semitransparente */
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1); /* Borde sutil para definirlo */
  
  /* Estética del texto */
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9); 
  font-weight: 600;
  text-transform: lowercase;     /* Se ve más moderno en minúsculas */
  letter-spacing: 0.5px;
  
  /* Comportamiento */
  pointer-events: none;
  z-index: 5;
}