/* =========================================================
   VISTOLIST — ESTILOS DIFERIDOS (MODALES, PERFIL, CALENDARIO Y VISUAL LENS)
   ========================================================= */
/* =========================================================
   MODALES Y FICHA DE DETALLE CINEMATOGRÁFICA
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: radial-gradient(circle at 50% 25%, rgba(124, 92, 255, 0.12), rgba(4, 6, 12, 0.86) 65%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  contain: layout paint;
}

#manualModal,
#mediaPickerModal,
#themePickerModal {
  z-index: 155;
}

#detailModal {
  z-index: 165;
}

.modal-panel,
.modal-card {
  width: 100%;
  background: linear-gradient(165deg, rgba(18, 24, 42, 0.95) 0%, rgba(10, 14, 26, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  box-shadow:
    0 28px 75px -12px rgba(0, 0, 0, 0.88),
    0 0 0 1px rgba(124, 92, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  max-height: 91vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  contain: layout style;
}

.modal-detail {
  max-width: 1180px;
  width: min(96vw, 1180px);
  max-height: 90vh;
  background: linear-gradient(165deg, rgba(18, 23, 40, 0.96) 0%, rgba(10, 14, 25, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  box-shadow: 0 30px 80px -12px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}
.modal-lg { max-width: 700px; }
.modal-md { max-width: 540px; }
#communityModal .modal-panel { max-width: 680px; }

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  background: linear-gradient(90deg, rgba(124, 92, 255, 0.09), rgba(56, 189, 248, 0.05) 60%, transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.modal-header h2 {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #f8fafc;
}

.modal-close-btn,
.icon-close-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.95rem;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.18s ease;
}

.modal-close-btn:hover,
.icon-close-btn:hover {
  background: rgba(124, 92, 255, 0.24);
  border-color: rgba(124, 92, 255, 0.6);
  color: #fff;
  transform: rotate(90deg);
}

.modal-body {
  padding: 20px 22px 24px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 92, 255, 0.35) transparent;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 11, 21, 0.55);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* =========================================================
   FICHA ENCICLOPÉDICA DE ANIME / MANGA (3 PESTAÑAS)
   ========================================================= */
.detail-banner {
  position: relative;
  height: 220px;
  background-color: #121829;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.detail-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(14, 18, 31, 0.08) 0%, rgba(14, 18, 31, 0.45) 58%, rgba(14, 18, 31, 0.96) 100%);
}

.floating-close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 40;
  background: rgba(10, 14, 26, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.floating-close:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: rgba(239, 68, 68, 1);
  transform: scale(1.08) rotate(90deg);
  color: #fff;
}

.detail-scroll-area {
  overflow-y: auto;
  flex: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.detail-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
  padding: 0 32px 36px;
  margin-top: -100px;
}

.detail-poster-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-poster-frame {
  width: 100%;
  aspect-ratio: 2 / 3;
  max-height: 360px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
  background: #090d16;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  cursor: zoom-in;
}

.detail-poster-ambient {
  position: absolute;
  inset: -12px;
  background-size: cover;
  background-position: center;
  filter: blur(22px) brightness(0.6);
  opacity: 0.6;
  transform: scale(1.15);
  pointer-events: none;
}

.detail-poster-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 14px;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.detail-poster-frame:hover img {
  transform: scale(1.03);
}

.poster-zoom-pill {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  z-index: 3;
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.detail-poster-frame:hover .poster-zoom-pill {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.detail-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.detail-st-btn {
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-st-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.detail-st-btn.active-completed { background: var(--st-completed); border-color: var(--st-completed); color: #fff; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35); }
.detail-st-btn.active-watching  { background: var(--st-watching); border-color: var(--st-watching); color: #fff; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35); }
.detail-st-btn.active-planned   { background: var(--st-planned); border-color: var(--st-planned); color: #121318; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35); }
.detail-st-btn.active-dropped   { background: var(--st-dropped); border-color: var(--st-dropped); color: #fff; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35); }

.detail-side-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-side-actions .ghost-btn {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.18s ease;
}

.detail-side-actions .ghost-btn:hover {
  transform: translateY(-1px);
}

.detail-edit-del-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.detail-edit-del-row .ghost-btn {
  justify-content: center;
}

#detailFavBtn {
  justify-content: center;
}

#detailFavBtn.is-fav {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.6);
  color: #fda4af;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.25);
}

.detail-main-col {
  padding-top: 18px;
  min-width: 0;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.meta-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta-pill.gold {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.meta-pill.accent {
  background: var(--accent-soft);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}

.detail-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0 0 6px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

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

.genre-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}

.genre-chip {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.28);
  color: #d8ceff;
  transition: all 0.18s ease;
}

.genre-chip.is-clickable {
  cursor: pointer;
}

.genre-chip.is-clickable:hover {
  background: rgba(124, 92, 255, 0.25);
  border-color: rgba(124, 92, 255, 0.55);
  color: #fff;
  transform: translateY(-1px);
}

/* Barra interactiva de Creadores: Autor y Estudio */
.detail-creators-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: -6px 0 16px;
  position: relative;
  z-index: 5;
}

.detail-author-row,
.detail-studio-row {
  display: inline-flex;
  align-items: center;
}

.author-badge-pill,
.studio-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.81rem;
  font-weight: 700;
  padding: 6px 15px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.author-badge-pill {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.22) 0%, rgba(168, 85, 247, 0.16) 100%);
  border: 1px solid rgba(139, 92, 246, 0.48);
  color: #ede9fe;
  box-shadow: 0 2px 12px rgba(124, 92, 255, 0.22);
}

.author-badge-pill:hover {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.4) 0%, rgba(168, 85, 247, 0.3) 100%);
  border-color: rgba(168, 85, 247, 0.8);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.4);
}

.studio-badge-pill {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22) 0%, rgba(59, 130, 246, 0.16) 100%);
  border: 1px solid rgba(56, 189, 248, 0.48);
  color: #e0f2fe;
  box-shadow: 0 2px 12px rgba(56, 189, 248, 0.22);
}

.studio-badge-pill:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.4) 0%, rgba(59, 130, 246, 0.3) 100%);
  border-color: rgba(56, 189, 248, 0.85);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

.author-search-hint,
.studio-search-hint {
  font-size: 0.72rem;
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 2px;
}

/* Barra de pestañas internas (Descripción / Capítulos / Openings y Endings) */
.detail-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.detail-tabs::-webkit-scrollbar { display: none; }

.detail-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.detail-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.detail-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 92, 255, 0.4);
}

.dtab-badge {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.3);
}

.dtab-badge:empty {
  display: none;
}

.inline-loading {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 12px 0;
}

.mini-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

.detail-synopsis {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.75;
  color: #d5dcef;
  white-space: pre-line;
}

/* Pestaña 2: Lista de capítulos / episodios */
.chapters-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.chapters-progress-info {
  font-size: 0.82rem;
  font-weight: 700;
  color: #34d399;
}

.chapter-search-input {
  background: var(--bg-0);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8rem;
  padding: 6px 13px;
  width: 230px;
  max-width: 100%;
}

.chapter-search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.chapters-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 10px;
}

.chapter-row {
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: background 0.14s, border-color 0.14s;
}

.chapter-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
}

.chapter-row.is-watched {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.06);
}

.chapter-thumb {
  width: 78px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-0);
  flex-shrink: 0;
}

.chapter-num-badge {
  font-family: "Outfit", sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  color: #c4b5fd;
  background: var(--accent-soft);
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  min-width: 56px;
  text-align: center;
}

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

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

.chapter-meta {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.chapter-check-btn {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 800;
  transition: all 0.15s;
}

.chapter-check-btn:hover {
  border-color: var(--st-completed);
  color: #34d399;
}

.chapter-check-btn.watched {
  background: var(--st-completed);
  border-color: var(--st-completed);
  color: #fff;
}

/* Pestaña 3: Openings y Endings */
.adaptation-note {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.3);
  font-size: 0.8rem;
  color: #d8ceff;
}

.themes-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.theme-group-title {
  font-family: "Outfit", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 9px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.theme-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theme-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  flex-wrap: wrap;
}

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

.theme-badge {
  font-family: "Outfit", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  min-width: 46px;
  text-align: center;
}

.theme-badge.op {
  background: rgba(139, 92, 246, 0.24);
  border: 1px solid rgba(139, 92, 246, 0.5);
  color: #ddd6fe;
}

.theme-badge.ed {
  background: rgba(236, 72, 153, 0.2);
  border: 1px solid rgba(236, 72, 153, 0.48);
  color: #fbcfe8;
}

.theme-text {
  min-width: 0;
}

.theme-song {
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--text-primary);
}

.theme-artist {
  font-size: 0.77rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

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

.theme-links {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.theme-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  transition: all 0.15s;
}

.theme-link-btn.yt:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.55);
  color: #fecaca;
}

.theme-link-btn.sp:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.55);
  color: #a7f3d0;
}

.empty-subpanel {
  padding: 24px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
}

/* Formulario manual */
.manual-layout {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 20px;
  align-items: start;
}

.poster-preview-box {
  width: 145px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  background: var(--bg-0);
  border: 1px dashed var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.poster-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-placeholder {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 8px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 13px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.req { color: var(--cat-manga); }

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-0);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 0.88rem;
  font-family: inherit;
}

.form-group textarea {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.79rem;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.manual-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* =========================================================
   MODAL NUBE / FIREBASE / RESPALDOS
   ========================================================= */
.cloud-intro {
  margin: 0 0 12px;
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.setup-guide {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  margin-bottom: 14px;
  font-size: 0.82rem;
}

.setup-guide summary {
  cursor: pointer;
  font-weight: 700;
  color: #b79eff;
}

.setup-guide ol {
  margin: 10px 0 2px;
  padding-left: 18px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.setup-guide a { color: #a78bfa; }

.alert-banner {
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  margin-bottom: 14px;
}

.alert-banner.error {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.alert-banner.info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-0);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.auth-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 7px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.auth-tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.divider span { padding: 0 10px; }

.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: #fff;
  color: #1f2937;
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.87rem;
  font-weight: 700;
  cursor: pointer;
}

.google-btn:hover { opacity: 0.93; }

.cloud-small-links {
  margin-top: 14px;
  text-align: center;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

.profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}

.profile-email {
  font-weight: 700;
  font-size: 0.92rem;
  word-break: break-all;
}

.profile-sync-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #34d399;
  margin-top: 4px;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.backup-box {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.backup-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.backup-header strong { font-size: 0.83rem; }
.backup-header span { font-size: 0.75rem; color: var(--text-muted); }
.backup-buttons { display: flex; gap: 8px; }
.file-label { cursor: pointer; }


@media (max-width: 640px) {
  .detail-scroll-area {
    padding: 0;
  }

  .detail-hero-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 18px 26px;
    margin-top: -70px;
  }

  .detail-poster-col {
    align-items: center;
  }

  .detail-poster-frame {
    width: 180px;
    aspect-ratio: 2 / 3;
    max-height: 270px;
  }

  .detail-poster-frame img {
    max-height: 270px;
    object-fit: contain;
  }

  .detail-status-grid,
  .detail-side-actions {
    width: 100%;
    max-width: 280px;
  }

  .detail-main-col {
    padding-top: 0;
  }

  .chapter-thumb {
    width: 64px;
    height: 40px;
  }

  .manual-layout {
    grid-template-columns: 1fr;
  }

  .manual-preview-col {
    display: flex;
    justify-content: center;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }

}
/* =========================================================
   VISTA 3: MI PERFIL PERSONALIZABLE, PODIO, TOP OP/ED Y PRIVACIDAD
   ========================================================= */
.profile-view {
  padding-top: 24px;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

.visitor-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22) 0%, rgba(139, 92, 246, 0.2) 100%);
  border: 1px solid rgba(96, 165, 250, 0.5);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
  flex-wrap: wrap;
}

.visitor-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: #dbeafe;
  flex-wrap: wrap;
}

.visitor-eye-pill {
  background: rgba(59, 130, 246, 0.4);
  border: 1px solid rgba(147, 197, 253, 0.6);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Cabecera del Perfil */
.profile-hero-card {
  background: var(--bg-glass);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.profile-banner-box {
  position: relative;
  height: clamp(260px, 20vw, 360px);
  overflow: hidden;
  background: linear-gradient(130deg, #311b6e 0%, #6d28d9 42%, #db2777 100%);
  background-size: cover;
  background-position: center 50%;
  background-repeat: no-repeat;
  image-rendering: -webkit-optimize-contrast;
}

.banner-media-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.banner-media-blur {
  position: absolute;
  inset: -24px;
  background-size: cover;
  background-position: center;
  filter: blur(22px) brightness(0.62) saturate(1.15);
  transform: scale(1.12);
}

.banner-media-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.08s linear;
}

.banner-media-img.is-cover {
  object-fit: cover;
}

.banner-media-img.is-contain {
  object-fit: contain;
}

.profile-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(6, 8, 15, 0.04) 0%,
    rgba(14, 18, 31, 0.18) 55%,
    rgba(14, 18, 31, 0.92) 100%
  );
  pointer-events: none;
}

.banner-floating-btns {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.profile-banner-box:hover .banner-floating-btns,
.profile-banner-box:focus-within .banner-floating-btns {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (hover: none) {
  .banner-floating-btns {
    opacity: 0.92;
    transform: none;
    pointer-events: auto;
  }
}

.banner-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(10, 14, 26, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.42);
}

.banner-quick-btn:hover {
  background: rgba(22, 29, 49, 0.96);
  border-color: rgba(255, 255, 255, 0.48);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
  color: #fff;
}

.profile-hero-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  padding: 0 32px 30px;
  position: relative;
  z-index: 2;
}

.profile-avatar-col {
  margin-top: -68px;
}

.profile-hero-avatar-wrap {
  position: relative;
  width: 136px;
  height: 136px;
  padding: 0;
  border-radius: 50%;
  border: 4px solid var(--bg-1);
  background: linear-gradient(135deg, var(--accent), #ec4899);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.45), 0 16px 36px rgba(0, 0, 0, 0.75);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease, border-radius 0.2s ease;
}

.profile-hero-avatar-wrap:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 4px var(--accent), 0 20px 42px rgba(124, 92, 255, 0.45);
}

.profile-hero-avatar-wrap.readonly-avatar {
  cursor: default;
}

.profile-hero-avatar-wrap.readonly-avatar:hover {
  transform: none;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.45), 0 16px 36px rgba(0, 0, 0, 0.75);
}

.profile-hero-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  background: var(--bg-elevated);
  transition: border-radius 0.2s ease;
}

/* Formas del Avatar (Círculo, Suave, Hexágono) */
.profile-hero-avatar-wrap.shape-squircle,
.edit-preview-avatar.shape-squircle {
  border-radius: 26%;
}

.profile-hero-avatar-wrap.shape-squircle .profile-hero-avatar-inner {
  border-radius: 23%;
}

.profile-hero-avatar-wrap.shape-hex {
  border-radius: 0;
  border: none;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent), #ec4899);
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  box-shadow: none;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.7));
}

.profile-hero-avatar-wrap.shape-hex .profile-hero-avatar-inner {
  border-radius: 0;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
}

.edit-preview-avatar.shape-hex {
  border-radius: 0;
  border: none;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
}

.profile-hero-avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.avatar-camera-badge {
  display: none !important;
}

.profile-hero-avatar-wrap:hover .avatar-camera-badge {
  display: none !important;
}

.profile-info-col {
  padding-top: 14px;
  min-width: 0;
}

.profile-hero-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.profile-name-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-display-name {
  font-family: "Outfit", sans-serif;
  font-size: 2.15rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: #f8fafc;
}

.profile-mood-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.24) 0%, rgba(236, 72, 153, 0.18) 100%);
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #f5f3ff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.25);
}

.profile-mood-pill.mini {
  padding: 3px 9px;
  font-size: 0.7rem;
}

.profile-subtitle-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #c4b5fd;
}

.profile-hero-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.profile-hero-actions .ghost-btn,
.profile-hero-actions .secondary-btn,
.profile-hero-actions .primary-btn {
  padding: 9px 15px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 11px;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.profile-hero-actions .ghost-btn:hover,
.profile-hero-actions .secondary-btn:hover {
  transform: translateY(-1px);
}

.profile-hero-actions .primary-btn {
  box-shadow: 0 4px 16px rgba(124, 92, 255, 0.4);
}

.profile-hero-actions .primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.55);
}

#toggleLayoutEditBtn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.4);
}

.profile-bio-text {
  margin: 16px 0 20px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #cbd5e1;
  white-space: pre-line;
  max-width: 820px;
}

.profile-bio-text.is-placeholder {
  font-style: italic;
  color: var(--text-muted);
}

.profile-quick-metrics {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.prof-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.11);
  font-size: 0.82rem;
  color: #cbd5e1;
  transition: all 0.18s ease;
}

.prof-metric-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
  color: #fff;
}

.prof-metric-pill strong {
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
}

/* Variante de Cabecera Centrada */
.profile-hero-card.hero-align-center .profile-hero-body {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 10px;
}

.profile-hero-card.hero-align-center .profile-info-col {
  padding-top: 4px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-hero-card.hero-align-center .profile-hero-top-row {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.profile-hero-card.hero-align-center .profile-name-badge-row,
.profile-hero-card.hero-align-center .profile-hero-actions,
.profile-hero-card.hero-align-center .profile-quick-metrics {
  justify-content: center;
}

.profile-hero-card.hero-align-center .profile-bio-text {
  margin-left: auto;
  margin-right: auto;
}

/* Estilos de Superficie de los Paneles (Cristal, Teñido, Sólido) */
.profile-view.pstyle-glass .profile-hero-card,
.profile-view.pstyle-glass .profile-section {
  background: rgba(14, 18, 31, 0.58);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.profile-view.pstyle-tinted .profile-hero-card,
.profile-view.pstyle-tinted .profile-section {
  background: linear-gradient(155deg, var(--accent-soft), rgba(14, 18, 31, 0.78) 65%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: var(--border-highlight);
}

.profile-view.pstyle-solid .profile-hero-card,
.profile-view.pstyle-solid .profile-section {
  background: rgba(12, 16, 28, 0.95);
  backdrop-filter: none;
  border-color: var(--border-strong);
}

/* Barra del Modo "Mover Paneles" y Aviso de Paneles Ocultos */
.layout-edit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-soft), rgba(16, 21, 35, 0.92));
  border: 1.5px solid var(--accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  flex-wrap: wrap;
}

.layout-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-primary);
  flex-wrap: wrap;
}

.layout-mode-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.layout-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hidden-panels-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--border-strong);
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

/* Tablero Flexible de Paneles (Drag & Drop + Ancho Completo o 2 Columnas) */
.profile-panels-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.profile-section {
  grid-column: 1 / -1;
  background: linear-gradient(165deg, rgba(20, 26, 44, 0.82) 0%, rgba(10, 14, 25, 0.94) 100%);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  padding: 28px 30px;
  box-shadow: 0 20px 52px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 0.2s ease;
  position: relative;
}

.profile-section:hover {
  border-color: rgba(124, 92, 255, 0.32);
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.8), 0 0 32px -8px rgba(124, 92, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.profile-section.panel-span-full {
  grid-column: 1 / -1;
}

.profile-section.panel-span-half {
  grid-column: span 1;
}

/* Adaptar cuadrículas internas cuando un panel ocupa media columna */
.profile-section.panel-span-half .top3-podium-grid,
.profile-section.panel-span-half .profile-themes-grid,
.profile-section.panel-span-half .profile-recs-grid {
  grid-template-columns: 1fr;
}

.profile-panels-board.is-editing-layout .profile-section {
  border: 1.5px dashed var(--accent);
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.15);
}

.profile-section.is-panel-hidden-preview {
  opacity: 0.52;
  border-style: dashed;
}

.profile-section.dragging-panel {
  opacity: 0.38;
  transform: scale(0.985);
}

.profile-section.drag-over-panel {
  border: 2px dashed var(--accent) !important;
  box-shadow: 0 0 0 4px var(--accent-soft), 0 18px 42px rgba(0, 0, 0, 0.55);
}

/* Barra superior de cada panel para arrastrar, mover, cambiar ancho y renombrar */
.panel-customize-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -12px -12px 18px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(8, 11, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-wrap: wrap;
}

.panel-drag-grip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: grab;
  user-select: none;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.15s ease;
}

.panel-drag-grip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.panel-drag-grip:active {
  cursor: grabbing;
}

.panel-bar-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.panel-ctrl-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.panel-ctrl-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.panel-ctrl-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.panel-ctrl-btn.active-toggle {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.35), rgba(168, 85, 247, 0.25));
  border-color: rgba(139, 92, 246, 0.6);
  color: #fff;
}

.panel-ctrl-btn.is-hidden-state {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fecdd3;
}

/* Reordenación Drag & Drop de tarjetas dentro de Top 3, OPs/EDs y Recomendados */
.draggable-card {
  cursor: grab;
}

.draggable-card:active {
  cursor: grabbing;
}

.draggable-card.dragging-item {
  opacity: 0.45;
}

.draggable-card.drag-over-item {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}

.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-wrap: wrap;
}

.profile-section-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.025em;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-section-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  flex-shrink: 0;
}

#profPanel-top3 .profile-section-title::before {
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.85);
}

#profPanel-themes .profile-section-title::before {
  background: #a855f7;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.85);
}

#profPanel-recs .profile-section-title::before {
  background: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.85);
}

#profPanel-lists .profile-section-title::before {
  background: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.85);
}

.profile-header-right-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Flechas de navegación de carrusel/estante (estilo streaming) */
.shelf-nav-arrows {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shelf-arrow-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
  line-height: 1;
}

.shelf-arrow-btn:hover {
  background: rgba(124, 92, 255, 0.25);
  border-color: rgba(139, 92, 246, 0.6);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.35);
}

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

.profile-section-sub {
  margin: 5px 0 0;
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.45;
}

/* =========================================================
   PODIO TOP 3 ANIMES / MANGAS (ALTA GAMA / CHAMPIONSHIP PODIUM)
   ========================================================= */
.top3-podium-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.top3-slot-card {
  position: relative;
  display: flex;
  gap: 16px;
  background: rgba(18, 24, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.22s ease,
              box-shadow 0.22s ease;
  overflow: hidden;
}

.top3-slot-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.5);
}

.top3-slot-card.rank-1 {
  border: 1.5px solid rgba(245, 158, 11, 0.55);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.14) 0%, rgba(18, 24, 42, 0.85) 60%);
  box-shadow: 0 12px 32px -6px rgba(245, 158, 11, 0.22), 0 0 0 1px rgba(245, 158, 11, 0.15);
}

.top3-slot-card.rank-1:hover {
  border-color: rgba(251, 191, 36, 0.85);
  box-shadow: 0 18px 44px -6px rgba(245, 158, 11, 0.38), 0 0 20px rgba(245, 158, 11, 0.25);
}

.top3-slot-card.rank-2 {
  border: 1.5px solid rgba(203, 213, 225, 0.45);
  background: linear-gradient(145deg, rgba(203, 213, 225, 0.12) 0%, rgba(18, 24, 42, 0.85) 60%);
  box-shadow: 0 10px 28px -6px rgba(148, 163, 184, 0.18);
}

.top3-slot-card.rank-2:hover {
  border-color: rgba(241, 245, 249, 0.75);
  box-shadow: 0 16px 38px -6px rgba(148, 163, 184, 0.3);
}

.top3-slot-card.rank-3 {
  border: 1.5px solid rgba(217, 119, 6, 0.48);
  background: linear-gradient(145deg, rgba(217, 119, 6, 0.13) 0%, rgba(18, 24, 42, 0.85) 60%);
  box-shadow: 0 10px 28px -6px rgba(217, 119, 6, 0.18);
}

.top3-slot-card.rank-3:hover {
  border-color: rgba(251, 146, 60, 0.75);
  box-shadow: 0 16px 38px -6px rgba(217, 119, 6, 0.3);
}

.top3-poster-box {
  width: 96px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #080b14;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top3-poster-box:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.top3-poster-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.top3-info-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 1;
}

.top3-medal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Outfit", sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  width: fit-content;
  text-transform: uppercase;
}

.rank-1 .top3-medal-badge {
  background: rgba(245, 158, 11, 0.22);
  color: #fef08a;
  border: 1px solid rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.rank-2 .top3-medal-badge {
  background: rgba(226, 232, 240, 0.18);
  color: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.45);
}

.rank-3 .top3-medal-badge {
  background: rgba(217, 119, 6, 0.22);
  color: #fed7aa;
  border: 1px solid rgba(217, 119, 6, 0.55);
}

.top3-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  margin: 8px 0 4px;
  line-height: 1.3;
  color: #f1f5f9;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.16s ease;
}

.top3-title:hover {
  color: #c4b5fd;
}

.top3-meta {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
}

.top3-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.mini-action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 5px 11px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mini-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.mini-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.5);
}

.top3-empty-slot {
  min-height: 160px;
  border: 1.5px dashed rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  color: #94a3b8;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-align: center;
}

.top3-empty-slot:hover {
  border-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.08);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -4px rgba(124, 92, 255, 0.25);
}

.top3-empty-slot.readonly-slot {
  cursor: default;
  opacity: 0.65;
}

.top3-empty-slot.readonly-slot:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.02);
  color: #94a3b8;
  transform: none;
  box-shadow: none;
}

/* =========================================================
   TOP OPENINGS Y ENDINGS (ESTILO TRACK / MUSIC PLAYER DE ÉLITE)
   ========================================================= */
.profile-themes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.prof-theme-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(18, 24, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 12px 16px;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.prof-theme-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(22, 29, 52, 0.75);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.prof-theme-rank {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.prof-theme-rank.rank-1 {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fef08a;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.prof-theme-rank.rank-2 {
  background: rgba(226, 232, 240, 0.16);
  border-color: rgba(226, 232, 240, 0.45);
  color: #f8fafc;
}

.prof-theme-rank.rank-3 {
  background: rgba(217, 119, 6, 0.2);
  border-color: rgba(217, 119, 6, 0.5);
  color: #fed7aa;
}

.prof-theme-poster {
  width: 48px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: #080b14;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.prof-theme-main {
  flex: 1;
  min-width: 0;
}

.prof-theme-top-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.prof-theme-song {
  font-weight: 700;
  font-size: 0.94rem;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prof-theme-sub {
  font-size: 0.79rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prof-theme-anime {
  font-size: 0.77rem;
  color: #c4b5fd;
  font-weight: 600;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prof-theme-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  flex-shrink: 0;
}

.theme-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.15s ease;
}

.theme-link-btn.yt {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.theme-link-btn.yt:hover {
  background: rgba(239, 68, 68, 0.28);
  color: #fff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.theme-link-btn.sp {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #86efac;
}

.theme-link-btn.sp:hover {
  background: rgba(16, 185, 129, 0.28);
  color: #fff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.prof-theme-controls {
  display: flex;
  gap: 4px;
}

.theme-star-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(124, 92, 255, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #ddd6fe;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-star-btn:hover {
  background: rgba(124, 92, 255, 0.28);
  color: #fff;
  box-shadow: 0 0 12px rgba(124, 92, 255, 0.3);
}

.theme-star-btn.in-top {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fef08a;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

/* =========================================================
   ANIMES Y MANGAS RECOMENDADOS (ESTILO EDITORIAL / CURATOR)
   ========================================================= */
.profile-recs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.rec-card {
  display: flex;
  gap: 16px;
  background: rgba(18, 24, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.2s ease,
              box-shadow 0.2s ease;
}

.rec-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.rec-poster-box {
  width: 90px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #080b14;
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.18s ease;
}

.rec-poster-box:hover {
  transform: scale(1.03);
}

.rec-poster-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rec-info-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  flex: 1;
}

.rec-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  margin: 4px 0 4px;
  cursor: pointer;
  line-height: 1.3;
  color: #f1f5f9;
  transition: color 0.15s ease;
}

.rec-title:hover {
  color: #c4b5fd;
}

.rec-quote-box {
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(124, 92, 255, 0.1);
  border-left: 3px solid #8b5cf6;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #e2e8f0;
  font-style: italic;
}

.rec-actions-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

/* =========================================================
   PRIVACIDAD Y LISTAS DE ESTADOS EN EL PERFIL
   ========================================================= */
.privacy-toggles-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.privacy-box-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.privacy-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.privacy-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  transition: all 0.18s ease;
}

.privacy-chip:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.privacy-chip.is-private {
  border-color: rgba(244, 63, 94, 0.5);
  background: rgba(244, 63, 94, 0.16);
  color: #fda4af;
}

.profile-lists-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.profile-status-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.profile-status-tabs::-webkit-scrollbar {
  display: none;
}

.prof-st-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(12, 17, 30, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.prof-st-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1.5px);
}

.prof-st-tab.active {
  color: #fff;
}

.prof-st-tab[data-prof-status="completed"].active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.15) 100%);
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.prof-st-tab[data-prof-status="completed"].active .prof-st-count {
  background: rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}

.prof-st-tab[data-prof-status="watching"].active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25) 0%, rgba(14, 165, 233, 0.15) 100%);
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.prof-st-tab[data-prof-status="watching"].active .prof-st-count {
  background: rgba(56, 189, 248, 0.35);
  color: #bae6fd;
}

.prof-st-tab[data-prof-status="planned"].active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.15) 100%);
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.prof-st-tab[data-prof-status="planned"].active .prof-st-count {
  background: rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

.prof-st-tab[data-prof-status="dropped"].active {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.25) 0%, rgba(225, 29, 72, 0.15) 100%);
  border-color: rgba(244, 63, 94, 0.65);
  box-shadow: 0 4px 18px rgba(244, 63, 94, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.prof-st-tab[data-prof-status="dropped"].active .prof-st-count {
  background: rgba(244, 63, 94, 0.35);
  color: #fecdd3;
}

.prof-st-count {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.2s ease;
}

.profile-cat-mini-tabs {
  display: inline-flex;
  background: rgba(8, 11, 20, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 4px;
  border-radius: var(--radius-pill);
  gap: 4px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.mini-cat-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.79rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.18s ease;
}

.mini-cat-btn:hover {
  color: #f1f5f9;
}

.mini-cat-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.owner-private-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.38);
  color: #fecdd3;
  font-size: 0.84rem;
  flex-wrap: wrap;
}

.private-locked-box {
  padding: 48px 24px;
  text-align: center;
  background: rgba(8, 11, 20, 0.6);
  border: 1.5px dashed rgba(244, 63, 94, 0.35);
  border-radius: 18px;
}

.lock-circle {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.2);
}

.private-locked-box h3 {
  font-family: "Outfit", sans-serif;
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: #fff;
}

.private-locked-box p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.88rem;
}

.card-icon-btn.priv-btn.is-private {
  background: rgba(244, 63, 94, 0.88);
  border-color: rgba(251, 113, 133, 0.8);
  color: #fff;
}

.card-top-actions.has-private {
  opacity: 1;
}

/* =========================================================
   ESTUDIO VISUAL DE PERFIL (4 PESTAÑAS + FONDO DE PÁGINA + PANELES)
   ========================================================= */
.modal-panel.modal-studio {
  max-width: 850px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.studio-header-sub {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.studio-form-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Escenario en vivo que simula el fondo de toda la página + cabecera */
.studio-live-stage {
  position: relative;
  margin: 12px 22px 10px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background-color: var(--bg-0);
  flex-shrink: 0;
}

.studio-stage-bg {
  position: absolute;
  inset: -16px;
  background-size: cover;
  background-position: center;
  transition: filter 0.2s ease, opacity 0.25s ease;
}

.studio-stage-dim {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 15, 0.58);
  transition: background 0.2s ease;
}

.studio-stage-tag {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 3;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: rgba(6, 8, 15, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
}

.edit-profile-preview-card {
  position: relative;
  z-index: 2;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: rgba(16, 21, 35, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin: 0;
}

.edit-profile-preview-card.pstyle-tinted {
  background: linear-gradient(150deg, var(--accent-soft), rgba(16, 21, 35, 0.88) 70%);
  border-color: var(--border-highlight);
}

.edit-profile-preview-card.pstyle-solid {
  background: rgba(12, 16, 28, 0.96);
  backdrop-filter: none;
}

.edit-preview-banner {
  position: relative;
  height: clamp(148px, 20vh, 195px);
  background: linear-gradient(130deg, #311b6e 0%, #6d28d9 42%, #db2777 100%);
  background-size: cover;
  background-position: center 50%;
  cursor: grab;
  user-select: none;
  overflow: hidden;
  touch-action: none;
}

.edit-preview-banner.is-framing-dragging,
.edit-preview-banner:active {
  cursor: grabbing;
}

.banner-drag-hint {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(6, 8, 15, 0.72);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.edit-preview-banner:hover .banner-drag-hint {
  background: rgba(6, 8, 15, 0.9);
  border-color: var(--accent);
  color: #fff;
}

.edit-preview-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px 14px;
}

.edit-preview-row.hero-align-center {
  flex-direction: column;
  text-align: center;
  gap: 6px;
}

.edit-preview-row.hero-align-center .edit-preview-meta {
  align-items: center;
}

.edit-preview-row.hero-align-center .edit-preview-name-line {
  justify-content: center;
}

.edit-preview-avatar {
  position: relative;
  z-index: 3;
  width: 80px;
  height: 80px;
  margin-top: -44px;
  border-radius: 50%;
  border: 3.5px solid var(--bg-elevated);
  background: var(--bg-0);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 800;
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: border-radius 0.2s ease;
}

.edit-preview-avatar.is-framing-dragging,
.edit-preview-avatar:active {
  cursor: grabbing;
}

.edit-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.edit-preview-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.edit-preview-name-line {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.edit-preview-meta strong {
  font-size: 0.96rem;
}

.edit-preview-meta > span {
  font-size: 0.76rem;
  color: var(--accent-2);
}

/* Barra de 4 Pestañas del Estudio */
.studio-tabs-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 0 22px 10px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.studio-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.studio-tab-btn:hover {
  background: rgba(255, 255, 255, 0.065);
  color: var(--text-primary);
}

.studio-tab-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px var(--accent-soft);
}

.studio-scroll-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 16px 22px;
}

.studio-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 22px 16px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(10, 13, 24, 0.86);
  flex-shrink: 0;
}

.studio-inline-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 13px;
}

.studio-opt-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.avatar-picker-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-micro-hint {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.label-with-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.form-group textarea.bio-textarea {
  font-family: inherit;
  font-size: 0.87rem;
  line-height: 1.5;
}

.avatar-picker-block,
.banner-picker-block {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px;
  margin-bottom: 13px;
}

.avatar-picker-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.block-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.mini-seg-tabs {
  display: inline-flex;
  background: var(--bg-0);
  border: 1px solid var(--border-subtle);
  padding: 3px;
  border-radius: var(--radius-pill);
  gap: 3px;
  flex-wrap: wrap;
}

.mini-seg-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.14s ease;
}

.mini-seg-btn.active {
  background: var(--accent);
  color: #fff;
}

.char-search-bar {
  display: flex;
  gap: 8px;
}

.char-search-bar input {
  flex: 1;
  background: var(--bg-0);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.85rem;
}

.char-search-bar input:focus {
  outline: none;
  border-color: var(--accent);
}

.char-avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 10px;
  margin-top: 12px;
  max-height: 215px;
  overflow-y: auto;
  padding-right: 4px;
}

.char-avatar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: var(--bg-0);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 7px 5px;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: inherit;
  transition: all 0.14s;
}

.char-avatar-item:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.char-avatar-item.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #fff;
}

.char-avatar-item img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
}

.char-avatar-name {
  font-size: 0.69rem;
  font-weight: 600;
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-drop-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  text-align: center;
}

.upload-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.banner-presets-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.banner-preset-swatch {
  width: 56px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: transform 0.14s, border-color 0.14s;
}

.banner-preset-swatch:hover,
.banner-preset-swatch.selected {
  transform: scale(1.06);
  border-color: #fff;
}

/* Cuadrícula de Banners / Wallpapers Panorámicos HD de Anime */
.anime-banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 10px;
  margin-top: 11px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.anime-banner-choice {
  position: relative;
  height: 76px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: var(--bg-0);
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.anime-banner-choice:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.45);
}

.anime-banner-choice.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.anime-banner-choice img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.anime-banner-choice-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 8px 5px;
  background: linear-gradient(to top, rgba(6, 8, 15, 0.92), transparent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tarjetas de Atmósferas de Fondo de Página (8 Temas) */
.theme-presets-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.theme-preset-card {
  position: relative;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255, 255, 255, 0.11);
  padding: 10px;
  min-height: 58px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  font-family: inherit;
  color: #fff;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.theme-preset-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.38);
}

.theme-preset-card.selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--accent);
}

.theme-preset-name {
  position: relative;
  z-index: 2;
  font-size: 0.74rem;
  font-weight: 800;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

/* =========================================================
   CONTROLES DE ENCUADRE, ZOOM Y AJUSTE VISUAL (AVATAR, BANNER Y FONDO)
   ========================================================= */
.studio-framing-box {
  background: rgba(14, 18, 30, 0.65);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  margin-top: 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.framing-box-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.framing-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.framing-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.framing-hint {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.framing-quick-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.framing-preset-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.framing-preset-pill:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.framing-preset-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px var(--accent-soft);
}

.framing-sliders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.pagebg-fit-mode-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.quick-suggest-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  margin-bottom: 12px;
}

.suggest-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
}

.mini-chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.mini-chip-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* Deslizadores (Sliders) y Selectores de Color del Estudio */
.studio-bg-sliders-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.studio-slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.studio-slider-row label {
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.slider-val-pill {
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.studio-range {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.studio-scope-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.solid-color-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  flex-wrap: wrap;
}

.native-color-input {
  width: 44px;
  height: 36px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-0);
  cursor: pointer;
}

.native-color-input.sm {
  width: 34px;
  height: 28px;
}

.accent-swatches-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.accent-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.accent-swatch:hover,
.accent-swatch.selected {
  transform: scale(1.14);
  border-color: #fff;
}

.custom-accent-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

/* Pestaña 4 del Estudio: Lista Ordenable de Paneles */
.studio-panels-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.studio-panels-sort-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.studio-panel-sort-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  flex-wrap: wrap;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.studio-panel-sort-item.is-hidden-panel {
  opacity: 0.58;
  border-style: dashed;
}

.studio-panel-sort-item.drag-over-row {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.studio-panel-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 220px;
}

.studio-panel-handle {
  font-size: 1.05rem;
  color: var(--text-muted);
  cursor: grab;
  padding: 4px 6px;
  user-select: none;
}

.studio-panel-title-input {
  flex: 1;
  background: var(--bg-0);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  padding: 7px 10px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
}

.studio-panel-title-input:focus {
  outline: none;
  border-color: var(--accent);
}

.studio-panel-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Modal Selector de Anime/Manga y Openings */
.picker-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.picker-search-wrap {
  position: relative;
  flex: 1;
  min-width: 210px;
  display: flex;
  align-items: center;
}

.picker-search-wrap input {
  width: 100%;
  background: var(--bg-0);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  padding: 8px 34px 8px 14px;
  font-family: inherit;
  font-size: 0.85rem;
}

.picker-search-wrap input:focus {
  outline: none;
  border-color: var(--accent);
}

.picker-search-wrap .mini-spinner {
  position: absolute;
  right: 11px;
}

.picker-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
  gap: 12px;
  max-height: 390px;
  overflow-y: auto;
  padding-right: 4px;
}

.picker-mini-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  color: var(--text-primary);
  font-family: inherit;
  transition: transform 0.15s, border-color 0.15s;
}

.picker-mini-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.picker-mini-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--bg-0);
  overflow: hidden;
}

.picker-mini-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.picker-mini-info {
  padding: 8px;
}

.picker-mini-title {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.picker-mini-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.saved-anime-quick-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.theme-picker-results {
  margin-top: 14px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.theme-anime-choice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
}

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

.theme-anime-choice-left img {
  width: 38px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.share-subhead {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  margin: 0 0 6px;
}

.uid-pill-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.uid-pill-row code {
  background: var(--bg-0);
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: 6px;
  color: #c4b5fd;
}

.share-local-actions {
  margin-top: 12px;
}

@media (max-width: 960px) {
  .profile-section.panel-span-half {
    grid-column: 1 / -1;
  }

  .top3-podium-grid {
    grid-template-columns: 1fr;
  }

  .profile-themes-grid {
    grid-template-columns: 1fr;
  }

  .privacy-toggles-box {
    align-items: flex-start;
  }

  .theme-presets-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-inline-options-grid,
  .studio-bg-sliders-grid {
    grid-template-columns: 1fr;
  }

  .studio-tabs-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .profile-banner-box {
    height: 155px;
  }

  .banner-floating-btns {
    top: 10px;
    right: 10px;
    left: 10px;
    justify-content: flex-end;
  }

  .profile-hero-body {
    grid-template-columns: 1fr;
    padding: 0 18px 22px;
    gap: 10px;
  }

  .profile-avatar-col {
    margin-top: -52px;
  }

  .profile-hero-avatar-wrap {
    width: 100px;
    height: 100px;
  }

  .profile-display-name {
    font-size: 1.45rem;
  }

  .profile-section {
    padding: 18px 15px;
  }

  .studio-live-stage {
    margin: 10px 14px 8px;
    padding: 10px;
  }

  .studio-tabs-bar,
  .studio-scroll-body,
  .studio-footer-actions {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* =========================================================
   TEMPORADAS UNIFICADAS EN ANIMES Y PESTAÑA CAPÍTULOS
   ========================================================= */
.seasons-selector-wrap {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}

.seasons-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.seasons-section-label {
  font-family: "Outfit", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-primary);
}

.seasons-total-summary {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.seasons-pills-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.season-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.79rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.16s ease;
}

.season-pill:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.season-pill.active {
  background: var(--accent-soft);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.season-pill.is-done {
  border-color: rgba(16, 185, 129, 0.45);
}

.season-pill.is-done .season-pill-count {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
}

.season-pill-count {
  font-size: 0.69rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.season-pill.active .season-pill-count {
  background: var(--accent);
  color: #fff;
}

.active-season-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.active-season-poster {
  width: 44px;
  height: 62px;
  border-radius: 7px;
  object-fit: cover;
  background: var(--bg-0);
  border: 1px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.active-season-info {
  flex: 1;
  min-width: 0;
}

.active-season-title {
  font-family: "Outfit", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.active-season-meta {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

.season-mark-btn {
  flex-shrink: 0;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.16s ease;
}

.season-mark-btn:hover {
  background: rgba(16, 185, 129, 0.26);
  color: #fff;
}

.season-mark-btn.is-done {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.season-mark-btn.is-done:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.chapter-season-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  margin-top: 8px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--accent-soft), rgba(255, 255, 255, 0.02));
  border-left: 3px solid var(--accent);
  font-family: "Outfit", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
}

.chapter-season-divider:first-child {
  margin-top: 0;
}

.chapter-season-divider span.sub {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* =========================================================
   BUSCADOR DE GIFS ANIMADOS (FOTO DE PERFIL Y BANNER)
   ========================================================= */
.gif-mood-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.gif-mood-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.gif-mood-chip:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.gif-mood-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #fff;
}

.gif-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 9px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.gif-choice-card {
  position: relative;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-0);
  aspect-ratio: 1 / 1;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.gif-choice-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.gif-choice-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.gif-choice-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gif-badge-pill {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(12, 14, 24, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fde68a;
  font-family: "Outfit", sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 4px;
  pointer-events: none;
}

.gif-choice-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px 6px 5px;
  background: linear-gradient(to top, rgba(6, 8, 15, 0.92), transparent);
  color: #f8fafc;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

@media (max-width: 640px) {
  .active-season-card {
    flex-wrap: wrap;
  }

  .season-mark-btn {
    width: 100%;
    text-align: center;
  }
}

/* =========================================================
   LISTA DEL PERFIL (TOP 5 + BOTÓN "VER TODOS")
   ========================================================= */
.profile-lists-view-all-box {
  margin-top: 22px;
  padding: 16px 24px;
  background: linear-gradient(135deg, rgba(19, 25, 42, 0.88) 0%, rgba(12, 16, 28, 0.94) 100%);
  border: 1px solid rgba(124, 92, 255, 0.28);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  box-shadow: 0 12px 36px -6px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.view-all-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.view-all-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.view-all-count {
  font-size: 0.88rem;
  color: #e2e8f0;
}

.view-all-count strong {
  color: #fff;
  font-weight: 700;
}

.view-all-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.83rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
}

.view-all-btn .btn-arrow {
  font-size: 0.95rem;
  transition: transform 0.15s ease;
}

.view-all-btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* =========================================================
   MODAL DE LISTA COMPLETA DEL PERFIL
   ========================================================= */
.modal-full-list {
  width: 960px;
  max-width: 96vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.full-list-modal-body {
  overflow-y: auto;
  flex: 1;
  padding: 16px 22px 24px;
}

.full-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.full-list-count-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}


@media (max-width: 640px) {
  .profile-lists-view-all-box {
    flex-direction: column;
    align-items: stretch;
  }
  .view-all-actions {
    flex-direction: column;
  }
  .view-all-btn {
    width: 100%;
    justify-content: center;
  }
}


.detail-review-card {
  background: rgba(18, 22, 36, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.detail-review-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-review-icon {
  font-size: 1.8rem;
}

.detail-review-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0;
}

.detail-review-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.user-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  transition: all 0.2s ease;
}

.user-score-badge.has-score {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.star-rating-widget {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(10, 13, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 16px;
}

.star-buttons-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.star-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.star-btn:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
  transform: translateY(-2px);
}

.star-btn.active {
  background: rgba(245, 158, 11, 0.25);
  border-color: #fbbf24;
  color: #fbbf24;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.star-score-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.detail-review-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-input-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
}

.review-char-count {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.detail-review-textarea {
  width: 100%;
  background: rgba(10, 13, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  color: #f1f5f9;
  font-size: 0.88rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 110px;
  transition: border-color 0.2s;
}

.detail-review-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.detail-review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-review-save-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.save-indicator {
  font-size: 0.78rem;
  font-weight: 700;
  color: #34d399;
}

.synopsis-user-rating-box {
  margin-top: 24px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.16) 0%, rgba(59, 130, 246, 0.1) 100%);
  border: 1px solid rgba(139, 92, 246, 0.42);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

.synopsis-user-rating-box.hidden {
  display: none !important;
}

.syn-rating-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
}

.syn-rating-score {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.syn-star {
  color: #fbbf24;
  font-size: 1.35rem;
}

.syn-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fbbf24;
  font-family: "Outfit", sans-serif;
}

.syn-max {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.syn-rating-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 180px;
}

.syn-rating-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f1f5f9;
}

.syn-rating-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
}

.syn-edit-review-btn,
.syn-rate-now-btn {
  background: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.35);
}

.syn-edit-review-btn:hover,
.syn-rate-now-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.5);
}

.syn-rating-inner.unrated {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.syn-unrated-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.syn-unrated-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.syn-unrated-text strong {
  font-size: 0.94rem;
  color: #f8fafc;
}

.syn-unrated-text span {
  font-size: 0.82rem;
  color: #94a3b8;
}

.synopsis-user-score-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.synopsis-user-score-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fbbf24;
}

.synopsis-user-notes-preview {
  font-size: 0.8rem;
  color: #cbd5e1;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-roulette {
  max-width: 840px;
  width: 95vw;
  max-height: 94vh;
  background: radial-gradient(ellipse at 50% 0%, rgba(124, 92, 255, 0.16) 0%, transparent 52%),
    linear-gradient(168deg, rgba(16, 21, 38, 0.98) 0%, rgba(7, 10, 20, 0.99) 100%);
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 26px;
  box-shadow: 0 32px 90px -12px rgba(0, 0, 0, 0.92), 0 0 50px -12px rgba(124, 92, 255, 0.28);
  --roulette-glow: #8b5cf6;
  --roulette-accent-a: #7c5cff;
  --roulette-accent-b: #ec4899;
}

.modal-roulette[data-source="explore"] {
  background: radial-gradient(ellipse at 50% 0%, rgba(56, 189, 248, 0.16) 0%, transparent 52%),
    linear-gradient(168deg, rgba(13, 22, 42, 0.98) 0%, rgba(6, 10, 20, 0.99) 100%);
  border-color: rgba(56, 189, 248, 0.28);
  box-shadow: 0 32px 90px -12px rgba(0, 0, 0, 0.92), 0 0 50px -12px rgba(56, 189, 248, 0.28);
  --roulette-glow: #38bdf8;
  --roulette-accent-a: #0ea5e9;
  --roulette-accent-b: #a855f7;
}

.roulette-modal-header {
  padding: 18px 24px 14px;
}

.roulette-header-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.roulette-icon-tool {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.roulette-icon-tool:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.06);
}

.roulette-icon-tool.is-muted {
  opacity: 0.58;
}

.roulette-count-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--roulette-glow) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--roulette-glow) 48%, transparent);
  color: #e2e8f0;
  letter-spacing: 0.02em;
}

.roulette-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 22px 16px;
}

.roulette-top-switchers,
.roulette-filters-bar,
.roulette-wheel-wrap,
.roulette-stage,
.roulette-winner-card,
.roulette-history-wrap {
  flex-shrink: 0;
}

.roulette-top-switchers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.roulette-switcher-group {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.roulette-filters-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.roulette-filter-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.roulette-cat-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.roulette-filter-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.roulette-shuffle-btn {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.roulette-shuffle-btn:hover {
  background: color-mix(in srgb, var(--roulette-glow) 22%, transparent);
  border-color: var(--roulette-glow);
  transform: translateY(-1px);
}

/* --- MODO 1: RUEDA CIRCULAR DE PRECISIÓN --- */
.roulette-wheel-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 12px 14px;
  min-height: 344px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 52%, color-mix(in srgb, var(--roulette-glow) 14%, #090d1a) 0%, #070a14 78%);
  border: 1px solid color-mix(in srgb, var(--roulette-glow) 32%, rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 0 42px rgba(0, 0, 0, 0.72);
  overflow: hidden;
}

.roulette-wheel-ambient-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--roulette-glow) 28%, transparent) 0%, transparent 68%);
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.roulette-wheel-wrap.is-spinning .roulette-wheel-ambient-glow {
  opacity: 1;
}

.roulette-wheel-pointer {
  position: relative;
  z-index: 9;
  margin-bottom: -14px;
  transform-origin: 50% 8px;
  filter: drop-shadow(0 4px 12px rgba(56, 189, 248, 0.75));
  pointer-events: none;
}

.roulette-wheel-pointer.is-ticking {
  animation: needleKick 0.1s ease-out;
}

@keyframes needleKick {
  0% { transform: rotate(0deg); }
  40% { transform: rotate(-18deg); }
  100% { transform: rotate(0deg); }
}

.roulette-wheel-bezel {
  position: relative;
  width: min(312px, 72vw);
  height: min(312px, 72vw);
  --led-radius: calc(min(312px, 72vw) / 2 - 6px);
  border-radius: 50%;
  padding: 9px;
  background: linear-gradient(145deg, #273252 0%, #0f1526 52%, #1d2642 100%);
  border: 2px solid color-mix(in srgb, var(--roulette-glow) 55%, rgba(255, 255, 255, 0.2));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.8), 0 0 36px color-mix(in srgb, var(--roulette-glow) 26%, transparent), inset 0 0 14px rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.roulette-wheel-leds {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
}

.roulette-rim-led {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  opacity: 0.45;
  transform: translate(-50%, -50%) rotate(var(--led-angle, 0deg)) translateY(calc(-1 * var(--led-radius, 177px)));
}

.roulette-wheel-wrap.is-spinning .roulette-rim-led.is-even {
  background: #fde047;
  box-shadow: 0 0 8px #fde047;
  animation: rimLedPulse 0.36s ease-in-out var(--led-delay, 0s) infinite alternate;
}

.roulette-wheel-wrap.is-spinning .roulette-rim-led.is-odd {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: rimLedPulse 0.36s ease-in-out calc(var(--led-delay, 0s) + 0.18s) infinite alternate;
}

@keyframes rimLedPulse {
  from { opacity: 0.25; }
  to { opacity: 1; }
}

.roulette-wheel-rotator {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  will-change: transform;
  transform: rotate(0deg);
}

.roulette-wheel-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.roulette-wedge-path {
  transition: filter 0.25s ease;
}

.roulette-wedge-path.is-winner-wedge {
  filter: brightness(1.32) saturate(1.2);
  stroke: #ffffff;
  stroke-width: 2.6;
}

.roulette-wedge-label {
  fill: #ffffff;
  font-size: 11px;
  font-weight: 800;
  font-family: inherit;
  paint-order: stroke;
  stroke: rgba(6, 9, 18, 0.85);
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
  user-select: none;
}

.roulette-wedge-label.is-dense {
  font-size: 9.8px;
}

.roulette-wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  background: radial-gradient(circle at 35% 30%, var(--roulette-accent-a), #141932 82%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85), 0 0 22px color-mix(in srgb, var(--roulette-glow) 60%, transparent);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
  padding: 0;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease;
}

.roulette-wheel-hub:hover {
  transform: translate(-50%, -50%) scale(1.07);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.9), 0 0 32px var(--roulette-glow);
}

.roulette-wheel-wrap.is-spinning .roulette-wheel-hub {
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.95);
}

.roulette-hub-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.roulette-hub-text {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.roulette-hub-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.roulette-hub-replay {
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 22, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.roulette-wheel-hub.has-winner-poster:hover .roulette-hub-replay {
  opacity: 1;
}

/* --- MODO 2: CARRIL ARCADE HORIZONTAL --- */
.roulette-stage {
  height: 232px;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--roulette-glow) 18%, #10152b) 0%, rgba(7, 9, 17, 0.98) 100%);
  border: 1.5px solid color-mix(in srgb, var(--roulette-glow) 45%, transparent);
  box-shadow: inset 0 0 48px rgba(0, 0, 0, 0.88), 0 8px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
}

.roulette-stage::before,
.roulette-stage::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 118px;
  pointer-events: none;
  z-index: 4;
}

.roulette-stage::before {
  left: 0;
  background: linear-gradient(to right, rgba(7, 9, 17, 0.96) 0%, rgba(7, 9, 17, 0.62) 50%, transparent 100%);
}

.roulette-stage::after {
  right: 0;
  background: linear-gradient(to left, rgba(7, 9, 17, 0.96) 0%, rgba(7, 9, 17, 0.62) 50%, transparent 100%);
}

.roulette-focus-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 132px;
  height: 190px;
  transform: translate(-50%, -50%);
  border-radius: 15px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 24px color-mix(in srgb, var(--roulette-glow) 25%, transparent);
  pointer-events: none;
  z-index: 4;
}

.roulette-laser-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, var(--roulette-glow) 0%, var(--roulette-accent-b) 50%, var(--roulette-glow) 100%);
  box-shadow: 0 0 12px var(--roulette-glow), 0 0 24px color-mix(in srgb, var(--roulette-accent-b) 70%, transparent);
  z-index: 5;
  pointer-events: none;
  opacity: 0.92;
}

.roulette-pointer {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  color: var(--roulette-glow);
  z-index: 7;
  text-shadow: 0 0 16px var(--roulette-glow);
  pointer-events: none;
  line-height: 1;
}

.roulette-pointer-top { top: 6px; }
.roulette-pointer-bottom { bottom: 6px; }

.roulette-spinner-track {
  display: flex;
  align-items: center;
  gap: 14px;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 3.6s cubic-bezier(0.08, 0.86, 0.16, 1);
  will-change: transform;
}

.roulette-card-item {
  width: 120px;
  height: 176px;
  flex-shrink: 0;
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(135deg, #131b2e 0%, #0d1120 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  position: relative;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
}

.roulette-card-item.is-winner-card {
  border-color: var(--roulette-glow) !important;
  transform: scale(1.06);
  box-shadow: 0 0 30px color-mix(in srgb, var(--roulette-glow) 85%, transparent), 0 0 0 2px var(--roulette-glow);
  z-index: 3;
}

.roulette-card-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.roulette-card-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(8, 11, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.66rem;
  font-weight: 700;
  color: #e2e8f0;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.roulette-card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 8px 6px;
  background: linear-gradient(to top, rgba(8, 11, 20, 0.97) 0%, rgba(8, 11, 20, 0.72) 62%, transparent 100%);
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

/* --- GANADOR & HISTORIAL DE SESIÓN --- */
.roulette-winner-card {
  display: flex;
  gap: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--roulette-accent-a) 22%, #11182c) 0%, rgba(12, 17, 32, 0.96) 55%, rgba(16, 20, 40, 0.92) 100%);
  border: 1.5px solid color-mix(in srgb, var(--roulette-glow) 60%, transparent);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 28px color-mix(in srgb, var(--roulette-glow) 22%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  animation: winnerPop 0.42s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes winnerPop {
  0% { transform: scale(0.94); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.winner-poster {
  width: 96px;
  height: 138px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.15);
  background: #0d1224;
  display: flex;
  align-items: center;
  justify-content: center;
}

.winner-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.winner-poster-fallback {
  font-size: 2.2rem;
}

.winner-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.winner-eyebrow {
  font-size: 0.7rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.winner-badge-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.winner-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}

.winner-synopsis {
  font-size: 0.81rem;
  color: #cbd5e1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
  margin: 0;
}

.roulette-history-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.roulette-history-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  white-space: nowrap;
}

.roulette-history-list {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.roulette-history-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 165px;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.roulette-history-chip:hover,
.roulette-history-chip.is-current {
  background: color-mix(in srgb, var(--roulette-glow) 22%, transparent);
  border-color: var(--roulette-glow);
  color: #fff;
}

.roulette-hist-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.roulette-hist-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roulette-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.roulette-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.roulette-spin-btn {
  background: linear-gradient(135deg, var(--roulette-accent-a) 0%, var(--roulette-glow) 100%) !important;
  font-weight: 800;
  font-size: 0.94rem;
  padding: 11px 26px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--roulette-glow) 50%, transparent);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.roulette-spin-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--roulette-glow) 70%, transparent);
}

.roulette-spin-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* --- 3. CALENDARIO SEMANAL (REDISEÑO EDITORIAL DE SIMULCAST) --- */
.calendar-view {
  padding: 20px 0 68px;
}

.calendar-hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(16, 22, 42, 0.88) 0%, rgba(9, 12, 24, 0.94) 100%);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  padding: 26px 28px 22px;
  box-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
  transition: border-color 0.22s ease;
}

.calendar-hero-card::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -10%;
  width: 420px;
  height: 240px;
  background: radial-gradient(ellipse at center, rgba(124, 92, 255, 0.22) 0%, rgba(56, 189, 248, 0.1) 45%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.calendar-hero-card > * {
  position: relative;
  z-index: 1;
}

.calendar-hero-card:hover {
  border-color: rgba(139, 92, 246, 0.25);
}

.cal-live-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.cal-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 4px 11px;
  border-radius: var(--radius-pill);
}

.cal-tz-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.cal-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: liveDotPulse 2s infinite ease-in-out;
}

@keyframes liveDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.calendar-header-left .view-title {
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.75rem, 2.8vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.1;
}

.calendar-header-left .view-subtitle {
  font-size: 0.88rem;
  color: #94a3b8;
  max-width: 580px;
  line-height: 1.5;
  margin: 0;
}

.calendar-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-filter-toggle {
  display: flex;
  background: rgba(6, 9, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px;
  border-radius: var(--radius-pill);
  gap: 4px;
}

.cal-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.18s ease;
}

.cal-filter-btn:hover {
  color: #fff;
}

.cal-filter-btn.active {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border-color: rgba(196, 181, 253, 0.35);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

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

.cal-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.cal-action-btn:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
  transform: translateY(-1px);
}

/* Barra de Días de la Semana */
.calendar-days-bar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.cal-day-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 16px 8px 12px;
  border-radius: 16px;
  background: rgba(14, 19, 36, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.cal-day-btn:hover {
  background: rgba(24, 32, 58, 0.88);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.45);
}

.cal-day-btn.active {
  background: linear-gradient(160deg, rgba(124, 58, 237, 0.34) 0%, rgba(79, 70, 229, 0.2) 100%);
  border-color: rgba(167, 139, 250, 0.75);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -6px rgba(124, 58, 237, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.cal-day-short {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #94a3b8;
  text-transform: uppercase;
}

.cal-day-btn.active .cal-day-short {
  color: #ddd6fe;
}

.cal-day-num {
  font-family: "Outfit", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-top: 2px;
}

.cal-day-month {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.cal-day-btn.active .cal-day-month {
  color: #c4b5fd;
}

.cal-day-badges {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.cal-day-count {
  display: inline-flex;
  align-items: center;
  font-size: 0.69rem;
  font-weight: 800;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.07);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cal-day-btn.active .cal-day-count {
  background: rgba(139, 92, 246, 0.38);
  color: #f5f3ff;
  border-color: rgba(196, 181, 253, 0.45);
}

.cal-day-lib-dot {
  display: inline-flex;
  align-items: center;
  font-size: 0.67rem;
  font-weight: 800;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.42);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.cal-day-btn.is-today {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.14);
}

.cal-day-btn.is-today::before {
  content: "HOY";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.58rem;
  font-weight: 800;
  color: #082f49;
  background: linear-gradient(90deg, #38bdf8, #7dd3fc);
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
  padding: 1px 8px;
  letter-spacing: 0.08em;
}

.cal-day-btn.is-today .cal-day-num {
  color: #7dd3fc;
}

.cal-day-btn.is-today.active .cal-day-num {
  color: #fff;
}

/* Barra de Resumen, Filtros de Estado y Buscador */
.calendar-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 16px;
  border-radius: 14px;
  background: rgba(7, 10, 20, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.07);
  flex-wrap: wrap;
}

.cal-summary-left {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.87rem;
  color: #cbd5e1;
}

.cal-summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(124, 92, 255, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
  flex-shrink: 0;
}

.cal-summary-left strong {
  color: #fff;
  font-weight: 800;
}

.cal-summary-sep {
  color: #475569;
  margin: 0 2px;
}

.cal-summary-upcoming {
  color: #7dd3fc;
  font-weight: 700;
}

.cal-today-pill {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: 5px;
  vertical-align: middle;
}

.cal-summary-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cal-status-tabs {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.cal-status-tab {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-status-tab:hover {
  color: #fff;
}

.cal-status-tab.active {
  background: rgba(139, 92, 246, 0.32);
  color: #f5f3ff;
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.5);
}

.cal-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 230px;
}

.cal-search-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  pointer-events: none;
}

.cal-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  padding: 7px 30px 7px 32px;
  color: #fff;
  font-size: 0.81rem;
  font-family: inherit;
  transition: all 0.16s ease;
}

.cal-search-input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.7);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 14px rgba(124, 92, 255, 0.25);
}

.cal-clear-search-btn {
  position: absolute;
  right: 9px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.78rem;
  padding: 2px 6px;
  transition: color 0.15s ease;
}

.cal-clear-search-btn:hover {
  color: #fff;
}

/* Destacado del Siguiente Estreno del Día */
.cal-nextup-strip {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(56, 189, 248, 0.32);
  background: linear-gradient(120deg, rgba(13, 19, 36, 0.94) 0%, rgba(20, 26, 52, 0.9) 100%);
  margin-bottom: 20px;
  cursor: pointer;
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.55), 0 0 24px rgba(56, 189, 248, 0.09);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cal-nextup-strip:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.6), 0 0 28px rgba(56, 189, 248, 0.16);
}

.cal-nextup-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.26;
  filter: blur(4px) saturate(1.25);
  transform: scale(1.06);
  -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 90%);
  mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 90%);
  pointer-events: none;
}

.cal-nextup-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  flex-wrap: wrap;
}

.cal-nextup-left {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  flex: 1;
}

.cal-nextup-poster {
  width: 54px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  background: #080b14;
}

.cal-nextup-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cal-nextup-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cal-nextup-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #7dd3fc;
}

.cal-nextup-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: liveDotPulse 1.8s infinite ease-in-out;
}

.cal-nextup-countdown {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(124, 58, 237, 0.28));
  border: 1px solid rgba(125, 211, 252, 0.42);
  color: #e0f2fe;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}

.cal-nextup-clock {
  color: #cbd5e1;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.cal-nextup-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-nextup-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.79rem;
  font-weight: 600;
  color: #94a3b8;
}

.cal-nextup-score {
  color: #fbbf24;
  font-weight: 800;
}

.cal-nextup-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.cal-nextup-strip:hover .cal-nextup-cta {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border-color: rgba(196, 181, 253, 0.45);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.45);
}

/* Cuadrícula de Tarjetas de Estreno */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.cal-card {
  display: flex;
  gap: 16px;
  background: linear-gradient(155deg, rgba(16, 21, 38, 0.92) 0%, rgba(10, 13, 25, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease, box-shadow 0.22s ease;
  position: relative;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 340px 166px;
}

.cal-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: rgba(148, 163, 184, 0.25);
  z-index: 2;
  transition: background 0.2s ease;
}

.cal-card.is-upcoming::before {
  background: linear-gradient(180deg, #38bdf8, #8b5cf6);
}

.cal-card.is-next-up {
  border-color: rgba(56, 189, 248, 0.38);
  box-shadow: 0 10px 28px -8px rgba(56, 189, 248, 0.18);
}

.cal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 18px 36px -8px rgba(0, 0, 0, 0.55), 0 0 22px rgba(124, 92, 255, 0.18);
}

.cal-card-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.14;
  filter: blur(10px) saturate(1.3);
  transform: scale(1.12);
  -webkit-mask-image: linear-gradient(135deg, transparent 22%, rgba(0, 0, 0, 0.85) 100%);
  mask-image: linear-gradient(135deg, transparent 22%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.24s ease;
}

.cal-card:hover .cal-card-backdrop {
  opacity: 0.24;
}

.cal-card-poster {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 138px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #080b14;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.cal-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cal-card:hover .cal-card-poster img {
  transform: scale(1.06);
}

.cal-card-info {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 7px;
}

.cal-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.cal-time-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cal-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "Outfit", sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 9px;
  border-radius: 8px;
  letter-spacing: 0.02em;
}

.cal-card.is-aired .cal-time-badge {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
}

.cal-ep-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.85), rgba(147, 51, 234, 0.85));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 8px;
  border: 1px solid rgba(196, 181, 253, 0.28);
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.3);
  white-space: nowrap;
}

.cal-ep-total {
  opacity: 0.75;
  font-weight: 700;
}

.cal-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.69rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 7px;
  letter-spacing: 0.02em;
}

.cal-status-pill.aired {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.cal-status-pill.upcoming {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.38);
}

.cal-card-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.03rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  transition: color 0.16s ease;
}

.cal-card:hover .cal-card-title {
  color: #ddd6fe;
}

.cal-card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cal-format-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal-in-lib-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.16);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.36);
}

.cal-card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
  margin-top: auto;
  padding-top: 2px;
  flex-wrap: wrap;
}

.cal-meta-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.cal-meta-genres-list {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.cal-genre-chip {
  font-size: 0.7rem;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 6px;
}

/* Responsividad */
@media (max-width: 900px) {
  .calendar-days-bar {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }
  .cal-day-btn {
    min-width: 102px;
    flex-shrink: 0;
  }
}

@media (max-width: 640px) {
  .calendar-hero-card {
    padding: 20px 16px 16px;
    border-radius: 18px;
  }
  .calendar-header {
    flex-direction: column;
    align-items: stretch;
  }
  .calendar-header-right {
    flex-direction: column;
    align-items: stretch;
  }
  .calendar-filter-toggle {
    width: 100%;
  }
  .cal-filter-btn {
    flex: 1;
    justify-content: center;
  }
  .cal-summary-right {
    width: 100%;
  }
  .cal-status-tabs {
    width: 100%;
    justify-content: space-between;
  }
  .cal-status-tab {
    flex: 1;
    text-align: center;
  }
  .cal-search-wrap {
    min-width: 100%;
  }
  .cal-nextup-inner {
    padding: 12px 14px;
  }
  .cal-nextup-cta {
    width: 100%;
    justify-content: center;
  }
  .calendar-grid {
    grid-template-columns: 1fr;
  }
  .cal-card-poster {
    width: 84px;
    height: 122px;
  }
  .roulette-winner-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .winner-badge-row {
    justify-content: center;
  }
  .roulette-modal-body {
    padding: 14px;
  }
  .roulette-wheel-bezel {
    width: 296px;
    height: 296px;
    --led-radius: 141px;
  }
  .roulette-wheel-hub {
    width: 64px;
    height: 64px;
  }
  .roulette-modal-footer {
    justify-content: center;
  }
}

.modal-lens {
  max-width: 760px;
  width: 95vw;
  background: radial-gradient(ellipse at 85% 0%, rgba(236, 72, 153, 0.14), transparent 50%),
              radial-gradient(ellipse at 15% 0%, rgba(124, 92, 255, 0.2), transparent 50%),
              #0d1222;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 35px rgba(124, 92, 255, 0.16);
}

.modal-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lens-badge-glow {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.25), rgba(236, 72, 153, 0.25));
  border: 1px solid rgba(236, 72, 153, 0.5);
  color: #f472b6;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Selector Segmentado de Modo (Anime / Manga) */
.lens-mode-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 22px 0;
}

.lens-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(0, 0, 0, 0.38);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lens-mode-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-align: left;
  font-family: inherit;
}

.lens-mode-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.lens-mode-tab.active[data-lens-mode="anime"] {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.25), rgba(56, 189, 248, 0.18));
  border-color: rgba(124, 92, 255, 0.5);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.2);
}

.lens-mode-tab.active[data-lens-mode="manga"] {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.26), rgba(168, 85, 247, 0.18));
  border-color: rgba(236, 72, 153, 0.55);
  color: #fff;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.22);
}

.lens-tab-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.lens-tab-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.lens-tab-content strong {
  font-size: 0.86rem;
  font-weight: 700;
  color: inherit;
}

.lens-tab-content small {
  font-size: 0.71rem;
  color: #94a3b8;
}

.lens-mode-indicator {
  font-size: 0.76rem;
  color: #a78bfa;
  font-weight: 600;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lens-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 22px 20px;
}

.lens-dropzone {
  border: 2px dashed rgba(124, 92, 255, 0.35);
  background: rgba(15, 23, 42, 0.45);
  border-radius: 18px;
  padding: 26px 20px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.lens-dropzone:hover {
  border-color: rgba(168, 85, 247, 0.6);
  background: rgba(124, 92, 255, 0.08);
}

.lens-dropzone.drag-over {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  transform: scale(1.01);
}

.lens-drop-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lens-icon-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.2), rgba(236, 72, 153, 0.2));
  color: #c084fc;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 22px rgba(124, 92, 255, 0.25);
}

.lens-prompt-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lens-prompt-text strong {
  font-size: 0.98rem;
  color: #f1f5f9;
}

.lens-prompt-text span {
  font-size: 0.8rem;
  color: #94a3b8;
}

.lens-prompt-text kbd {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: 700;
  color: #a78bfa;
  background: rgba(124, 92, 255, 0.18);
  border: 1px solid rgba(124, 92, 255, 0.35);
  border-radius: 6px;
}

.lens-prompt-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2px 0;
}

.lens-pill-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 600;
}

.lens-preview-wrapper {
  position: relative;
  max-height: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.lens-preview-wrapper img {
  max-height: 290px;
  max-width: 100%;
  width: auto;
  border-radius: 12px;
  object-fit: contain;
}

.lens-remove-img-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  z-index: 5;
}

.lens-remove-img-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  transform: scale(1.1);
}

/* Efecto Láser Neón Animado */
.lens-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #38bdf8, #ec4899, #a855f7, transparent);
  box-shadow: 0 0 16px #38bdf8, 0 0 12px #ec4899;
  animation: lensLaserSweep 1.8s ease-in-out infinite alternate;
  z-index: 4;
}

@keyframes lensLaserSweep {
  0% { top: 2%; }
  100% { top: 96%; }
}

/* Cuadrícula Cyber de Escaneo */
.lens-scan-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(124, 92, 255, 0.14) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(124, 92, 255, 0.14) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 3;
  animation: lensGridPulse 2s ease-in-out infinite alternate;
}

@keyframes lensGridPulse {
  0% { opacity: 0.25; }
  100% { opacity: 0.85; }
}

.lens-url-row {
  display: flex;
  gap: 10px;
}

.lens-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.lens-input-icon {
  position: absolute;
  left: 12px;
  color: #64748b;
  pointer-events: none;
}

.lens-url-input {
  width: 100%;
  padding-left: 36px;
  padding-right: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding-top: 8px;
  padding-bottom: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.lens-url-input:focus {
  outline: none;
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.06);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.lens-status-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.28);
  border-radius: 10px;
  color: #c084fc;
  font-size: 0.86rem;
  font-weight: 600;
}

/* Fila de Motores Especializados en Manga */
.lens-engine-buttons-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 12px 14px;
}

.lens-engines-heading {
  font-size: 0.78rem;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lens-engines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.lens-engine-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.lens-engine-btn:hover {
  transform: translateY(-2px);
}

.engine-google:hover {
  background: rgba(66, 133, 244, 0.18);
  border-color: rgba(66, 133, 244, 0.55);
  box-shadow: 0 4px 14px rgba(66, 133, 244, 0.25);
}

.engine-saucenao:hover {
  background: rgba(236, 72, 153, 0.18);
  border-color: rgba(236, 72, 153, 0.55);
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.25);
}

.engine-ascii2d:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.engine-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1;
}

.engine-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.engine-meta strong {
  font-size: 0.82rem;
  color: #f8fafc;
  font-weight: 700;
}

.engine-meta small {
  font-size: 0.69rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.engine-arrow {
  margin-left: auto;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 700;
}

/* Buscador Asistido de Manga */
.lens-manga-assist-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.08), rgba(124, 92, 255, 0.08));
  border: 1px solid rgba(236, 72, 153, 0.25);
  border-radius: 14px;
  padding: 12px 14px;
}

.lens-assist-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.assist-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f472b6;
}

.assist-sub {
  font-size: 0.72rem;
  color: #94a3b8;
}

.lens-assist-row {
  display: flex;
  gap: 8px;
}

.lens-assist-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: #fff;
  font-size: 0.82rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.lens-assist-input:focus {
  outline: none;
  border-color: #ec4899;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}

.lens-manga-assist-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.lens-manga-card-mini {
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px;
  align-items: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.lens-manga-card-mini:hover {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.12);
  transform: translateY(-2px);
}

.lens-mini-thumb {
  width: 44px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.lens-mini-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.lens-mini-info strong {
  font-size: 0.78rem;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lens-mini-info span {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Tarjeta Ganadora de Resultado */
.lens-winner-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  background: linear-gradient(135deg, rgba(18, 24, 40, 0.95) 0%, rgba(12, 16, 28, 0.98) 100%);
  border: 1px solid rgba(124, 92, 255, 0.32);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 14px 34px -6px rgba(0, 0, 0, 0.55);
}

.lens-winner-media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lens-preview-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.lens-timestamp-pill {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.88);
  color: #f1f5f9;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.lens-winner-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.lens-match-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.match-exact {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.45);
}

.match-prob {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.match-low {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.45);
}

.lens-winner-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

.lens-winner-sub {
  font-size: 0.8rem;
  color: #94a3b8;
}

.lens-scene-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: #cbd5e1;
  font-weight: 600;
}

.lens-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

/* Tarjeta de Manga Original Detectado */
.lens-manga-relation-card {
  display: flex;
  gap: 14px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.14) 0%, rgba(124, 92, 255, 0.1) 100%);
  border: 1px solid rgba(236, 72, 153, 0.45);
  border-radius: 14px;
  padding: 14px;
  margin-top: 12px;
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.12);
  align-items: center;
}

.lens-manga-rel-thumb {
  width: 60px;
  height: 85px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.lens-manga-rel-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow: hidden;
}

.lens-manga-badge {
  align-self: flex-start;
  background: #ec4899;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.lens-manga-rel-title {
  font-family: "Outfit", sans-serif;
  font-size: 0.98rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lens-manga-rel-meta {
  font-size: 0.75rem;
  color: #cbd5e1;
}

.lens-manga-rel-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.lens-warning-note {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.lens-alt-section {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lens-alt-heading {
  font-size: 0.84rem;
  color: #94a3b8;
  font-weight: 700;
  margin: 0;
}

.lens-alt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.lens-alt-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lens-alt-item:hover {
  background: rgba(124, 92, 255, 0.15);
  border-color: rgba(124, 92, 255, 0.4);
  transform: translateY(-2px);
}

.lens-alt-thumb {
  width: 50px;
  height: 38px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.lens-alt-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.lens-alt-info strong {
  font-size: 0.78rem;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lens-alt-info span {
  font-size: 0.7rem;
  color: #94a3b8;
}

.lens-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.lens-quota-hint {
  font-size: 0.75rem;
  color: #64748b;
}

@media (max-width: 640px) {
  .lens-winner-card {
    grid-template-columns: 1fr;
  }
  .lens-mode-tabs {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cal-live-dot,
  .lens-scan-line,
  .lens-scan-grid,
  .mini-spinner,
  .roulette-rim-led,
  .roulette-wheel-pointer,
  .roulette-winner-card {
    animation: none !important;
  }
}




/* Rewatch & Colecciones en Ficha Técnica + Highlight Calendario */
.detail-rewatch-box,
.detail-collections-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-rewatch-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.detail-rw-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #bae6fd;
}

.detail-rw-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.detail-rw-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-weight: 800;
  cursor: pointer;
}

.detail-rw-btn:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.25);
  border-color: rgba(56, 189, 248, 0.55);
}

.detail-rw-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.detail-rw-val {
  min-width: 22px;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 800;
  color: #fff;
}

.detail-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
}

.detail-col-add-btn {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, 0.45);
  background: rgba(124, 92, 255, 0.14);
  color: #ddd6fe;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.detail-col-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-col-empty {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.detail-col-chip {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.detail-col-chip.active {
  background: rgba(124, 92, 255, 0.24);
  border-color: rgba(124, 92, 255, 0.75);
  color: #f3e8ff;
}

.cal-card.is-watching-today {
  border-color: rgba(248, 113, 113, 0.65);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35), 0 8px 20px rgba(239, 68, 68, 0.14);
}

/* Efectos estacionales GPU-only (Navidad, Halloween, San Valentín, Sakura, Festival, Año Nuevo) */
.seasonal-pop-head {
  padding: 5px 10px 7px;
  margin-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.seasonal-opt {
  text-align: left;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}

.seasonal-opt:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateX(2px);
}

.seasonal-opt.active {
  background: rgba(124, 92, 255, 0.24);
  border-color: rgba(124, 92, 255, 0.65);
  color: #fff;
}

.seasonal-opt.active::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.seasonal-aurora {
  position: absolute;
  top: -120px;
  left: 6%;
  right: 6%;
  height: 240px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.54;
  filter: blur(55px);
  animation: seasonalAuroraDrift 14s ease-in-out infinite alternate;
}

.seasonal-bottom-glow {
  position: absolute;
  bottom: -140px;
  left: 12%;
  right: 12%;
  height: 220px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.34;
  filter: blur(60px);
}

@keyframes seasonalAuroraDrift {
  from {
    transform: translate3d(-2%, 0, 0) scale(0.98);
  }
  to {
    transform: translate3d(2%, 10px, 0) scale(1.04);
  }
}

body[data-seasonal="christmas"] .seasonal-aurora {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.5), rgba(167, 139, 250, 0.24), transparent 72%);
}
body[data-seasonal="christmas"] .seasonal-bottom-glow {
  background: radial-gradient(circle, rgba(186, 230, 253, 0.32), transparent 72%);
}

body[data-seasonal="halloween"] .seasonal-aurora {
  background: radial-gradient(circle, rgba(249, 115, 22, 0.45), rgba(139, 92, 246, 0.38), transparent 72%);
}
body[data-seasonal="halloween"] .seasonal-bottom-glow {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.36), rgba(249, 115, 22, 0.2), transparent 72%);
}

body[data-seasonal="valentine"] .seasonal-aurora {
  background: radial-gradient(circle, rgba(244, 114, 182, 0.5), rgba(251, 113, 133, 0.28), transparent 72%);
}
body[data-seasonal="valentine"] .seasonal-bottom-glow {
  background: radial-gradient(circle, rgba(251, 113, 133, 0.34), transparent 72%);
}

body[data-seasonal="sakura"] .seasonal-aurora {
  background: radial-gradient(circle, rgba(249, 168, 212, 0.48), rgba(244, 114, 182, 0.22), transparent 72%);
}
body[data-seasonal="sakura"] .seasonal-bottom-glow {
  background: radial-gradient(circle, rgba(251, 207, 232, 0.3), transparent 72%);
}

body[data-seasonal="summer"] .seasonal-aurora {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.44), rgba(249, 115, 22, 0.24), transparent 72%);
}
body[data-seasonal="summer"] .seasonal-bottom-glow {
  background: radial-gradient(circle, rgba(253, 224, 71, 0.28), rgba(239, 68, 68, 0.16), transparent 72%);
}

body[data-seasonal="newyear"] .seasonal-aurora {
  background: radial-gradient(circle, rgba(250, 204, 21, 0.45), rgba(56, 189, 248, 0.32), transparent 72%);
}
body[data-seasonal="newyear"] .seasonal-bottom-glow {
  background: radial-gradient(circle, rgba(167, 139, 250, 0.32), transparent 72%);
}

.seasonal-p {
  position: absolute;
  top: -10vh;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  opacity: 0;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 6px currentColor);
}

.seasonal-p svg {
  width: 100%;
  height: 100%;
  display: block;
}

.seasonal-p-bokeh {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, var(--sp-color, #38bdf8) 55%, transparent 100%);
  box-shadow: 0 0 12px var(--sp-color, #38bdf8);
}

.seasonal-p-confetti {
  width: 7px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffffff 0%, var(--sp-color, #fde047) 100%);
  box-shadow: 0 0 8px var(--sp-color, #fde047);
}

.seasonal-p-firefly {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fef08a;
  box-shadow: 0 0 12px 3px var(--sp-color, #fde047);
}

.seasonal-p-firework {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffffff 0 3px, transparent 4px),
    repeating-conic-gradient(from 0deg, var(--sp-color, #fde047) 0deg 6deg, transparent 6deg 30deg);
  -webkit-mask-image: radial-gradient(circle, transparent 0 18%, #000 32%, transparent 72%);
  mask-image: radial-gradient(circle, transparent 0 18%, #000 32%, transparent 72%);
  filter: drop-shadow(0 0 10px var(--sp-color, #fde047));
}

.seasonal-depth-0 {
  --sp-max-op: 0.42;
}

.seasonal-depth-1 {
  --sp-max-op: 0.68;
}

.seasonal-depth-2 {
  --sp-max-op: 0.92;
}

.seasonal-p-fall {
  animation: seasonalFall 12s linear infinite;
}

.seasonal-p-sway {
  animation: seasonalSwayFall 12s ease-in-out infinite;
}

.seasonal-p-flutter {
  animation: seasonalSakuraFlutter 12s ease-in-out infinite;
}

.seasonal-p-float {
  top: auto;
  bottom: -10vh;
  animation: seasonalFloat 13s ease-in-out infinite;
}

.seasonal-p-heart {
  top: auto;
  bottom: -10vh;
  animation: seasonalHeartRise 12s ease-in-out infinite;
}

.seasonal-p-firefly {
  animation: seasonalFirefly 6.5s ease-in-out infinite;
}

.seasonal-p-firework {
  animation: seasonalFireworkBurst 3.8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes seasonalFall {
  0% {
    transform: translate3d(0, -10vh, 0) scale(var(--sp-scale, 1)) rotate(0deg);
    opacity: 0;
  }
  12% {
    opacity: var(--sp-max-op, 0.72);
  }
  55% {
    transform: translate3d(var(--sp-drift, 20px), 52vh, 0) scale(var(--sp-scale, 1)) rotate(125deg);
  }
  85% {
    opacity: var(--sp-max-op, 0.65);
  }
  100% {
    transform: translate3d(calc(var(--sp-drift, 20px) * 0.4), 112vh, 0) scale(var(--sp-scale, 1)) rotate(260deg);
    opacity: 0;
  }
}

@keyframes seasonalSwayFall {
  0% {
    transform: translate3d(0, -10vh, 0) scale(var(--sp-scale, 1)) rotate(0deg);
    opacity: 0;
  }
  14% {
    opacity: var(--sp-max-op, 0.75);
  }
  33% {
    transform: translate3d(var(--sp-drift, 26px), 32vh, 0) scale(var(--sp-scale, 1)) rotate(75deg);
  }
  68% {
    transform: translate3d(calc(var(--sp-drift, 26px) * -0.7), 70vh, 0) scale(var(--sp-scale, 1)) rotate(175deg);
  }
  88% {
    opacity: var(--sp-max-op, 0.68);
  }
  100% {
    transform: translate3d(calc(var(--sp-drift, 26px) * 0.4), 112vh, 0) scale(var(--sp-scale, 1)) rotate(260deg);
    opacity: 0;
  }
}

@keyframes seasonalSakuraFlutter {
  0% {
    transform: translate3d(0, -10vh, 0) scale(var(--sp-scale, 1)) rotateZ(0deg) rotateY(0deg);
    opacity: 0;
  }
  12% {
    opacity: var(--sp-max-op, 0.8);
  }
  35% {
    transform: translate3d(var(--sp-drift, 32px), 34vh, 0) scale(var(--sp-scale, 1)) rotateZ(95deg) rotateY(180deg);
  }
  70% {
    transform: translate3d(calc(var(--sp-drift, 32px) * -0.5), 74vh, 0) scale(var(--sp-scale, 1)) rotateZ(210deg) rotateY(360deg);
  }
  88% {
    opacity: var(--sp-max-op, 0.7);
  }
  100% {
    transform: translate3d(var(--sp-drift, 32px), 112vh, 0) scale(var(--sp-scale, 1)) rotateZ(320deg) rotateY(520deg);
    opacity: 0;
  }
}

@keyframes seasonalFloat {
  0% {
    transform: translate3d(0, 8vh, 0) scale(var(--sp-scale, 1)) rotate(-8deg);
    opacity: 0;
  }
  14% {
    opacity: var(--sp-max-op, 0.75);
  }
  50% {
    transform: translate3d(var(--sp-drift, 20px), -52vh, 0) scale(var(--sp-scale, 1)) rotate(10deg);
  }
  86% {
    opacity: var(--sp-max-op, 0.65);
  }
  100% {
    transform: translate3d(calc(var(--sp-drift, 20px) * -0.5), -114vh, 0) scale(var(--sp-scale, 1)) rotate(-12deg);
    opacity: 0;
  }
}

@keyframes seasonalHeartRise {
  0% {
    transform: translate3d(0, 8vh, 0) scale(calc(var(--sp-scale, 1) * 0.85)) rotate(-6deg);
    opacity: 0;
  }
  18% {
    opacity: var(--sp-max-op, 0.8);
  }
  45% {
    transform: translate3d(var(--sp-drift, 24px), -45vh, 0) scale(calc(var(--sp-scale, 1) * 1.1)) rotate(8deg);
  }
  75% {
    transform: translate3d(calc(var(--sp-drift, 24px) * -0.4), -82vh, 0) scale(calc(var(--sp-scale, 1) * 0.94)) rotate(-5deg);
    opacity: var(--sp-max-op, 0.68);
  }
  100% {
    transform: translate3d(0, -114vh, 0) scale(var(--sp-scale, 1)) rotate(6deg);
    opacity: 0;
  }
}

@keyframes seasonalFirefly {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(0.75);
    opacity: 0.08;
  }
  30% {
    transform: translate3d(calc(var(--sp-drift, 24px) * 0.6), -18px, 0) scale(1.25);
    opacity: 0.95;
  }
  65% {
    transform: translate3d(calc(var(--sp-drift, 24px) * -0.5), 14px, 0) scale(0.95);
    opacity: 0.35;
  }
  85% {
    transform: translate3d(var(--sp-drift, 24px), -8px, 0) scale(1.2);
    opacity: 0.85;
  }
}

@keyframes seasonalFireworkBurst {
  0% {
    transform: scale(0.12) rotate(0deg);
    opacity: 0;
  }
  18% {
    opacity: 0.95;
  }
  75% {
    transform: scale(var(--sp-scale, 1.15)) rotate(28deg);
    opacity: 0.45;
  }
  100% {
    transform: scale(calc(var(--sp-scale, 1.15) * 1.35)) rotate(45deg);
    opacity: 0;
  }
}

body[data-seasonal="christmas"] .topbar {
  border-bottom-color: rgba(56, 189, 248, 0.22);
}

body[data-seasonal="halloween"] .topbar {
  border-bottom-color: rgba(249, 115, 22, 0.28);
}

body[data-seasonal="valentine"] .topbar {
  border-bottom-color: rgba(244, 114, 182, 0.28);
}

body[data-seasonal="sakura"] .topbar {
  border-bottom-color: rgba(249, 168, 212, 0.26);
}

body[data-seasonal="newyear"] .topbar {
  border-bottom-color: rgba(250, 204, 21, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .seasonal-effects-layer {
    display: none;
  }
}

/* Pie legal y modal de Privacidad / Términos */
.site-footer {
  margin-top: 28px;
  padding: 18px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.site-footer-link {
  background: none;
  border: none;
  padding: 0;
  color: #a5b4fc;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer-link:hover {
  color: #e0e7ff;
}

.legal-modal-card {
  max-width: 600px;
}

.legal-modal-body h3 {
  margin: 12px 0 6px;
  font-size: 0.92rem;
  color: #f8fafc;
}

.legal-modal-body h3:first-child {
  margin-top: 0;
}

.legal-modal-body p {
  margin: 0 0 10px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #cbd5e1;
}

/* Pie legal acciones y banner de actualización del Service Worker */
.legal-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sw-update-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 420;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.55);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  color: #e0f2fe;
  font-size: 0.82rem;
  font-weight: 700;
}

.visitor-banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.danger-ghost-btn {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.38);
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.danger-ghost-btn:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(248, 113, 113, 0.72);
}

.backup-import-extra {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Mejoras de Cuentas y Personalización de Perfil */
.auth-pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-pass-wrap input {
  width: 100%;
  padding-right: 40px;
}

.auth-pass-toggle {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 4px;
}

.cloud-handle-badge {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.22);
  border: 1px solid rgba(124, 92, 255, 0.5);
  color: #ddd6fe;
  font-size: 0.72rem;
  font-weight: 700;
}

.cloud-verify-row {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: #fde047;
}

.profile-handle-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #bae6fd;
  font-size: 0.78rem;
  font-weight: 700;
}

.profile-handle-pill.mini {
  font-size: 0.68rem;
  padding: 1px 7px;
}

.pfont-outfit {
  font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
}

.pfont-serif {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.01em;
}

.pfont-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -0.02em;
}

/* Perfiles seguidos ("Siguiendo") */
.profile-following-bar,
.share-following-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-following-bar {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.share-following-box {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.following-bar-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #cbd5e1;
  white-space: nowrap;
}

.following-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, 0.4);
  background: rgba(124, 92, 255, 0.14);
  color: #f1f5f9;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.following-chip:hover {
  background: rgba(124, 92, 255, 0.28);
  border-color: rgba(124, 92, 255, 0.75);
}

.following-chip-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.25);
  color: #e0f2fe;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.following-chip-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.following-chip-unfollow {
  margin-left: 2px;
  opacity: 0.65;
  font-size: 0.7rem;
}

.following-chip-unfollow:hover {
  opacity: 1;
  color: #fca5a5;
}

/* Afinidad de perfil + Comunidad (Directorio y Feed de Actividad) */
.profile-affinity-card {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(56, 189, 248, 0.1));
  border: 1px solid rgba(124, 92, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.affinity-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.affinity-pct-badge {
  min-width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid #38bdf8;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #e0f2fe;
  font-size: 1.05rem;
  line-height: 1;
}

.affinity-pct-badge small {
  font-size: 0.56rem;
  color: #94a3b8;
  text-transform: uppercase;
  margin-top: 2px;
}

.affinity-meta strong {
  display: block;
  font-size: 0.92rem;
  color: #f8fafc;
}

.affinity-meta span {
  font-size: 0.78rem;
  color: #cbd5e1;
}

.affinity-recs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.affinity-rec-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  font-size: 0.74rem;
  font-weight: 600;
}

.comm-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.comm-dir-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  max-height: 54vh;
  overflow-y: auto;
}

.comm-profile-card {
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comm-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comm-card-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(124, 92, 255, 0.25);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.comm-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comm-card-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f8fafc;
}

.comm-card-sub {
  font-size: 0.73rem;
  color: #94a3b8;
}

.comm-card-bio {
  font-size: 0.76rem;
  color: #cbd5e1;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.comm-card-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

.comm-feed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 54vh;
  overflow-y: auto;
}

.comm-feed-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.comm-feed-poster {
  width: 38px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.comm-feed-body {
  min-width: 0;
  flex: 1;
}

.comm-feed-user {
  font-size: 0.76rem;
  font-weight: 800;
  color: #a5b4fc;
}

.comm-feed-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f8fafc;
}

.comm-feed-review {
  font-size: 0.74rem;
  color: #cbd5e1;
  margin-top: 2px;
}

.comm-empty {
  padding: 22px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Contadores de seguidores / seguidos en la cabecera del perfil */
.profile-social-counts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.profile-social-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.profile-social-pill:hover {
  border-color: rgba(124, 92, 255, 0.55);
  background: rgba(124, 92, 255, 0.16);
}

.profile-social-pill strong {
  color: #fff;
  font-weight: 800;
}

.auth-pass-hint {
  display: block;
  margin-top: 5px;
  font-size: 0.72rem;
  color: #94a3b8;
}

/* Modal y enlaces de donación voluntaria */
.donate-pill-btn {
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

.donate-pill-btn:hover {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.65);
}

.site-footer-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.donate-modal-card {
  max-width: 500px;
}

.donate-lead {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: #f8fafc;
  line-height: 1.5;
}

.donate-sub {
  margin: 0 0 14px;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.donate-links-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.donate-action-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(244, 114, 182, 0.16));
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fef3c7;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.donate-action-link:hover {
  transform: translateY(-1px);
  border-color: rgba(251, 191, 36, 0.85);
}

.donate-empty-note {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px dashed rgba(251, 191, 36, 0.35);
  color: #fde68a;
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: center;
}

/* Micro-animaciones suaves para botones, pestañas y tarjetas */
.nav-seg-btn,
.cat-tab,
.status-pill,
.cloud-btn,
.mini-seg-btn,
.roulette-action-btn,
.filter-dropdown-btn {
  transition:
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.2s ease;
}

.nav-seg-btn:hover,
.cat-tab:hover,
.status-pill:hover,
.cloud-btn:hover,
.mini-seg-btn:hover,
.roulette-action-btn:hover,
.filter-dropdown-btn:hover {
  transform: translateY(-1.5px);
}

.nav-seg-btn:active,
.cat-tab:active,
.status-pill:active,
.cloud-btn:active,
.mini-seg-btn:active,
.roulette-action-btn:active {
  transform: scale(0.96);
}

.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.ghost-btn:focus-visible,
.cloud-btn:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.72);
  outline-offset: 2px;
}

.donate-pill-btn {
  animation: gentleAmberPulse 3.8s ease-in-out infinite;
}

@keyframes gentleAmberPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
  }
  50% {
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.22);
  }
}

@media (prefers-reduced-motion: reduce) {
  .primary-btn::after,
  .donate-pill-btn {
    animation: none;
    transition: none;
  }
  .primary-btn:hover,
  .secondary-btn:hover,
  .ghost-btn:hover,
  .nav-seg-btn:hover,
  .cat-tab:hover,
  .status-pill:hover {
    transform: none;
  }
}

/* =========================================================
   MENÚ DESPLEGABLE DE USUARIO EN BARRA SUPERIOR
   ========================================================= */
.user-menu-trigger:hover {
  background: rgba(124, 92, 255, 0.14);
  border-color: rgba(155, 123, 255, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.18);
}

.user-menu-trigger:active {
  transform: scale(0.96);
}

.user-menu-trigger[aria-expanded="true"] .user-menu-chevron {
  transform: rotate(180deg);
}

.user-menu-popover {
  padding: 6px;
  border-radius: 14px;
  background: rgba(16, 17, 23, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.68), 0 0 0 1px rgba(124, 92, 255, 0.08);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform-origin: top right;
  animation: userMenuPop 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes userMenuPop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.user-menu-header {
  padding: 10px 12px 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 4px;
}

.user-menu-header-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-header-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.user-menu-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  transform: translateX(2px);
}

.user-menu-item:active {
  transform: scale(0.98);
}

.user-menu-ico {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9b7bff;
  font-size: 0.95rem;
}

.user-menu-item .cloud-dot {
  margin-left: auto;
}

.user-menu-item.is-highlight {
  color: #f59e0b;
}

.user-menu-item.is-highlight .user-menu-ico {
  color: #f59e0b;
}

.user-menu-item.is-highlight:hover {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.user-menu-divider {
  height: 1px;
  margin: 5px 6px;
  background: rgba(255, 255, 255, 0.08);
}

.user-menu-item.is-danger {
  color: #f87171;
}

.user-menu-item.is-danger .user-menu-ico {
  color: #9b7bff;
}

.user-menu-item.is-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

/* =========================================================
   MEJORAS VISUALES DE "MI BIBLIOTECA"
   ========================================================= */
#libraryView .stat-card {
  background: linear-gradient(180deg, rgba(22, 28, 48, 0.86) 0%, rgba(14, 18, 32, 0.94) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

#libraryView .stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(155, 123, 255, 0.38);
}

#libraryView .stat-card.active-kpi {
  background: linear-gradient(180deg, rgba(35, 34, 66, 0.92) 0%, rgba(18, 22, 42, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 28px rgba(124, 92, 255, 0.22);
}

#libraryView .category-tabs {
  background: rgba(15, 20, 36, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#libraryView .local-filter-box {
  background: rgba(15, 20, 36, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#libraryView .local-filter-box:focus-within {
  border-color: rgba(155, 123, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16);
}

#libraryView .media-card {
  background: linear-gradient(180deg, #14192b 0%, #0e1220 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 24px rgba(0, 0, 0, 0.36);
}

#libraryView .media-card:hover {
  transform: translateY(-5px);
  border-color: rgba(155, 123, 255, 0.5);
  box-shadow: 0 18px 38px -8px rgba(0, 0, 0, 0.72), 0 0 22px rgba(124, 92, 255, 0.18);
}

#libraryView .poster-wrap::after {
  height: 58%;
  background: linear-gradient(to top, rgba(10, 13, 24, 0.96) 0%, rgba(10, 13, 24, 0.5) 48%, transparent 100%);
}

#libraryView .card-tracker-wrap {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 8px 10px;
}

#libraryView .status-select {
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

#libraryView .status-select:hover {
  border-color: rgba(155, 123, 255, 0.45);
}

.fallback-poster {
  background:
    radial-gradient(circle at 25% 20%, rgba(124, 92, 255, 0.24), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.16), transparent 55%),
    linear-gradient(180deg, #171d33 0%, #0d111e 100%);
}

.poster-wrap.is-loading {
  background: linear-gradient(110deg, #12172a 25%, #1d2440 45%, #12172a 65%);
  background-size: 220% 100%;
  animation: posterShimmer 1.3s ease-in-out infinite;
}

@keyframes posterShimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

/* Controles modernos de zoom y encuadre en el Estudio de Perfil */
.edit-preview-banner {
  overflow: hidden;
  cursor: grab;
}

.edit-preview-banner.is-framing-dragging {
  cursor: grabbing;
}

.edit-preview-banner .banner-drag-hint {
  position: absolute;
  bottom: 8px;
  right: 10px;
  z-index: 3;
}

@media (max-width: 640px) {
  .edit-preview-banner {
    height: 122px;
  }
  .edit-preview-avatar {
    width: 66px;
    height: 66px;
    margin-top: -36px;
  }
}

/* =========================================================
   REDISEÑO CINEMATOGRÁFICO DE LA FICHA DE INFORMACIÓN
   ========================================================= */
#detailModal .modal-detail {
  max-width: 1180px;
  width: min(96vw, 1180px);
  background: linear-gradient(180deg, #121728 0%, #0b0f1b 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#detailModal .detail-banner {
  height: 265px;
}

#detailModal .detail-banner-overlay {
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 92, 255, 0.16), transparent 55%),
    linear-gradient(
      to bottom,
      rgba(12, 16, 28, 0.12) 0%,
      rgba(14, 19, 34, 0.56) 58%,
      #121728 100%
    );
}

#detailModal .detail-hero-grid {
  grid-template-columns: 248px 1fr;
  gap: 34px;
  padding: 0 34px 36px;
  margin-top: -132px;
}

#detailModal .detail-poster-frame {
  border-radius: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(124, 92, 255, 0.16);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.24s ease;
}

#detailModal .detail-poster-frame:hover {
  transform: translateY(-3px);
  border-color: rgba(155, 123, 255, 0.6);
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.84), 0 0 26px rgba(124, 92, 255, 0.22);
}

#detailModal .detail-status-grid,
#detailModal .detail-side-actions {
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

#detailModal .detail-st-btn {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#detailModal .detail-main-col {
  padding-top: 28px;
}

#detailModal .detail-title {
  font-size: clamp(1.5rem, 2.3vw, 2.05rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}

#detailModal .meta-pill {
  background: rgba(15, 21, 38, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
}

#detailModal .detail-tabs {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 5px;
  gap: 6px;
  margin-top: 16px;
  margin-bottom: 18px;
}

#detailModal .detail-tab {
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 14px;
  font-size: 0.83rem;
}

#detailModal .detail-tab:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.08);
}

#detailModal .detail-tab.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.36);
}

#detailModal .detail-tab-panel {
  animation: detailPanelFade 0.18s ease;
}

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

#detailModal .detail-synopsis {
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 18px 20px;
  line-height: 1.72;
  color: #dce4f2;
  font-size: 0.93rem;
}

@media (max-width: 820px) {
  #detailModal .detail-banner {
    height: 190px;
  }
  #detailModal .detail-hero-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 18px 26px;
    margin-top: -86px;
  }
  #detailModal .detail-main-col {
    padding-top: 0;
  }
}

/* =========================================================
   TRÁILER, PERSONAJES, RELACIONADOS Y REDES EN BANNER
   ========================================================= */
.detail-extra-block {
  margin-top: 18px;
}

.detail-extra-head {
  font-size: 0.84rem;
  font-weight: 800;
  color: #e2e8f0;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}

.detail-trailer-preview {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0b0f1c;
  padding: 0;
  cursor: pointer;
  display: block;
}

.detail-trailer-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.84);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.detail-trailer-preview:hover img {
  transform: scale(1.03);
  filter: brightness(0.98);
}

.detail-trailer-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.92);
  color: #fff;
  font-weight: 800;
  font-size: 0.86rem;
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.45);
}

.detail-trailer-iframe {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  display: block;
}

.detail-chars-strip,
.detail-rels-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(195px, 215px);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.detail-rels-strip {
  grid-auto-columns: minmax(132px, 142px);
}

.detail-char-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-char-img {
  width: 44px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #141a2e;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.detail-char-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-char-role {
  font-size: 0.68rem;
  font-weight: 700;
  color: #a78bfa;
}

.detail-char-va {
  font-size: 0.7rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-rel-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.detail-rel-card:hover {
  transform: translateY(-2px);
  border-color: rgba(155, 123, 255, 0.55);
}

.detail-rel-card img,
.detail-rel-ph {
  width: 100%;
  height: 148px;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #141a2e;
}

.detail-rel-meta {
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.detail-rel-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: #c4b5fd;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-rel-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #f1f5f9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.banner-social-links {
  position: absolute;
  bottom: 14px;
  right: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.banner-social-pill {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.banner-social-pill:hover {
  transform: translateY(-2px) scale(1.06);
  background: var(--soc-color, var(--accent));
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.social-links-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.affinity-groups-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.affinity-row-label {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 700;
}

.affinity-rec-pill.is-shared {
  background: rgba(167, 139, 250, 0.18);
  border-color: rgba(167, 139, 250, 0.45);
  color: #ede9fe;
}

/* =========================================================
   CONTORNO REAL Y CORONA EXCLUSIVA DEL FUNDADOR (@juanpis22)
   ========================================================= */
.profile-hero-avatar-wrap.is-founder-avatar {
  overflow: visible;
  border: 3px solid #fbbf24;
  box-shadow:
    0 0 0 3px rgba(251, 191, 36, 0.28),
    0 0 28px rgba(245, 158, 11, 0.55),
    0 14px 32px rgba(0, 0, 0, 0.72);
  animation: founderHaloPulse 3.2s ease-in-out infinite;
}

.profile-hero-avatar-wrap.is-founder-avatar .profile-hero-avatar-inner {
  overflow: hidden;
  border-radius: inherit;
}

.founder-crown-ornament {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%) rotate(-5deg);
  z-index: 6;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.65));
  animation: founderCrownFloat 3.2s ease-in-out infinite;
}

.founder-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(245, 158, 11, 0.14));
  border: 1px solid rgba(251, 191, 36, 0.62);
  color: #fef08a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.22);
}

.founder-badge-pill.mini {
  padding: 1px 7px;
  font-size: 0.65rem;
}

.user-menu-avatar.is-founder-avatar,
.comm-card-avatar.is-founder-avatar {
  border: 2px solid #fbbf24;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.25), 0 0 12px rgba(245, 158, 11, 0.5);
}

.comm-profile-card.is-founder-card {
  border-color: rgba(251, 191, 36, 0.42);
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.08), rgba(15, 21, 38, 0.92) 55%);
}

.founder-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.28), rgba(217, 119, 6, 0.24));
  border: 1px solid rgba(251, 191, 36, 0.7);
  color: #fef08a;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.founder-admin-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.42), rgba(217, 119, 6, 0.36));
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.32);
}

.privacy-toggles-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.privacy-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.privacy-toggle-row input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.privacy-toggle-row span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
  color: #f1f5f9;
}

.privacy-toggle-row small {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.35;
}

/* =========================================================
   HERO SPOTLIGHT CINEMATOGRÁFICO AMPLIADO (ESTILO STREAMING)
   ========================================================= */
.explore-hero-spotlight {
  min-height: clamp(430px, 56vh, 560px);
  border-radius: 22px;
  background: #070910;
}

.explore-hero-spotlight .hero-spotlight-bg {
  left: auto;
  right: 0;
  width: 78%;
  object-position: center 20%;
  filter: brightness(1) saturate(1.08);
}

.explore-hero-spotlight .hero-gradient-overlay {
  background:
    linear-gradient(
      90deg,
      #070910 0%,
      #070910 24%,
      rgba(7, 9, 16, 0.9) 38%,
      rgba(7, 9, 16, 0.36) 56%,
      rgba(7, 9, 16, 0.06) 78%,
      rgba(7, 9, 16, 0.18) 100%
    ),
    linear-gradient(
      to top,
      rgba(7, 9, 16, 0.96) 0%,
      rgba(7, 9, 16, 0.34) 26%,
      transparent 58%
    );
}

.explore-hero-spotlight .hero-spotlight-content {
  padding: 46px 56px 58px;
  max-width: 560px;
  gap: 14px;
}

.explore-hero-spotlight .hero-spotlight-title {
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-shadow: 0 6px 26px rgba(0, 0, 0, 0.75);
}

.explore-hero-spotlight .hero-spotlight-synopsis {
  font-size: 0.93rem;
  line-height: 1.58;
  color: #d7dfef;
  max-width: 490px;
}

.explore-hero-spotlight .hero-carousel-dots {
  left: 56px;
  right: auto;
  bottom: 22px;
  gap: 7px;
}

.explore-hero-spotlight .hero-dot {
  width: 16px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: width 0.24s ease, background 0.2s ease;
}

.explore-hero-spotlight .hero-dot.active {
  width: 32px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(124, 92, 255, 0.65);
}

.hero-nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0.55;
  transition: opacity 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.explore-hero-spotlight:hover .hero-nav-arrow {
  opacity: 0.95;
}

.hero-nav-arrow:hover {
  background: rgba(124, 92, 255, 0.55);
  border-color: rgba(155, 123, 255, 0.7);
  transform: translateY(-50%) scale(1.08);
}

.explore-hero-spotlight.is-skeleton .hero-nav-arrow {
  display: none;
}

@media (max-width: 860px) {
  .explore-hero-spotlight {
    min-height: 390px;
  }
  .explore-hero-spotlight .hero-spotlight-bg {
    width: 100%;
  }
  .explore-hero-spotlight .hero-gradient-overlay {
    background: linear-gradient(
      to top,
      #070910 0%,
      rgba(7, 9, 16, 0.88) 42%,
      rgba(7, 9, 16, 0.28) 78%,
      rgba(7, 9, 16, 0.12) 100%
    );
  }
  .explore-hero-spotlight .hero-spotlight-content {
    padding: 28px 22px 48px;
    max-width: 100%;
  }
  .explore-hero-spotlight .hero-carousel-dots {
    left: 22px;
    bottom: 16px;
  }
}

@keyframes founderHaloPulse {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(251, 191, 36, 0.28),
      0 0 24px rgba(245, 158, 11, 0.5),
      0 14px 32px rgba(0, 0, 0, 0.72);
  }
  50% {
    box-shadow:
      0 0 0 5px rgba(254, 240, 138, 0.36),
      0 0 36px rgba(251, 191, 36, 0.72),
      0 14px 32px rgba(0, 0, 0, 0.72);
  }
}

@keyframes founderCrownFloat {
  0%, 100% {
    transform: translateX(-50%) translateY(0) rotate(-5deg);
  }
  50% {
    transform: translateX(-50%) translateY(-3px) rotate(-2deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-hero-avatar-wrap.is-founder-avatar,
  .founder-crown-ornament {
    animation: none;
  }
}

.framing-modern-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.framing-zoom-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 220px;
}

.framing-step-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.12s ease;
}

.framing-step-btn:hover {
  background: rgba(124, 92, 255, 0.28);
  border-color: rgba(155, 123, 255, 0.55);
}

.framing-step-btn:active {
  transform: scale(0.92);
}

.framing-finetune-details {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 8px;
}

.framing-finetune-details summary {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.framing-finetune-details summary:hover {
  color: #e2e8f0;
}

.framing-finetune-details[open] .framing-sliders-grid {
  margin-top: 10px;
}

.studio-panels-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}


/* =========================================================
   ESTUDIO 3×3 Y TARJETA DE PERFIL (PNG COMPARTIBLE)
   ========================================================= */
.share-studio-panel {
  max-width: 1020px;
  width: min(96vw, 1020px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(16, 20, 38, 0.98) 0%, rgba(9, 12, 23, 0.99) 100%);
  border: 1px solid rgba(168, 85, 247, 0.28);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.72), 0 0 40px rgba(124, 58, 237, 0.16);
}

.share-studio-header {
  padding: 18px 24px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.share-studio-header .modal-sub {
  margin: 4px 0 0;
  font-size: 0.84rem;
  color: #94a3b8;
}

.ss-mode-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(6, 9, 18, 0.45);
}

.ss-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.ss-mode-tab:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

.ss-mode-tab.active {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border-color: rgba(196, 181, 253, 0.45);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

.share-studio-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.95fr);
  gap: 22px;
  padding: 20px 24px 22px;
  overflow-y: auto;
  align-items: start;
}

.ss-preview-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ss-canvas-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(124, 58, 237, 0.12), rgba(5, 7, 14, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  padding: 14px;
  min-height: 360px;
}

.ss-canvas-stage canvas {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
  display: block;
}

.ss-rendering-pill {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(8, 11, 22, 0.92);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #f3e8ff;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.ss-export-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ss-export-actions .primary-btn {
  flex: 1 1 160px;
  justify-content: center;
}

.ss-controls-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ss-control-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 10px;
}

.ss-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ss-theme-swatches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ss-swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.ss-swatch:hover {
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.ss-swatch.active {
  background: rgba(124, 58, 237, 0.22);
  border-color: rgba(192, 132, 252, 0.65);
  color: #fff;
}

.ss-swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.ss-input,
.ss-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  padding: 9px 12px;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
}

.ss-select option {
  background: #0f1426;
  color: #fff;
}

.ss-input:focus,
.ss-select:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.7);
  background: rgba(255, 255, 255, 0.08);
}

.ss-control-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.ss-control-row .ss-select {
  flex: 1;
}

.ss-checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.84rem;
  color: #cbd5e1;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
}

.ss-checkbox-row input {
  accent-color: #a855f7;
  width: 16px;
  height: 16px;
}

.ss-slots-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  max-width: 240px;
}

.ss-mini-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 20, 38, 0.9);
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.ss-mini-slot:hover {
  transform: scale(1.03);
  border-color: rgba(192, 132, 252, 0.55);
}

.ss-mini-slot.active {
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.45);
}

.ss-mini-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ss-mini-num {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(7, 9, 18, 0.86);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 5px;
}

.ss-mini-empty {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.ss-library-picker {
  max-height: 185px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 4px;
}

.ss-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 9px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.ss-picker-item:hover {
  background: rgba(124, 58, 237, 0.22);
  border-color: rgba(168, 85, 247, 0.5);
  color: #fff;
}

.ss-picker-item img {
  width: 28px;
  height: 38px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
  background: #090d1a;
}

.ss-picker-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-picker-fav {
  color: #f472b6;
  font-size: 0.82rem;
}

.ss-picker-empty {
  font-size: 0.8rem;
  color: #64748b;
  padding: 12px;
  text-align: center;
}

.ss-hint {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 11px 13px;
  margin: 4px 0 0;
}

@media (max-width: 860px) {
  .share-studio-body {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .ss-canvas-stage {
    min-height: 260px;
  }
  .ss-canvas-stage canvas {
    max-height: 380px;
  }
}


/* =========================================================
   BOTÓN COMUNIDAD EN TOPBAR Y MODAL DE SUGERENCIAS
   ========================================================= */
#openCommunityBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(168, 85, 247, 0.38);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(56, 189, 248, 0.1));
  color: #e9d5ff;
  font-size: 0.84rem;
  font-weight: 700;
  transition: transform 0.16s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

#openCommunityBtn:hover {
  transform: translateY(-1px);
  border-color: rgba(192, 132, 252, 0.72);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.28), rgba(56, 189, 248, 0.16));
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

#openCommunityBtn svg {
  color: #c084fc;
  flex-shrink: 0;
}

.suggestions-modal-panel {
  max-width: 580px;
  width: min(94vw, 580px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.suggestions-modal-body {
  padding: 18px 22px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.suggestions-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sug-cat-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sug-cat-pill {
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sug-cat-pill:hover {
  border-color: rgba(192, 132, 252, 0.45);
  color: #fff;
}

.sug-cat-pill.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.34), rgba(168, 85, 247, 0.24));
  border-color: rgba(192, 132, 252, 0.72);
  color: #fff;
  box-shadow: 0 3px 12px rgba(124, 58, 237, 0.28);
}

.sug-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sug-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sug-input,
.sug-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 13px;
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  resize: vertical;
}

.sug-input:focus,
.sug-textarea:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.72);
  background: rgba(255, 255, 255, 0.08);
}

.sug-char-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #94a3b8;
}

.sug-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.sug-admin-inbox {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sug-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sug-admin-head h3 {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sug-admin-badge {
  background: rgba(168, 85, 247, 0.25);
  border: 1px solid rgba(192, 132, 252, 0.45);
  color: #f3e8ff;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.sug-admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.sug-admin-card {
  background: rgba(15, 20, 38, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sug-admin-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #94a3b8;
}

.sug-admin-cat {
  background: rgba(124, 58, 237, 0.22);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #e9d5ff;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.sug-admin-author {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sug-admin-del-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.78rem;
}

.sug-admin-del-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.sug-admin-msg {
  margin: 0;
  font-size: 0.84rem;
  color: #e2e8f0;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.sug-admin-empty {
  font-size: 0.82rem;
  color: #64748b;
  text-align: center;
  padding: 12px;
}


/* =========================================================
   OPTIMIZACIONES DE RENDERIZADO Y SCROLL (CONTAINMENT)
   ========================================================= */
.profile-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 380px;
}

.media-card,
.cal-card {
  contain: layout style;
}

.carousel-row-section,
.explore-row-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 340px;
}


/* =========================================================
   REDISEÑO EDITORIAL DE TARJETAS DE ANIME / MANGA (.media-card)
   ========================================================= */
.media-card {
  background: linear-gradient(180deg, rgba(16, 21, 38, 0.94) 0%, rgba(9, 12, 24, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.22s ease, box-shadow 0.24s ease;
}

.media-card:hover {
  transform: translateY(-6px);
  border-color: rgba(168, 85, 247, 0.58);
  box-shadow: 0 22px 44px -12px rgba(0, 0, 0, 0.8), 0 0 24px rgba(139, 92, 246, 0.2);
}

.media-card.in-library-completed {
  border-color: rgba(16, 185, 129, 0.35);
}

.media-card.in-library-watching {
  border-color: rgba(56, 189, 248, 0.42);
}

.media-card.in-library-planned {
  border-color: rgba(251, 191, 36, 0.35);
}

.media-card .poster-wrap::after {
  height: 46%;
  background: linear-gradient(to top, rgba(13, 17, 32, 0.98) 0%, rgba(13, 17, 32, 0.42) 48%, transparent 100%);
}

/* Badges superiores en cristal translúcido compacto (dejan respirar el póster) */
.media-card .card-top-left-badges {
  top: 7px;
  left: 7px;
  gap: 4px;
}

.media-card .card-cat-badge {
  padding: 2px 8px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(8, 11, 22, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.media-card .cat-badge-anime {
  color: #ddd6fe;
  border-color: rgba(168, 85, 247, 0.55);
}

.media-card .cat-badge-manga {
  color: #fbcfe8;
  border-color: rgba(244, 114, 182, 0.55);
}

.media-card .cat-badge-novel {
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.55);
}

.media-card .card-top-left-badges .badge-airing-pill {
  padding: 2px 7px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: rgba(6, 22, 18, 0.78);
  border: 1px solid rgba(52, 211, 153, 0.48);
  color: #6ee7b7;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Metadatos inferiores del póster (rating y temporadas) */
.media-card .card-bottom-left-meta {
  bottom: 7px;
  left: 7px;
  gap: 4px;
}

.media-card .rating-chip {
  background: rgba(8, 11, 22, 0.8);
  border: 1px solid rgba(251, 191, 36, 0.42);
  color: #fde047;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.media-card .seasons-chip {
  background: rgba(8, 11, 22, 0.78);
  border: 1px solid rgba(192, 132, 252, 0.42);
  color: #e9d5ff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.media-card .quick-seen-btn {
  bottom: 7px;
  right: 7px;
  width: 30px;
  height: 30px;
  background: rgba(8, 11, 22, 0.78);
  border-color: rgba(255, 255, 255, 0.18);
  opacity: 0.76;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.media-card:hover .quick-seen-btn,
.media-card .quick-seen-btn.is-completed {
  opacity: 1;
}

/* Cuerpo editorial más limpio y equilibrado */
.media-card .card-body {
  padding: 11px 12px 12px;
  gap: 7px;
}

.media-card .card-title {
  font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: #f8fafc;
}

.media-card:hover .card-title {
  color: #ddd6fe;
}

.media-card .card-subline {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.media-card .card-genres-row {
  gap: 4px;
  margin-top: 1px;
}

.media-card .card-genre-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
}

.media-card .card-genre-tag:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.48);
  color: #f3e8ff;
}

/* Botones de acción inferiores más finos y modernos */
.media-card .status-trigger-btn {
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 700;
}

.media-card .explore-card-actions {
  gap: 6px;
}

.media-card .explore-card-actions .quick-add-btn,
.media-card .explore-card-actions .quick-menu-btn {
  border-radius: 10px;
  min-height: 32px;
  font-size: 0.76rem;
  font-weight: 700;
}
