* { 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 — POST CARDS
========================= */
.spacer {
  position: relative;
  width: 100%;
}

.gallery {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #111; /* color del gap */
}

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* =========================
   POST CARD
========================= */
.post-card {
  background: #0d0d0d;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background 0.2s ease;
}

.post-card:hover {
  background: #141414;
}

/* Thumbnail */
.post-thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #1a1a1a;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.35s ease;
  display: block;
}

/* Watermark */
.post-watermark {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.55);
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.4px;
  pointer-events: none;
  z-index: 5;
}

/* Meta area below thumbnail */
.post-meta {
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  background: #222;
}

.post-info {
  flex: 1;
}

.post-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
  letter-spacing: 0.2px;
}

.post-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
  margin-bottom: 0;
}

/* Footer: date + button */
.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.post-date {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
}

.post-btn {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.post-btn.unlock {
  background: #1a1a1a;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.1);
}

.post-btn.unlock:hover {
  background: #222;
  color: #fff;
}

.post-btn.view {
  background: #1f8f4a;
  color: #fff;
}

.post-btn.view:hover {
  background: #26b060;
  transform: translateY(-1px);
}

/* Mobile: stack footer */
@media (max-width: 600px) {
  .post-meta {
    padding: 12px;
  }
  .post-title {
    font-size: 14px;
  }
  .post-desc {
    font-size: 13px;
  }
  .post-date {
    font-size: 12px;
  }
  .post-btn {
    font-size: 12px;
    padding: 7px 16px;
  }
}

/* =========================
   LOAD MORE (kept for reference)
========================= */
.load-more {
  width: 100%;
  padding: 16px;
  border: none;
  background: #111;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: background 0.2s ease;
}

.load-more:hover {
  background: #1a1a1a;
}

/* =========================
   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;
}

/* ---------- 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 {
  background: #1a1a1a;
  padding: 40px;
  max-width: 400px;
  width: 90%;
  border-radius: 24px;
  color: #fff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.1);
}

#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;
}

#modal .box button {
  display: inline-block;
  width: auto;
  min-width: 160px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 5px;
}

#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);
}

#modal .box button[onclick*="closeModal"],
#modal .box button[style*="opacity"] {
  background: rgba(255,255,255,0.1) !important;
  color: #ccc !important;
  opacity: 1 !important;
}

#modal .box button[onclick*="closeModal"]:hover {
  background: rgba(255,255,255,0.2) !important;
  color: #fff !important;
}

#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;
}

#modal .box button.modal-close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  width: 24px !important;
  height: 24px !important;
  min-width: unset !important;
  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;
}

#modal .box button:not(.modal-close) {
  width: auto !important;
  min-width: 140px;
  max-width: 200px;
  margin: 10px auto !important;
  display: block;
  padding: 10px 20px !important;
  border-radius: 8px;
  font-weight: 600;
}

#modal video {
  width:100%;
}

/* =========================
   VIDEO MODAL
========================= */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal.hidden {
  display: none;
}

.video-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
}

.video-wrapper {
  position: relative;
  z-index: 1;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  padding: 6px 10px;
}

.close-btn:hover {
  color: #ccc;
}

.video-box {
  height: 90vh;
  width: calc(90vh * 9 / 16);
  max-width: 90vw;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

@media (max-width: 600px) {
  .video-box {
    width: 95vw;
    height: calc(95vw * 16 / 9);
    max-height: 90vh;
    border-radius: 6px;
  }
}

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================
   AUTH
========================= */
#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;
}

.auth-btn.primary {
  border-color: #1f8f4a;
  color: #fff;
}

.auth-btn.primary:hover {
  background: #1f8f4a;
  border-color: #1f8f4a;
  color: #fff;
}

.auth-btn.ghost {
  border-color: rgba(255,255,255,.5);
}

.auth-btn.ghost:hover {
  border-color: #fff;
  background: rgba(255,255,255,.08);
}

/* =========================
   GLOBAL
========================= */
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
========================= */
.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;
}

.purchase-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 15px auto 0 auto;
  text-align: center;
}

.purchase-section .note {
  margin: 0;
  line-height: 1.2;
}

/* =========================
   SPINNER
========================= */
.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;
  vertical-align: middle;
}

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

#modal .box button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.post-btn.download {
  background: #1e3a8a !important; /* azul oscuro */
  color: #fff !important;
  border: none;
}

.post-btn.download:hover {
  background: #1e40af !important; /* un poco más claro al hover */
  transform: translateY(-1px);
}