/* ================================================================
   JFLIX WATCH LATER (MY LIST) PREMIUM DASHBOARD STYLES
   ================================================================ */

.watchlist-page {
  min-height: 100vh;
  padding-top: 80px;
  padding-bottom: 60px;
  background: radial-gradient(circle at 50% 0%, rgba(229, 9, 20, 0.08) 0%, rgba(20, 20, 20, 1) 60%);
}

.watchlist-header {
  padding: 30px 4% 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.watchlist-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.watchlist-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.watchlist-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.25), rgba(229, 9, 20, 0.05));
  border: 1px solid rgba(229, 9, 20, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e50914;
  font-size: 22px;
  box-shadow: 0 8px 24px rgba(229, 9, 20, 0.2);
}

.watchlist-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.watchlist-count-badge {
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(229, 9, 20, 0.2);
  color: #ff4d5a;
  border: 1px solid rgba(229, 9, 20, 0.4);
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.watchlist-subtitle {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  margin: 4px 0 0;
}

.watchlist-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.watchlist-clear-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.watchlist-clear-btn:hover {
  background: rgba(229, 9, 20, 0.2);
  border-color: #e50914;
  color: #ff4d5a;
  transform: translateY(-1px);
}

/* Controls Bar (Filter Chips + Search + Sort) */
.watchlist-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 15px;
}

.watchlist-filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.watchlist-filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.filter-chip.active {
  background: #e50914;
  color: #ffffff;
  border-color: #e50914;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.4);
}

.watchlist-filter-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.watchlist-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.watchlist-search-box i {
  position: absolute;
  left: 12px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  pointer-events: none;
}

.watchlist-search-box input {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 7px 12px 7px 32px;
  border-radius: 8px;
  font-size: 0.82rem;
  outline: none;
  width: 180px;
  transition: all 0.2s ease;
}

.watchlist-search-box input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: #e50914;
  width: 220px;
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.3);
}

.watchlist-sort-select {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

.watchlist-sort-select option {
  background: #181818;
  color: #ffffff;
}

/* Card Grid */
.watchlist-container {
  padding: 10px 4% 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
}

/* Watchlist Card Specific Styling */
.watchlist-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #1c1c1c;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.watchlist-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.8), 0 0 18px rgba(229, 9, 20, 0.2);
}

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

.watchlist-card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.watchlist-card:hover .watchlist-card-poster {
  transform: scale(1.05);
}

.watchlist-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8px 6px;
  z-index: 3;
}

.watchlist-card:hover .watchlist-card-overlay,
.watchlist-card.card-touch-hover .watchlist-card-overlay {
  opacity: 1;
}

.watchlist-card-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
}

.watchlist-card-buttons .btn {
  height: 30px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  transition: all 0.18s ease;
}

.watchlist-card-buttons .play-btn {
  flex: 1.2 1 0%;
  background: linear-gradient(135deg, #e50914, #ff2d3d);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.4);
}

.watchlist-card-buttons .play-btn:hover {
  background: linear-gradient(135deg, #ff1a26, #ff4553);
  transform: translateY(-1px);
}

.watchlist-card-buttons .details-btn {
  flex: 1 1 0%;
  background: rgba(40, 40, 40, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.watchlist-card-buttons .details-btn:hover {
  background: rgba(65, 65, 65, 0.95);
  border-color: rgba(255, 255, 255, 0.4);
}

.watchlist-card-buttons .remove-btn {
  flex: 0 0 30px;
  width: 30px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ff6b6b;
  border-radius: 6px;
  backdrop-filter: blur(8px);
}

.watchlist-card-buttons .remove-btn:hover {
  background: rgba(229, 9, 20, 0.3);
  border-color: #e50914;
  color: #ffffff;
  transform: scale(1.08);
}

.watchlist-card-info {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.watchlist-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.watchlist-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
}

.watchlist-card-meta .rating {
  color: #ffd700;
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
}

/* Remove button placed below card info */
.watchlist-card-info .remove-btn {
  margin-top: 8px;
  width: 100%;
  background: rgba(229, 9, 20, 0.08);
  border: 1px solid rgba(229, 9, 20, 0.25);
  color: #ff6b6b;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.3px;
}

.watchlist-card-info .remove-btn:hover {
  background: rgba(229, 9, 20, 0.25);
  border-color: #e50914;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(229, 9, 20, 0.3);
}

/* Empty State */
.watchlist-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  max-width: 500px;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(12px);
}

.empty-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(229, 9, 20, 0.12);
  border: 1px solid rgba(229, 9, 20, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #e50914;
  margin-bottom: 20px;
  box-shadow: 0 0 25px rgba(229, 9, 20, 0.2);
  animation: pulseBookmark 2.5s infinite ease-in-out;
}

@keyframes pulseBookmark {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(229, 9, 20, 0.2); }
  50% { transform: scale(1.06); box-shadow: 0 0 35px rgba(229, 9, 20, 0.4); }
}

.empty-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.empty-description {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

.empty-browse-btn {
  background: linear-gradient(135deg, #e50914, #ff2d3d);
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4);
  transition: all 0.2s ease;
}

.empty-browse-btn:hover {
  background: linear-gradient(135deg, #ff1a26, #ff4553);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(229, 9, 20, 0.6);
}

/* Confirmation Modal */
.watchlist-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
}

.watchlist-modal.show {
  display: flex;
}

.watchlist-modal-card {
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  max-width: 420px;
  width: 100%;
  padding: 24px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
}

.watchlist-modal-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}

.watchlist-modal-card p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin-bottom: 22px;
}

.watchlist-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.watchlist-modal-actions button {
  padding: 9px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.watchlist-modal-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.watchlist-modal-confirm {
  background: #e50914;
  color: #ffffff;
}

.watchlist-modal-confirm:hover {
  background: #ff1a26;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .watchlist-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .watchlist-page {
    padding-top: 70px;
    padding-bottom: 80px;
  }
  
  .watchlist-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  
  .watchlist-title {
    font-size: 1.7rem;
  }

  .watchlist-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .watchlist-filter-tools {
    justify-content: space-between;
    width: 100%;
  }

  .watchlist-search-box {
    flex: 1;
  }

  .watchlist-search-box input {
    width: 100%;
  }

  .watchlist-search-box input:focus {
    width: 100%;
  }

  .watchlist-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .watchlist-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .watchlist-card-buttons .btn {
    height: 28px;
    font-size: 0.68rem;
  }
}
