/* ============================================================
   XFINTER — Main Stylesheet
   Aesthetic: Dark luxury · Cinematic · Mobile-first
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Fondos — degradado petróleo/marino */
  --xf-bg:           #101010;   /* azul marino profundo     */
  --xf-surface:      #181818;   /* petróleo muy oscuro      */
  --xf-surface-2:    #1e1e1e;   /* petróleo medio           */
  --xf-surface-3:    #252525;   /* petróleo iluminado       */

  /* Bordes */
  --xf-border:       rgba(220,41,41,0.15);
  --xf-border-soft:  rgba(255,255,255,0.07);

  /* Accent — magenta/fucsia */
  --xf-accent:       #DC2929;
  --xf-accent-hover: #e83333;
  --xf-accent-dark:  #b52020;
  --xf-accent-dim:   rgba(220,41,41,0.14);
  --xf-accent-glow:  rgba(220,41,41,0.30);

  /* Texto */
  --xf-text:         #EDF0F4;
  --xf-muted:        rgba(237,240,244,0.50);
  --xf-muted-2:      rgba(237,240,244,0.28);

  /* Estado */
  --xf-success:      #34d399;
  --xf-danger:       #f87171;

  /* Utilidades */
  --xf-radius:       14px;
  --xf-radius-sm:    8px;
  --xf-font-display: 'Cormorant Garamond', Georgia, serif;
  --xf-font-body:    'DM Sans', system-ui, sans-serif;
  --xf-transition:   0.22s cubic-bezier(.4,0,.2,1);
  --xf-shadow:       0 4px 32px rgba(0,0,0,0.55);
  --xf-glow:         0 0 40px rgba(220,41,41,0.14);
}

/* ── RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--xf-bg);
  color: var(--xf-text);
  font-family: var(--xf-font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--xf-accent); text-decoration: none; }
img, video { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ── UTILIDADES ─────────────────────────────────────────── */
.xf-container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.xf-sr-only   { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── BOTONES ────────────────────────────────────────────── */
.xf-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  border: none; border-radius: 100px;
  font-family: var(--xf-font-body);
  font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
  transition: var(--xf-transition);
  white-space: nowrap;
}
.xf-btn-primary {
  background: var(--xf-accent);
  color: #101010;
}
.xf-btn-primary:hover { background: #e83333; box-shadow: 0 4px 20px rgba(220,41,41,0.35); }

.xf-btn-outline {
  background: transparent;
  color: var(--xf-text);
  border: 1px solid var(--xf-border);
}
.xf-btn-outline:hover { border-color: var(--xf-accent); color: var(--xf-accent); }

.xf-btn-ghost {
  background: transparent; color: var(--xf-muted);
  border: none; padding: 8px 12px;
}
.xf-btn-ghost:hover { color: var(--xf-text); }

.xf-btn-lg { padding: 14px 32px; font-size: 14px; }
.xf-btn-sm { padding: 6px 14px; font-size: 12px; }
.xf-btn[disabled], .xf-btn.loading {
  opacity: 0.5; pointer-events: none;
}

/* ── FEED WRAPPER ───────────────────────────────────────── */
.xf-feed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

/* ── FEED ITEM (Reel / Card) ────────────────────────────── */
.xf-feed-item {
  position: relative;
  width: 100%;
  background: var(--xf-surface);
  border-bottom: 1px solid var(--xf-border);
  overflow: hidden;
}

.xf-media-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  background: #0a0c12;
  overflow: hidden;
}

.xf-media-wrap img,
.xf-media-wrap video {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ── BLURRED PREVIEW (contenido bloqueado) ──────────────── */
.xf-media-wrap.is-locked img,
.xf-media-wrap.is-locked video {
  filter: blur(18px) brightness(0.55);
  transform: scale(1.05);
  pointer-events: none;
  user-select: none;
}

.xf-lock-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  background: rgba(0,0,0,0.35);
  z-index: 2;
}
.xf-lock-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(220,41,41,0.15);
  border: 1.5px solid var(--xf-accent);
  display: flex; align-items: center; justify-content: center;
  color: var(--xf-accent);
  font-size: 22px;
}
.xf-lock-text {
  font-family: var(--xf-font-display);
  font-size: 20px; font-weight: 300;
  color: #fff; letter-spacing: 0.02em;
  text-align: center;
}
.xf-lock-price {
  font-size: 13px; color: var(--xf-muted);
}

/* ── WATERMARK ──────────────────────────────────────────── */
.xf-watermark {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 5;
  color: rgba(255,255,255,0.18);
  font-size: 11px;
  letter-spacing: 0.06em;
  font-family: var(--xf-font-body);
  mix-blend-mode: overlay;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) rotate(-25deg);
  white-space: nowrap;
}

/* ── FEED ACCIONES ──────────────────────────────────────── */
.xf-feed-actions {
  position: absolute;
  right: 14px; bottom: 100px;
  display: flex; flex-direction: column;
  align-items: center; gap: 20px;
  z-index: 10;
}

.xf-action-btn {
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  padding: 12px;
  color: #fff;
  font-size: 10px;
  transition: var(--xf-transition);
  cursor: pointer;
  min-width: 48px;
}
.xf-action-btn svg { width: 22px; height: 22px; }
.xf-action-btn:hover { background: rgba(200,169,110,0.2); border-color: var(--xf-accent); }
.xf-action-btn.active { color: var(--xf-accent); }

/* ── FEED INFO (autor / descripción) ───────────────────── */
.xf-feed-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 60px 16px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  z-index: 9;
}

.xf-feed-creator {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.xf-feed-creator img {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--xf-accent);
  object-fit: cover;
}
.xf-feed-creator a {
  font-weight: 500; font-size: 14px; color: #fff;
}
.xf-feed-creator a:hover { color: var(--xf-accent); }

.xf-feed-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── PERFIL DE CREADOR ──────────────────────────────────── */
.xf-profile-header {
  position: relative;
}
.xf-profile-banner {
  width: 100%; height: 240px;
  object-fit: cover;
  background: var(--xf-surface-2);
}
.xf-profile-info {
  padding: 0 20px 20px;
  position: relative;
}
.xf-avatar-wrap {
  position: relative;
  margin-top: -50px;
  display: inline-block;
}
.xf-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 3px solid var(--xf-bg);
  object-fit: cover;
}
.xf-profile-name {
  font-family: var(--xf-font-display);
  font-size: 28px; font-weight: 600;
  margin: 10px 0 4px;
  letter-spacing: -0.01em;
}
.xf-profile-category {
  font-size: 12px; color: var(--xf-accent);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 12px;
}
.xf-profile-bio {
  font-size: 14px; color: var(--xf-muted);
  line-height: 1.6;
  max-width: 520px;
}
.xf-profile-stats {
  display: flex; gap: 28px;
  margin: 18px 0;
}
.xf-stat {
  display: flex; flex-direction: column;
  align-items: flex-start;
}
.xf-stat-num {
  font-family: var(--xf-font-display);
  font-size: 22px; font-weight: 600;
  color: var(--xf-text);
}
.xf-stat-label {
  font-size: 11px; color: var(--xf-muted);
  letter-spacing: 0.06em;
}

.xf-profile-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 16px;
}

/* ── CONTENT GRID ───────────────────────────────────────── */
.xf-content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 2px;
}
.xf-grid-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--xf-surface-2);
}
.xf-grid-item img, .xf-grid-item video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.xf-grid-item:hover img, .xf-grid-item:hover video {
  transform: scale(1.04);
}
.xf-grid-item.locked img, .xf-grid-item.locked video {
  filter: blur(10px) brightness(0.5);
}
.xf-grid-lock-badge {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 22px;
}
.xf-grid-video-badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.6);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  color: #fff;
  display: flex; align-items: center; gap: 4px;
}

/* ── MODAL ──────────────────────────────────────────────── */
.xf-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.xf-modal-overlay.open {
  opacity: 1; pointer-events: all;
}
.xf-modal {
  background: var(--xf-surface);
  border-radius: var(--xf-radius) var(--xf-radius) 0 0;
  border: 1px solid var(--xf-border);
  border-bottom: none;
  padding: 28px 24px 36px;
  width: 100%; max-width: 480px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}
.xf-modal-overlay.open .xf-modal {
  transform: translateY(0);
}
.xf-modal h3 {
  font-family: var(--xf-font-display);
  font-size: 22px; font-weight: 400;
  margin-bottom: 6px;
}
.xf-modal-drag {
  width: 40px; height: 4px;
  border-radius: 2px;
  background: var(--xf-border);
  margin: 0 auto 20px;
}

/* ── PLAN CARDS ─────────────────────────────────────────── */
.xf-plans {
  display: flex; flex-direction: column; gap: 10px;
  margin: 18px 0;
}
.xf-plan-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--xf-border);
  border-radius: var(--xf-radius-sm);
  transition: var(--xf-transition);
  cursor: pointer;
}
.xf-plan-card:hover, .xf-plan-card.selected {
  border-color: var(--xf-accent);
  background: var(--xf-accent-dim);
}
.xf-plan-name { font-weight: 500; font-size: 14px; }
.xf-plan-duration { font-size: 12px; color: var(--xf-muted); }
.xf-plan-price {
  font-family: var(--xf-font-display);
  font-size: 20px; font-weight: 600;
  color: var(--xf-accent);
}

/* ── FORMULARIO RÁPIDO ──────────────────────────────────── */
.xf-form-group {
  margin-bottom: 16px;
}
.xf-form-group label {
  display: block;
  font-size: 12px; letter-spacing: 0.06em;
  color: var(--xf-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.xf-form-group input,
.xf-form-group textarea,
.xf-form-group select {
  width: 100%;
  background: var(--xf-surface-2);
  border: 1px solid var(--xf-border);
  border-radius: var(--xf-radius-sm);
  padding: 11px 14px;
  color: var(--xf-text);
  font-family: var(--xf-font-body);
  font-size: 14px;
  transition: var(--xf-transition);
  outline: none;
}
.xf-form-group input:focus,
.xf-form-group textarea:focus {
  border-color: var(--xf-accent);
  box-shadow: 0 0 0 3px rgba(200,169,110,0.1);
}
.xf-form-group textarea { resize: vertical; min-height: 90px; }

/* ── NOTIFICACIONES TOAST ───────────────────────────────── */
#xf-toast-container {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  pointer-events: none;
}
.xf-toast {
  background: var(--xf-surface);
  border: 1px solid var(--xf-border);
  border-radius: 100px;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--xf-text);
  box-shadow: var(--xf-shadow);
  animation: xfToastIn 0.3s ease forwards;
  max-width: 320px;
  text-align: center;
}
.xf-toast.success { border-color: #3d9a5c; color: #5dcb84; }
.xf-toast.error   { border-color: var(--xf-danger); color: var(--xf-danger); }

@keyframes xfToastIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── ADMIN DASHBOARD WIDGETS ─────────────────────────────── */
.xf-admin-wrap { font-family: var(--xf-font-body); }
.xf-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.xf-stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
}
.xf-stat-card-label { font-size: 12px; color: #6b7280; letter-spacing: 0.05em; text-transform: uppercase; }
.xf-stat-card-value { font-size: 32px; font-weight: 700; color: #111827; margin-top: 6px; }

/* ── CREATOR DASHBOARD ───────────────────────────────────── */
.xf-creator-dashboard {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
}
.xf-dashboard-header {
  margin-bottom: 28px;
}
.xf-dashboard-header h2 {
  font-family: var(--xf-font-display);
  font-size: 32px; font-weight: 300;
  color: var(--xf-text);
}

/* ── UPLOAD ZONE ─────────────────────────────────────────── */
.xf-upload-zone {
  border: 2px dashed var(--xf-border);
  border-radius: var(--xf-radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--xf-transition);
}
.xf-upload-zone:hover,
.xf-upload-zone.drag-over {
  border-color: var(--xf-accent);
  background: var(--xf-accent-dim);
}
.xf-upload-icon { font-size: 40px; margin-bottom: 14px; opacity: 0.5; }
.xf-upload-text { font-size: 14px; color: var(--xf-muted); }
.xf-upload-zone input[type="file"] { display: none; }

/* ── SPINNER ─────────────────────────────────────────────── */
.xf-spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(220,41,41,0.3);
  border-top-color: var(--xf-accent);
  border-radius: 50%;
  animation: xfSpin 0.7s linear infinite;
}
@keyframes xfSpin { to { transform: rotate(360deg); } }

/* ── INFINITE SCROLL SENTINEL ────────────────────────────── */
#xf-feed-sentinel { height: 60px; }
.xf-feed-loading {
  display: flex; justify-content: center;
  padding: 20px;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (min-width: 768px) {
  .xf-feed {
    max-width: 540px;
  }
  .xf-modal {
    border-radius: var(--xf-radius);
    max-width: 440px;
    align-self: center;
    margin: auto;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .xf-modal-overlay.open .xf-modal {
    transform: scale(1);
    opacity: 1;
  }
}

@media (min-width: 1024px) {
  .xf-content-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── BLOQUEO CLIC DERECHO (básico CSS) ───────────────────── */
.xf-media-wrap {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* ── NO-JS FALLBACK ─────────────────────────────────────── */
.xf-requires-js { display: none; }

/* ═══════════════════════════════════════════════════════════
   AUTH FORMS — [xf_register] / [xf_register_creator]
   ═══════════════════════════════════════════════════════════ */

/* Wrap centrado */
.xf-auth-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px 60px;
  min-height: 60vh;
}

/* Tarjeta principal */
.xf-auth-card {
  background: var(--xf-surface, #181818);
  border: 1px solid var(--xf-border, #1e2130);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 8px 40px rgba(0,0,0,.4);
}

.xf-auth-card--wide  { max-width: 640px; }
.xf-auth-card--logged{ max-width: 360px; text-align: center; }

/* Logo / estrella */
.xf-auth-logo {
  text-align: center;
  margin-bottom: 18px;
}
.xf-auth-star {
  font-size: 36px;
  color: var(--xf-accent, #DC2929);
  display: inline-block;
  line-height: 1;
}
.xf-auth-avatar {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50%;
  border: 2px solid var(--xf-accent, #DC2929);
}

/* Títulos */
.xf-auth-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--xf-text, #f0ece4);
  text-align: center;
  margin: 0 0 6px;
  line-height: 1.2;
}
.xf-auth-subtitle {
  color: var(--xf-muted, #9ca3af);
  font-size: 14px;
  text-align: center;
  margin: 0 0 24px;
  line-height: 1.5;
}

/* Beneficios (registro creador) */
.xf-creator-benefits {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(220,41,41,.07);
  border: 1px solid rgba(220,41,41,.18);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 24px;
}
.xf-benefit {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--xf-muted, #9ca3af);
}
.xf-benefit-icon { font-size: 16px; flex-shrink: 0; }

/* Notice (éxito / error) */
.xf-auth-notice {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
  line-height: 1.5;
}
.xf-auth-notice.success {
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.3);
  color: #6ee7b7;
}
.xf-auth-notice.error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.25);
  color: #fca5a5;
}

/* Filas de campos */
.xf-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Campo individual */
.xf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.xf-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--xf-muted, #9ca3af);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.xf-field input[type="text"],
.xf-field input[type="email"],
.xf-field input[type="password"],
.xf-field select,
.xf-field textarea {
  background: rgba(255,255,255,.05) !important;
  background-color: rgba(255,255,255,.05) !important;
  border: 1px solid var(--xf-border) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  color: var(--xf-text) !important;
  transition: border-color .2s, box-shadow .2s;
  width: 100% !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  box-shadow: none !important;
}
.xf-field input[type="text"]:focus,
.xf-field input[type="email"]:focus,
.xf-field input[type="password"]:focus,
.xf-field select:focus,
.xf-field textarea:focus {
  outline: none !important;
  border-color: var(--xf-accent) !important;
  box-shadow: 0 0 0 3px rgba(220,41,41,.15) !important;
  background: rgba(220,41,41,.04) !important;
}
.xf-field select option { background: #1e1e1e; color: #f0ece4; }
.xf-field textarea { resize: vertical; min-height: 80px; }
.xf-field-hint {
  font-size: 11px;
  color: var(--xf-muted, #6b7280);
}

/* Prefijo @ en username */
.xf-input-prefix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.xf-input-prefix {
  position: absolute;
  left: 12px;
  color: var(--xf-accent, #DC2929);
  font-weight: 700;
  font-size: 15px;
  pointer-events: none;
  z-index: 1;
}
.xf-input-prefix-wrap input { padding-left: 28px; }

/* Toggle contraseña */
.xf-input-toggle-wrap {
  position: relative;
  display: flex;
}
.xf-input-toggle-wrap input { padding-right: 42px; }
.xf-pass-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer;
  color: var(--xf-muted, #6b7280);
  padding: 4px;
  display: flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  z-index: 10;
  pointer-events: all;
}
.xf-pass-toggle:hover,
.xf-pass-toggle:focus,
.xf-pass-toggle:active { color: var(--xf-accent, #DC2929); background: none !important; outline: none !important; box-shadow: none !important; }

/* Checkbox personalizado */
.xf-field-check { margin-bottom: 20px; }
.xf-check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--xf-muted, #9ca3af);
  line-height: 1.5;
}
.xf-check-label input[type="checkbox"] { display: none; }
.xf-check-box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--xf-border, #2a2d3a);
  border-radius: 4px;
  background: rgba(255,255,255,.04);
  margin-top: 2px;
  transition: background .15s, border-color .15s;
  position: relative;
}
.xf-check-label input:checked + .xf-check-box {
  background: var(--xf-accent, #DC2929);
  border-color: var(--xf-accent, #DC2929);
}
.xf-check-label input:checked + .xf-check-box::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: 2px solid #101010;
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg);
}
.xf-check-label a { color: var(--xf-accent, #DC2929); }

/* Botón submit */
.xf-btn-full { width: 100%; justify-content: center; }
.xf-auth-submit {
  position: relative;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .03em;
}
.xf-auth-submit:disabled { opacity: .6; cursor: wait; }

/* Spinner */
@keyframes xf-rotate { to { transform: rotate(360deg); } }
.xf-spin { animation: xf-rotate .8s linear infinite; }

/* Textos secundarios */
.xf-auth-terms {
  text-align: center;
  font-size: 12px;
  color: var(--xf-muted, #6b7280);
  margin-top: 12px;
  line-height: 1.5;
}
.xf-auth-terms a,
.xf-auth-switch a { color: var(--xf-accent, #DC2929); text-decoration: none; }
.xf-auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--xf-muted, #9ca3af);
  margin: 10px 0 0;
}
.xf-auth-note {
  text-align: center;
  font-size: 12px;
  color: var(--xf-muted, #6b7280);
  margin-top: 14px;
  line-height: 1.5;
}

/* Divider */
.xf-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
  color: var(--xf-muted, #3a3d4a);
  font-size: 12px;
}
.xf-auth-divider::before,
.xf-auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--xf-border, #1e2130);
}

/* Bio counter */
.xf-bio-counter { align-self: flex-end; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 560px) {
  .xf-auth-card        { padding: 28px 20px; }
  .xf-field-row        { grid-template-columns: 1fr; gap: 0; }
  .xf-auth-title       { font-size: 22px; }
}

/* ═══════════════════════════════════════════════════════════
   COMBINED AUTH FORM — [xf_auth]
   ═══════════════════════════════════════════════════════════ */

/* Tabs principales Login / Registro */
.xf-auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--xf-border, #1e2130);
  margin-bottom: 24px;
  gap: 0;
}
.xf-auth-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--xf-muted, #9ca3af);
  cursor: pointer;
  letter-spacing: .02em;
  transition: color .2s, border-color .2s;
}
.xf-auth-tab:hover  { color: var(--xf-text, #f0ece4); }
.xf-auth-tab.active {
  color: var(--xf-accent, #DC2929);
  border-bottom-color: var(--xf-accent, #DC2929);
}

/* Paneles de contenido */
.xf-auth-panel { display: none; }
.xf-auth-panel.active { display: block; }

/* Sub-tabs Consumidor / Creador */
.xf-reg-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.xf-reg-type-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--xf-border, #1e2130);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  text-align: center;
}
.xf-reg-type-tab:hover {
  border-color: rgba(220,41,41,.4);
  background: rgba(220,41,41,.05);
}
.xf-reg-type-tab.active {
  border-color: var(--xf-accent, #DC2929);
  background: rgba(220,41,41,.08);
}
.xf-reg-type-icon  { font-size: 22px; }
.xf-reg-type-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--xf-text, #f0ece4);
}
.xf-reg-type-desc  {
  font-size: 11px;
  color: var(--xf-muted, #6b7280);
}

/* Sub-panels de formulario */
.xf-reg-form-wrap { display: none; }
.xf-reg-form-wrap.active { display: block; }

/* Label row con enlace de olvidé contraseña */
.xf-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.xf-label-row label { margin: 0; }

/* Botones tipo link */
.xf-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--xf-accent, #DC2929);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.xf-link-btn:hover { opacity: .8; }

/* Panel olvidé contraseña */
.xf-back-btn {
  display: inline-block;
  margin-bottom: 14px;
  text-decoration: none;
  font-size: 13px;
}
.xf-forgot-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--xf-text, #f0ece4);
  margin: 0 0 6px;
}

/* Checkbox inline (recordarme) */
.xf-field-inline { margin-bottom: 20px; }
.xf-field-inline .xf-check-label {
  font-size: 13px;
}

@media (max-width: 400px) {
  .xf-reg-type-tabs { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════
   XFinter v4 Fixes — Avatar & Tabs
   ═══════════════════════════════════════ */

/* Profile avatar wrapper — ensures placeholder + img stack correctly */
#xfp3-av-wrap {
  width: 112px !important;
  height: 112px !important;
  position: relative !important;
  flex-shrink: 0 !important;
}
#xfp3-av {
  width: 112px !important;
  height: 112px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  border: 3px solid #0d0d0d !important;
  background: #1e1e1e !important;
  box-shadow: 0 6px 30px rgba(0,0,0,0.6) !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
}
#xfp3-av-ph {
  width: 112px !important;
  height: 112px !important;
  border-radius: 50% !important;
  background: #1e1e1e !important;
  border: 3px solid #0d0d0d !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 44px !important;
  font-weight: 700 !important;
  color: rgba(196,28,28,0.4) !important;
  box-shadow: 0 6px 30px rgba(0,0,0,0.6) !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
}
@media(max-width:640px){
  #xfp3-av-wrap { width: 84px !important; height: 84px !important; }
  #xfp3-av { width: 84px !important; height: 84px !important; font-size: 32px !important; }
  #xfp3-av-ph { width: 84px !important; height: 84px !important; font-size: 32px !important; }
}

/* Feed v4 avatar wrapper */
.xff3-av-wrap, .xff4-av-link {
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  position: relative !important;
  flex-shrink: 0 !important;
  display: block !important;
  text-decoration: none !important;
}

/* Grid items for profile — ensure aspect-ratio works with absolute positioned children */
.xfp3-gi {
  position: relative !important;
  aspect-ratio: 1/1 !important;
  overflow: hidden !important;
  background: #1a1a1a !important;
  cursor: pointer !important;
}

/* Video thumbnail in grid */
.xfp3-gi img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform .3s !important;
}
.xfp3-gi:hover img {
  transform: scale(1.06) !important;
}

/* Search card thumb fix */
.xfsr3-thumb {
  aspect-ratio: 1/1 !important;
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(135deg, #1c1c1c, #0e0e0e) !important;
}