@import './tokens.css';

/* =========================================================
   1. RESET Y CONFIGURACIÓN BASE (ZERO-LAG ENGINE)
========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden {
  display: none !important;
}

html, body {
  background-color: var(--bg-dark);
}

body {
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  line-height: 1.5;
}

/* =========================================================
   2. FONDOS AMBIENTALES ACELERADOS POR GPU (CERO FILTROS PESADOS)
========================================================= */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}

.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.42;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  animation: floatBlobs 24s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.blob-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(131, 58, 180, 0.5) 0%, rgba(131, 58, 180, 0.18) 45%, transparent 70%);
  top: -120px;
  left: -120px;
}

.blob-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(225, 48, 108, 0.42) 0%, rgba(253, 29, 29, 0.15) 45%, transparent 70%);
  bottom: -100px;
  right: -100px;
  animation-duration: 28s;
  animation-delay: -5s;
}

.blob-3 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(252, 176, 69, 0.32) 0%, rgba(240, 148, 51, 0.1) 45%, transparent 70%);
  top: 35%;
  left: 25%;
  animation-duration: 32s;
  animation-delay: -10s;
}

@keyframes floatBlobs {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(70px, 45px, 0) scale(1.08); }
  100% { transform: translate3d(-50px, 80px, 0) scale(0.96); }
}

/* =========================================================
   3. LAYOUT PRINCIPAL COMPACTO & HEADER
========================================================= */
.app-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Header */
header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.badge-header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-accent);
}

/* Conmutador de Idioma ES / EN */
.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.lang-switch-btn:hover {
  background: rgba(225, 48, 108, 0.18);
  border-color: var(--ig-pink);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(225, 48, 108, 0.3);
}

.lang-active {
  color: var(--ig-gold);
  font-weight: 800;
}

.lang-divider {
  color: var(--text-dim);
  font-size: 0.7rem;
}

.lang-inactive {
  color: var(--text-dim);
}

/* Clases Utilitarias para Eliminar Estilos en Línea */
.icon-xs {
  width: 14px;
  height: 14px;
}

.icon-sm {
  width: 18px;
  height: 18px;
}

.icon-md {
  width: 21px;
  height: 21px;
}

.icon-btn {
  width: 15px;
  height: 15px;
}

.icon-plus {
  width: 13px;
  height: 13px;
}

.icon-pink {
  color: var(--ig-pink);
}

.icon-gold {
  color: var(--ig-gold);
}

.icon-verified {
  width: 12px;
  height: 12px;
  color: #fff;
  stroke-width: 3.5;
}

.modal-filter-icon {
  width: 20px;
  height: 20px;
  color: var(--ig-pink);
}

.label-hint {
  font-weight: normal;
  font-size: 0.76rem;
  color: var(--text-dim);
}

.pills-hint {
  font-size: 0.74rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 0.85rem;
  margin-bottom: 1rem;
}

.stat-pill-end {
  align-items: flex-end;
}

.btn-rerun {
  width: auto;
  padding: 0.75rem 1.4rem;
}

.btn-winner-action {
  padding: 0.75rem 1.2rem;
}

.chip-overflow {
  background: rgba(252, 176, 69, 0.15);
  border-color: rgba(252, 176, 69, 0.4);
}

.status-ready {
  color: var(--color-success);
}

.status-warning {
  color: var(--color-warning);
}

.status-dim {
  color: var(--text-dim);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--ig-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
}

p.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 580px;
}

/* =========================================================
   4. TARJETA GLASSMORPHISM & PESTAÑAS
========================================================= */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-normal), background var(--transition-normal), box-shadow var(--transition-normal);
}

/* En Fase 2 (Previsualización), se oculta la tarjeta exterior para que solo aparezca la tarjeta de Instagram limpia */
.glass-card.is-phase-preview {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* =========================================================
   4.1 BARRA SUPERIOR DE CONTROL DE MODO (RÁPIDO VS AVANZADO)
========================================================= */
.card-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--card-border);
}

.card-top-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.mode-indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
}

.glass-card.mode-quick .mode-indicator-badge {
  color: var(--ig-gold);
  border-color: rgba(252, 176, 69, 0.3);
  background: rgba(252, 176, 69, 0.08);
}

.glass-card.mode-advanced .mode-indicator-badge {
  color: var(--ig-pink);
  border-color: rgba(225, 48, 108, 0.3);
  background: rgba(225, 48, 108, 0.08);
}

.mode-switch-pill {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--card-border);
  padding: 0.2rem;
  border-radius: var(--radius-full);
  gap: 0.2rem;
}

.mode-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.mode-switch-btn:hover:not(.active) {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.mode-switch-btn.active {
  background: var(--card-bg-elevated);
  color: #fff;
  border: 1px solid var(--card-border-glow);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Modos de visualización de la tarjeta (Rápido vs Avanzado) */
.glass-card.mode-quick .tabs-nav {
  display: none;
}

.glass-card.mode-quick .stats-pills-col {
  display: none;
}

.glass-card.mode-quick .stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.65rem 1.15rem 1.25rem 1.15rem;
  padding: 0.75rem 1.15rem;
}

.glass-card.mode-quick .stat-pill-center {
  align-items: flex-start;
  text-align: left;
  padding: 0;
}

.glass-card.mode-advanced .tabs-nav {
  display: flex;
}

.glass-card.mode-advanced .stats-pills-col {
  display: flex;
  flex-direction: column;
}

.tabs-nav {
  display: flex;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex: 1;
  padding: 0.7rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: calc(var(--radius-md) - 0.2rem);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  user-select: none;
}

.tab-btn:hover:not(.active) {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  background: var(--card-bg-elevated);
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-border);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   5. CAMPOS DE ENTRADA Y TEXTAREA
========================================================= */
.input-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

input[type="text"],
input[type="number"],
input[type="password"],
textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.05rem;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input::placeholder, textarea::placeholder {
  color: var(--text-dim);
}

input:focus, textarea:focus {
  border-color: var(--ig-pink);
  box-shadow: 0 0 0 3px rgba(225, 48, 108, 0.25);
}

/* =========================================================
   6. BARRA DE ACCIONES PARA PARTICIPANTES
========================================================= */
.actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.action-buttons-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.actions-bar .btn-secondary {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.actions-bar .btn-secondary .icon-btn {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.actions-bar .btn-secondary:hover:not(:disabled) .icon-btn {
  transform: scale(1.08);
}

.btn-secondary {
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
  user-select: none;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-secondary.active {
  background: rgba(225, 48, 108, 0.18);
  border-color: rgba(225, 48, 108, 0.55);
  color: #fff;
  box-shadow: 0 0 16px rgba(225, 48, 108, 0.3);
}

.btn-secondary.active:hover {
  background: rgba(225, 48, 108, 0.28);
  border-color: rgba(225, 48, 108, 0.75);
}

/* Estado activo Rojo (para Quitar Duplicados cuando está activado) */
.btn-secondary.active-red,
.btn-secondary.danger.active {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.75);
  color: #fca5a5;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.38);
}

.btn-secondary.active-red:hover:not(:disabled),
.btn-secondary.danger.active:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.32);
  border-color: rgba(239, 68, 68, 0.95);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.55);
  color: #fff;
}

.btn-secondary.active-red .icon-btn,
.btn-secondary.danger.active .icon-btn {
  color: #fca5a5;
}

.btn-secondary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary.danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* =========================================================
   7. SISTEMA DE PÍLDORAS / CHIPS INTERACTIVAS (HERENCIA OPCIÓN B)
========================================================= */
.pills-wrapper {
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.pills-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pills-count-badge {
  color: var(--ig-gold);
  font-weight: 700;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-height: 180px;
  overflow-y: auto;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  contain: content;
}

.chips-container::-webkit-scrollbar {
  width: 6px;
}

.chips-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.chips-empty-hint {
  font-size: 0.82rem;
  color: var(--text-dim);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0;
}

.participant-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full);
  padding: 0.28rem 0.65rem 0.28rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  animation: popChip 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  transition: background var(--transition-fast);
}

.participant-chip:hover {
  background: rgba(255, 255, 255, 0.15);
}

.chip-handle {
  font-weight: 600;
  color: #fff;
}

.chip-remove {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  line-height: 1;
  transition: all var(--transition-fast);
}

.chip-remove:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

@keyframes popChip {
  0% { transform: scale(0.65); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* =========================================================
   8. OPCIONES Y FILTROS ADICIONALES
========================================================= */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
  margin: 1.25rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.checkbox-container:hover {
  color: var(--text-main);
}

.checkbox-container input {
  accent-color: var(--ig-pink);
  width: 17px;
  height: 17px;
  cursor: pointer;
}

/* =========================================================
   9. BARRA DE ESTADO Y PÍLDORAS
========================================================= */
.stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  background: rgba(255, 255, 255, 0.025);
  margin: 0.65rem 1.15rem 1.25rem 1.15rem;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

.stats-pills-col {
  flex: 1;
  min-width: 0;
  max-width: 54%;
}

.stats-pills-col .pills-header {
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.pills-header-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participants-view-toggle {
  display: inline-flex;
  gap: 0.2rem;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  flex-shrink: 0;
}

.view-toggle-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all var(--transition-fast);
  user-select: none;
}

.view-toggle-btn:hover:not(.active) {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.view-toggle-btn.active {
  background: rgba(225, 48, 108, 0.25);
  color: #fff;
  border-color: rgba(225, 48, 108, 0.5);
}

.stats-pills-col .chips-container {
  max-height: 85px;
  overflow-y: auto;
  padding: 0.4rem 0.55rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
}

/* Lista Limpia de Participantes (Sin botones ✕) */
.clean-participants-list {
  max-height: 85px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.4rem 0.55rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  contain: content;
}

.clean-participants-list::-webkit-scrollbar {
  width: 5px;
}

.clean-participants-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.clean-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0.45rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  border-left: 2px solid var(--ig-pink);
}

.clean-list-user {
  font-weight: 700;
  color: #fff;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.clean-list-comment {
  font-size: 0.72rem;
  color: var(--text-dim);
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: italic;
  text-align: right;
}

.clean-list-empty {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  padding: 0.6rem;
}

.stat-pill {
  display: flex;
  flex-direction: column;
}

.stat-pill > span:first-child {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

#raffleStatusText {
  display: none !important;
}

.stat-pill-center {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  padding: 0 0.5rem;
  flex-shrink: 0;
}

.stat-pill-center span:first-child {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

#participantCount {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  line-height: 1.1;
  margin-top: 0.2rem;
}

/* Grupo de 4 iconos de filtros rápidos en la posición del estado de sorteo */
.stat-pill-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.stat-pill-actions .btn-secondary {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.stat-pill-actions .btn-secondary .icon-btn {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.stat-pill-actions .btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.stat-pill-actions .btn-secondary:hover:not(:disabled) .icon-btn {
  transform: scale(1.08);
}

.stat-pill-actions .btn-secondary.active {
  background: rgba(225, 48, 108, 0.15);
  color: var(--ig-pink);
  border-color: rgba(225, 48, 108, 0.4);
}

.stat-pill-actions .btn-secondary.active-red {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.45);
}

.stat-pill-actions .btn-secondary.danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.45);
}

/* =========================================================
   10. RULETA DIGITAL CON MIRA LÁSER (HIGH-PERFORMANCE)
========================================================= */
.roulette-box {
  background: radial-gradient(circle at center, rgba(32, 18, 48, 0.88), rgba(9, 10, 15, 0.98));
  border: 2px solid rgba(225, 48, 108, 0.45);
  border-radius: var(--radius-lg);
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin: 1.25rem 0;
  box-shadow: inset 0 0 45px rgba(0, 0, 0, 0.85), var(--shadow-glow);
  contain: paint;
}

.roulette-target {
  position: absolute;
  width: 100%;
  height: 56px;
  border-top: 1.5px dashed rgba(225, 48, 108, 0.55);
  border-bottom: 1.5px dashed rgba(225, 48, 108, 0.55);
  background: linear-gradient(90deg, transparent, rgba(225, 48, 108, 0.08), transparent);
  pointer-events: none;
}

.roulette-name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  text-align: center;
  text-shadow: 0 0 20px rgba(225, 48, 108, 0.7);
  will-change: transform;
  transform: translate3d(0, 0, 0);
  padding: 0 1rem;
}

.roulette-name.pulse {
  animation: winnerGlow 1.2s infinite alternate;
}

@keyframes winnerGlow {
  0% { transform: scale(1); text-shadow: 0 0 18px var(--ig-gold); }
  100% { transform: scale(1.06); text-shadow: 0 0 35px var(--ig-pink); }
}

/* Barra Rápida de Configuración de Ganadores y Suplentes */
.raffle-quick-options-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: -0.25rem 0 1.25rem 0;
  flex-wrap: wrap;
}

.quick-option-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.quick-option-badge:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.quick-option-label {
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.quick-option-select {
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast);
}

.quick-option-select:focus {
  border-color: var(--ig-gold);
}

/* =========================================================
   11. BOTÓN PRINCIPAL DE LANZAMIENTO (CTA)
========================================================= */
.btn-gradient {
  width: 100%;
  padding: 1.05rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--ig-gradient);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  box-shadow: 0 12px 28px -5px rgba(220, 39, 67, 0.45);
  user-select: none;
}

.btn-gradient:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -5px rgba(220, 39, 67, 0.65);
  background: var(--ig-gradient-hover);
}

.btn-gradient:active:not(:disabled) {
  transform: translateY(0);
}

.btn-gradient:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Indicador de Ganadores Excluidos */
.past-winners-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: rgba(252, 176, 69, 0.12);
  border: 1px solid rgba(252, 176, 69, 0.35);
  border-radius: var(--radius-full, 9999px);
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffc97a;
  margin: 0.75rem auto 0;
  width: fit-content;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-fast, 0.2s ease);
}

.past-winners-badge.hidden {
  display: none;
}

.past-winners-text {
  letter-spacing: -0.01em;
}

.btn-reset-history {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(252, 176, 69, 0.3);
  color: #ffc97a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin-left: 0.25rem;
  transition: transform 0.25s ease, background 0.2s ease, color 0.2s ease;
}

.btn-reset-history:hover {
  transform: rotate(-180deg);
  background: rgba(252, 176, 69, 0.25);
  color: #fff;
}

/* =========================================================
   11.1 MODO ESCENARIO TEATRAL DE SORTEO (FOCUS MODE)
   Al pulsar "¡Comenzar Sorteo!", todos los controles secundarios
   se desvanecen suavemente y la ruleta se convierte en protagonista
   absoluta en el centro de la pantalla.
========================================================= */

/* Transiciones fluidas para todos los elementos colapsables de Fase 3 */
.raffle-freemium-banner,
.stats-bar,
.tabs-nav,
.raffle-quick-options-row,
#btnStart,
#pastWinnersBadge {
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              margin 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 400px;
}

/* Colapso fluido de elementos durante el giro */
.raffle-stage-mode .raffle-freemium-banner,
.raffle-stage-mode .stats-bar,
.raffle-stage-mode .tabs-nav,
.raffle-stage-mode .raffle-quick-options-row,
.raffle-stage-mode #btnStart,
.raffle-stage-mode #pastWinnersBadge {
  opacity: 0 !important;
  max-height: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-width: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transform: translateY(-8px) scale(0.98);
}

.raffle-stage-mode .mode-switch-pill {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.raffle-stage-mode .card-top-bar {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  border-bottom-color: transparent !important;
  margin: 0 auto 0.5rem auto !important;
  width: 100% !important;
  transition: all 0.4s ease;
}

.raffle-stage-mode .loaded-post-pill {
  max-width: 100% !important;
  margin: 0 auto !important;
  justify-content: center !important;
}

/* Cabecera Escénica "EN VIVO" */
.raffle-stage-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              margin 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.raffle-stage-mode .raffle-stage-header {
  opacity: 1;
  max-height: 70px;
  margin: 1.25rem 0 0.5rem 0;
  transform: translateY(0);
}

.stage-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-full);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.3);
}

.stage-live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulseLiveDot 1s infinite alternate ease-in-out;
}

@keyframes pulseLiveDot {
  0% { transform: scale(0.85); opacity: 0.7; }
  100% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #ef4444; }
}

.stage-live-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Ruleta protagonista en modo escenario */
.raffle-stage-mode .roulette-box {
  height: 220px;
  margin: 1.25rem 0 2rem 0;
  border: 2px solid rgba(225, 48, 108, 0.85);
  background: radial-gradient(circle at center, rgba(42, 18, 58, 0.96), rgba(9, 10, 16, 0.99));
  box-shadow: 0 0 55px rgba(225, 48, 108, 0.45), inset 0 0 50px rgba(0, 0, 0, 0.9);
  transform: scale(1.02);
  transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.raffle-stage-mode .roulette-target {
  height: 72px;
  border-top: 2px dashed rgba(225, 48, 108, 0.75);
  border-bottom: 2px dashed rgba(225, 48, 108, 0.75);
  background: linear-gradient(90deg, transparent, rgba(225, 48, 108, 0.14), transparent);
}

.raffle-stage-mode .roulette-name {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  text-shadow: 0 0 28px rgba(225, 48, 108, 0.9), 0 0 55px rgba(240, 148, 51, 0.55);
}

@media (max-width: 640px) {
  .raffle-stage-mode .roulette-box {
    height: 160px;
    margin: 1rem 0 1.5rem 0;
  }
  .raffle-stage-mode .roulette-name {
    font-size: clamp(1.4rem, 6vw, 2.1rem);
  }
}

/* =========================================================
   12. MODAL DE REVELACIÓN DE GANADOR (OVERLAY GLASSMORPHISM)
========================================================= */
.winner-modal-card {
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(48, 16, 40, 0.97), rgba(12, 11, 20, 0.99));
  border: 2px solid rgba(225, 48, 108, 0.55);
  border-radius: var(--radius-lg);
  box-shadow: 0 35px 85px -10px rgba(0, 0, 0, 0.9), 0 0 65px rgba(225, 48, 108, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  max-width: 500px;
  width: 100%;
  padding: 2.25rem 2rem 2rem;
  text-align: center;
  overflow: hidden;
  animation: popInWinnerModal 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popInWinnerModal {
  0% { transform: scale(0.82) translateY(24px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.winner-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 20;
}

.winner-modal-close:hover {
  background: rgba(225, 48, 108, 0.25);
  border-color: var(--ig-pink);
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 0 16px rgba(225, 48, 108, 0.5);
}

.winner-modal-glow {
  position: absolute;
  top: -65px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 160px;
  background: radial-gradient(circle, rgba(225, 48, 108, 0.45) 0%, rgba(252, 176, 69, 0.18) 45%, transparent 70%);
  pointer-events: none;
}

.trophy-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.2rem;
  position: relative;
}

.trophy-icon {
  font-size: 2.8rem;
  line-height: 1;
  display: inline-block;
  animation: bounceTrophy 1.2s infinite alternate ease-in-out;
  text-shadow: 0 0 20px rgba(252, 176, 69, 0.7);
}

@keyframes bounceTrophy {
  from { transform: translateY(0) rotate(-4deg); }
  to { transform: translateY(-7px) rotate(4deg); }
}

.winner-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

/* Contenedor del Avatar y Anillo de Instagram Stories */
.winner-avatar-wrapper {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0 auto 0.95rem;
}

.avatar-story-ring {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--ig-gradient);
  padding: 3.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 28px rgba(225, 48, 108, 0.55), 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: pulseAvatarRing 2.4s infinite alternate ease-in-out;
}

@keyframes pulseAvatarRing {
  0% { transform: scale(1); box-shadow: 0 0 20px rgba(225, 48, 108, 0.45); }
  100% { transform: scale(1.04); box-shadow: 0 0 38px rgba(252, 176, 69, 0.7); }
}

.winner-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #0f1118;
  background: #181a28;
  display: block;
  opacity: 1;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.winner-avatar-img.hidden {
  display: none;
  opacity: 0;
}

.winner-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid #0f1118;
  background: #e1306c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  animation: pulseAvatarRing 1.8s infinite alternate ease-in-out;
}

.winner-avatar-fallback.hidden {
  display: none;
}

.avatar-verified-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0095f6;
  border: 2.5px solid #0f1118;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.winner-username {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  color: var(--ig-gold);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  text-shadow: 0 0 28px rgba(252, 176, 69, 0.6);
  word-break: break-word;
}

/* Caja de Comentario Condicional */
.winner-comment-box {
  position: relative;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(225, 48, 108, 0.35);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem 0.85rem 2.2rem;
  margin: 0 auto 1.35rem;
  max-width: 440px;
  text-align: left;
  animation: fadeIn 0.25s ease-out;
}

.comment-quote-mark {
  position: absolute;
  top: 0.35rem;
  left: 0.75rem;
  font-family: serif;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ig-pink);
  opacity: 0.85;
}

.winner-comment-text {
  font-style: italic;
  color: var(--text-main);
  font-size: 0.88rem;
  line-height: 1.42;
  margin: 0;
  word-break: break-word;
}

.winner-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-rerun {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(225, 48, 108, 0.35);
}

.btn-download-acta {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-download-acta:hover {
  background: rgba(225, 48, 108, 0.15);
  border-color: rgba(225, 48, 108, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(225, 48, 108, 0.28);
  color: #fff;
}


/* =========================================================
   13. SISTEMA DE TOASTS LIGEROS (CERO LAG FEEDBACK)
========================================================= */
#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.65rem 1.1rem;
  background: rgba(18, 20, 32, 0.96);
  border: 1px solid var(--card-border);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

.toast.success { border-color: rgba(16, 185, 129, 0.4); }
.toast.info { border-color: rgba(225, 48, 108, 0.4); }

.toast.fade-out {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

@keyframes slideToast {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* =========================================================
   14. RESPONSIVE Y MEJORAS TÁCTILES
========================================================= */
@media (max-width: 640px) {
  .app-container {
    padding: 1.5rem 1rem 2.5rem;
    gap: 1.25rem;
  }
  .glass-card {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }
  .actions-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .action-buttons-group {
    width: auto;
  }
  .action-buttons-group .btn-secondary {
    flex: initial;
  }
  .roulette-box {
    height: 140px;
  }
  .stats-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }
  .stats-pills-col {
    max-width: 100%;
  }
  .stat-pill-center,
  .stat-pill-end {
    align-items: center;
    text-align: center;
    padding: 0;
  }
}

/* =========================================================
   15. MODAL DE MENCIÓN OBLIGATORIA (GLASSMORPHISM)
========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(4, 5, 9, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 1;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-card {
  background: var(--card-bg-elevated);
  border: 1px solid var(--card-border-glow);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(225, 48, 108, 0.25);
  max-width: 460px;
  width: 100%;
  padding: 1.75rem;
  animation: popInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popInModal {
  from { transform: scale(0.92) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.modal-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

.mention-input-box {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.mention-input-box:focus-within {
  border-color: var(--ig-pink);
  box-shadow: 0 0 0 3px rgba(225, 48, 108, 0.25);
}

.at-addon {
  padding: 0.85rem 0.2rem 0.85rem 1.1rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ig-pink);
  user-select: none;
}

.mention-text-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 0.85rem 1rem 0.85rem 0.35rem !important;
  color: #fff !important;
  font-family: var(--font-sans);
  font-size: 1.05rem !important;
  font-weight: 600;
  outline: none !important;
  box-shadow: none !important;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
}

.modal-submit-btn {
  width: auto !important;
  padding: 0.7rem 1.35rem !important;
  font-size: 0.92rem !important;
}

/* =========================================================
   16. PANEL DE FILTROS: MENCIONES Y TEXTO (PÍLDORAS DINÁMICAS)
========================================================= */
.filters-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.1rem;
  contain: content;
}

.filter-section {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 230px;
}

.filter-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.filter-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
}

.btn-circle-add {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  line-height: 1;
}

.btn-circle-add:hover:not(:disabled) {
  background: var(--ig-pink);
  border-color: var(--ig-pink);
  transform: scale(1.12);
  box-shadow: 0 0 12px rgba(225, 48, 108, 0.5);
}

.btn-circle-add:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.filter-pills-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-placeholder-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.6rem 0.22rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
  border: 1px solid transparent;
  animation: popChip 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Estado ACTIVO: Señalada y filtrando */
.filter-pill.active.type-mention {
  background: rgba(225, 48, 108, 0.22);
  border-color: rgba(225, 48, 108, 0.65);
  color: #fff;
  box-shadow: 0 0 12px rgba(225, 48, 108, 0.35);
}

.filter-pill.active.type-text {
  background: rgba(252, 176, 69, 0.22);
  border-color: rgba(252, 176, 69, 0.65);
  color: #fff;
  box-shadow: 0 0 12px rgba(252, 176, 69, 0.35);
}

/* Estado INACTIVO: Deseleccionada / Pausada */
.filter-pill.inactive {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  color: var(--text-dim);
  opacity: 0.7;
}

.filter-pill.inactive:hover {
  opacity: 0.95;
  border-color: rgba(255, 255, 255, 0.45);
}

.filter-pill-remove {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: all 0.15s;
}

.filter-pill-remove:hover {
  opacity: 1;
  color: #fca5a5;
  transform: scale(1.25);
}

.filter-divider {
  width: 1px;
  height: 26px;
  background: var(--card-border);
}

@media (max-width: 640px) {
  .filter-divider {
    display: none;
  }
  .filter-section {
    width: 100%;
  }
}

/* =========================================================
   17. BARRA DE RESUMEN DE FILTROS & SELECTOR DE TIPO EN MODAL
========================================================= */
.filter-summary-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  margin-bottom: 1.1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.filter-summary-bar.has-filters {
  background: rgba(225, 48, 108, 0.1);
  border-color: rgba(225, 48, 108, 0.35);
  color: #fff;
}

.filter-summary-bar.has-filters b {
  color: var(--ig-gold);
}

.modal-type-selector {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

.type-selector-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  border-radius: calc(var(--radius-md) - 0.2rem);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.type-selector-btn:hover:not(.active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.type-selector-btn.active {
  background: var(--card-bg-elevated);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(225, 48, 108, 0.5);
}

/* =========================================================
   18. SECCIÓN Y PESTAÑA DEDICADA: FILTROS & REGLAS
========================================================= */
.btn-help-interrogation {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.3), rgba(131, 58, 180, 0.45));
  border: 1.5px solid rgba(225, 48, 108, 0.65);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(225, 48, 108, 0.4);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  padding: 0;
}

.btn-help-interrogation:hover {
  transform: scale(1.12) rotate(8deg);
  border-color: var(--ig-gold);
  box-shadow: 0 0 24px rgba(252, 176, 69, 0.65);
}

.help-question-mark {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  font-family: var(--font-display);
  color: #fff;
}

.filters-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--card-border);
}

.filters-tab-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.25rem;
}

.filters-tab-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.filters-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.filter-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.filter-card:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-card-wide {
  grid-column: 1 / -1;
}

.filter-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.filter-card-title-box {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.filter-card-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
}

.filter-card-hint {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.filter-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast);
}

.filter-select:focus {
  border-color: var(--ig-pink);
  box-shadow: 0 0 10px rgba(225, 48, 108, 0.35);
}

.filter-datetime-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  padding: 0.45rem 0.65rem;
  outline: none;
  color-scheme: dark;
}

.filter-datetime-input:focus {
  border-color: var(--ig-gold);
  box-shadow: 0 0 10px rgba(252, 176, 69, 0.35);
}

.filter-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  cursor: pointer;
}

.filter-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  transition: 0.25s;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: 0.25s;
}

.filter-switch input:checked + .switch-slider {
  background: linear-gradient(135deg, var(--ig-pink), var(--ig-gold));
  border-color: var(--ig-pink);
}

.filter-switch input:checked + .switch-slider:before {
  transform: translateX(16px);
}

.filter-winners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 0.35rem;
}

.filter-winner-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.filters-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.85rem;
  border-top: 1px solid var(--card-border);
}

.filters-footer-bar .filter-summary-bar {
  margin-bottom: 0;
  flex: 1;
  min-width: 260px;
}

/* Variantes de Píldoras de Filtro (Bloqueados / Blacklist) */
.filter-pill.active.type-blockedText,
.filter-pill.active.type-blockedUser {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.65);
  color: #fca5a5;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}

.btn-circle-add.danger:hover:not(:disabled) {
  background: #ef4444;
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.icon-red {
  color: #ef4444;
}

/* =========================================================
   19. MODAL DE GUÍA Y AYUDA DE FILTROS CON EJEMPLOS
========================================================= */
.filter-help-card-container {
  max-width: 820px !important;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.help-modal-header-text {
  flex: 1;
}

.help-title-icon {
  font-size: 1.3rem;
  margin-right: 0.35rem;
}

.filter-help-scroll-area {
  overflow-y: auto;
  padding-right: 0.5rem;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 56vh;
}

.filter-help-scroll-area::-webkit-scrollbar {
  width: 6px;
}

.filter-help-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.help-guide-item {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: border-color var(--transition-fast);
}

.help-guide-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.help-item-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.help-item-header h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.help-item-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.help-example-box {
  margin-top: 0.35rem;
  background: rgba(0, 0, 0, 0.45);
  border-left: 3px solid var(--ig-gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.6rem 0.85rem;
  position: relative;
}

.example-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ig-gold);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.25rem;
}

.example-text {
  font-family: var(--font-sans);
  font-size: 0.79rem;
  color: #e2e8f0;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.help-modal-footer {
  padding-top: 0.6rem;
  border-top: 1px solid var(--card-border);
}

/* =========================================================
   20. GANADORES ADICIONALES Y SUPLENTES EN MODAL RESULTADO
========================================================= */
.winner-extra-section {
  width: 100%;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--card-border);
}

.winner-section-subtitle {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ig-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.55rem;
  text-align: left;
}

.winner-extra-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.winner-extra-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
}

.winner-extra-user-col {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.winner-extra-avatar-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  padding: 1.5px;
  background: var(--ig-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(225, 48, 108, 0.4);
}

.winner-extra-avatar-wrap.alternate {
  background: linear-gradient(45deg, #f09433, #e6683c, #bc1888);
  box-shadow: 0 0 8px rgba(240, 148, 51, 0.4);
}

.winner-extra-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #0f1118;
  display: block;
}

.winner-extra-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid #0f1118;
  background: #e1306c !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: #ffffff !important;
}

.winner-extra-avatar-fallback.alternate {
  background: #e1306c !important;
  color: #ffffff !important;
}

.winner-extra-user {
  font-weight: 700;
  color: #fff;
}

.winner-extra-comment {
  font-size: 0.76rem;
  color: var(--text-dim);
  font-style: italic;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner-extra-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(225, 48, 108, 0.2);
  color: #f687b3;
  border: 1px solid rgba(225, 48, 108, 0.4);
}

.winner-extra-badge.alternate {
  background: rgba(252, 176, 69, 0.2);
  color: #fbd38d;
  border-color: rgba(252, 176, 69, 0.4);
}

/* =========================================================
   21. ARQUITECTURA DE 3 FASES LINEALES (INGESTA -> POST CARD -> SORTEO)
========================================================= */
.app-phase {
  display: block;
  width: 100%;
  animation: phaseEnter 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.app-phase.hidden {
  display: none !important;
}

@keyframes phaseEnter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------------------------------------------------------
   FASE 1: HERO DE ENTRADA Y FORMULARIO DE URL
--------------------------------------------------------- */
.input-hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 2rem);
  gap: 1.25rem;
}

.input-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(225, 48, 108, 0.12);
  border: 1px solid rgba(225, 48, 108, 0.35);
  font-size: 0.76rem;
  font-weight: 700;
  color: #f687b3;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.input-hero-subtitle {
  font-size: clamp(0.85rem, 1.4vw, 0.96rem);
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.55;
  margin-top: -0.35rem;
}

.input-hero-form {
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  text-align: left;
  margin-top: 0.5rem;
}

.input-hero-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-hero-wrapper input {
  width: 100%;
  padding: 1rem 1.1rem 1rem 2.85rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.input-hero-wrapper input:focus {
  background: rgba(0, 0, 0, 0.75);
  border-color: rgba(225, 48, 108, 0.75);
  box-shadow: 0 0 0 3px rgba(225, 48, 108, 0.22);
  outline: none;
}

.input-hero-wrapper .input-icon-left {
  position: absolute;
  left: 1rem;
  color: var(--text-dim);
  pointer-events: none;
}

.input-hero-footer {
  margin-top: 0.5rem;
}

.btn-text-link {
  background: transparent;
  border: none;
  color: var(--ig-gold);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  opacity: 0.85;
  transition: all var(--transition-fast);
}

.btn-text-link:hover {
  opacity: 1;
  color: #fff;
  text-shadow: 0 0 10px rgba(252, 176, 69, 0.4);
}

.btn-instagram-oauth {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  margin-top: 0.85rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(225, 48, 108, 0.45);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.btn-instagram-oauth:hover {
  background: rgba(225, 48, 108, 0.14);
  border-color: rgba(225, 48, 108, 0.85);
  transform: translateY(-1px);
}

.oauth-helper-note {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ---------------------------------------------------------
   FASE 2: TARJETA DE PREVISUALIZACIÓN DE INSTAGRAM
--------------------------------------------------------- */
.preview-hero-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(0.5rem, 2vw, 1.5rem) 0;
}

.ig-post-card {
  width: 100%;
  max-width: 480px;
  background: rgba(14, 16, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 45px rgba(225, 48, 108, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  backdrop-filter: blur(16px);
}

.ig-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.75), 0 0 55px rgba(225, 48, 108, 0.2);
}

.ig-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.ig-author-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ig-avatar-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ig-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0e1018;
}

.ig-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #1e2230;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0e1018;
}

.ig-author-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.ig-username-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ig-username {
  font-weight: 700;
  font-size: 0.94rem;
  color: #fff;
}

.verified-badge {
  color: #38bdf8;
  fill: #38bdf8;
  width: 15px;
  height: 15px;
}

.ig-post-badge {
  font-size: 0.7rem;
  color: var(--ig-gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ig-more-dots {
  color: var(--text-dim);
  font-weight: bold;
  letter-spacing: 0.15em;
  font-size: 0.9rem;
}

.ig-media-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 420px;
  background: #06070a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ig-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.ig-post-card:hover .ig-media-img {
  transform: scale(1.02);
}

.ig-media-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.ig-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

.ig-interactions-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ig-stat-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition-fast);
}

.ig-stat-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

.ig-heart-icon {
  font-size: 1.15rem;
  filter: drop-shadow(0 0 6px rgba(225, 48, 108, 0.6));
  animation: heartPulse 2.8s infinite ease-in-out;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.22); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
}

.ig-comment-icon {
  font-size: 1.1rem;
}

.ig-stat-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.ig-stat-number {
  font-weight: 800;
  font-size: 0.92rem;
  color: #fff;
}

.ig-stat-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.ig-caption-box {
  padding: 0.95rem 1.15rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #cbd5e1;
  max-height: 110px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.ig-caption-author {
  color: #fff;
  font-weight: 700;
  margin-right: 0.45rem;
}

.ig-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* =========================================================
   SKELETON LOADER PRO — ESTILO INSTAGRAM GLASSMORPHISM
========================================================= */
.ig-skeleton-card {
  position: relative;
  border-color: rgba(225, 48, 108, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(225, 48, 108, 0.16);
  animation: skeletonCardPulse 3s ease-in-out infinite;
}

@keyframes skeletonCardPulse {
  0%, 100% {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 35px rgba(225, 48, 108, 0.12);
  }
  50% {
    border-color: rgba(225, 48, 108, 0.38);
    box-shadow: 0 28px 75px rgba(0, 0, 0, 0.85), 0 0 50px rgba(225, 48, 108, 0.28);
  }
}

/* Efecto Shimmer de Onda Multicapa */
.skeleton-shimmer {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.skeleton-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 15%,
    rgba(255, 255, 255, 0.08) 35%,
    rgba(225, 48, 108, 0.22) 50%,
    rgba(252, 176, 69, 0.15) 60%,
    rgba(255, 255, 255, 0.08) 75%,
    transparent 100%
  );
  animation: igSkeletonWave 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes igSkeletonWave {
  0% {
    transform: translateX(-100%);
  }
  60%, 100% {
    transform: translateX(100%);
  }
}

/* 1. Cabecera Skeleton */
.ig-skeleton-header {
  pointer-events: none;
}

.skeleton-avatar-ring {
  background: linear-gradient(45deg, rgba(240, 148, 51, 0.4), rgba(220, 39, 67, 0.5), rgba(188, 24, 136, 0.4));
  animation: skeletonRingPulse 2.2s ease-in-out infinite alternate;
}

@keyframes skeletonRingPulse {
  0% {
    filter: brightness(0.85) drop-shadow(0 0 4px rgba(225, 48, 108, 0.2));
  }
  100% {
    filter: brightness(1.25) drop-shadow(0 0 10px rgba(225, 48, 108, 0.5));
  }
}

.skeleton-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #141724;
  border: 2px solid #0e1018;
}

.skeleton-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.skeleton-bar {
  display: block;
}

.skeleton-username {
  width: 120px;
  height: 14px;
  border-radius: 6px;
}

.skeleton-badge-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.25);
}

.skeleton-badge-label {
  width: 85px;
  height: 10px;
  border-radius: 4px;
}

.skeleton-dots-placeholder {
  display: flex;
  align-items: center;
  gap: 5px;
}

.skeleton-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  animation: skeletonDotPulse 1.4s infinite ease-in-out;
}

.skeleton-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.skeleton-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes skeletonDotPulse {
  0%, 100% {
    opacity: 0.25;
    transform: scale(0.9);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.15);
  }
}

/* 2. Media Skeleton (1:1 Aspect Ratio) */
.ig-skeleton-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 420px;
  background: #07090e;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skeleton-media-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(28, 32, 48, 0.6) 0%, rgba(7, 9, 14, 0.95) 75%);
}

.skeleton-media-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  text-align: center;
}

.skeleton-instagram-emblem {
  position: relative;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skeleton-glow-ring {
  position: absolute;
  inset: -6px;
  border-radius: 24px;
  background: var(--ig-gradient);
  opacity: 0.45;
  filter: blur(14px);
  animation: emblemGlowPulse 2.5s ease-in-out infinite alternate;
}

@keyframes emblemGlowPulse {
  0% {
    opacity: 0.35;
    transform: scale(0.95);
  }
  100% {
    opacity: 0.65;
    transform: scale(1.08);
  }
}

.skeleton-emblem-core {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(28, 32, 48, 0.95), rgba(16, 18, 28, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.skeleton-camera-icon {
  width: 38px;
  height: 38px;
  color: #fff;
  filter: drop-shadow(0 2px 8px rgba(225, 48, 108, 0.6));
  animation: cameraFloat 3s ease-in-out infinite alternate;
}

@keyframes cameraFloat {
  0% {
    transform: translateY(0) scale(0.98);
  }
  100% {
    transform: translateY(-4px) scale(1.02);
  }
}

.skeleton-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  background: rgba(18, 21, 32, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 18px rgba(225, 48, 108, 0.16);
  backdrop-filter: blur(12px);
  max-width: 90%;
}

.skeleton-status-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--ig-pink);
  border-right-color: var(--ig-gold);
  animation: skeletonSpin 0.85s linear infinite;
  flex-shrink: 0;
}

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

.skeleton-status-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: 0.01em;
  white-space: normal;
  text-align: center;
  transition: opacity 0.3s ease;
}

.skeleton-progress-bar-wrap {
  width: 190px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.skeleton-progress-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: var(--ig-gradient);
  border-radius: 99px;
  animation: skeletonIndeterminate 1.8s ease-in-out infinite;
}

@keyframes skeletonIndeterminate {
  0% {
    left: -50%;
    width: 30%;
  }
  50% {
    left: 25%;
    width: 60%;
  }
  100% {
    left: 100%;
    width: 30%;
  }
}

/* 3. Estadísticas Skeleton (Píldoras) */
.ig-skeleton-interactions {
  pointer-events: none;
}

.skeleton-stat-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.skeleton-pill-icon {
  font-size: 1.1rem;
  opacity: 0.85;
}

.skeleton-heart-icon {
  filter: drop-shadow(0 0 5px rgba(225, 48, 108, 0.4));
  animation: heartPulse 2.8s infinite ease-in-out;
}

.skeleton-stat-num {
  width: 44px;
  height: 14px;
  border-radius: 4px;
  margin-bottom: 2px;
}

/* 4. Caption Box Skeleton */
.ig-skeleton-caption {
  pointer-events: none;
}

.skeleton-caption-line-1 {
  width: 84%;
  height: 12px;
  border-radius: 4px;
  margin-bottom: 9px;
}

.skeleton-caption-line-2 {
  width: 95%;
  height: 12px;
  border-radius: 4px;
  margin-bottom: 9px;
}

.skeleton-caption-line-3 {
  width: 58%;
  height: 12px;
  border-radius: 4px;
}

/* 5. Acciones Footer Skeleton */
.ig-skeleton-actions {
  pointer-events: none;
}

.skeleton-btn {
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.skeleton-btn-secondary {
  width: 125px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.skeleton-btn-gradient {
  width: 175px;
  background: linear-gradient(135deg, rgba(240, 148, 51, 0.22), rgba(220, 39, 67, 0.28), rgba(188, 24, 136, 0.22));
  border: 1px solid rgba(225, 48, 108, 0.35);
  box-shadow: 0 4px 16px rgba(225, 48, 108, 0.15);
}

.skeleton-btn-text {
  width: 80px;
  height: 12px;
  border-radius: 4px;
}

.skeleton-btn-text-lg {
  width: 110px;
  height: 12px;
  border-radius: 4px;
}

/* Animación de entrada fluida al revelar la tarjeta real */
.ig-card-fade-in {
  animation: igCardFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes igCardFadeIn {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------------------------------------------------------
   FASE 3: PASTILLA DEL POST CARGADO Y BARRA DE SORTEO
--------------------------------------------------------- */
.loaded-post-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: #e2e8f0;
  font-weight: 600;
  max-width: calc(100% - 190px);
}

.loaded-post-avatar-wrap {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  padding: 1.5px;
  background: var(--ig-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(225, 48, 108, 0.45);
}

.loaded-post-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #0f1118;
  display: block;
}

.loaded-post-avatar.hidden {
  display: none;
}

.loaded-post-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #181a28;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--ig-gold);
}

.loaded-post-avatar-fallback.hidden {
  display: none;
}

.loaded-post-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-pill-change {
  background: rgba(225, 48, 108, 0.2);
  border: 1px solid rgba(225, 48, 108, 0.45);
  color: #f687b3;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-pill-change:hover {
  background: rgba(225, 48, 108, 0.35);
  color: #fff;
  transform: scale(1.04);
}

@media (max-width: 640px) {
  .loaded-post-pill {
    max-width: 100%;
    order: 2;
    width: 100%;
    justify-content: space-between;
  }
  
  .card-top-bar {
    flex-wrap: wrap;
  }
}


/* =========================================================
   23. MODAL DE PAGO / PAYWALL (MODELO COMPETENCIA -50% PRECIO)
========================================================= */
.paywall-modal-card {
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(56, 16, 48, 0.98), rgba(13, 11, 22, 0.99));
  border: 2px solid rgba(225, 48, 108, 0.55);
  border-radius: var(--radius-lg);
  box-shadow: 0 35px 85px -10px rgba(0, 0, 0, 0.9), 0 0 65px rgba(131, 58, 180, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  max-width: 480px;
  width: 100%;
  padding: 2.2rem 1.75rem 1.5rem;
  text-align: center;
  overflow: hidden;
  max-height: 94vh;
  overflow-y: auto;
  animation: popInWinnerModal 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.paywall-glow {
  position: absolute;
  top: -70px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 180px;
  background: radial-gradient(circle, rgba(225, 48, 108, 0.45) 0%, rgba(131, 58, 180, 0.25) 50%, transparent 75%);
  pointer-events: none;
}

.paywall-header {
  position: relative;
  z-index: 1;
  margin-bottom: 0.85rem;
}

.paywall-eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ig-pink);
  margin-bottom: 0.35rem;
  display: block;
}

.paywall-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.paywall-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

.paywall-highlight-count {
  color: var(--ig-gold);
  font-size: 1.05rem;
  font-weight: 800;
}

.paywall-laurel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
  padding: 0.45rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  user-select: none;
}

.laurel-leaf {
  font-size: 1.35rem;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.5));
}

.laurel-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08rem;
}

.laurel-category {
  font-size: 0.66rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.laurel-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
}

.laurel-year {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.laurel-stars {
  font-size: 0.85rem;
  color: var(--ig-gold);
  letter-spacing: 0.15em;
}

.paywall-benefits-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.paywall-benefit-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.benefit-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.2), rgba(131, 58, 180, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ig-gold);
  flex-shrink: 0;
}

.benefit-icon {
  width: 17px;
  height: 17px;
}

.benefit-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.benefit-text strong {
  font-size: 0.85rem;
  color: #fff;
  font-weight: 700;
}

.benefit-text span {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.paywall-plans-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
  text-align: left;
}

.paywall-plan-card {
  position: relative;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.paywall-plan-card:hover {
  border-color: rgba(225, 48, 108, 0.5);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.paywall-plan-card.selected {
  border: 2px solid var(--ig-pink);
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.16) 0%, rgba(131, 58, 180, 0.14) 100%);
  box-shadow: 0 0 25px rgba(225, 48, 108, 0.35);
}

.plan-badge-top {
  position: absolute;
  top: -11px;
  left: 1rem;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.5);
}

.plan-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.plan-info {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  flex: 1;
}

.plan-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.plan-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.77rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.plan-bullets li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.icon-bullet {
  width: 13px;
  height: 13px;
  color: #10b981;
}

.plan-urgency {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.73rem;
  color: #f43f5e;
  font-weight: 700;
  margin-top: 0.15rem;
}

.icon-urgency {
  width: 12px;
  height: 12px;
}

.countdown-digits {
  font-family: var(--font-display);
  color: #f43f5e;
  font-weight: 800;
}

.plan-pricing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  flex-shrink: 0;
}

.plan-old-price {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

.plan-current-price {
  display: flex;
  align-items: baseline;
  gap: 0.15rem;
}

.plan-currency {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ig-gold);
}

.plan-amount {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.plan-period {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.paywall-billed-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 1.15rem 0;
  text-align: center;
}

.paywall-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}

.btn-paywall-cta {
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-md);
}

.btn-paywall-free {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-paywall-free:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.paywall-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

.btn-footer-link {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.75rem;
  text-decoration: underline;
  padding: 0;
  transition: color var(--transition-fast);
}

.btn-footer-link:hover {
  color: #fff;
}

.footer-static-link {
  color: var(--text-dim);
}

.footer-dot {
  color: var(--text-dim);
  opacity: 0.5;
}

/* =========================================================
   ELEMENTOS DE CONTROL DEL MODELO FREEMIUM / PREMIUM
========================================================= */

/* Callout en la Tarjeta de Previsualización (Fase 2) */
.ig-freemium-callout {
  margin: 0.65rem 1.15rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(240, 148, 51, 0.08);
  border: 1px solid rgba(240, 148, 51, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: all var(--transition-normal);
}

.ig-freemium-callout.is-pro {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.28);
}

.freemium-callout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.freemium-badge-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(240, 148, 51, 0.2);
  color: var(--ig-gold);
  border: 1px solid rgba(240, 148, 51, 0.35);
  text-transform: uppercase;
}

.freemium-badge-tag.is-pro-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.freemium-count-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.freemium-callout-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.freemium-callout-text {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.freemium-callout-text strong {
  color: #fff;
}

.btn-freemium-unlock {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  background: var(--ig-gradient);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 4px 14px rgba(225, 48, 108, 0.35);
  flex-shrink: 0;
}

.btn-freemium-unlock:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(225, 48, 108, 0.5);
}

/* Banner Informativo Freemium en Fase 3 (Estudio de Sorteo) */
.raffle-freemium-banner {
  margin: 0.85rem 1.15rem 0.35rem 1.15rem;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(240, 148, 51, 0.08);
  border: 1px solid rgba(240, 148, 51, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  transition: all var(--transition-normal);
}

.raffle-freemium-banner.is-pro {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.28);
}

.raffle-freemium-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 260px;
}

.raffle-freemium-text {
  font-size: 0.84rem;
  color: #e2e8f0;
  margin: 0;
  line-height: 1.45;
}

.raffle-freemium-text strong {
  color: #fff;
}

/* =========================================================
   TIPOGRAFÍA Y COLORES DEL CONTEO (EFECTIVO VS PREMIUM)
   Mismo tamaño de fuente exacto (2.15rem), diferenciando:
   - Dorado/Ámbar: Participantes efectivos activos (50)
   - Separador tenue: '/'
   - Rosa Magenta Pro: Comentarios totales en modo Premium (805)
========================================================= */
#participantCount .count-effective,
#participantCount .count-premium,
#participantCount .count-single,
#participantCount .count-pro-active {
  font-size: 2.25rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  font-family: var(--font-display) !important;
  letter-spacing: -0.02em !important;
  display: inline-block !important;
  text-transform: none !important;
}

#participantCount .count-separator {
  font-size: 2.1rem !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.28) !important;
  margin: 0 0.15rem !important;
  user-select: none !important;
  display: inline-block !important;
}

/* Efectivo (Modo Gratuito): Dorado cálido de la marca */
#participantCount .count-effective {
  color: var(--ig-gold) !important;
  text-shadow: 0 0 16px rgba(240, 148, 51, 0.45) !important;
}

/* Premium Pro: Rosa Magenta vibrante de Instagram */
#participantCount .count-premium {
  color: var(--ig-pink) !important;
  text-shadow: 0 0 16px rgba(225, 48, 108, 0.45) !important;
}

/* Número único regular */
#participantCount .count-single {
  color: #fff !important;
}

/* Pro activo */
#participantCount .count-pro-active {
  color: #10b981 !important;
  text-shadow: 0 0 16px rgba(16, 185, 129, 0.45) !important;
}

/* =========================================================
   28. MODAL DE EXPORTACIÓN MULTI-FORMATO (PDF, MD, TXT)
========================================================= */
#exportModal.modal-overlay {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  overflow-y: auto !important;
  padding: 40px 20px !important;
  -webkit-overflow-scrolling: touch;
}

#exportModal.modal-overlay.hidden {
  display: none !important;
}

.export-modal-card {
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(36, 18, 40, 0.98), rgba(13, 14, 22, 0.99));
  border: 1px solid rgba(225, 48, 108, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 35px 85px -10px rgba(0, 0, 0, 0.9), 0 0 50px rgba(225, 48, 108, 0.22);
  max-width: 620px;
  width: 100%;
  max-height: none !important;
  margin: 0 auto;
  padding: 2.2rem 2rem 2rem;
  text-align: left;
  animation: popInWinnerModal 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.export-modal-close {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.export-modal-close:hover {
  background: rgba(225, 48, 108, 0.25);
  border-color: var(--ig-pink);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(225, 48, 108, 0.4);
}

.export-modal-header {
  margin-bottom: 1.4rem;
}

.export-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(240, 148, 51, 0.15);
  border: 1px solid rgba(240, 148, 51, 0.4);
  color: var(--ig-gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.export-modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.export-modal-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}

.export-formats-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.export-format-card {
  position: relative;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all var(--transition-fast);
  overflow: hidden;
}

.export-format-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Card Destacada (PDF Oficial) */
.export-format-card.export-card-featured {
  background: radial-gradient(circle at 10% 20%, rgba(225, 48, 108, 0.14), rgba(240, 148, 51, 0.08) 60%, rgba(20, 20, 32, 0.85) 100%);
  border: 1.5px solid rgba(225, 48, 108, 0.45);
  box-shadow: 0 12px 30px rgba(225, 48, 108, 0.18);
}

.export-format-card.export-card-featured:hover {
  border-color: rgba(225, 48, 108, 0.7);
  box-shadow: 0 16px 36px rgba(225, 48, 108, 0.3);
}

.export-card-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(225, 48, 108, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.export-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.export-card-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-dim);
  text-transform: uppercase;
}

.export-card-badge.featured {
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.3), rgba(252, 176, 69, 0.3));
  border: 1px solid rgba(225, 48, 108, 0.5);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.export-format-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.export-format-icon.pdf-icon {
  background: rgba(225, 48, 108, 0.18);
  color: #ff4b72;
  border: 1px solid rgba(225, 48, 108, 0.35);
}

.export-format-icon.md-icon {
  background: rgba(131, 58, 180, 0.18);
  color: #c084fc;
  border: 1px solid rgba(131, 58, 180, 0.35);
}

.export-format-icon.txt-icon {
  background: rgba(240, 148, 51, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(240, 148, 51, 0.35);
}

.export-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.export-format-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.export-format-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 0;
}

.btn-format-action {
  width: 100%;
  justify-content: center;
  padding: 0.72rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  margin-top: 0.35rem;
}

@media (min-width: 600px) {
  .export-formats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .export-format-card.export-card-featured {
    grid-column: 1 / -1;
    padding: 1.35rem 1.5rem;
  }
}

/* =========================================================
   17. FOOTER GLOBAL Y MODALES LEGALES (JGS STUDIO)
========================================================= */
.app-global-footer {
  width: 100%;
  max-width: 900px;
  margin: 2.75rem auto 1.5rem auto;
  padding: 1.25rem 1rem 2rem 1rem;
  text-align: center;
  position: relative;
  z-index: 10;
}

.footer-links-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
}

.footer-legal-link {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 0.2rem 0.35rem;
}

.footer-legal-link:hover {
  color: var(--text-main);
  transform: translateY(-1px);
}

.footer-vip-link {
  color: #fcb045;
  font-weight: 600;
  background: rgba(252, 176, 69, 0.08);
  border: 1px solid rgba(252, 176, 69, 0.25);
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
}

.footer-vip-link:hover {
  background: rgba(252, 176, 69, 0.16);
  color: #fed7aa;
}

.footer-sep {
  color: rgba(255, 255, 255, 0.18);
  font-size: 0.75rem;
}

.footer-copy-text {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.45rem;
}

.footer-copy-text strong {
  color: var(--text-muted);
}

.footer-disclaimer-text {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.32);
  line-height: 1.45;
  max-width: 720px;
  margin: 0 auto;
}

/* Modal Legal de Alta Definición */
.legal-modal-card {
  max-width: 760px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.legal-header-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.legal-tabs-nav {
  display: flex;
  gap: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.legal-tabs-nav::-webkit-scrollbar {
  display: none;
}

.legal-tab-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 0.95rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.legal-tab-btn:hover {
  color: var(--text-muted);
}

.legal-tab-btn.active {
  color: #fff;
  border-bottom-color: #e1306c;
  background: rgba(225, 48, 108, 0.08);
  border-radius: 6px 6px 0 0;
}

.legal-tab-content {
  overflow-y: auto;
  padding: 1.25rem 0.75rem;
  max-height: 52vh;
}

.legal-pane {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.legal-pane h4 {
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0.35rem;
  letter-spacing: -0.01em;
}

.legal-pane p {
  margin: 0;
}

.legal-pane code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  color: #fed7aa;
  font-size: 0.82rem;
}

.legal-email-link {
  color: #f472b6;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.legal-email-link:hover {
  color: #fbcfe8;
}

.legal-modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

/* Modal de Clave VIP */
.vip-modal-card {
  max-width: 480px;
  width: 95%;
}

.vip-header-title-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.vip-crown-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f09433, #e1306c);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.vip-modal-body {
  padding: 1.25rem 0.25rem 0.5rem 0.25rem;
}

.vip-modal-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

.vip-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.vip-input-icon {
  position: absolute;
  left: 1rem;
  color: #fcb045;
  pointer-events: none;
  width: 1.15rem;
  height: 1.15rem;
}

.vip-input-field {
  width: 100%;
  background: rgba(10, 12, 18, 0.75);
  border: 1.5px solid rgba(252, 176, 69, 0.35);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem 0.85rem 2.85rem;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-family: monospace;
  outline: none;
  transition: all 0.2s ease;
}

.vip-input-field:focus {
  border-color: #fcb045;
  box-shadow: 0 0 15px rgba(252, 176, 69, 0.3);
  background: rgba(10, 12, 18, 0.95);
}

.vip-modal-footer {
  margin-top: 1.25rem;
}




