/* ═══════════════════════════════════════════════════════
   RBK MUSIC — Premium CSS
   Inspirado en Spotify 2026 + Apple Music + Linear
   Versión limpia: sin reglas duplicadas, organizado por categorías
═══════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════
   1. VARIABLES GLOBALES
   Colores, gradientes, espaciados, sombras y transiciones
   reutilizadas en toda la app
═══════════════════════════════════════════════════════ */
:root {
  /* Fondos */
  --bg-void:     #131834;   /* fondo de splash y body */
  --bg-deep:     #121632;   /* sidebar, paneles laterales */
  --bg-base:     #0e1226;   /* fondo general del contenido */
  --bg-raise:    #ffffff;   /* color elevado (actualmente sin uso) */
  --bg-card:     rgba(123,140,222,0.06);  /* fondo de las cards */
  --bg-hover:    rgba(123,140,222,0.10);
  --bg-active:   rgba(123,140,222,0.15);

  /* Bordes */
  --border-dim:  rgba(123,140,222,0.06);
  --border-soft: rgba(123,140,222,0.10);
  --border-mid:  rgba(123,140,222,0.16);
  --border-hi:   rgba(123,140,222,0.25);

  /* Textos */
  --text-primary:   #FFFFFF;
  --text-secondary: #A8B4D8;
  --text-tertiary:  #6B7BA4;
  --text-hint:      #4A5580;

  /* Colores de acento (marca RBK) */
  --accent-1:     #7B8CDE;
  --accent-2:     #E8C4FF;
  --accent-3:     #9BB5FF;
  --accent-4:     #C4D4FF;

  --accent-1-dim: rgba(123,140,222,0.15);
  --accent-2-dim: rgba(232,196,255,0.12);
  --accent-3-dim: rgba(155,181,255,0.12);
  --accent-4-dim: rgba(196,212,255,0.12);

  /* Gradientes de marca */
  --grad-main:   linear-gradient(135deg, #7B8CDE 0%, #E8C4FF 100%);
  --grad-purple: linear-gradient(135deg, #9BB5FF 0%, #7B8CDE 100%);
  --grad-cyan:   linear-gradient(135deg, #C4D4FF 0%, #9BB5FF 100%);
  --grad-warm:   linear-gradient(135deg, #E8C4FF 0%, #7B8CDE 100%);
  --grad-soft:   linear-gradient(135deg, rgba(123,140,222,0.12) 0%, rgba(232,196,255,0.08) 100%);
  --grad-glow:   linear-gradient(135deg, rgba(123,140,222,0.06) 0%, rgba(232,196,255,0.04) 100%);

  /* Tamaños de layout */
  --header-h:     110px;
  --sidebar-w:    280px;
  --player-h:     92px;
  --mobile-nav-h: 64px;

  /* Radios de borde */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-2xl:  28px;
  --r-full: 9999px;

  /* Curvas de animación */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Duraciones */
  --dur-f: 150ms;
  --dur-m: 280ms;
  --dur-s: 420ms;

  /* Sombras */
  --sh-sm:  0 2px 10px rgba(0,0,0,0.50);
  --sh-md:  0 8px 32px rgba(0,0,0,0.60);
  --sh-lg:  0 25px 50px rgba(0,0,0,0.70);
  --sh-acc: 0 0 40px rgba(139,127,255,0.25);
  --sh-premium: 0 25px 50px rgba(0,0,0,0.35);
}


/* ═══════════════════════════════════════════════════════
   2. RESET Y ESTILOS BASE
   Reglas generales aplicadas a toda la página
═══════════════════════════════════════════════════════ */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html {
  font-size:14px;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  scroll-behavior:smooth;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg-void);
  color: var(--text-primary);
  overflow: hidden;
  height: 100dvh;
  line-height: 1.5;
  overscroll-behavior: none; /* evita el "rebote" al scrollear en móvil */
}

img    { display:block; user-select:none; }
button { cursor:pointer; font-family:inherit; border:none; background:none; }
input  { font-family:inherit; }
svg    { flex-shrink:0; }

/* Scrollbar personalizado (delgado y discreto) */
::-webkit-scrollbar       { width:4px; height:4px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.10); border-radius:99px; }
::-webkit-scrollbar-thumb:hover { background:rgba(255,255,255,0.20); }


/* ═══════════════════════════════════════════════════════
   3. PANTALLA DE CARGA (SPLASH)
   Logo animado mientras carga la app
═══════════════════════════════════════════════════════ */
.splash {
  position: fixed; inset: 0;
  background: var(--bg-void);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 48px; z-index: 9999;
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}
.splash.gone { opacity: 0; visibility: hidden; pointer-events: none; }

.splash-logo {
  display: flex; align-items: center; gap: 16px;
  animation: fadeUp 0.6s var(--ease-out) both;
}
.splash-logo span {
  font-family: 'Syne', sans-serif;
  font-size: 32px; font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.8px;
}
.splash-bar-wrap {
  width: 180px; height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px; overflow: hidden;
}
.splash-bar {
  height: 100%; width: 0%;
  background: var(--grad-main);
  border-radius: 99px;
  animation: barLoad 2s var(--ease-out) 0.3s both;
}

/* Animaciones de entrada reutilizadas en toda la app */
@keyframes barLoad { to { width: 100%; } }
@keyframes fadeUp  { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn  { from{opacity:0} to{opacity:1} }
@keyframes scaleIn { from{opacity:0;transform:scale(0.95)} to{opacity:1;transform:scale(1)} }
@keyframes slideUp { from{opacity:0;transform:translateY(30px)} to{opacity:1;transform:translateY(0)} }


/* ═══════════════════════════════════════════════════════
   4. HEADER (logo, búsqueda, notificaciones, perfil)
═══════════════════════════════════════════════════════ */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(15, 15, 41, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-soft);
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 14px 20px;
  gap: 14px;
  z-index: 1000;
}

.header-row1 {
  display: flex; align-items: center;
  justify-content: space-between;
  height: 30px;
}
.header-row2 {
  display: flex; align-items: center;
  gap: 14px;
  height: 34px;
}
.header-row2 .search { flex: 1; }
.header-row2 .btn-noti { flex-shrink: 0; }

/* Logo RBK */
.logo {
  display: flex; align-items: center;
  gap: 7px; text-decoration: none;
}
.logo-icon {
  width: 28px; height: 28px;
  background: var(--grad-main);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-acc); flex-shrink: 0;
}
.logo-icon svg { width: 15px; height: 15px; color: #fff; }
.logo-name {
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
}

/* Botón hamburguesa (abre/cierra sidebar) */
.btn-menu {
  display: flex; flex-direction: column;
  justify-content: center; gap: 4px;
  width: 28px; height: 28px; padding: 5px;
  border-radius: var(--r-sm);
  transition: background var(--dur-f); flex-shrink: 0;
}
.btn-menu:hover { background: var(--bg-hover); }
.hline {
  display: block; height: 1.5px;
  background: var(--text-secondary);
  border-radius: 99px;
  transition: all var(--dur-m) var(--ease-out);
  transform-origin: center;
}
.menu-open .hline:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-open .hline:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-open .hline:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Barra de búsqueda */
.search {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full);
  padding: 0 12px; height: 32px;
  position: relative;
  transition: all var(--dur-m) var(--ease-out);
}
.search:focus-within {
  border-color: rgba(139,127,255,0.45);
  box-shadow: 0 0 0 3px rgba(139,127,255,0.10), var(--sh-acc);
  background: rgba(255,255,255,0.07);
}
.search svg { width: 15px; height: 15px; color: var(--text-tertiary); flex-shrink: 0; transition: color var(--dur-f); }
.search:focus-within svg { color: var(--accent-1); }
.search input { flex: 1; background: none; border: none; outline: none; color: var(--text-primary); font-size: 14px; }
.search input::placeholder { color: var(--text-tertiary); }

/* Resultados de búsqueda (dropdown) */
.search-results {
  position: absolute; top: calc(100% + 12px); left: 0; right: 0;
  background: var(--bg-base); border: 1px solid var(--border-mid);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  display: none; flex-direction: column;
  overflow: hidden; max-height: 420px; overflow-y: auto; z-index: 5000;
  animation: slideUp 0.2s var(--ease-out);
}
.search-results.show { display: flex; }
.sr-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer; transition: background var(--dur-f); border-bottom: 1px solid var(--border-dim); }
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: var(--bg-hover); }
.sr-item img { width: 38px; height: 38px; border-radius: var(--r-sm); object-fit: cover; flex-shrink: 0; }
.sr-item-text span { font-size: 13px; color: var(--text-primary); font-weight: 500; display: block; }
.sr-item-text small { font-size: 11px; color: var(--text-secondary); }

/* Botón de notificaciones */
.btn-noti {
  width: 28px; height: 28px;
  border: 1px solid var(--border-soft); border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  position: relative;
  transition: all var(--dur-f);
}
.btn-noti svg { width: 16px; height: 16px; }
.btn-noti:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-mid); }
.noti-dot { position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; background: var(--accent-2); border-radius: 99px; border: 1.5px solid var(--bg-void); }

/* Pill de perfil + dropdown */
.profile-pill {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 12px 4px 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-full); cursor: pointer; position: relative;
  transition: all var(--dur-m) var(--ease-out); user-select: none;
}
.profile-pill:hover { background: var(--bg-hover); border-color: var(--border-mid); }
.prof-img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1.5px solid rgba(139,127,255,0.4); flex-shrink: 0; }
.prof-name { font-size: 13px; font-weight: 500; color: var(--text-primary); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { width: 11px; height: 11px; color: var(--text-tertiary); transition: transform var(--dur-m) var(--ease-out); }
.profile-pill.open .chevron { transform: rotate(180deg); }

.dropdown {
  display: none; position: absolute; top: calc(100% + 10px); right: 0;
  width: 220px; background: var(--bg-base); border: 1px solid var(--border-mid);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  padding: 14px; flex-direction: column; gap: 10px; z-index: 5000;
  animation: slideUp 0.2s var(--ease-out);
}
.profile-pill.open .dropdown { display: flex; }
.dd-top  { display: flex; align-items: center; gap: 11px; }
.dd-img  { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(139,127,255,0.3); }
.dd-info { display: flex; flex-direction: column; gap: 2px; }
.dd-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.dd-badge{ font-size: 10px; color: var(--text-tertiary); }
.dd-div  { height: 1px; background: var(--border-dim); }
.dd-btn  { display: flex; align-items: center; gap: 9px; padding: 9px 11px; background: var(--bg-hover); border: 1px solid var(--border-soft); border-radius: var(--r-md); color: var(--text-primary); font-size: 12px; font-weight: 500; transition: all var(--dur-f); width: 100%; text-align: left; }
.dd-btn svg { width: 13px; height: 13px; color: var(--accent-1); }
.dd-btn:hover { background: var(--bg-active); border-color: var(--border-mid); }

/* Panel de edición de perfil (nombre + foto) */
.edit-panel      { display: none; flex-direction: column; gap: 8px; }
.edit-panel.show { display: flex; }
.ep-label { font-size: 10px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.08em; }
.ep-input { padding: 9px 12px; background: var(--bg-hover); border: 1px solid var(--border-soft); border-radius: var(--r-sm); color: var(--text-primary); font-size: 13px; outline: none; transition: all var(--dur-f); width: 100%; }
.ep-input:focus { border-color: rgba(139,127,255,0.5); box-shadow: 0 0 0 3px rgba(139,127,255,0.08); }
.ep-upload { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--bg-hover); border: 1px dashed var(--border-mid); border-radius: var(--r-sm); color: var(--text-secondary); font-size: 12px; cursor: pointer; transition: all var(--dur-f); width: 100%; }
.ep-upload:hover { border-color: var(--accent-1); color: var(--accent-1); }
.ep-save { padding: 9px; background: var(--grad-main); border: none; border-radius: var(--r-sm); color: #fff; font-size: 13px; font-weight: 600; width: 100%; transition: opacity var(--dur-f), transform var(--dur-f); }
.ep-save:hover { opacity: 0.88; }
.ep-save:active { transform: scale(0.98); }


/* ═══════════════════════════════════════════════════════
   5. LAYOUT PRINCIPAL (sidebar, overlay, contenido)
═══════════════════════════════════════════════════════ */
.app-layout {
  position: fixed;
  top: var(--header-h);
  bottom: var(--player-h);
  left: 0; right: 0;
  display: flex;
  overflow: hidden;
}

/* Sidebar lateral */
.sidebar {
  width: var(--sidebar-w);
  height: 100%;
  background: var(--bg-deep);
  border-right: 1px solid var(--border-dim);
  display: flex; flex-direction: column; flex-shrink: 0;
  transform: translateX(calc(-1 * var(--sidebar-w)));
  transition: transform var(--dur-s) var(--ease-out);
  z-index: 900;
  position: relative;
}
.sidebar.open { transform: translateX(0); }
.sidebar-inner { display: flex; flex-direction: column; min-height: 100%; height: auto; padding: 20px 12px; }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-div { height: 1px; background: var(--border-dim); margin: 8px 6px; }
.nav-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: none; border: none;
  border-radius: var(--r-md); color: var(--text-tertiary);
  font-size: 13px; font-weight: 500; text-align: left;
  transition: all var(--dur-f); position: relative; width: 100%;
}
.nav-btn:hover { background: var(--bg-hover); color: var(--text-secondary); }
.nav-btn.active { background: var(--bg-card); color: var(--text-primary); }
.nav-btn.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; background: var(--grad-main); border-radius: 0 3px 3px 0;
}
.nav-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-icon svg { width: 18px; height: 18px; transition: color var(--dur-f); }
.nav-btn.active .nav-icon svg { color: var(--accent-1); }

/* Ecualizador animado + info de canción actual (footer del sidebar) */
.sidebar-foot { padding: 16px 12px 12px; border-top: 1px solid var(--border-dim); display: flex; align-items: center; gap: 10px; }
.eq { display: flex; align-items: flex-end; gap: 2.5px; height: 22px; flex-shrink: 0; }
.eq span { display: block; width: 3px; background: var(--grad-main); border-radius: 99px; animation: eq 1.2s ease-in-out infinite; min-height: 3px; }
.eq span:nth-child(1){animation-delay:0.0s} .eq span:nth-child(2){animation-delay:0.2s}
.eq span:nth-child(3){animation-delay:0.4s} .eq span:nth-child(4){animation-delay:0.1s}
.eq span:nth-child(5){animation-delay:0.3s}
.eq.paused span { animation-play-state: paused; height: 3px !important; }
@keyframes eq { 0%,100%{height:4px} 50%{height:20px} }
.np-mini { min-width: 0; flex: 1; }
.np-title  { font-size: 12px; font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-artist { font-size: 11px; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }

/* Overlay oscuro detrás del sidebar en móvil */
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 800; backdrop-filter: blur(3px); }
.overlay.show { display: block; }

/* Área principal de contenido (scrollable) */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 32px;
  padding-bottom: 40px;
  background: var(--bg-base);
}

/* Páginas/secciones (Inicio, Biblioteca, Playlist, etc) */
.page { display: none; flex-direction: column; gap: 32px; animation: slideUp 0.35s var(--ease-out); }
.page.active { display: flex; }

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
}

.lib-filters {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.sec-title-wrap { display: flex; flex-direction: column; gap: 4px; }
.sec-title-wrap h2 { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.4px; }
.sec-sub { font-size: 12px; color: var(--text-tertiary); }
.btn-more { font-size: 12px; font-weight: 500; color: var(--accent-1); padding: 5px 10px; border-radius: var(--r-sm); transition: background var(--dur-f); }
.btn-more:hover { background: var(--accent-1-dim); }


/* ═══════════════════════════════════════════════════════
   6. TARJETAS / CARDS (canciones y álbumes)
═══════════════════════════════════════════════════════ */

/* Carruseles horizontales: "Para ti", "Recientes" y "Álbumes recomendados" */
#recGrid, #recienteGrid, #albumsRecGrid {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  gap: 12px;
  padding-bottom: 8px;
  scrollbar-width: none;
}
#recGrid::-webkit-scrollbar,
#recienteGrid::-webkit-scrollbar,
#albumsRecGrid::-webkit-scrollbar { display: none; }

#recGrid .card,
#recienteGrid .card,
#albumsRecGrid .card {
  flex-shrink: 0;
  width: 160px;
  scroll-snap-align: start;
}

/* Grid normal (Biblioteca, Favoritos) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

/* Card individual (canción o álbum) */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--r-xl); padding: 14px; cursor: pointer;
  transition: all 0.35s var(--ease);
  position: relative; overflow: hidden;
  animation: scaleIn 0.4s var(--ease-out) both;
  backdrop-filter: blur(10px);
}
.card::before { content: ''; position: absolute; inset: 0; background: var(--grad-glow); opacity: 0; transition: opacity var(--dur-m); pointer-events: none; }
.card:hover {
  border-color: var(--border-mid);
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--sh-premium), 0 0 30px rgba(139,127,255,0.12);
}
.card:hover::before { opacity: 1; }
.card-img { position: relative; overflow: hidden; border-radius: var(--r-lg); margin-bottom: 12px; }
.card-img img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-lg); transition: transform 0.5s var(--ease-out); }
.card:hover .card-img img { transform: scale(1.06); }

/* Botón flotante de play sobre la portada */
.play-fab {
  position: absolute; bottom: 9px; right: 9px;
  width: 38px; height: 38px; background: var(--grad-main);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(8px);
  transition: all var(--dur-m) var(--ease-spring);
  box-shadow: 0 6px 20px rgba(139,127,255,0.45); cursor: pointer;
}
.play-fab svg { width: 14px; height: 14px; color: #fff; }
.card:hover .play-fab { opacity: 1; transform: translateY(0); }

.card h3 { font-size: 13px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 4px; }
.card p  { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* ═══════════════════════════════════════════════════════
   7. FILTROS DE BIBLIOTECA (Todo / Canciones / Álbumes)
═══════════════════════════════════════════════════════ */
.filter-btn {
  padding: 5px 10px;
  font-size: 11px;
  white-space: nowrap;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r-full);
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-f);
}
.filter-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.filter-btn.active { background: var(--accent-1-dim); border-color: var(--accent-1); color: var(--accent-1); }


/* ═══════════════════════════════════════════════════════
   8. PLAYLIST (placeholder "crea tu primera playlist")
═══════════════════════════════════════════════════════ */
.create-pl {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 64px 32px; background: var(--bg-card);
  border: 1px dashed rgba(139,127,255,0.20); border-radius: var(--r-2xl);
  text-align: center; transition: all var(--dur-m); cursor: pointer;
  backdrop-filter: blur(10px);
}
.create-pl:hover { border-color: rgba(139,127,255,0.40); background: var(--bg-hover); }
.create-pl h3 { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; color: var(--text-primary); }
.create-pl p  { font-size: 13px; color: var(--text-secondary); max-width: 260px; }
.btn-new-pl { margin-top: 6px; padding: 11px 26px; background: var(--grad-main); border: none; border-radius: var(--r-full); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity var(--dur-f), transform var(--dur-f); box-shadow: 0 4px 20px rgba(139,127,255,0.30); }
.btn-new-pl:hover { opacity: 0.88; transform: scale(1.02); }
.btn-new-pl:active { transform: scale(0.97); }


/* ═══════════════════════════════════════════════════════
   9. FAVORITOS (estado vacío)
═══════════════════════════════════════════════════════ */
.fav-empty { display: none; flex-direction: column; align-items: center; gap: 10px; padding: 64px; text-align: center; }
.fav-empty svg { width: 60px; height: 60px; opacity: 0.35; }
.fav-empty p   { font-size: 16px; font-weight: 500; color: var(--text-secondary); }
.fav-empty span{ font-size: 13px; color: var(--text-tertiary); }


/* ═══════════════════════════════════════════════════════
   10. PANEL DE NOTIFICACIONES
═══════════════════════════════════════════════════════ */
.noti-panel {
  position: fixed; top: 0; right: 0;
  width: 320px; height: 100dvh;
  background: var(--bg-deep);
  border-left: 1px solid var(--border-mid);
  z-index: 8000;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
  box-shadow: -8px 0 32px rgba(0,0,0,0.5);
}
.noti-panel.open { transform: translateX(0); }
.noti-panel.hidden { display: none; }

.noti-panel-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 52px 20px 16px;
  border-bottom: 1px solid var(--border-dim);
  flex-shrink: 0;
}
.noti-panel-header h3 {
  font-family: 'Syne', sans-serif;
  font-size: 16px; font-weight: 700;
  color: var(--text-primary);
}
.noti-close {
  background: rgba(255,255,255,0.08);
  border: none; border-radius: 50%;
  width: 28px; height: 28px;
  color: var(--text-secondary);
  font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.noti-list {
  flex: 1; overflow-y: auto;
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}

.noti-item {
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-dim);
  cursor: pointer;
  transition: all var(--dur-f);
  position: relative;
}
.noti-item.no-leida {
  background: rgba(123,140,222,0.08);
  border-color: rgba(123,140,222,0.2);
}
.noti-item:active { transform: scale(0.98); }
.noti-dot-item {
  position: absolute; top: 14px; right: 14px;
  width: 7px; height: 7px;
  background: var(--accent-1);
  border-radius: 50%;
}
.noti-titulo {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.noti-mensaje {
  font-size: 12px; color: var(--text-secondary);
  line-height: 1.5;
}
.noti-fecha {
  font-size: 10px; color: var(--text-tertiary);
  margin-top: 6px;
}
.noti-empty {
  text-align: center; padding: 40px 20px;
  color: var(--text-tertiary); font-size: 13px;
}

.noti-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 7999;
  backdrop-filter: blur(3px);
}
.noti-overlay.hidden { display: none; }


/* ═══════════════════════════════════════════════════════
   11. MODAL DE CARTA (mensaje especial)
═══════════════════════════════════════════════════════ */
.carta-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 99000;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.3s ease;
}
.carta-overlay.hidden { display: none; }

.carta {
  width: min(320px, 90vw);
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}

/* Hoja de papel que "vuela" hacia adentro al abrir el sobre */
.carta-hoja {
  width: 100%;
  background-color: #f8f6f0;
  background-image:
    linear-gradient(rgba(123,140,222,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123,140,222,0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  transform: translateY(-120%) rotate(-3deg);
  opacity: 0;
}
.carta-hoja.aterrizar {
  animation: hojaVuela 0.8s cubic-bezier(0.34,1.2,0.64,1) forwards;
}
.carta-hoja.cerrando {
  animation: cartaCierra 0.6s cubic-bezier(0.4,0,1,1) forwards;
}
.carta-hoja.hidden { display: none; }

@keyframes hojaVuela {
  0%   { transform: translateY(-120%) rotate(-3deg); opacity: 0; }
  60%  { transform: translateY(10px) rotate(1deg); opacity: 1; }
  80%  { transform: translateY(-5px) rotate(-1deg); opacity: 1; }
  100% { transform: translateY(20px) rotate(0deg); opacity: 1; }
}
@keyframes cartaCierra {
  0%   { transform: translateY(20px) rotate(0deg); opacity: 1; }
  30%  { transform: translateY(-10px) rotate(2deg); opacity: 1; }
  100% { transform: translateY(120%) rotate(-5deg); opacity: 0; }
}

/* Texto dentro de la hoja (título escrito letra por letra + mensaje) */
.carta-titulo {
  font-family: 'Syne', sans-serif;
  font-size: 18px; font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 16px;
  min-height: 24px;
}
.carta-mensaje {
  font-family: 'Caveat', cursive;
  font-size: 16px;
  color: #2a2a4e;
  line-height: 1.7;
  min-height: 60px;
  white-space: pre-wrap;
}
.carta-cerrar {
  margin-top: 20px; width: 100%;
  padding: 12px;
  background: rgba(123,140,222,0.15);
  border: 1px solid rgba(123,140,222,0.3);
  border-radius: var(--r-lg);
  color: #1a1a2e; font-size: 13px;
  font-weight: 600; cursor: pointer;
}
.carta-cerrar:active { background: rgba(123,140,222,0.2); }

/* Sobre cerrado (estado inicial, antes de abrir la carta) */
.carta-sobre {
  width: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid rgba(123,140,222,0.3);
  border-radius: 16px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  padding: 40px 20px;
  cursor: pointer;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(123,140,222,0.15);
  transition: transform 0.3s ease;
  animation: sobreAppear 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
.carta-sobre:active { transform: scale(0.97); }
@keyframes sobreAppear {
  from { opacity: 0; transform: translateY(30px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.carta-flap {
  width: 0; height: 0;
  border-left: 120px solid transparent;
  border-right: 120px solid transparent;
  border-top: 70px solid rgba(123,140,222,0.15);
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.carta-body {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.carta-emoji { font-size: 3rem; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.1)} }

.carta-hint {
  font-size: 12px; color: rgba(255,255,255,0.4);
  letter-spacing: 0.08em;
}

/* Variante "carta ya abierta" (contenido fijo, sin animación de vuelo) */
.carta-contenido {
  width: 100%;
  background-color: #f8f6f0;
  background-image:
    linear-gradient(rgba(123,140,222,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123,140,222,0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1px solid rgba(123,140,222,0.3);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: cartaAbre 0.5s cubic-bezier(0.34,1.2,0.64,1) both;
}
.carta-contenido.hidden { display: none; }
@keyframes cartaAbre {
  from { opacity: 0; transform: scale(0.8) translateY(-20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}


/* ═══════════════════════════════════════════════════════
   12. DETALLE DE ÁLBUM
═══════════════════════════════════════════════════════ */
.album-hero {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--border-dim);
  animation: slideUp 0.4s var(--ease-out);
}

.album-cover-wrap {
  flex-shrink: 0;
  position: relative;
  width: 120px;
  height: 120px;
}
.album-cover {
  width: 120px;
  height: 120px;
  border-radius: var(--r-lg);
  object-fit: cover;
  box-shadow: var(--sh-md);
}
/* Resplandor decorativo detrás de la portada (no usado actualmente, queda preparado) */
.album-glow { position: absolute; inset: -15px; border-radius: 40px; background: var(--grad-main); opacity: 0.10; filter: blur(24px); z-index: -1; }

.album-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.album-type   { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; color: var(--accent-1); text-transform: uppercase; }
.album-title  { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.4px; }
.album-artist { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.album-meta   { font-size: 11px; color: var(--text-tertiary); }

.album-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  align-items: center;
}

/* Botón principal de play del álbum */
.btn-play-alb {
  width: 52px; height: 52px;
  background: var(--grad-main);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer;
  box-shadow: 0 6px 24px rgba(123,140,222,0.4);
  transition: all var(--dur-f) var(--ease-spring);
  flex-shrink: 0;
}
.btn-play-alb svg { width: 20px; height: 20px; }
.btn-play-alb:hover { transform: scale(1.08); }

/* Botón de shuffle del álbum */
.btn-shuffle-alb {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border-mid);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); cursor: pointer;
  transition: all var(--dur-f);
  flex-shrink: 0;
}
.btn-shuffle-alb svg {
  width: 18px; height: 18px;
  color: var(--text-secondary);
}
.btn-shuffle-alb:hover { background: var(--bg-active); color: #fff; }
.btn-shuffle-alb.on {
  border-color: var(--accent-1);
  color: var(--accent-1);
  background: var(--accent-1-dim);
}

/* Botón "Volver" */
.btn-back {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none;
  color: var(--text-secondary); font-size: 13px;
  cursor: pointer; padding: 8px 0;
  transition: color var(--dur-f);
  margin-bottom: 8px;
}
.btn-back svg { width: 18px; height: 18px; }
.btn-back:hover { color: var(--text-primary); }


/* ═══════════════════════════════════════════════════════
   13. TABLA DE CANCIONES (dentro de detalle de álbum)
═══════════════════════════════════════════════════════ */
.tbl-head {
  display: grid;
  grid-template-columns: 32px 1fr 100px 55px;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-dim);
  margin-bottom: 4px;
}
.tbl-head svg { width: 14px; height: 14px; }

.song-row {
  display: grid;
  grid-template-columns: 32px 1fr 100px 55px;
  gap: 10px; padding: 10px 14px; border-radius: var(--r-md);
  align-items: center; cursor: pointer;
  transition: all var(--dur-f);
  color: var(--text-secondary); font-size: 13px;
}
.song-row:hover { background: var(--bg-hover); color: var(--text-primary); }
.song-row.active { background: rgba(255,181,200,0.08); color: var(--accent-1); }
.col-title { font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* ═══════════════════════════════════════════════════════
   14. REPRODUCTOR INFERIOR (mini player)
═══════════════════════════════════════════════════════ */
.player {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--player-h);
  background: rgba(9,9,11,0.97);
  backdrop-filter: blur(30px) saturate(2);
  -webkit-backdrop-filter: blur(30px) saturate(2);
  border-top: 1px solid var(--border-soft);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 999; gap: 16px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Barra de progreso delgada arriba del player */
.prog-rail { position: absolute; top: -1px; left: 0; right: 0; height: 2px; }
.prog-rail-fill { height: 100%; background: var(--grad-main); border-radius: 99px; width: 0%; transition: width 0.5s linear; }

/* Info de la canción actual (portada + nombre + artista + like) */
.track-info { display: flex; align-items: center; gap: 12px; width: 240px; min-width: 0; flex-shrink: 0; }
.track-img-wrap { position: relative; flex-shrink: 0; cursor: pointer; }
.track-img { width: 52px; height: 52px; border-radius: var(--r-md); object-fit: cover; border: 1px solid var(--border-mid); background: var(--bg-card); transition: transform var(--dur-f) var(--ease-spring); }
.track-img-wrap:hover .track-img { transform: scale(1.06); }

/* Anillo giratorio sobre la portada mientras carga */
.track-img-spin { position: absolute; inset: -3px; border-radius: calc(var(--r-md) + 3px); background: conic-gradient(var(--accent-1), transparent 60%, var(--accent-2), transparent 90%); animation: spin 2s linear infinite; display: none; pointer-events: none; }
.player.loading .track-img-spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.track-text { min-width: 0; flex: 1; }
.track-name   { font-size: 13px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-artist { font-size: 11px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }

.btn-like { color: var(--text-tertiary); padding: 7px; border-radius: var(--r-sm); flex-shrink: 0; transition: all var(--dur-f); }
.btn-like:hover { color: var(--accent-2); transform: scale(1.15); }
.btn-like.liked { color: var(--accent-2); }
.btn-like.liked svg { fill: var(--accent-2); }
.btn-like svg { width: 16px; height: 16px; }

/* Controles centrales (prev/play/next/shuffle/repeat) */
.controls { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 520px; }
.ctrl-btns { display: flex; align-items: center; gap: 6px; }
.ctrl { width: 32px; height: 32px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; color: var(--text-tertiary); transition: all var(--dur-f); }
.ctrl svg { width: 16px; height: 16px; }
.ctrl:hover { color: var(--text-primary); background: var(--bg-hover); }
.ctrl.on { color: var(--accent-1); }

.play-btn {
  width: 44px; height: 44px;
  background: var(--grad-main); border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer;
  box-shadow: 0 6px 20px rgba(139,127,255,0.38);
  transition: all var(--dur-f) var(--ease-spring); flex-shrink: 0;
}
.play-btn svg { width: 18px; height: 18px; }
.play-btn:hover { transform: scale(1.10); box-shadow: 0 8px 28px rgba(139,127,255,0.55); }
.play-btn:active { transform: scale(0.95); }

/* Barra de tiempo + progreso */
.time-bar { display: flex; align-items: center; gap: 10px; width: 100%; }
.time { font-size: 10px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; min-width: 32px; flex-shrink: 0; }
.time.r { text-align: right; }
.prog-track { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 99px; position: relative; cursor: pointer; transition: height var(--dur-f); }
.prog-track:hover { height: 8px; }
.prog-fill { height: 100%; background: var(--grad-main); border-radius: 99px; pointer-events: none; width: 0%; }
.prog-thumb { position: absolute; top: 50%; transform: translate(-50%,-50%) scale(0); width: 14px; height: 14px; background: #fff; border-radius: 50%; box-shadow: var(--sh-sm); transition: transform var(--dur-f); pointer-events: none; left: 0%; }
.prog-track:hover .prog-thumb { transform: translate(-50%,-50%) scale(1); }

/* Controles extra (volumen, cola, fullscreen) — solo escritorio */
.extras {
  display: flex;
  width: auto;
  justify-content: center;
  gap: 8px;
}
.vol-wrap { display: none; }
.btn-queue { display: none; }
.btn-fs-mobile-show { display: flex; }

.vol-track { width: 80px; height: 4px; background: rgba(255,255,255,0.08); border-radius: 99px; position: relative; }
.vol-fill { height: 100%; background: var(--grad-main); border-radius: 99px; }
.vol-input { position: absolute; inset: -8px 0; width: 100%; opacity: 0; cursor: pointer; z-index: 1; }


/* ═══════════════════════════════════════════════════════
   15. REPRODUCTOR PANTALLA COMPLETA (fs-player)
═══════════════════════════════════════════════════════ */
.fs-player {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; flex-direction: column;
  align-items: center;
  opacity: 0; pointer-events: none;
  overflow-y: auto;
  overflow-x: hidden;
  /* Fondo de respaldo: si por alguna razón no se aplica el color
     de la canción (c.colorBg), nunca queda transparente */
  background: var(--bg-void);
}
.fs-player.open { opacity: 1; pointer-events: all; }

/* Header (botón cerrar + "Reproduciendo" + título + menú) */
.fs-header {
  position: relative; z-index: 10;
  width: 100%; display: flex;
  align-items: center; justify-content: space-between;
  padding: 52px 20px 16px;
}
.fs-header-center { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; }
.fs-header-label { font-size: 11px; font-weight: 300; opacity: 0.5; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; }
.fs-header-title { font-size: 13px; font-weight: 600; color: #fff; }
.fs-close {
  background: rgba(255,255,255,0.15); border: none;
  border-radius: 50%; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer; flex-shrink: 0;
}
.fs-close svg { width: 18px; height: 18px; }
.fs-header-btn {
  background: none; border: none;
  color: rgba(255,255,255,0.6);
  font-size: 20px; cursor: pointer; padding: 8px;
  flex-shrink: 0;
}

/* Portada grande */
.fs-album-wrap {
  position: relative; z-index: 10;
  width: min(75vw, 300px);
  aspect-ratio: 1;
  border-radius: 12px; overflow: hidden;
  margin: 8px 0;
  flex-shrink: 0;
}
.fs-album-img { width: 100%; height: 100%; object-fit: cover; }

/* Tarjeta inferior: título, like, progreso y controles */
.fs-bottom-card {
  margin-top: 55px;
  position: relative; z-index: 10;
  width: 100%;
  padding: 20px 28px 16px;
  display: flex; flex-direction: column; gap: 16px;
}
.fs-song-row { display: flex; align-items: center; justify-content: space-between; }
.fs-song-info { flex: 1; min-width: 0; }
.fs-title-big { font-size: 1.5rem; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.fs-artist-sub { font-size: 0.9rem; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* Botón de like (corazón) */
.fs-like {
  background: none; border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 50%; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5); cursor: pointer; flex-shrink: 0;
  transition: all var(--dur-f);
}
.fs-like svg {
  width: 18px; height: 18px;
  fill: none;
  transition: fill var(--dur-f);
}
.fs-like.liked { border-color: var(--accent-2); color: var(--accent-2); }
.fs-like.liked svg { fill: var(--accent-2); }
/* :hover solo en dispositivos con mouse real, para evitar que en
   móvil el estado "hover" se quede pegado tras un toque */
@media (hover: hover) {
  .fs-like:hover { border-color: var(--accent-2); color: var(--accent-2); }
}

/* Barra de progreso */
.fs-prog-wrap { display: flex; align-items: center; gap: 10px; }
.fs-prog-wrap span { font-size: 11px; color: rgba(255,255,255,0.4); min-width: 36px; font-variant-numeric: tabular-nums; }
.fs-prog {
  flex: 1; height: 3px;
  background: rgba(255,255,255,0.2); border-radius: 99px;
  cursor: pointer; position: relative;
}
.fs-prog-fill {
  height: 100%; background: #fff;
  border-radius: 99px; width: 0%;
  transition: width 0.5s linear; position: relative;
}
.fs-prog-fill::after {
  content: ''; position: absolute; right: -6px; top: -4.5px;
  width: 12px; height: 12px; background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Controles (prev/play/next/expandir karaoke) */
.fs-btns { display: flex; align-items: center; justify-content: center; gap: 24px; }
.fs-ctrl {
  width: 44px; height: 44px; background: none; border: none;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7); cursor: pointer; transition: all var(--dur-f);
}
.fs-ctrl svg { width: 24px; height: 24px; }
.fs-ctrl:hover { color: #fff; background: rgba(255,255,255,0.1); }
.fs-play {
  width: 72px; height: 72px;
  background: #fff; border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #000; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transition: transform var(--dur-f) var(--ease-spring);
}
.fs-play svg { width: 28px; height: 28px; }
.fs-play:hover { transform: scale(1.08); }
.fs-play:active { transform: scale(0.95); }


/* ═══════════════════════════════════════════════════════
   16. TARJETA DE LETRAS (lyrics preview dentro de fs-player)
═══════════════════════════════════════════════════════ */
.fs-lyrics-card {
  width: calc(100% - 32px);
  margin: 63px 16px 20px;
  flex-shrink: 0;
  background: linear-gradient(160deg, #408eb8 0%, #20508a 100%);
  border-radius: 16px;
  padding: 20px 18px 24px;
  min-height: 200px;
  max-height: 450px;
  overflow-y: hidden;
  overflow-x: hidden;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  pointer-events: none;
}
.fs-lyrics-card::-webkit-scrollbar { display: none; }

.fs-lyrics-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  padding: 8px 0;
  z-index: 1;
  flex-shrink: 0;
  pointer-events: all;
}
.fs-lyrics-label {
  font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.5);
}

/* Contenedor de líneas de letra (scrollea verticalmente con la canción) */
.fs-lyrics-world {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  padding: 54% 0 50% 0;
  will-change: transform;
  transition: transform 0.65s cubic-bezier(0.33,1,0.68,1);
  overflow-y: visible;
  scrollbar-width: none;
}
.fs-lyrics-world::-webkit-scrollbar { display: none; }

.fs-lyrics-footer {
  flex-shrink: 0;
  display: flex; justify-content: flex-end;
  padding: 8px 0 12px;
  position: sticky;
  bottom: 0;
}
.fs-lyrics-share {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px; color: rgba(255,255,255,.7);
  font-size: .7rem; padding: 5px 12px; cursor: pointer;
}

/* Estilo de cada línea de letra (mini karaoke dentro de fs-lyrics-world) */
.fs-kar-line {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: rgba(255,255,255,0.28);
  line-height: 1.4;
  opacity: 0.35;
  transition: color 0.35s ease, opacity 0.35s ease, font-size 0.4s cubic-bezier(0.34,1.3,0.64,1), transform 0.35s ease;
  padding: 3px 0;
  transform: scale(0.92);
}
.fs-kar-line.active {
  color: #fff; opacity: 1;
  font-size: 1.25rem;
  font-weight: 900;
  transform: scale(1.04);
}
.fs-kar-line.past { color: rgba(255,255,255,0.22); opacity: 0.28; transform: scale(0.88); }
.fs-kar-line.next { color: rgba(255,255,255,0.45); opacity: 0.5; transform: scale(0.95); }


/* ═══════════════════════════════════════════════════════
   17. SWITCH DE IDIOMA ES/EN (píldora deslizante)
   Usado en fs-lyrics-card (#fsLangBtn) y en
   el karaoke completo (#fsKarLang)
═══════════════════════════════════════════════════════ */
.lang-switch {
  position: relative;
  display: flex;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  cursor: pointer;
}

/* Píldora blanca que se desliza entre ES y EN */
.lang-pill {
  position: absolute;
  top: 4px; left: 4px;
  width: 38px; height: calc(100% - 8px);
  background: #fff;
  border-radius: 999px;
  transition: transform 0.35s cubic-bezier(0.34,1.4,0.64,1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.lang-switch.is-es .lang-pill {
  transform: translateX(40px);
}

.lang-opt {
  position: relative;
  width: 38px; padding: 6px 0;
  text-align: center;
  font-size: 0.72rem; font-weight: 700;
  color: rgba(255,255,255,0.6);
  border-radius: 999px;
  transition: color 0.25s ease;
  z-index: 1;
  user-select: none;
}
.lang-switch.is-es .lang-opt[data-lang="es"],
.lang-switch.is-en .lang-opt[data-lang="en"] {
  color: #1a1a2e;
}

/* Micro-animación al tocar: la píldora se achica un poco */
.lang-switch:active .lang-pill {
  transform: scale(0.92) translateX(var(--x, 0));
}
.lang-switch.is-en:active .lang-pill {
  --x: 40px;
}


/* ═══════════════════════════════════════════════════════
   18. KARAOKE PANTALLA COMPLETA (#fsKaraoke)
═══════════════════════════════════════════════════════ */
#fsKaraoke {
  position: fixed; inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #408eb8 0%, #20508a 100%);
}
#fsKaraoke.hidden { display: none !important; }

/* Header: mini portada + nombre + artista + botón cerrar */
#fsKaraoke .karaoke-header {
  padding: 52px 20px 14px;
  display: flex; flex-direction: column; gap: 12px; z-index: 1;
  flex-shrink: 0;
}
#fsKaraoke .karaoke-mini {
  display: flex; align-items: center; gap: 12px; width: 100%;
}
#fsKaraoke .karaoke-mini > div { flex: 1; }
#fsKaraoke .karaoke-mini-img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }
#fsKaraoke .karaoke-mini-name { font-size: .9rem; font-weight: 600; margin: 0; color: #fff; }
#fsKaraoke .karaoke-mini-artist { font-size: .75rem; opacity: .6; margin: 3px 0 0; color: #fff; }
#fsKaraoke .close-karaoke {
  background: rgba(255,255,255,.15); border: none;
  color: rgba(255,255,255,.85); font-size: .85rem;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Escenario donde se desplazan las letras grandes */
#fsKaraoke .karaoke-stage {
  flex: 1; overflow: hidden; position: relative;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.3) 8%, black 22%, black 72%, rgba(0,0,0,.3) 86%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.3) 8%, black 22%, black 72%, rgba(0,0,0,.3) 86%, transparent 100%);
}
#fsKaraoke .karaoke-world {
  position: absolute; left: 0; right: 0;
  display: flex; flex-direction: column;
  padding: 50% 24px; gap: 16px;
  will-change: transform;
  transition: transform .65s cubic-bezier(0.33,1,0.68,1);
}
#fsKaraoke .kar-line {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.3rem, 6vw, 1.9rem);
  font-weight: 700;
  color: rgba(255,255,255,.35);
  line-height: 1.3;
  transition: color .35s ease, transform .35s cubic-bezier(0.34,1.3,0.64,1), opacity .35s ease;
  transform: scale(0.9); opacity: .4;
  transform-origin: left center;
}
#fsKaraoke .kar-line.active {
  color: #fff;
  opacity: 1;
  position: relative;
  z-index: 10;
  animation: karPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes karPop {
  0%   { transform: scale(0.9) translateY(10px); }
  60%  { transform: scale(1.1) translateY(-2px); }
  100% { transform: scale(1.04) translateY(0); }
}
#fsKaraoke .kar-line.past   { color: rgba(255,255,255,.2); transform: scale(0.88); opacity: .25; }
#fsKaraoke .kar-line.next   { color: rgba(255,255,255,.45); transform: scale(0.93); opacity: .5; }

/* Footer: barra de progreso + botón de idioma + play */
#fsKaraoke .karaoke-footer {
  position: absolute; bottom: 0; left: 0; right: 0;
  border-radius: 20px 20px 0 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 24px 40px;
  display: flex; flex-direction: column; gap: 14px;
}

#fsKaraoke .karaoke-footer {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#fsKaraoke.controles-ocultos .karaoke-footer {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

/* El header (Letras/Ampliar/X) también se oculta junto con los controles */
#fsKaraoke .karaoke-header {
  transition: opacity 0.4s ease;
}
#fsKaraoke.controles-ocultos .karaoke-header {
  opacity: 0;
  pointer-events: none;
}

/* Que el cursor no se quede visible tampoco, para sentirse realmente "limpio" */
#fsKaraoke.controles-ocultos {
  cursor: none;
}

#fsKaraoke .karaoke-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 0 3px;
}
#fsKaraoke .karaoke-controls > * { flex-shrink: 0; }

#fsKaraoke .mob-progress-wrap {
  width: 100%; display: flex; align-items: center; gap: 10px;
}
#fsKaraoke .mob-time {
  font-size: .62rem; font-weight: 300; opacity: .55; min-width: 30px; text-align: center; color: #fff;
}
#fsKaraoke .mob-progress {
  flex: 1; height: 3px;
  background: rgba(255,255,255,.25);
  border-radius: 3px; cursor: pointer; position: relative;
  overflow: visible;
}
#fsKaraoke .mob-fill {
  height: 100%; width: 0%;
  background: #fff; border-radius: 3px;
  transition: width .1s linear;
  position: relative;
}
/* Círculo/thumb al final de la barra de progreso */
#fsKaraoke .mob-fill::after {
  content: '';
  position: absolute; right: -6px; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  z-index: 2;
}

/* Botón circular de play/pausa del karaoke (mismo tamaño que los otros controles) */
#fsKaraoke .play-btn,
#fsKaraoke .karaoke-controls .play-btn {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  padding: 0 !important;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
#fsKaraoke .play-btn svg {
  width: 28px; height: 28px;
  filter: none;
  color: #000;
  fill: #000;
}


/* ═══════════════════════════════════════════════════════
   19. NAVEGACIÓN MÓVIL (barra inferior, actualmente sin uso)
═══════════════════════════════════════════════════════ */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: var(--player-h);
  left: 0; right: 0;
  height: var(--mobile-nav-h);
  background: rgba(9,9,11,0.97);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-soft);
  z-index: 2500;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
}
.mob-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 14px; background: none; border: none; color: var(--text-tertiary); font-size: 10px; font-weight: 500; border-radius: var(--r-md); transition: color var(--dur-f); cursor: pointer; flex: 1; }
.mob-btn svg { width: 22px; height: 22px; transition: transform var(--dur-f) var(--ease-spring); }
.mob-btn.active { color: var(--accent-1); }
.mob-btn.active svg { transform: scale(1.15); }
.mob-btn:not(.active):hover { color: var(--text-secondary); }


/* ═══════════════════════════════════════════════════════
   20. TOAST (mensajes flotantes temporales)
═══════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: calc(var(--player-h) + 16px); left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--bg-base); border: 1px solid var(--border-mid);
  border-radius: var(--r-full); padding: 10px 20px;
  font-size: 13px; color: var(--text-primary);
  box-shadow: var(--sh-md); opacity: 0; pointer-events: none;
  transition: all 0.28s var(--ease-out); z-index: 8000; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }


/* ═══════════════════════════════════════════════════════
   21. SKELETON LOADERS (placeholders mientras carga)
═══════════════════════════════════════════════════════ */
.sk { background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--r-md); }
@keyframes shimmer { from{background-position:200% 0} to{background-position:-200% 0} }
.sk-img   { width: 100%; aspect-ratio: 1; margin-bottom: 12px; }
.sk-title { height: 13px; width: 80%; margin-bottom: 7px; }
.sk-sub   { height: 11px; width: 55%; }


/* ═══════════════════════════════════════════════════════
   22. CORAZONES FLOTANTES (animación al dar like)
═══════════════════════════════════════════════════════ */
.heart-btn {
  background: none; border: none;
  color: rgba(255,255,255,.5);
  font-size: 1.5rem; cursor: pointer; padding: 4px;
  transition: transform .15s ease;
}
.heart-btn.liked {
  color: var(--accent-2);
  animation: heartPop .4s cubic-bezier(0.34,1.8,0.64,1) forwards;
}
@keyframes heartPop {
  0%{transform:scale(1)} 40%{transform:scale(1.5)} 70%{transform:scale(.88)} 100%{transform:scale(1.15)}
}

.heart-float {
  position: fixed;
  pointer-events: none; z-index: 9999;
  color: var(--accent-2);
  animation: heartFloat 1.2s ease forwards;
}
@keyframes heartFloat {
  0%   { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translateY(-120px) scale(1.4) rotate(var(--rot, 15deg)); }
}


/* ═══════════════════════════════════════════════════════
   23. MEDIA QUERIES — RESPONSIVE
═══════════════════════════════════════════════════════ */

/* ── Laptop (≤1200px): sidebar más angosto, cards más pequeñas ── */
@media (max-width: 1200px) {
  :root { --sidebar-w: 240px; }
  .extras { width: auto; }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
}

/* ── Tablet (≤992px) ── */
@media (max-width: 992px) {
  :root { --sidebar-w: 220px; }
  .prof-name { display: none; }
  .album-hero { grid-template-columns: 260px 1fr; }
  .fs-body { gap: 40px; padding: 0 40px; }
  .fs-art img { width: 220px; height: 220px; }
}

/* ── Mobile (≤768px): layout completo del reproductor en columna ── */
@media (max-width: 768px) {
  :root {
    --header-h:     100px;
    --player-h:     115px;
    --mobile-nav-h: 60px;
  }

  /* Header compacto */
  /* Header compacto */
  .header { padding: 12px 14px; gap: 12px; }
  .header-row1 { height: 24px; }
  .header-row2 { height: 26px; }
  .logo-name { font-size: 15px; }
  .logo-icon { width: 26px; height: 26px; }
  .search { height: 28px; padding: 0 10px; }
  .search input { font-size: 13px; }

  /* Sidebar como panel deslizante a pantalla completa */
  .sidebar {
    position: fixed;
    top: var(--header-h);
    bottom: calc(var(--player-h) + var(--mobile-nav-h));
    z-index: 2000;
    overflow-y: auto;
  }

  .content { padding: 20px 16px; padding-bottom: 40px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Card más compacta en móvil */
  .card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--r-xl);
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    position: relative;
    overflow: hidden;
    animation: scaleIn 0.4s var(--ease-out) both;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  }
  .card:active { transform: scale(0.96); background: rgba(255,255,255,0.09); border-color: rgba(123,140,222,0.2); }
  .card h3 { font-size: 13px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 3px; }
  .card p  { font-size: 11px; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Card de álbum (con badge "ÁLBUM") */
  .card-album { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--r-xl); padding: 12px; cursor: pointer; transition: all 0.3s var(--ease); position: relative; overflow: hidden; animation: scaleIn 0.4s var(--ease-out) both; }
  .card-album .card-img img { border-radius: var(--r-lg); box-shadow: 0 8px 24px rgba(0,0,0,0.5); transition: transform 0.3s var(--ease); }
  .card-album:active { transform: scale(0.97); }
  .card-album .album-badge { font-size: 9px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent-1); text-transform: uppercase; margin-bottom: 3px; display: block; }

  /* Detalle de álbum apilado verticalmente */
  .album-hero { grid-template-columns: 1fr; gap: 16px; }
  .album-cover { width: 140px; height: 140px; }
  .album-title { font-size: 22px; }

  /* Tabla de canciones: oculta columna de año */
  .tbl-head { grid-template-columns: 28px 1fr 90px 45px; }
  .song-row { grid-template-columns: 28px 1fr 90px 45px; font-size: 12px; padding: 8px 10px; }
  .tbl-head .col-year, .song-row .col-year { display: none; }
  .song-row .col-artist { font-size: 11px; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
  .tbl-head .col-artist { text-align: center; }

  /* ── Reproductor inferior en columna (2 filas) ── */
  .player {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 8px 14px;
    height: var(--player-h);
  }

  /* Fila 1: portada + nombre + corazón */
  .track-info {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .track-img { width: 38px; height: 38px; }
  .track-text { flex: 1; min-width: 0; }
  .track-name { font-size: 12px; font-weight: 600; }
  .track-artist { font-size: 10px; }
  .btn-like { display: flex; color: var(--text-tertiary); padding: 6px; }
  .btn-like svg { width: 16px; height: 16px; }

  /* Fila 2: controles + barra de progreso */
  .controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .ctrl-btns {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
  }
  .time-bar { display: flex; width: 100%; }

  .ctrl { width: 30px; height: 30px; }
  .ctrl svg { width: 16px; height: 16px; }
  .play-btn { width: 40px; height: 40px; }
  .play-btn svg { width: 18px; height: 18px; }

  /* Mostrar controles extra que en desktop están ocultos */
  #btnRew, #btnFwd, #btnRep { display: flex; }
  #btnRnd { display: flex; }

  /* Ocultar extras de escritorio pero mostrar botón de fullscreen */
  .extras { display: none; }
  #btnFs {
    display: flex;
    width: 30px; height: 30px;
  }
  #btnFs svg { width: 16px; height: 16px; }

  .app-layout { bottom: var(--player-h); }

  /* Fullscreen player apilado */
  .fs-body { flex-direction: column; gap: 24px; padding: 0 20px; align-items: center; }
  .fs-art img { width: 200px; height: 200px; }
  .fs-title { font-size: 22px; }
  .fs-close { top: 16px; left: 16px; padding: 6px 12px 6px 8px; }
  .fs-play { width: 60px; height: 60px; }

  .toast { bottom: calc(var(--player-h) + 10px); font-size: 12px; }
  .sec-head h2 { font-size: 18px; }
}

/* ── Small Mobile (≤480px) ── */
@media (max-width: 480px) {
  :root { --header-h: 100px; }
  .header { padding: 0 12px; gap: 5px; }
  .header-row1 { height: 22px; }
  .header-row2 { height: 24px; }
  .logo-icon { width: 24px; height: 24px; }
  .logo-icon svg { width: 13px; height: 13px; }
  .logo-name { font-size: 14px; }
  .search { height: 26px; }
  .btn-noti { width: 26px; height: 26px; }
  .profile-pill { padding: 3px 8px 3px 3px; gap: 6px; }
  .prof-img { width: 22px; height: 22px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .content { padding: 16px 12px; padding-bottom: 32px; }
  .album-cover { width: 110px; height: 110px; }
  .album-title { font-size: 18px; }
}






/* ════════════════════════════════
   MODAL VER/EDITAR PERFIL
════════════════════════════════ */
.perfil-overlay {
  position: fixed; inset: 0;
  background: var(--bg-void);
  z-index: 9500;
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto;
}
.perfil-overlay.hidden { display: none; }

.perfil-modal {
  width: 100%;
  max-width: 480px;
  min-height: 100%;
  background: var(--bg-void);
  border-radius: 0;
  padding: 60px 24px 40px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative;
  animation: fadeIn 0.25s ease;
}
.perfil-close {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%; color: var(--text-secondary);
  font-size: 12px; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.perfil-foto-wrap {
  position: relative;
  width: 96px; height: 96px;
  margin-bottom: 12px;
}
.perfil-foto-grande {
  width: 96px; height: 96px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(139,127,255,0.4);
}
.perfil-foto-lapiz {
  position: absolute; bottom: -2px; right: -2px;
  width: 30px; height: 30px;
  background: var(--grad-main);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer;
  border: 2px solid var(--bg-deep);
}
.perfil-foto-lapiz svg { width: 13px; height: 13px; }

.perfil-campo {
  width: 100%;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border-dim);
  display: flex; flex-direction: column; gap: 4px;
}
.perfil-campo:last-child { border-bottom: none; }
.perfil-campo-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.perfil-campo-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.perfil-campo-valor {
  font-size: 14px; color: var(--text-primary); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.perfil-lapiz-btn {
  flex-shrink: 0;
  width: 26px; height: 26px;
  background: var(--bg-hover); border-radius: var(--r-sm);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--dur-f);
}
.perfil-lapiz-btn:hover { background: var(--bg-active); color: var(--accent-1); }
.perfil-lapiz-btn svg { width: 12px; height: 12px; }

.perfil-campo-input {
  width: 100%;
  padding: 7px 10px;
  background: var(--bg-hover);
  border: 1px solid var(--accent-1);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.perfil-guardar-btn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 432px;
  padding: 14px;
  background: var(--grad-main);
  border: none; border-radius: var(--r-lg);
  color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(123,140,222,0.35);
  transition: opacity var(--dur-f), transform var(--dur-f);
  z-index: 9600;
}
.perfil-guardar-btn:hover { opacity: 0.9; }
.perfil-guardar-btn:active { transform: translateX(-50%) scale(0.98); }
.perfil-guardar-btn.hidden { display: none; }

@media (min-width: 900px) {
  .perfil-overlay {
    align-items: center;
    background: rgba(10, 12, 30, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .perfil-modal {
    width: 100%;
    max-width: 480px;
    min-height: auto;
    background: var(--bg-deep);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-2xl);
    box-shadow: var(--sh-lg);
    padding: 44px 40px 36px;
  }
  .perfil-foto-wrap {
    width: 112px; height: 112px;
    margin-bottom: 20px;
  }
  .perfil-foto-grande {
    width: 112px; height: 112px;
  }
  .perfil-campo {
    padding: 16px 4px;
  }
  .perfil-guardar-btn {
    position: relative;
    bottom: auto; left: auto; transform: none;
    max-width: none;
    margin-top: 24px;
  }
  .perfil-guardar-btn.hidden {
    display: none;
  }
}

.foto-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
}
.foto-overlay img {
  width: min(90vw, 500px);
  height: min(90vw, 500px);
  max-height: 90vh;
  border-radius: 20%;
  object-fit: cover;
}
.foto-overlay.hidden { display: none; }

.search-filter-btn {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
  border-radius: var(--r-sm);
  transition: all var(--dur-f);
}
.search-filter-btn svg { width: 14px; height: 14px; }
.search-filter-btn:hover { color: var(--accent-1); background: var(--bg-hover); }
.search-filter-btn.active { color: var(--accent-1); background: var(--accent-1-dim); }

.search-genero-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--bg-base);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  z-index: 5001;
  animation: slideUp 0.2s var(--ease-out);
}
.search-genero-dropdown.hidden { display: none; }
.search-genero-item {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--dur-f);
  text-align: left;
}
.search-genero-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.search-genero-item.selected { background: var(--accent-1-dim); color: var(--accent-1); font-weight: 600; }


.genero-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-1);
  background: var(--accent-1-dim);
  padding: 3px 8px;
  border-radius: var(--r-full);
  margin-bottom: 4px;
}

.login-prompt-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 9700;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.3s ease;
  padding: 20px;
}
.login-prompt-overlay.hidden { display: none; }

.login-prompt-modal {
  width: 100%;
  max-width: 360px;
  background: var(--bg-deep);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-xl);
  padding: 32px 24px 24px;
  text-align: center;
  box-shadow: var(--sh-lg);
  animation: scaleIn 0.3s var(--ease-out);
}
.login-prompt-emoji { font-size: 2.5rem; margin-bottom: 12px; }
.login-prompt-modal h3 {
  font-family: 'Syne', sans-serif;
  font-size: 17px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.login-prompt-modal p {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.5;
}
.login-prompt-skip {
  width: 100%; padding: 10px;
  color: var(--text-tertiary);
  font-size: 12px;
  margin-top: 4px;
}
.login-prompt-skip:hover { color: var(--text-secondary); }

.perfil-fecha-selects {
  display: flex;
  gap: 6px;
  flex: 1;
}
.perfil-fecha-selects select {
  flex: 1;
  padding: 7px 8px;
  background: var(--bg-hover);
  border: 1px solid var(--accent-1);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

#fsKaraoke .close-karaoke {
  background: rgba(255,255,255,.15); border: none;
  color: rgba(255,255,255,.85); font-size: .85rem;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ← PEGA AQUÍ EL BLOQUE DE .fs-modo-tabs / .fs-modo-btn, SIN @media alrededor */
.fs-modo-tabs { display: flex; gap: 6px; }
.fs-modo-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r-full);
  padding: 5px 12px;
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all var(--dur-f);
}
.fs-modo-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }
.fs-modo-btn.active { background: #fff; color: #1a1a2e; }
.fs-modo-btn.hidden { display: none; }

/* ════════════════════════════════
                PC
════════════════════════════════ */

.karaoke-big-img {
  display: none;
}

@media (min-width: 769px) {
  .overlay { display: none !important; }
  .fs-lyrics-card { display: none; }

  .sidebar {
    width: 0; min-width: 0; overflow: hidden;
    transform: none;
    transition: width var(--dur-s) var(--ease-out);
  }
  .sidebar.open { width: var(--sidebar-w); }
  .sidebar-inner { width: var(--sidebar-w); }

  #btnFs { display: none; }

  .fs-album-wrap {
    width: min(38vw, 420px);
    margin: 40px auto 0;
  }

  .fs-bottom-card {
    max-width: 640px;
    margin: 90px auto 16px;
    gap: 24px;
    padding: 0;
  }

  .fs-lyrics-card { display: none; }

  .fs-title-big { font-size: 1.75rem; letter-spacing: -0.03em; }
  .fs-artist-sub { font-size: 1rem; margin-top: 6px; }
  .fs-song-row { padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .fs-prog-wrap { gap: 14px; }
  .fs-prog { height: 4px; }
  .fs-btns { gap: 32px; }
  .fs-ctrl:hover { background: rgba(255,255,255,0.12); transform: scale(1.08); }
  .fs-play:hover { transform: scale(1.06); box-shadow: 0 12px 32px rgba(0,0,0,0.4); }

  #fsKaraoke .karaoke-footer {
    max-width: 640px;
    margin: 0 auto;
  }

  /* Karaoke centrado en PC */
  #fsKaraoke .karaoke-stage {
    width: 60%;
    margin: 0 auto;
  }

  #fsKaraoke .karaoke-header {
    display: block !important;
    flex-direction: unset !important;
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    padding: 24px 24px 0 !important;
  }

  /* Mini info: se queda pegada a la izquierda real */
  #fsKaraoke .karaoke-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    max-width: 60%;
  }

  /* X: fuera del flujo, esquina superior derecha real del header */
  #fsKaraoke .close-karaoke {
    position: absolute !important;
    top: 24px !important;
    right: 24px !important;
  }

  /* Tabs: centrados de forma independiente, sin importar el ancho del mini */
  #fsKaraoke .fs-modo-tabs {
    position: absolute !important;
    top: 24px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
}


.content-loading {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  z-index: 5000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.content-loading.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.content-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(139,127,255,0.2);
  border-top-color: var(--accent-1, #7B8CDE);
  border-radius: 50%;
  animation: spinLoading 0.8s linear infinite;
}
@keyframes spinLoading {
  to { transform: rotate(360deg); }
}

.content-loading p {
  font-size: 13px;
  color: var(--text-secondary);
}







/* ════════════════════════════════
   KARAOKE GRANDE — DESKTOP (≥1100px)
   Bloque único: consolida todos los ajustes
   de columnas, portada, footer y modo "Ampliar"
════════════════════════════════ */
@media (min-width: 1100px) {
  #fsKaraoke {
    display: grid;
    grid-template-columns: 40% 60%;
    grid-template-rows: 96px 1fr auto;
    column-gap: 32px;
    row-gap: 24px;
    height: 100vh;
    overflow: hidden;
  }

  #fsKaraoke .karaoke-header {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex !important;
    align-items: center !important;
    padding: 0 48px !important;
  }

  /* Columna izquierda: portada + controles */
  .karaoke-big-img {
    display: block;
    grid-column: 1;
    grid-row: 2;
    width: clamp(320px, 30vw, 440px);
    height: clamp(320px, 30vw, 440px);
    object-fit: cover;
    border-radius: 16px;
    margin: 0 0 32px 140px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.45);
    align-self: center;
  }

  #fsKaraoke .karaoke-footer {
    grid-column: 1;
    grid-row: 3;
    position: relative;
    bottom: auto; left: auto; right: auto;
    width: clamp(320px, 30vw, 440px);
    max-width: none;
    margin: 0 0 0 140px;
    padding: 0 0 48px;
    display: flex;
    flex-direction: column;
    gap: 22px;
  }

    #fsKaraoke.modo-foco .karaoke-footer {
    grid-column: 1 / -1;
    max-width: 560px;
    margin: 0 auto;
    padding: 24px 32px 40px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
  }

  #fsKaraoke.modo-foco .mob-progress-wrap {
    gap: 14px;
  }


  #fsKaraoke.modo-foco .mob-time {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.75;
  }

  #fsKaraoke.modo-foco .mob-progress {
    height: 5px;
  }

  #fsKaraoke.modo-foco .karaoke-controls {
    gap: 28px;
    margin-top: 4px;
  }

  #fsKaraoke.modo-foco .play-btn,
  #fsKaraoke.modo-foco .karaoke-controls .play-btn {
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    min-height: 72px !important;
    max-height: 72px !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.35) !important;
  }

  #fsKaraoke.modo-foco .play-btn svg {
    width: 34px; height: 34px;
  }

  #fsKaraoke .mob-progress-wrap { max-width: 440px; }
  #fsKaraoke .karaoke-controls { gap: 36px; }

  /* Botón play más grande en esta vista */
  #fsKaraoke .play-btn,
  #fsKaraoke .karaoke-controls .play-btn {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
  }
  #fsKaraoke .play-btn svg { width: 30px; height: 30px; }
  #fsKaraoke .lang-switch { transform: scale(1.05); }

  /* Columna derecha: letras con degradado real hacia abajo */
  #fsKaraoke .karaoke-stage {
    grid-column: 2;
    grid-row: 2 / 4;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 92%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 92%);
  }

  
  #fsKaraoke .fs-modo-tabs {
    gap: 4px !important;
  }

  #fsKaraoke .kar-line {
    position: relative;
    z-index: 1;
    font-size: clamp(2rem, 4.2vw, 3.4rem);  /* usa siempre el tamaño MÁS GRANDE como base */
    font-weight: 800;
    transform: scale(0.68);                  /* en modo normal, se ve más chico via escala */
    transform-origin: left center;
    transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
  }

  #fsKaraoke.modo-foco .kar-line {
    transform: scale(1);                      /* en modo Ampliar, tamaño real (grande) */
    transform-origin: center center;
    text-align: center;
  }

  #fsKaraoke .karaoke-world {
    padding: 8% 56px 50% 12px;
    text-align: left;
  }

  #fsKaraoke.modo-foco .karaoke-world {
    text-align: center;
    align-items: center;
    padding: 8% 12% 50%;
  }

  #fsKaraoke .kar-line.active {
    position: relative;
    z-index: 10;
  }

  #fsVideoWrapKar {
    grid-column: 2;
    grid-row: 2 / 4;
  }

  body.trends-fullscreen .trend-item {
  justify-content: center !important;
  padding: 0 !important;
  }

  body.trends-fullscreen .trend-video-wrap {
    margin: 0 auto;
  }

  /* Letra más grande en anchos intermedios tipo "mitad de pantalla" en PC */

  /* ...y ponerlo aquí, fuera de cualquier @media, junto a la sección 18 (KARAOKE) */
  /* Modo "Ampliar": oculta portada, letra grande y centrada */
  #fsKaraoke.modo-foco .karaoke-big-img { display: none; }
  #fsKaraoke.modo-foco .karaoke-stage {
    grid-column: 1 / -1;
    grid-row: 2 / 4;
  }
  #fsKaraoke.modo-foco .karaoke-world {
    text-align: center;
    align-items: center;
    padding: 8% 12% 50%;
  }
  #fsKaraoke.modo-foco .kar-line {
    text-align: center;
    font-size: clamp(2rem, 4.2vw, 3.4rem);
    font-weight: 800;
    transform-origin: center center;
  }
  #fsKaraoke.modo-foco .karaoke-footer {
    grid-column: 1 / -1;
    max-width: 640px;
    margin: 0 auto;
  }

  #fsKaraoke .close-karaoke {
    right: 56px !important;
    z-index: 20 !important;
  }
}

@media (min-width: 900px) and (max-width: 1300px) {
  #fsKaraoke .kar-line {
    font-size: clamp(1.8rem, 3.6vw, 2.6rem) !important;
  }
}
/* ═══ FIX: mini-karaoke solo visible en móvil ═══ */
@media (max-width: 768px) {
  .fs-lyrics-card { display: flex !important; }
}
@media (min-width: 769px) {
  .fs-lyrics-card { display: none !important; }
}

@media (max-width: 768px) {
  .fs-modo-btn[data-modo="foco"] {
    display: none !important;
  }
}

.settings-wrap {
  max-width: 560px;
  display: flex; flex-direction: column; gap: 28px;
}

.settings-group-title {
  font-size: 11px; font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.settings-row {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text-primary);
  text-decoration: none;
  transition: background var(--dur-f);
}
.settings-row:last-child { border-bottom: none; }
button.settings-row:hover, a.settings-row:hover { background: var(--bg-hover); }

.settings-row-col { flex-direction: column; align-items: flex-start; gap: 10px; }

.settings-row-text { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.settings-row-label { font-size: 13px; font-weight: 500; }
.settings-row-sub { font-size: 11px; color: var(--text-tertiary); }
.settings-row-value { font-size: 12px; color: var(--text-tertiary); }

.settings-row svg { width: 16px; height: 16px; color: var(--text-tertiary); flex-shrink: 0; }

.settings-select {
  background: var(--bg-hover);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  font-size: 12px;
  padding: 6px 10px;
  outline: none;
  cursor: pointer;
}

.settings-toggle { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.settings-toggle input { opacity: 0; width: 0; height: 0; }
.settings-toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg-hover);
  border: 1px solid var(--border-mid);
  border-radius: 99px;
  cursor: pointer;
  transition: background var(--dur-f);
}
.settings-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 2px; top: 2px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: transform var(--dur-f), background var(--dur-f);
}
.settings-toggle input:checked + .settings-toggle-slider {
  background: var(--grad-main);
  border-color: transparent;
}
.settings-toggle input:checked + .settings-toggle-slider::before {
  transform: translateX(18px);
  background: #fff;
}

.color-picker { display: flex; gap: 10px; }
.color-swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-mid);
  cursor: pointer;
  transition: all var(--dur-f) var(--ease-spring);
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--accent-1); }

.settings-logout-btn {
  margin-top: 8px;
  padding: 13px;
  background: rgba(255,80,80,0.1);
  border: 1px solid rgba(255,80,80,0.25);
  border-radius: var(--r-md);
  color: #ff6b6b;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-f);
}
.settings-logout-btn:hover { background: rgba(255,80,80,0.18); }
@media (min-width: 1000px) {
  .settings-wrap {
    max-width: 900px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 28px;
    align-items: start;
  }
  .settings-group {
    background: var(--bg-card);
    border: 1px solid var(--border-dim);
    border-radius: var(--r-lg);
    padding: 20px 24px;
  }
  .settings-logout-btn {
    grid-column: 1 / -1;
  }
}
.settings-profile-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px 18px;
  border-bottom: 1px solid var(--border-dim);
  margin-bottom: 4px;
}
.settings-profile-img {
  width: 48px; height: 48px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(139,127,255,0.4);
}
.settings-profile-text { display: flex; flex-direction: column; gap: 2px; }
.settings-profile-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.settings-profile-email { font-size: 12px; color: var(--text-tertiary); }

.confirm-overlay {
  position: fixed; inset: 0;
  z-index: 400000;
  background: rgba(10, 12, 30, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.confirm-overlay.hidden { display: none; }

.confirm-modal {
  width: 100%; max-width: 340px;
  background: var(--bg-deep);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-xl);
  padding: 28px 24px 20px;
  text-align: center;
  box-shadow: var(--sh-lg);
  animation: scaleIn 0.25s var(--ease-out);
}
.confirm-modal h3 {
  font-family: 'Syne', sans-serif;
  font-size: 17px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.confirm-modal p {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}
.confirm-actions { display: flex; gap: 10px; }
.confirm-btn-cancel, .confirm-btn-ok {
  flex: 1; padding: 11px;
  border-radius: var(--r-md);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.confirm-btn-cancel {
  background: var(--bg-hover);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
}
.confirm-btn-ok {
  background: rgba(255,80,80,0.15);
  border: 1px solid rgba(255,80,80,0.3);
  color: #ff6b6b;
}
.confirm-btn-ok:hover { background: rgba(255,80,80,0.22); }
.color-custom-swatch {
  background: var(--bg-hover);
  border: 2px dashed var(--border-mid);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary);
  font-size: 18px; font-weight: 300;
  cursor: pointer; position: relative;
}
.color-custom-swatch input[type="color"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
}

/* ═══════════════════════════════════════════════════════
   TRENDS — feed vertical tipo TikTok
═══════════════════════════════════════════════════════ */
.trend-like-global {
  position: fixed;
  right: 20px;
  bottom: calc(var(--player-h) + 76px);
  width: 44px; height: 44px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
  z-index: 50;
  transition: background var(--dur-f), transform 0.15s var(--ease-spring), bottom var(--dur-m);
}
.trend-like-global svg { width: 22px; height: 22px; fill: none; }
.trend-like-global:hover { background: rgba(0,0,0,0.7); }
.trend-like-global:active { transform: scale(0.88); }
.trend-like-global.liked { color: var(--accent-2); border-color: var(--accent-2); }
.trend-like-global.liked svg { fill: var(--accent-2); }

body.trends-fullscreen .trend-like-global {
  bottom: 76px;
}

.trend-item-titulo {
  position: absolute;
  top: 20px; left: 16px;
  right: 90px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  z-index: 10;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

@media (min-width: 900px) {
  .trend-item-titulo {
    left: 12px; right: 12px;
    top: 16px;
  }
}
/* ═══════════════════════════════════════════════════════
   TRENDS — feed vertical
═══════════════════════════════════════════════════════ */
#trends.page.active {
  padding: 0;
  height: 100%;
  overflow: hidden;
}

.trends-feed {
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  background: var(--bg-base);
}
.trends-feed::-webkit-scrollbar { display: none; }

.trend-item {
  position: relative;
  height: 100%;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Móvil: video a pantalla completa, acciones flotando encima */
.trend-video-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}
.trend-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}


.trend-item-desc {
  position: absolute;
  left: 16px; right: 90px;
  bottom: 32px;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  z-index: 10;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.trend-heart-burst {
  position: absolute;
  color: #fff;
  pointer-events: none;
  z-index: 20;
  animation: trendHeartBurst 0.9s ease forwards;
}
@keyframes trendHeartBurst {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(0.3); }
  30%  { opacity: 1; transform: translate(-50%,-50%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.4); }
}

.trends-empty {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--text-tertiary); text-align: center;
}
.trends-empty p { font-size: 15px; color: var(--text-secondary); }
.trends-empty span { font-size: 12px; }
.trends-empty.hidden { display: none; }
.trend-side-info { display: none; }

@media (min-width: 900px) {
  .trend-item {
    justify-content: center;
    align-items: center;
    gap: 32px;
  }

  /* En desktop, el título/desc dejan de ser overlay del video */
  .trend-item-titulo,
  .trend-item-desc {
    position: static !important;
  }

  .trend-side-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;   /* empuja el contenido hacia abajo dentro de su propia columna */
    align-self: flex-end;         /* ancla todo el bloque a la parte inferior del item */
    gap: 10px;
    width: 260px;
    flex-shrink: 0;
    order: -1;
    height: 100%;
    padding-bottom: 60px;         /* altura razonable desde el borde inferior real */
  }

  .trend-item-titulo {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    text-shadow: none;
  }

  .trend-item-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    text-shadow: none;
    line-height: 1.6;
  }
}

@media (min-width: 900px) {
  .trend-item {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    padding: 0 260px 0 0; /* reserva el mismo ancho que .trend-side-info, del lado opuesto */
  }
}

/* ═══ Desktop: estilo TikTok web — video angosto centrado + acciones al costado ═══ */
@media (min-width: 900px) {
  .trends-feed {
    background: #000;
  }
  .trend-item {
    position: relative;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 0;
  }

  .trend-video-wrap {
    height: 100%;
    width: auto;
    max-width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .trend-video-wrap video {
    height: 100%;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .trend-side-info {
    position: absolute;
    left: 24px;
    bottom: 60px;
    width: min(260px, 24vw);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
  }

  .trend-item-actions {
    position: static;
    flex-direction: column;
    gap: 16px;
  }

  .trend-item-desc {
    left: 12px; right: 12px;
    bottom: 16px;
  }


  
  .trend-like-btn:hover { background: rgba(255,255,255,0.14); }
  .trend-like-btn.liked { color: var(--accent-2); border-color: var(--accent-2); }

  .trend-item-desc {
    left: 12px; right: 12px;
    bottom: 16px;
  }
}
.content.no-padding {
  padding: 0 !important;
}

.trends-fs-btn {
  position: fixed;
  right: 20px;
  bottom: calc(var(--player-h) + 20px);
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
  z-index: 50;
  transition: background var(--dur-f), bottom var(--dur-m);
}
.trends-fs-btn:hover { background: rgba(0,0,0,0.7); }
.trends-fs-btn svg { width: 18px; height: 18px; }

/* Modo pantalla completa: oculta header y player, feed ocupa todo */
body.trends-fullscreen .header,
body.trends-fullscreen .player {
  display: none !important;
}
body.trends-fullscreen .app-layout {
  top: 0 !important;
  bottom: 0 !important;
}
body.trends-fullscreen .trends-fs-btn {
  bottom: 20px;
}

/*Solo voz*/
.fs-audio-switch-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}
.fs-audio-switch-btn:hover {
  background: rgba(255,255,255,0.25);
}
.fs-audio-switch-btn:active {
  transform: scale(0.95);
}
.fs-audio-switch-btn.hidden {
  display: none;
}
.fs-audio-switch-btn.activo {
  background: #fff;
  color: #1a1a2e;
}


/* ═══════════════════════════════════════════════════════
   PAUSAR
═══════════════════════════════════════════════════════ */
.trend-pause-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 72px; height: 72px;
  background: rgba(0,0,0,0.45);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 15;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.trend-pause-icon.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.trend-pause-icon svg { width: 32px; height: 32px; }
/* ═══════════════════════════════════════════════════════
   GATE OBLIGATORIO DE INICIO DE SESIÓN
═══════════════════════════════════════════════════════ */
.login-gate-overlay {
  position: fixed; inset: 0;
  z-index: 100000;
  background: #ffffff;
}
.login-gate-overlay.hidden { display: none !important; }

.login-gate-split {
  display: flex;
  width: 100%; height: 100%;
}

/* Panel izquierdo — blanco puro */
.login-gate-left {
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex; flex-direction: column;
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
  position: relative;
  overflow: hidden;
}

.login-gate-left::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(123,140,222,0.08) 0%, transparent 70%);
  top: 10%; right: -120px;
  pointer-events: none;
}
.login-gate-left::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(232,196,255,0.07) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  pointer-events: none;
}

.login-gate-logo {
  width: 100%;
  max-width: 380px;
  display: flex; align-items: center; gap: 10px;
  position: relative;
}
.login-gate-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--grad-main);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-acc);
}
.login-gate-logo .logo-icon svg { width: 19px; height: 19px; }
.login-gate-name {
  font-family: 'Syne', sans-serif;
  font-size: 18px; font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-gate-content {
  flex: 1;
  display: flex; flex-direction: column;
  justify-content: center !important;;
  padding-top: 0 !important;
  gap: 14px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  position: relative;
}

.login-gate-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8B7FFF;
  margin-bottom: -6px;
}

.login-gate-content h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(24px, 3vw, 30px); font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -0.5px;
}
.login-gate-content p {
  font-size: 14px; color: #5a5a72;
  line-height: 1.6;
  margin-top: 4px;
}

#loginGateGoogleBtn {
  margin-top: 6px;
  padding: 4px 0;
}

.login-gate-trust {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid #ececf3;
}
.login-gate-trust-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: #6b6b82;
}
.login-gate-trust-item svg {
  width: 15px; height: 15px; flex-shrink: 0;
  color: #8B7FFF;
}

.login-gate-credit {
  font-size: 11px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  color: #b0b0c4;
  text-align: center;
  margin-top: 20px;
  letter-spacing: 0.02em;
}

/* Panel derecho — oculto en móvil, visible en desktop */
/* Panel derecho — oculto en móvil, visible en desktop */
.login-gate-right {
  display: none !important;
  position: relative;
  transition: filter 0.4s ease;
}
.login-gate-right:hover .wave1,
.login-gate-right:hover .wave2,
.login-gate-right:hover .wave3 {
  filter: brightness(1.12);
}
.login-gate-right:hover .wave1 {
  box-shadow: 0 0 60px rgba(232, 196, 255, 0.35);
}
.wave {
  transition: filter 0.5s ease, box-shadow 0.5s ease;
}

.login-gate-right-text {
  pointer-events: none !important;
  position: relative;
  z-index: 5;
  height: 100%;
  display: flex; flex-direction: column;
  align-items: flex-end;      /* nuevo: empuja todo a la derecha */
  justify-content: flex-end;
  padding: 48px;
  text-align: right;          /* nuevo: el texto también se alinea a la derecha */
}
.login-gate-right-text h3 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.login-gate-right-text p {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
  max-width: 320px;
  line-height: 1.6;
}

.login-gate-orbit {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 4;
}

.login-gate-song-pop {
  pointer-events: auto !important;
  z-index: 10 !important;
  position: absolute;
  left: 50%; top: 50%;
  width: 110px; height: 110px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  border: 2px solid rgba(255,255,255,0.2);
  opacity: 0;
  animation: songPop 4.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.login-gate-song-pop img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

@keyframes songPop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  16%  { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  24%  { transform: translate(-50%, -50%) scale(1); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.7); }
}

.login-preview-overlay {
  position: absolute; inset: 0;
  z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
  animation: fadeIn 0.35s ease;
  transition: background 0.5s ease;
}

.login-preview-bg {
  position: absolute; inset: -30px;
  background-size: cover;
  background-position: center;
  filter: blur(35px) brightness(0.4) saturate(1.3);
  transform: scale(1.15);
  z-index: -1;
}

.login-preview-overlay.hidden { display: none; }

.login-preview-close {
  position: absolute; top: 24px; right: 24px;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.12);
  border: none; border-radius: 50%;
  color: #fff; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.login-preview-img {
  width: min(50vw, 260px);
  height: min(50vw, 260px);
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  animation: scaleIn 0.4s var(--ease-out);
}

.login-preview-title {
  font-family: 'Syne', sans-serif;
  font-size: 20px; font-weight: 800;
  color: #fff;
}
.login-preview-artist {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: -8px;
}

.login-preview-prog {
  width: min(80vw, 320px);
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
}
.login-preview-prog-fill {
  height: 100%;
  background: var(--grad-main);
  width: 0%;
}


.username-gate-overlay {
  position: fixed; inset: 0;
  z-index: 300000;
  background: rgba(10, 12, 30, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.username-gate-overlay.hidden { display: none; }

.username-gate-modal {
  width: 100%; max-width: 360px;
  background: var(--bg-deep);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-xl);
  padding: 32px 28px 28px;
  text-align: center;
  box-shadow: var(--sh-lg);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  animation: scaleIn 0.35s var(--ease-out);
}

.username-gate-emoji { font-size: 2.2rem; margin-bottom: 8px; }

.username-gate-modal h2 {
  font-family: 'Syne', sans-serif;
  font-size: 19px; font-weight: 700;
  color: var(--text-primary);
}
.username-gate-modal p {
  font-size: 13px; color: var(--text-secondary);
  margin-bottom: 14px;
}

#usernameGateInput {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-hover);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  text-align: center;
  transition: border-color var(--dur-f);
}
#usernameGateInput:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(139,127,255,0.12);
}

.username-gate-error {
  font-size: 12px; color: #ff8080;
  margin-top: 6px;
}
.username-gate-error.hidden { display: none; }

.username-gate-btn {
  width: 100%; margin-top: 16px;
  padding: 12px;
  background: var(--grad-main);
  border: none; border-radius: var(--r-md);
  color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: opacity var(--dur-f), transform var(--dur-f);
}
.username-gate-btn:hover { opacity: 0.9; }
.username-gate-btn:active { transform: scale(0.98); }
@media (min-width: 900px) {
  .login-gate-left {
    width: 42% !important;
    flex-shrink: 0;
    align-items: flex-start !important;
  }
  
  .login-gate-content h2 {
    font-size: 32px !important;
  }
  .login-gate-content p {
    font-size: 15px !important;
  }
  .login-gate-eyebrow {
    font-size: 12.5px !important;
  }
  .login-gate-left::after {
    display: none !important;
  }
  .login-gate-right {
    display: block !important;
    width: 58%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #131834;
  }

  .login-gate-video-bg {
    pointer-events: none !important;
    position: absolute; inset: 0;
    overflow: hidden;
  }
  .wave {
    position: absolute;
    left: 50%; top: 50%;
    width: 900px; height: 900px;
    border-radius: 40%;
    opacity: 0.5;
    transform-origin: center center;
  }
  .wave1 {
    background: linear-gradient(135deg, #7B8CDE, #E8C4FF);
    animation: waveSpin 18s linear infinite;
  }
  .wave2 {
    background: linear-gradient(135deg, #9BB5FF, #7B8CDE);
    opacity: 0.35;
    animation: waveSpin 24s linear infinite reverse;
  }
  .wave3 {
    background: linear-gradient(135deg, #E8C4FF, #C4D4FF);
    opacity: 0.25;
    width: 700px; height: 700px;
    animation: waveSpin 14s linear infinite;
  }
  @keyframes waveSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
  }
}

body.gate-open { overflow: hidden; }

@media (min-width: 900px) and (max-width: 1200px) {
  .login-gate-content h2 {
    font-size: 26px !important;
  }
}
.login-gate-right-text {
  pointer-events: none !important;
}

@media (min-width: 1400px) {
  .trend-item {
    gap: 24px;
    padding: 0 260px 0 0;
  }

  .trend-video-wrap {
    height: 100%;
    width: auto;
    max-width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .trend-video-wrap video {
    height: 100%;
    width: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .trend-side-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-self: flex-end;
    gap: 10px;
    width: 260px;
    flex-shrink: 0;
    order: -1;
    height: 100%;
    padding-bottom: 60px;
  }

  .trend-item-titulo {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    text-shadow: none;
  }

  .trend-item-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    text-shadow: none;
    line-height: 1.6;
  }
}


.audio-switch.deshabilitado {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(1);
}

.audio-switch.is-es .lang-opt[data-audio="es"],
.audio-switch.is-en .lang-opt[data-audio="en"] {
  color: #1a1a2e;
  font-weight: 800;
}

#fsLangBtn.is-en .lang-opt[data-lang="en"] {
  color: #1a1a2e !important;
  font-weight: 800 !important;
}
#fsLangBtn.is-es .lang-opt[data-lang="es"] {
  color: #1a1a2e !important;
  font-weight: 800 !important;
}