/* ==========================================================================
   RILIPA STREAMING - SISTEMA DE ESTILOS UNIVERSAL FLUIDO (PORCENTAJES Y RATIOS)
   Diseñado para escalado y proporción 100% fluida en cualquier resolución de pantalla
   (4K TV, 1080p Smart TV, 720p, Consolas, Tablets y Teléfonos).
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: #0b0f19;
  color: #f8fafc;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
  width: 0.5rem;
}
::-webkit-scrollbar-track {
  background: #0b0f19;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 0.25rem;
}
::-webkit-scrollbar-thumb:hover {
  background: #6366f1;
}

/* ==========================================================================
   NAVEGACIÓN ESPACIAL Y ENFOQUE SMART TV (NETFLIX STYLE)
   ========================================================================== */
:focus-visible, .tv-focused {
  outline: none !important;
  box-shadow: 0 0 0 4px #6366f1, 0 0 25px rgba(99, 102, 241, 0.65) !important;
  transform: scale(1.06) !important;
  z-index: 30 !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s !important;
}

.movie-card:focus-visible, .movie-card.tv-focused {
  transform: scale(1.08) translateY(-0.375rem) !important;
  border-color: #818cf8 !important;
  box-shadow: 0 0 0 4px #6366f1, 0 1.25rem 2.5rem rgba(99, 102, 241, 0.55) !important;
}

.profile-user-item:focus-visible, .profile-user-item.tv-focused {
  transform: scale(1.1) !important;
}

.profile-user-item:focus-visible .profile-avatar-box,
.profile-user-item.tv-focused .profile-avatar-box {
  box-shadow: 0 0 0 4px #6366f1, 0 1.25rem 3rem rgba(99, 102, 241, 0.7) !important;
}

.episode-card:focus-visible, .episode-card.tv-focused {
  border-color: #6366f1 !important;
  background: rgba(99, 102, 241, 0.25) !important;
  transform: scale(1.04) !important;
}

.recommendation-card:focus-visible, .recommendation-card.tv-focused {
  border-color: #6366f1 !important;
  background: rgba(99, 102, 241, 0.25) !important;
  transform: scale(1.04) !important;
}

/* --- HEADER PRINCIPAL FLUIDO --- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 2vw;
  background: rgba(11, 15, 25, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.logo-badge {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.25rem 0.875rem rgba(99, 102, 241, 0.4);
}

.logo-text {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #ffffff;
}
.logo-dot {
  color: #6366f1;
}

/* BARRA DE BÚSQUEDA FLUIDA */
.search-form {
  flex: 1 1 auto;
  max-width: clamp(280px, 35vw, 540px);
}

.search-box-wrap {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 0.25rem 0.375rem 0.25rem 1rem;
  gap: 0.625rem;
}

.search-input {
  flex: 1 1 0%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.875rem;
  outline: none;
}
.search-input::placeholder {
  color: #64748b;
}

.btn-search {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

/* ACCIONES DE CABECERA */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-profile-pill {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: #1e293b;
  border: 1px solid #334155;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}

.avatar-circle-sm {
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 900;
  color: #ffffff;
}

.btn-api-key {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

/* --- SELECCIÓN DE PERFIL DE USUARIO CENTRADA (NETFLIX STYLE) --- */
.profile-selection-screen {
  min-height: 100vh;
  background-color: #0b0f19;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 2vw;
  position: relative;
  overflow: hidden;
}

.profile-center-container {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin: 2rem auto;
  z-index: 10;
}

.profile-screen-title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 900;
  color: #ffffff;
  text-align: center;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

.profile-grid-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  max-width: 56rem;
  margin: 0 auto;
}

.profile-user-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}
.profile-user-item:hover {
  transform: scale(1.08);
}

.profile-avatar-box {
  width: 8rem;
  height: 8rem;
  border-radius: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.25rem;
  font-weight: 900;
  color: #ffffff;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s;
}
.profile-user-item:hover .profile-avatar-box {
  box-shadow: 0 0 0 4px #6366f1, 0 1.25rem 3rem rgba(99, 102, 241, 0.5);
}

.profile-avatar-add {
  width: 8rem;
  height: 8rem;
  border-radius: 1.75rem;
  background: #0f172a;
  border: 2px dashed #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #64748b;
  transition: all 0.25s;
}
.profile-user-item:hover .profile-avatar-add {
  border-color: #6366f1;
  color: #818cf8;
}

.profile-user-name {
  margin-top: 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #cbd5e1;
  transition: color 0.2s;
}
.profile-user-item:hover .profile-user-name {
  color: #ffffff;
}

.btn-manage-profiles {
  margin-top: 3rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid #334155;
  background: rgba(30, 41, 59, 0.6);
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-manage-profiles:hover {
  border-color: #94a3b8;
  color: #ffffff;
  background: #334155;
}

/* MODAL DE GESTIÓN DE PERFILES */
.modal-backdrop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 25, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
}

.modal-content-card {
  background: #131927;
  border: 1px solid #1e293b;
  border-radius: 1.5rem;
  max-width: 32rem;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 0.875rem;
}

.btn-close-modal {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #1e293b;
  border: none;
  color: #94a3b8;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-close-modal:hover {
  background: #334155;
  color: #ffffff;
}

.user-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.user-item-row:hover {
  border-color: #6366f1;
  background: #1e293b;
}
.user-item-row.active {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.18);
}

.user-row-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  color: #ffffff;
  flex-shrink: 0;
}

.user-row-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
}

.btn-delete-user {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-delete-user:hover {
  background: #ef4444;
  color: #ffffff;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  color: #ffffff;
  font-size: 0.875rem;
  outline: none;
}
.form-input:focus {
  border-color: #6366f1;
}

.avatar-colors-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.avatar-color-btn {
  height: 2.25rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}
.avatar-color-btn.selected {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px #ffffff;
}

/* DEGRADADOS DE AVATAR */
.from-violet-600.to-indigo-600 { background: linear-gradient(135deg, #7c3aed, #4f46e5); }
.from-indigo-600.to-cyan-500 { background: linear-gradient(135deg, #4f46e5, #06b6d4); }
.from-orange-500.to-amber-500 { background: linear-gradient(135deg, #f97316, #f59e0b); }
.from-emerald-500.to-teal-500 { background: linear-gradient(135deg, #10b981, #14b8a6); }
.from-rose-500.to-pink-500 { background: linear-gradient(135deg, #f43f5e, #ec4899); }
.from-fuchsia-600.to-purple-600 { background: linear-gradient(135deg, #c026d3, #9333ea); }
.from-red-600.to-rose-600 { background: linear-gradient(135deg, #dc2626, #f43f5e); }
.from-yellow-400.to-amber-600 { background: linear-gradient(135deg, #facc15, #d97706); }
.from-blue-600.to-indigo-800 { background: linear-gradient(135deg, #2563eb, #3730a3); }
.from-purple-600.to-pink-600 { background: linear-gradient(135deg, #9333ea, #db2777); }

/* --- HERO BANNER --- */
.hero-container {
  position: relative;
  width: 100%;
  height: 48vh;
  min-height: 22rem;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0.55;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,15,25,0.2) 0%, rgba(11,15,25,0.8) 70%, #0b0f19 100%),
              linear-gradient(90deg, #0b0f19 0%, rgba(11,15,25,0.7) 50%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 100rem;
  height: 100%;
  margin: 0 auto;
  padding: 0 2vw 2.25rem 2vw;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-card-panel {
  width: 100%;
  max-width: 42rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.5);
}

.hero-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 0.875rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-primary-play {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 800;
  padding: 0.75rem 1.75rem;
  border-radius: 0.875rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 0.5rem 1.25rem rgba(99, 102, 241, 0.4);
}

/* --- CATÁLOGO LADO A LADO PORCENTUAL (SIDEBAR + GRILLA) --- */
.main-wrapper {
  width: 100%;
  max-width: 100rem;
  margin: 0 auto;
  padding: 1.75rem 2vw;
  display: flex;
  flex-direction: row;
  gap: 1.75rem;
  align-items: flex-start;
}

.sidebar-panel {
  width: clamp(200px, 18vw, 280px);
  flex-shrink: 0;
  background: rgba(19, 25, 39, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid #1e293b;
  border-radius: 1.25rem;
  padding: 1.25rem;
  position: sticky;
  top: 5.5rem;
}

.sidebar-section-title {
  font-size: 0.6875rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.625rem;
  margin-top: 1rem;
}
.sidebar-section-title:first-child {
  margin-top: 0;
}

.filter-btn-group {
  display: flex;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  padding: 0.25rem;
  gap: 0.25rem;
}

.filter-btn {
  flex: 1;
  padding: 0.375rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: center;
}
.filter-btn.active {
  background: #4f46e5;
  color: #ffffff;
}

.select-filter {
  width: 100%;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  padding: 0.625rem;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.genre-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 18.5rem;
  overflow-y: auto;
}

.genre-item-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}
.genre-item-btn.active {
  background: rgba(99, 102, 241, 0.18);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.4);
  font-weight: 800;
}

.catalog-content {
  flex: 1 1 0%;
  min-width: 0;
}

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

.catalog-title {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 800;
  color: #ffffff;
}
.catalog-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1.25rem;
}

.movie-card {
  position: relative;
  background: #131927;
  border: 1px solid #1e293b;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  outline: none;
}

.poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #0f172a;
  overflow: hidden;
}

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

.top-badge-row {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  right: 0.625rem;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.type-badge {
  background: rgba(11, 15, 25, 0.85);
  color: #f1f5f9;
  font-size: 0.625rem;
  font-weight: 800;
  padding: 0.1875rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-transform: uppercase;
}

.rating-badge {
  background: #f59e0b;
  color: #090d16;
  font-size: 0.625rem;
  font-weight: 900;
  padding: 0.1875rem 0.5rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.1875rem;
}

.movie-info {
  padding: 0.875rem;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid #1e293b;
}

.movie-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: #94a3b8;
  margin-top: 0.375rem;
}

/* ==========================================================================
   PÁGINA DEDICADA DE DETALLE DE PELÍCULA Y SERIE (REPRODUCCIÓN Y EPISODIOS)
   ========================================================================== */
.detail-page-container {
  width: 100%;
}

.detail-banner {
  position: relative;
  width: 100%;
  height: 36vh;
  min-height: 16rem;
  overflow: hidden;
}

.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  filter: brightness(80%);
}

.detail-main-layout {
  display: flex;
  flex-direction: row;
  gap: 2vw;
  width: 100%;
  max-width: 100rem;
  margin: 0 auto;
  padding: 1.5rem 2vw;
  align-items: flex-start;
}

.player-column {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 1.25rem;
  border: 1px solid #1e293b;
  overflow: hidden;
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.6);
}

.player-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.server-bar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: rgba(19, 25, 39, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid #1e293b;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
}

.server-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  background: #0f172a;
  border: 1px solid #1e293b;
  cursor: pointer;
  white-space: nowrap;
}
.server-btn.active {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border-color: #6366f1;
}

.nav-bar-episode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #1e293b;
  border-radius: 1rem;
}

.episodes-panel {
  background: rgba(19, 25, 39, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid #1e293b;
  border-radius: 1.25rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.75rem;
  max-height: 24rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.episode-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  padding: 0.625rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  outline: none;
}

.episode-thumb {
  width: 5.5rem;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  border-radius: 0.5rem;
  flex-shrink: 0;
  background: #0f172a;
}

.recommendations-column {
  width: clamp(230px, 22vw, 340px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.recommendations-panel {
  background: rgba(19, 25, 39, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid #1e293b;
  border-radius: 1.25rem;
  padding: 1.25rem;
}

.recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 75vh;
  overflow-y: auto;
}

.recommendation-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #1e293b;
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  outline: none;
}

.rec-poster {
  width: 3.5rem;
  aspect-ratio: 2 / 3;
  height: auto;
  object-fit: cover;
  border-radius: 0.5rem;
  flex-shrink: 0;
  background: #0f172a;
}

.rec-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-meta {
  font-size: 0.6875rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

/* ESTILOS AMARILLO-NARANJA PARA EPISODIOS VISTOS */
.card-watched-amber {
  border-color: #f59e0b !important;
  background-color: rgba(69, 26, 3, 0.75) !important;
  box-shadow: 0 0.5rem 1.5rem rgba(245, 158, 11, 0.45) !important;
}

.badge-watched-amber {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: #090d16;
  font-weight: 900;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.625rem;
}

@media (max-width: 900px) {
  .main-wrapper, .detail-main-layout {
    flex-direction: column;
  }
  .sidebar-panel, .recommendations-column {
    width: 100%;
  }
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1875rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
}
.badge-tag-indigo { background: rgba(99, 102, 241, 0.2); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.4); }
.badge-tag-amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
