/* ============================================================
   DanZar - Estilos Globales, Temas y Componentes
   ============================================================ */

body { 
  font-family: 'Plus Jakarta Sans', sans-serif; 
  background-color: #F7EDF4;
  background-image: 
    radial-gradient(at 0% 0%, rgba(244, 114, 160, 0.45) 0px, transparent 55%),
    radial-gradient(at 100% 0%, rgba(245, 158, 11, 0.35) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.40) 0px, transparent 55%),
    radial-gradient(at 0% 100%, rgba(168, 85, 247, 0.32) 0px, transparent 50%),
    radial-gradient(at 50% 45%, rgba(255, 235, 243, 0.55) 0px, transparent 65%);
  background-attachment: fixed;
  background-size: cover;
  min-height: 100vh;
}
.font-title { font-family: 'Montserrat', sans-serif; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #F7EDF4; }
::-webkit-scrollbar-thumb { background: #E25B88; border-radius: 9999px; }

/* Optimización máxima de tablas en panel Admin para móviles (Convertir a formato Tarjetas) */
@media (max-width: 768px) {
  /* Forzar que la tabla, filas y celdas se comporten como bloques */
  #view-admin .overflow-x-auto table,
  #view-admin .overflow-x-auto thead,
  #view-admin .overflow-x-auto tbody,
  #view-admin .overflow-x-auto th,
  #view-admin .overflow-x-auto td,
  #view-admin .overflow-x-auto tr {
    display: block;
    width: 100%;
  }
  /* Ocultar encabezados de la tabla visualmente */
  #view-admin .overflow-x-auto thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  /* Estilo de Tarjeta para cada fila */
  #view-admin .overflow-x-auto tr {
    margin-bottom: 1rem;
    border: 1px solid #fbcfe8; /* pink-200 */
    border-radius: 1rem;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  }
  /* Estilo de cada celda (fila dentro de la tarjeta) */
  #view-admin .overflow-x-auto td {
    border: none;
    border-bottom: 1px dashed #fce7f3; /* pink-100 */
    position: relative;
    padding: 0.75rem 0.5rem;
    text-align: left;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 2.5rem;
  }
  /* Quitar borde inferior a la última celda y centrar botones */
  #view-admin .overflow-x-auto td:last-child {
    border-bottom: 0;
    justify-content: center;
    padding-top: 1rem;
  }
  /* Ajustar tamaño de botones para móviles */
  #view-admin .overflow-x-auto button {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.65rem !important;
    flex: 1; /* Para que los botones se expandan uniformemente */
    justify-content: center;
  }
}

/* Estilos de Vista: Contenedor Principal Limpio, Nítido y de Ultra Alto Rendimiento */
.view-container {
  position: relative;
  border-radius: 0px !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  min-height: calc(100vh - 120px);
  width: 100%;
}

/* Overlay limpio con espaciado móvil optimizado */
.view-bg-overlay {
  background: transparent !important;
  border-radius: 0px !important;
  padding: 0.5rem 0.25rem;
  min-height: calc(100vh - 120px);
}

@media (min-width: 640px) {
  .view-bg-overlay {
    padding: 1.25rem;
  }
}

/* ============================================================
   PANELES Y TARJETAS PREMIUM DE DANZAR (TRANSLÚCIDOS & VIDRIO ESMERILADO)
   ============================================================ */
.dz-panel,
.view-bg-overlay .bg-white\/60,
.view-bg-overlay .bg-white\/70,
.view-bg-overlay .bg-white\/80,
.view-bg-overlay .bg-white\/90 {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  box-shadow: 0 10px 30px -5px rgba(226, 91, 136, 0.09), 0 4px 10px -2px rgba(0, 0, 0, 0.02) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.dz-panel:hover,
.view-bg-overlay .bg-white\/60:hover,
.view-bg-overlay .bg-white\/70:hover,
.view-bg-overlay .bg-white\/80:hover,
.view-bg-overlay .bg-white\/90:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(226, 91, 136, 0.28) !important;
  box-shadow: 0 14px 34px -4px rgba(226, 91, 136, 0.15), 0 6px 14px -2px rgba(0, 0, 0, 0.04) !important;
}

/* Acentos elegantes para tarjetas destacadas */
.dz-accent-pink {
  border-left: 4px solid #E25B88 !important;
}
.dz-accent-amber {
  border-left: 4px solid #D97706 !important;
}
.dz-accent-emerald {
  border-left: 4px solid #059669 !important;
}

.tab-view {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}
.tab-view.active-view {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.25s ease-out;
}
.modal-backdrop.modal-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateZ(0) scale(0.96) translateY(12px);
  opacity: 0;
  will-change: transform, opacity;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.modal-backdrop.modal-open .modal-card {
  transform: translateZ(0) scale(1) translateY(0);
  opacity: 1;
}

.btn-interactive {
  transition: transform 0.15s ease-out, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn-interactive:hover {
  transform: translateY(-2px);
}
.btn-interactive:active {
  transform: translateY(1px) scale(0.98);
}

/* ============================================================
   COMUNIDAD / FEED SOCIAL
============================================================ */
@keyframes postSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes likeHeartBeat {
  0%,100% { transform: scale(1); }
  30%      { transform: scale(1.3); }
  60%      { transform: scale(0.92); }
}
@keyframes communityGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(226,91,136,0.0); }
  50%       { box-shadow: 0 0 20px 2px rgba(226,91,136,0.15); }
}

.post-card {
  animation: postSlideIn 0.3s ease-out both;
  background: #ffffff;
  border: 1px solid rgba(226,91,136,0.14);
  border-radius: 1.5rem;
  box-shadow: 0 4px 16px rgba(226,91,136,0.05), 0 1px 3px rgba(0,0,0,0.03);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 0 450px;
}
.post-card:hover {
  box-shadow: 0 6px 24px rgba(226,91,136,0.11), 0 2px 6px rgba(0,0,0,0.05);
  transform: translateY(-2px);
}
.post-card-new {
  animation: communityGlow 1.5s ease-in-out 1;
}

.like-btn { transition: color 0.2s ease, transform 0.2s cubic-bezier(0.34,1.56,0.64,1); }
.like-btn.liked { color: #E25B88; }
.like-btn.liked i { animation: likeHeartBeat 0.4s cubic-bezier(0.34,1.56,0.64,1); }
.like-btn:active { transform: scale(0.9); }

.comment-section {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out, opacity 0.25s ease;
  opacity: 0;
}
.comment-section.open {
  max-height: 900px;
  opacity: 1;
}

.comment-item {
  animation: postSlideIn 0.25s ease-out both;
}

.community-composer {
  background: #ffffff;
  border: 1.5px solid rgba(226,91,136,0.18);
  border-radius: 1.5rem;
  box-shadow: 0 4px 20px rgba(226,91,136,0.07);
}

.post-image-preview {
  object-fit: contain;
  border-radius: 1rem;
  width: 100%;
  max-width: 100%;
  display: block;
  background: #f3f4f6;
}

.post-image-wrap {
  background: #1a1a2e;
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 480px;
}
.post-image-wrap img {
  max-height: 480px;
  width: 100%;
  object-fit: contain;
}

.user-avatar-ring {
  background: linear-gradient(135deg, #E25B88 0%, #C83B6A 50%, #a855f7 100%);
  padding: 2px;
  border-radius: 9999px;
  position: relative;
  flex-shrink: 0;
}
.user-avatar-inner {
  background: white;
  border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #E25B88; font-size: 0.875rem;
  letter-spacing: -0.02em;
  overflow: hidden;
}
.user-avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9999px;
}

/* Botón cámara sobre el avatar en el compositor */
.avatar-camera-btn {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #E25B88;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid white;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.avatar-camera-btn:hover { background: #C83B6A; transform: scale(1.1); }
.avatar-camera-btn i { color: white; font-size: 7px; }

/* Modal de foto de perfil */
@keyframes profilePhotoIn {
  from { opacity:0; transform: scale(0.88) translateY(12px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}
#profilePhotoModal .modal-card {
  animation: profilePhotoIn 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}
.profile-photo-preview-ring {
  background: linear-gradient(135deg, #E25B88, #C83B6A, #a855f7);
  padding: 3px;
  border-radius: 9999px;
  display: inline-block;
}
.profile-photo-preview-ring img,
.profile-photo-preview-ring div {
  border-radius: 9999px;
}

.role-badge-admin      { background:#FDE8F0; color:#C83B6A; border:1px solid #F9C3D6; }
.role-badge-representante { background:#EEF2FF; color:#4338CA; border:1px solid #C7D2FE; }
.role-badge-alumna     { background:#FFF7ED; color:#C2410C; border:1px solid #FED7AA; }

/* Estilos para Pestañas de Admin y Accordiones (<details>) */
.admin-tab-btn {
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #6B7280;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}
.admin-tab-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.admin-tab-btn.active {
  color: #BE185D; /* pink-700 */
  background: white;
  border-color: #F9A8D4; /* pink-300 */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.admin-module-details {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}
.admin-module-details[open] {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(244, 114, 182, 0.4); /* pink-400 */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}
.admin-module-summary {
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 1rem;
  color: #1F2937;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none; /* Hide default arrow */
  transition: background-color 0.2s ease;
}
.admin-module-summary::-webkit-details-marker {
  display: none; /* Hide default arrow in webkit */
}
.admin-module-summary:hover {
  background-color: rgba(249, 250, 251, 0.8);
}
.admin-module-summary .summary-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.admin-module-details[open] .admin-module-summary .summary-icon {
  transform: rotate(180deg);
}
.admin-module-content {
  padding: 0 1.25rem 1.25rem 1.25rem;
  animation: details-show 0.3s ease-out;
}
@keyframes details-show {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

#view-comunidad .empty-feed {
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(12px);
  border-radius: 1.5rem;
  border: 1px dashed rgba(226,91,136,0.25);
}

.comment-input-wrap {
  background: rgba(250,245,248,0.9);
  border: 1.5px solid rgba(226,91,136,0.18);
  border-radius: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.comment-input-wrap:focus-within {
  border-color: #E25B88;
  box-shadow: 0 0 0 3px rgba(226,91,136,0.10);
}

/* Notification badge & panel */
.notif-badge {
  animation: heartBeat 1.5s infinite;
}
.notif-dropdown {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16,1,0.3,1);
}
.notif-dropdown.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* User Profile Card */
.profile-card-header {
  background: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(252,231,240,0.85) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226,91,136,0.2);
}

/* ============================================================
   REPRODUCTOR Y CARRUSEL MULTI-MEDIA (VERTICAL 9:16)
============================================================ */
.post-vertical-video-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 9 / 16;
  max-height: 560px;
  margin: 0 auto;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #0d0d1a;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(244, 114, 182, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-vertical-video-wrap video.feed-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #0d0d1a;
  max-width: 380px;
  aspect-ratio: 9 / 16;
  max-height: 560px;
  margin: 0 auto;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(244, 114, 182, 0.25);
}
.post-carousel-track { display: flex; height: 100%; transition: transform 0.38s cubic-bezier(0.16,1,0.3,1); will-change: transform; }
.post-carousel-slide { min-width: 100%; height: 100%; flex-shrink: 0; position: relative; display: flex; align-items: center; justify-content: center; background: #0d0d1a; overflow: hidden; }
.post-carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-carousel-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }

.video-action-pulse {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.22s cubic-bezier(0.16,1,0.3,1), transform 0.22s cubic-bezier(0.16,1,0.3,1);
  z-index: 15;
}
.video-action-pulse.animate {
  opacity: 1;
  transform: scale(1.15);
}
.video-action-pulse-circle {
  width: 60px;
  height: 60px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.carousel-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 9999px;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: white; display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10; transition: background 0.2s ease, transform 0.2s ease;
  font-size: 13px;
}
.carousel-nav-btn:hover { background: rgba(226,91,136,0.75); transform: translateY(-50%) scale(1.08); }
.carousel-nav-btn.prev { left: 8px; }
.carousel-nav-btn.next { right: 8px; }
.carousel-nav-btn:disabled { opacity: 0.25; cursor: default; }

.carousel-dots { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 0 4px; }
.carousel-dot {
  width: 7px; height: 7px; border-radius: 9999px;
  background: rgba(226,91,136,0.25); border: 1.5px solid rgba(226,91,136,0.4);
  cursor: pointer; transition: all 0.25s ease;
}
.carousel-dot.active { width: 18px; background: #E25B88; border-color: #E25B88; }

.carousel-counter {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(6px);
  color: white; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 10;
}

/* ============================================================
   CONTROLES DE VIDEO ESTILO REELS (Volumen deslizable + Fullscreen)
============================================================ */
.post-video-controls-bar {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 30;
  pointer-events: auto;
}

.volume-control-group {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  border-radius: 9999px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.volume-control-group:hover .feed-volume-slider-wrap,
.volume-control-group:focus-within .feed-volume-slider-wrap {
  width: 70px;
  opacity: 1;
  margin-right: 8px;
  margin-left: 2px;
}

.feed-volume-slider-wrap {
  width: 0;
  opacity: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.feed-volume-slider {
  width: 65px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.feed-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #E25B88;
  border: 2px solid white;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.video-ctrl-btn {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  font-size: 12px;
  background: transparent;
  border: none;
}
.video-ctrl-btn:hover {
  transform: scale(1.1);
  color: #f472b6;
}

.video-fullscreen-btn-pill {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  font-size: 13px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}
.video-fullscreen-btn-pill:hover {
  background: rgba(226, 91, 136, 0.75);
  transform: scale(1.08);
}

/* ============================================================
   FEED AUDIO TOGGLE (global sticky)
============================================================ */
#feedAudioControl { pointer-events: none; }
#feedAudioControl.has-videos { pointer-events: auto; }

.feed-mute-toggle-btn {
  width: 44px; height: 44px; border-radius: 9999px;
  background: linear-gradient(135deg, #E25B88 0%, #C83B6A 100%);
  color: white; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 20px rgba(226,91,136,0.45), 0 2px 6px rgba(0,0,0,0.2);
  border: none; transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s ease;
  font-size: 16px;
}
.feed-mute-toggle-btn:hover { transform: scale(1.12); box-shadow: 0 6px 28px rgba(226,91,136,0.6); }
.feed-mute-toggle-btn:active { transform: scale(0.93); }
.feed-mute-toggle-btn.audio-on { background: linear-gradient(135deg, #10b981 0%, #059669 100%); box-shadow: 0 4px 20px rgba(16,185,129,0.45); }

/* ============================================================
   COMPOSER MULTI-MEDIA PREVIEW GRID
============================================================ */
.composer-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  padding: 10px;
  background: rgba(250,245,248,0.8);
  border: 1.5px dashed rgba(226,91,136,0.3);
  border-radius: 1rem;
}
.composer-media-thumb {
  position: relative; border-radius: 0.75rem; overflow: hidden;
  aspect-ratio: 1 / 1; background: #0d0d1a;
  border: 2px solid rgba(226,91,136,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: border-color 0.2s ease;
}
.composer-media-thumb:hover { border-color: rgba(226,91,136,0.5); }
.composer-media-thumb img,
.composer-media-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.composer-media-thumb .thumb-remove-btn {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 9999px;
  background: rgba(0,0,0,0.7); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; cursor: pointer; border: 1.5px solid rgba(255,255,255,0.3);
  transition: background 0.2s ease;
}
.composer-media-thumb .thumb-remove-btn:hover { background: #E25B88; }
.composer-media-thumb .thumb-trim-btn {
  position: absolute; bottom: 4px; right: 4px;
  background: linear-gradient(135deg, #E25B88 0%, #C83B6A 100%);
  color: white; font-size: 9px; font-weight: 700;
  padding: 2px 7px; border-radius: 9999px; cursor: pointer;
  display: flex; align-items: center; gap: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.4);
  transition: transform 0.15s ease, background 0.2s ease;
  z-index: 10;
}
.composer-media-thumb .thumb-trim-btn:hover { transform: scale(1.06); background: linear-gradient(135deg, #be185d 0%, #9f1239 100%); }
.composer-media-thumb .thumb-type-badge {
  position: absolute; bottom: 4px; left: 4px;
  background: rgba(0,0,0,0.65); color: white;
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.composer-media-counter {
  font-size: 11px; font-weight: 700; color: #E25B88;
  text-align: right; padding: 4px 2px 0;
}

/* ============================================================
   SPLASH SCREEN ANIMATIONS
============================================================ */
@keyframes dz-heartbeat {
  0%   { transform: scale(1);    filter: drop-shadow(0 0  0px rgba(226,91,136,0))  ; }
  30%  { transform: scale(1.06); filter: drop-shadow(0 0 18px rgba(226,91,136,0.35)); }
  60%  { transform: scale(0.98); filter: drop-shadow(0 0  6px rgba(226,91,136,0.15)); }
  100% { transform: scale(1);    filter: drop-shadow(0 0  0px rgba(226,91,136,0))  ; }
}
@keyframes dz-fadein-logo {
  from { opacity:0; transform:scale(0.88); }
  to   { opacity:1; transform:scale(1);    }
}
@keyframes dz-fadein-text {
  from { opacity:0; transform:translateY(10px); }
  to   { opacity:1; transform:translateY(0);    }
}
@keyframes dz-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
@keyframes dz-splash-out {
  0%   { opacity:1; transform:scale(1);    }
  100% { opacity:0; transform:scale(1.04); }
}
#danzar-splash.hiding {
  animation: dz-splash-out 0.5s cubic-bezier(0.4,0,0.2,1) forwards;
  pointer-events:none;
}
#dz-logo-wrap {
  animation: dz-fadein-logo 0.6s cubic-bezier(0.34,1.56,0.64,1) both;
}
#dz-logo-img {
  animation: dz-heartbeat 2.4s ease-in-out 0.6s infinite;
  will-change: transform, filter;
}
#dz-tagline {
  animation: dz-fadein-text 0.7s ease 0.5s both;
}
#dz-copyright {
  animation: dz-fadein-text 0.7s ease 0.8s both;
}
#dz-progress-bar {
  animation: dz-fadein-text 0.4s ease 0.3s both;
}
#dz-progress-inner {
  background: linear-gradient(90deg,
    #FCE7F0 0%, #E25B88 20%, #C83B6A 50%, #E25B88 80%, #FCE7F0 100%);
  background-size: 400px 100%;
  animation: dz-shimmer 1.6s linear 0.5s infinite;
}

/* ============================================================
   BANNER FLOTANTE DE ACTUALIZACIÓN EN TIEMPO REAL
============================================================ */
@keyframes updateFloatIn {
  0%   { opacity: 0; transform: translate(-50%, 30px) scale(0.92); }
  60%  { opacity: 1; transform: translate(-50%, -6px) scale(1.02); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes updatePulseGlow {
  0%, 100% { box-shadow: 0 10px 30px -5px rgba(226, 91, 136, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.3); }
  50%      { box-shadow: 0 14px 40px -2px rgba(226, 91, 136, 0.75), 0 0 0 3px rgba(254, 205, 211, 0.6); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

#appUpdateNotification.show {
  display: block !important;
  animation: updateFloatIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#appUpdateNotification .update-card-glow {
  animation: updatePulseGlow 2.5s ease-in-out infinite;
}

.animate-spin-slow {
  animation: spinSlow 6s linear infinite;
}

/* Asegurar que las alertas y toasts de SweetAlert se muestren siempre sobre cualquier modal de alta prioridad */
.swal2-container {
  z-index: 999999 !important;
}

