/* ====================================================================
   VARIABLES Y COLORES DINÁMICOS DE TELEGRAM
   Soporte nativo para Telegram.WebApp.themeParams y fallback nocturno
   ==================================================================== */
:root {
  /* Fallback para modo oscuro relajante cuando se prueba fuera de Telegram */
  --bg-color: var(--tg-theme-bg-color, #0d1117);
  --secondary-bg-color: var(--tg-theme-secondary-bg-color, #161b22);
  --text-color: var(--tg-theme-text-color, #f0f6fc);
  --hint-color: var(--tg-theme-hint-color, #8b949e);
  --link-color: var(--tg-theme-link-color, #58a6ff);
  --button-color: var(--tg-theme-button-color, #238636);
  --button-text-color: var(--tg-theme-button-text-color, #ffffff);

  /* Acentos de relajación (tonos lunares y aurora suave) */
  --accent-glow: rgba(88, 166, 255, 0.18);
  --accent-primary: #6366f1;
  --accent-gold: #f59e0b;
  --card-border: rgba(255, 255, 255, 0.08);
  --card-bg-glass: rgba(255, 255, 255, 0.04);
  
  --safe-area-bottom: env(safe-area-inset-bottom, 16px);
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.4;
  user-select: none;
  -webkit-user-select: none;
}

/* ====================================================================
   ESTRUCTURA DE APLICACIÓN
   ==================================================================== */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 65%),
              radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
              var(--bg-color);
}

/* Encabezado Compacto y Elegante */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px 4px;
  flex-shrink: 0;
}

.header-badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--hint-color);
  display: block;
  margin-bottom: 1px;
}

.app-title {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-color);
  line-height: 1.2;
}

.app-subtitle {
  font-size: 0.74rem;
  color: var(--hint-color);
  margin-top: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--card-bg-glass);
  border: 1px solid var(--card-border);
  color: var(--text-color);
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.lang-btn:active {
  transform: scale(0.96);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--secondary-bg-color);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 999;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  min-width: 140px;
  backdrop-filter: blur(12px);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text-color);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease;
}

.lang-option:hover, .lang-option.active {
  background: rgba(99, 102, 241, 0.18);
  color: #fff;
}

/* Aviso de Idioma para Subliminales */
.subliminal-notice {
  margin: 4px 0 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--text-color);
  line-height: 1.35;
}

.subliminal-notice .notice-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.lang-tag-pill {
  font-size: 0.64rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--hint-color);
}

.lang-tag-pill.universal {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}

.lang-tag-pill.spanish {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
}

.premium-badge-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--card-bg-glass);
  border: 1px solid var(--card-border);
  color: var(--text-color);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.premium-badge-btn.unlocked {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-color: rgba(245, 158, 11, 0.4);
}

.premium-badge-btn.trial {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

/* Categorías (Scroll horizontal suave) */
.categories-bar {
  display: flex;
  gap: 6px;
  padding: 4px 16px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.categories-bar::-webkit-scrollbar {
  display: none;
}

.category-chip {
  background: var(--card-bg-glass);
  border: 1px solid var(--card-border);
  color: var(--hint-color);
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-chip.active {
  background: var(--button-color);
  color: var(--button-text-color);
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Barra de Búsqueda Rápida */
.search-box-wrap {
  padding: 2px 16px 6px;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--secondary-bg-color);
  border: 1px solid var(--card-border);
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: 0.84rem;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.search-input:focus {
  border-color: var(--link-color);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.search-input::placeholder {
  color: var(--hint-color);
  font-size: 0.8rem;
}

/* Switcher de Vista (Colecciones vs Todas las pistas) */
.view-switch-row {
  display: flex;
  gap: 8px;
  padding: 0 16px 8px;
  flex-shrink: 0;
}

.switch-chip {
  flex: 1;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--card-bg-glass);
  border: 1px solid var(--card-border);
  color: var(--hint-color);
  font-family: var(--font-family);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.switch-chip.active {
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.5);
}

/* Encabezado dentro de un Álbum */
.album-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card-bg-glass);
  border: 1px solid var(--card-border);
  color: var(--link-color);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.back-link:active {
  transform: scale(0.96);
}

.album-header-details {
  text-align: right;
  min-width: 0;
  padding-left: 10px;
}

.album-header-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-header-count {
  font-size: 0.75rem;
  color: var(--hint-color);
}

/* Cuadrícula de Álbumes / Colecciones */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.album-card {
  background: var(--secondary-bg-color);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.album-card:active {
  transform: scale(0.97);
}

.album-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.album-cover-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  position: relative;
  overflow: hidden;
}

.album-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.album-card:hover .album-cover-img {
  transform: scale(1.05);
}

.album-free-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(34, 197, 94, 0.92);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.album-meta-box {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.album-meta-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.album-meta-subtitle {
  font-size: 0.73rem;
  color: var(--hint-color);
  margin-top: 2px;
}

.pricing-subtext {
  font-size: 0.75rem;
  color: var(--hint-color);
  text-align: center;
  margin-top: 6px;
}

/* Contenido Principal con Scroll Espacioso */
.content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px 16px 88px; /* Margen optimizado para el reproductor compacto */
  -webkit-overflow-scrolling: touch;
}

/* ====================================================================
   LISTA DE PISTAS (CARDS)
   ==================================================================== */
.tracks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.track-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--secondary-bg-color);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.track-card:active {
  transform: scale(0.985);
}

.track-card.active-playing {
  border-color: var(--link-color);
  background: rgba(99, 102, 241, 0.15);
  box-shadow: 0 4px 18px var(--accent-glow);
}

.track-cover {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: var(--card-bg-glass);
  flex-shrink: 0;
  position: relative;
}

.track-info-col {
  flex: 1;
  min-width: 0;
}

.track-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.track-card-title {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-card-desc {
  font-size: 0.78rem;
  color: var(--hint-color);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-action-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tag-badge {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 8px;
  font-weight: 600;
}

.tag-badge.free {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.tag-badge.locked {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 3px;
}

.track-card.locked-card {
  opacity: 0.78;
}

.track-play-indicator {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--link-color);
}

/* ====================================================================
   REPRODUCTOR INFERIOR ELEGANTE Y ULTRA-COMPACTO (MINI-PLAYER STREAMLINED)
   ==================================================================== */
.player-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 520px;
  margin: 0 auto;
  padding: 6px 14px calc(6px + var(--safe-area-bottom));
  background: rgba(18, 20, 32, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Barra de progreso superior compacta */
.player-progress-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.time-label {
  font-size: 0.68rem;
  color: var(--hint-color);
  font-variant-numeric: tabular-nums;
  min-width: 28px;
  text-align: center;
}

.progress-bar-wrapper {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  touch-action: none;
}

.progress-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #6366f1, #38bdf8);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

/* Fila principal del reproductor: Información a la izquierda, botones a la derecha */
.player-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.player-track-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0; /* Permite truncar texto */
}

.player-track-info .track-artwork {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--card-bg-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  overflow: hidden;
}

.player-track-info .track-details {
  flex: 1;
  min-width: 0;
}

.player-track-info .track-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.player-track-info .track-category {
  font-size: 0.72rem;
  color: var(--hint-color);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Temporizador dropdown */
.timer-control {
  position: relative;
}

.timer-trigger {
  background: transparent;
  border: none;
  color: var(--hint-color);
  padding: 6px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background-color 0.2s;
}

.timer-trigger:active, .timer-trigger.active {
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.15);
}

.timer-dropdown {
  position: absolute;
  right: 0;
  bottom: 44px;
  background: var(--secondary-bg-color);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  z-index: 60;
  animation: fadeIn 0.2s ease;
}

.timer-dropdown.hidden {
  display: none;
}

.timer-title {
  font-size: 0.72rem;
  color: var(--hint-color);
  padding: 4px 8px;
  text-transform: uppercase;
  font-weight: 600;
}

.timer-option {
  background: transparent;
  border: none;
  color: var(--text-color);
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.15s;
}

.timer-option:hover, .timer-option:active {
  background: var(--card-bg-glass);
}

/* Acciones y controles a la derecha */
.player-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.control-btn {
  background: transparent;
  border: none;
  color: var(--hint-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: transform 0.15s ease, color 0.15s ease;
}

.control-btn:active {
  transform: scale(0.9);
  color: var(--text-color);
}

.control-btn.active {
  color: var(--link-color);
}

.main-action {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--button-color);
  color: var(--button-text-color);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(99, 102, 241, 0.4);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.main-action:active {
  transform: scale(0.92);
}

/* Aviso de temporizador en mini-player */
.sleep-timer-notice {
  font-size: 0.68rem;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.1);
  padding: 2px 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  align-self: flex-start;
}

.sleep-timer-notice.hidden {
  display: none;
}

/* ====================================================================
   MODAL DE BLOQUEO / PASE PRÉMIUM (TELEGRAM STARS)
   ==================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}

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

.modal-sheet {
  background: var(--secondary-bg-color);
  border: 1px solid var(--card-border);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  width: 100%;
  max-width: 520px;
  padding: 16px 22px calc(24px + var(--safe-area-bottom));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.sheet-drag-handle {
  width: 38px;
  height: 4px;
  background: var(--card-border);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.modal-icon-badge {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(99, 102, 241, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 12px;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-color);
}

.modal-desc {
  font-size: 0.88rem;
  color: var(--hint-color);
  margin-top: 6px;
  margin-bottom: 18px;
}

.features-list {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  background: var(--card-bg-glass);
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
}

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.features-list .feat-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.features-list strong {
  font-size: 0.9rem;
  color: var(--text-color);
}

.features-list p {
  font-size: 0.78rem;
  color: var(--hint-color);
}

/* Selector de Planes de Precio */
.pricing-plans-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.plan-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--card-bg-glass);
  border: 1.5px solid var(--card-border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.plan-card.selected {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--link-color);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.plan-card.popular.selected {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(245, 158, 11, 0.15));
  border-color: var(--accent-gold);
}

.popular-badge {
  position: absolute;
  top: -9px;
  right: 14px;
  background: var(--accent-gold);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.plan-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.plan-radio-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--hint-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.plan-card.selected .plan-radio-circle {
  border-color: var(--accent-gold);
}

.plan-radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-gold);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
}

.plan-card.selected .plan-radio-dot {
  opacity: 1;
  transform: scale(1);
}

.plan-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.plan-name-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-color);
}

.plan-sub-desc {
  font-size: 0.74rem;
  color: var(--hint-color);
}

.plan-right-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.plan-stars-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 3px;
}

.plan-usd-equiv {
  font-size: 0.74rem;
  color: var(--hint-color);
  font-weight: 500;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary.buy-btn {
  background: var(--button-color);
  color: var(--button-text-color);
  border: none;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, filter 0.2s ease;
}

.btn-primary.buy-btn:active {
  transform: scale(0.98);
  filter: brightness(1.1);
}

.stars-pill {
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.btn-secondary {
  background: transparent;
  border: none;
  color: var(--hint-color);
  font-size: 0.88rem;
  padding: 8px;
  cursor: pointer;
}

.btn-secondary:hover {
  color: var(--text-color);
}

/* Banner de Bienvenida y Disparador de Audio Inmediato */
.welcome-teaser-bar {
  margin: 4px 0 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(56, 189, 248, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.teaser-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.teaser-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.teaser-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.teaser-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #38bdf8;
  letter-spacing: 0.4px;
}

.teaser-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.teaser-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--button-color);
  color: var(--button-text-color);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.teaser-play-btn:active {
  transform: scale(0.92);
}

/* Modal de Oferta Upsell */
.upsell-sheet {
  background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%) !important;
  border-top: 2px solid #f59e0b !important;
}

.upsell-fire-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.upsell-compare-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.upsell-old {
  font-size: 0.82rem;
  color: var(--hint-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
}

.upsell-old strong {
  color: #f87171;
  text-decoration: line-through;
}

.upsell-divider {
  font-size: 1rem;
}

.upsell-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.upsell-new-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #4ade80;
  letter-spacing: 0.5px;
}

.upsell-new-price {
  display: flex;
  align-items: center;
  gap: 8px;
}

.upsell-new-price .stars-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fbbf24;
}

.upsell-new-price .usd-val {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.upsell-sub {
  font-size: 0.75rem;
  color: var(--hint-color);
  margin-top: 4px;
}

.upsell-warning-text {
  font-size: 0.74rem;
  color: #fca5a5;
  margin-bottom: 14px;
  text-align: center;
}

.btn-primary.upsell-cta {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #000 !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.45) !important;
}

/* Utilidades */
.hidden {
  display: none !important;
}

/* ============================================================
   PIE DE PÁGINA DISCRETO Y MODAL DE CRÉDITOS / LICENCIAS
   ============================================================ */
.app-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 16px 28px;
  margin-top: 10px;
}

.footer-link-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 6px 14px;
  color: var(--hint-color);
  font-size: 0.76rem;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.footer-link-btn:hover,
.footer-link-btn:active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-color);
}

.credits-sheet {
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}

.credits-badge-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 10px;
}

.credits-scroll-list {
  max-height: 48vh;
  overflow-y: auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 16px;
  padding-right: 4px;
}

.credit-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--text-color);
  line-height: 1.45;
}

.credit-track-name {
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 4px;
  font-size: 0.88rem;
}

.credit-artist {
  color: var(--text-color);
  margin-bottom: 3px;
}

.credit-source {
  color: var(--hint-color);
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.credit-source a {
  color: #818cf8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.credit-badge-tag {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 2px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
