/* assets/css/favorites.css - Giao diện Tủ Phim Yêu Thích (Favorites / Watchlist) */

.favorites-page-content {
  padding: 24px 0 60px 0;
  flex: 1;
}

/* Breadcrumb điều hướng */
.favorites-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.favorites-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.favorites-breadcrumb a:hover {
  color: var(--secondary);
}

.favorites-breadcrumb span {
  color: var(--text-dim);
}

.favorites-breadcrumb .current {
  color: var(--primary);
  font-weight: 600;
}

/* Header Banner của trang Tủ Phim */
.favorites-hero-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.favorites-hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.favorites-hero-info {
  position: relative;
  z-index: 2;
}

.favorites-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.favorites-title-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ec4899, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.4);
}

.favorites-main-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.favorites-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 540px;
}

/* Các hành động trên Header */
.favorites-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.fav-badge-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--secondary);
}

.fav-badge-count i {
  color: #ec4899;
}

.btn-clear-all-fav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-clear-all-fav:hover {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

/* Thanh Lọc & Phân Loại trong Tủ Phim */
.favorites-filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  backdrop-filter: blur(10px);
}

.favorites-tab-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fav-tab-btn {
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.fav-tab-btn:hover {
  border-color: var(--primary);
  color: var(--text-main);
}

.fav-tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.favorites-sort-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.favorites-sort-label {
  font-size: 0.82rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
}

.fav-sort-select {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.fav-sort-select option {
  background: var(--bg-secondary);
  color: var(--text-main);
}

.fav-sort-select:hover,
.fav-sort-select:focus {
  border-color: var(--secondary);
  color: var(--text-main);
}

/* Lưới hiển thị danh sách phim yêu thích */
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 22px;
}

/* Thẻ phim yêu thích */
.fav-movie-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.fav-movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 15px var(--primary-glow);
}

.fav-thumb-wrapper {
  position: relative;
  padding-top: 140%;
  overflow: hidden;
  background: #1a202c;
}

.fav-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.fav-movie-card:hover .fav-thumb {
  transform: scale(1.08);
}

/* Nút Trái Tim Xóa Khỏi Tủ Phim */
.fav-heart-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(11, 13, 20, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(236, 72, 153, 0.5);
  color: #ec4899;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 5;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.fav-heart-toggle:hover {
  background: #ec4899;
  color: #fff;
  transform: scale(1.15);
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.7);
}

.fav-heart-toggle i {
  transition: transform var(--transition-fast);
}

.fav-heart-toggle:hover i {
  transform: scale(1.2);
}

.fav-movie-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.fav-movie-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.fav-movie-title:hover {
  color: var(--secondary);
}

.fav-movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.fav-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
}

.btn-watch-fav {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-watch-fav:hover {
  box-shadow: 0 0 12px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-remove-fav-text {
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-remove-fav-text:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* Hiệu ứng khi gỡ bỏ thẻ phim */
.fav-movie-card.removing {
  transform: scale(0.8) translateY(-20px);
  opacity: 0;
  pointer-events: none;
}

/* Giao diện khi tủ phim còn trống (Empty State) */
.favorites-empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 70px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  margin-top: 10px;
  backdrop-filter: blur(10px);
}

.favorites-empty-state.active {
  display: flex;
}

.empty-state-icon-box {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
  border: 2px dashed rgba(236, 72, 153, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #ec4899;
  margin-bottom: 20px;
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.2);
  animation: emptyIconFloat 3s ease-in-out infinite;
}

@keyframes emptyIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.empty-state-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.empty-state-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.6;
  margin-bottom: 26px;
}

.btn-explore-movies {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 20px var(--primary-glow);
  transition: all var(--transition-fast);
}

.btn-explore-movies:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

/* Nút icon trái tim nhỏ trên thẻ phim ở Trang Chủ */
.card-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(11, 13, 20, 0.7);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 4;
  transition: all var(--transition-fast);
}

.card-fav-btn:hover {
  background: rgba(236, 72, 153, 0.85);
  border-color: #ec4899;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

.card-fav-btn.is-favorited {
  background: rgba(236, 72, 153, 0.9);
  border-color: #ec4899;
  color: #fff;
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.6);
}

/* Đồng bộ Light Theme cho Favorites */
body.theme-light .favorites-hero-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

body.theme-light .fav-badge-count {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .favorites-filter-bar,
body.theme-light .fav-movie-card,
body.theme-light .favorites-empty-state {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

body.theme-light .fav-tab-btn {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}

body.theme-light .fav-tab-btn:hover {
  background: #f1f5f9;
  color: var(--primary);
}

body.theme-light .fav-tab-btn.active {
  color: #ffffff;
}

body.theme-light .fav-sort-select {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #1e293b;
}

body.theme-light .fav-sort-select option {
  background: #ffffff;
  color: #0f172a;
}

body.theme-light .fav-heart-toggle {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.theme-light .fav-movie-title {
  color: #0f172a;
}

body.theme-light .fav-movie-meta {
  border-color: rgba(0, 0, 0, 0.06);
}

body.theme-light .btn-remove-fav-text {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
  color: #64748b;
}

body.theme-light .card-fav-btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.1);
  color: #64748b;
}

body.theme-light .card-fav-btn.is-favorited {
  background: #ec4899;
  color: #fff;
}

/* Responsive trên Mobile */
@media (max-width: 768px) {
  .favorites-hero-banner {
    padding: 20px 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .favorites-main-title {
    font-size: 1.35rem;
  }

  .favorites-desc {
    font-size: 0.82rem;
  }

  .favorites-hero-actions {
    width: 100%;
    justify-content: space-between;
  }

  .favorites-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }

  .favorites-tab-group {
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .favorites-tab-group::-webkit-scrollbar {
    display: none;
  }

  .favorites-sort-group {
    justify-content: space-between;
    width: 100%;
  }

  .favorites-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}
