﻿/* VEO Clone Light Theme */
:root {
  --bg-color: #f6f6f8;
  --header-bg: #ffffff;
  --text-primary: #121212;
  --text-secondary: #888888;
  --card-bg: #ffffff;
  --card-radius: 14px;
  --accent: #1c1c1e;
  --transition: 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 12px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -1px;
}

.search-form {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  margin: 0;
}

.search-input {
  background: #f1f1f4;
  border: 1px solid transparent;
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 16px;
  width: 100%;
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  background: #ffffff;
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.03);
}

.search-input::placeholder {
  color: #999;
}

.search-input--invalid {
  border-color: #d9534f;
  background: #fff6f6;
  box-shadow: 0 0 0 4px rgba(217, 83, 79, 0.08);
}

.search-input--invalid::placeholder {
  color: #d9534f;
  opacity: 1;
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  margin-top: 8px;
  overflow: hidden;
  z-index: 200;
  border: 1px solid rgba(0,0,0,0.05);
}
.search-dropdown a {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(0,0,0,0.03);
  transition: var(--transition);
  gap: 12px;
}
.search-dropdown a:last-child {
  border-bottom: none;
}
.search-dropdown a:hover {
  background: #f9f9f9;
}
.search-dropdown img {
  width: 32px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  background: #e6e6e6;
  flex-shrink: 0;
}
.sd-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.sd-title {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sd-year {
  font-size: 12px;
  color: var(--text-secondary);
}

.filter-btn {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
  z-index: 101;
  -webkit-tap-highlight-color: transparent;
}

.filter-btn:hover {
  background: #f9f9f9;
}

/* Main Container & Grid */
.container {
  padding: 16px 32px 32px;
  max-width: 1600px;
  margin: 0 auto;
}

/* Page-specific normalization for movie/favorites top area */
.page-fullstory .site-header,
.page-favorites .site-header {
  border-bottom: 0;
}

.page-fullstory .container,
.page-favorites .container {
  padding-top: 0 !important;
}

.page-fullstory .movie-top,
.page-favorites .fav-page-header {
  margin-top: 0 !important;
}

.page-fullstory .movie-title-row h1,
.page-favorites .fav-page-header-left h1,
.page-favorites .fav-page-header-left p {
  margin-top: 0 !important;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 20px;
  transition: transform 0.3s ease;
}

/* Featured Carousel */
.carousel-wrapper {
  margin-bottom: 20px;
  background: transparent;
  border-radius: 24px;
  padding: 0;
  overflow: hidden;
  max-height: 600px;
  opacity: 1;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
              margin-bottom 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.carousel-wrapper.hidden {
  max-height: 0;
  margin-bottom: 0;
  opacity: 0;
  pointer-events: none;
}

.carousel-header {
  display: none;
}

.carousel-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.carousel-nav {
  display: flex;
  gap: 10px;
}

.nav-btn {
  position: absolute;
  top: 45%; 
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  border: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  color: #000;
  border: 1px solid rgba(0,0,0,0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0;
}

.nav-btn svg {
  width: 28px;
  height: 28px;
}

.nav-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

.nav-btn#carouselPrev { left: 16px; }
.nav-btn#carouselNext { right: 16px; }

@media (max-width: 900px) {
  .nav-btn {
    width: 48px;
    height: 48px;
    top: 40%;
  }
  .nav-btn svg {
    width: 24px;
    height: 24px;
  }
}

.carousel-container {
  overflow: hidden;
  position: relative;
  padding-bottom: 40px; /* Space for text so it doesn't get cut by overflow */
}

.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
  width: max-content; /* Force track to expand to fit all items */
}

.carousel-item {
  flex: 0 0 285px;
  width: 285px;
  min-width: 285px; /* Prevent shrinking even if container is small */
  transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1);
}

.carousel-item:hover {
  transform: translateY(-4px);
}

.carousel-item a {
  text-decoration: none;
}

/* Clean up old carousel styles that are now handled by .card */
.carousel-poster, .carousel-info, .carousel-item-title, .carousel-item-year {
  display: none;
}

/* Top Controls Bar */
.top-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.carousel-toggle-bar {
  display: flex;
}

.sort-dropdown-container {
  position: relative;
  z-index: 10;
}

.sort-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  min-width: 220px;
  box-shadow: 0 15px 45px rgba(0,0,0,0.12);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  transform-origin: top right;
  animation: dropdownEntry 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropdownEntry {
  from { opacity: 0; transform: scale(0.95) translateY(-5px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.sort-menu.show {
  display: flex;
}

.sort-menu a {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

.sort-menu a:hover {
  background: #f1f1f4;
}

.sort-menu a.active {
  background: #f1f1f4;
  font-weight: 600;
}

.sort-menu a.active::after {
  content: '✓';
  font-weight: 600;
  margin-left: 20px;
}

.carousel-separator {
  height: 2px;
  width: 70%;
  margin: 10px auto 30px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 75%);
  transition: all 0.4s ease;
  opacity: 1;
}

.carousel-wrapper.hidden + .carousel-separator {
  opacity: 0;
  margin: 0 auto;
  height: 0;
  overflow: hidden;
}

.toggle-btn-featured {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  transition: all 0.3s;
  user-select: none;
}

.toggle-btn-featured:hover {
  background: #f9f9fb;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.toggle-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-btn-featured.active .toggle-icon {
  transform: rotate(180deg);
}
/* Removed active background color change as requested */

/* Movie Card */
.card {
  transition: var(--transition);
  background: var(--card-bg);
  border-radius: var(--card-radius);
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.03);
  overflow: hidden; /* Important so poster respects rounded corners */
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.card-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
}

.poster-wrapper {
  display: block;
  width: 100%;
  height: 0;
  padding-bottom: 140%; /* slightly taller than 2:3 to match screenshot */
  position: relative;
  background: #e9e9e9;
}

.poster-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rating-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  padding: 3px 7px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  line-height: 1.4;
  letter-spacing: 0.2px;
}

.card-content {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 60px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.pg-btn {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 14px;
  background: #f1f1f4;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 10px;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
}

.pg-btn:hover {
  background: #e5e5e7;
  transform: translateY(-1px);
}

.pg-active {
  background: #1c1c1e !important;
  color: #fff !important;
  border-color: #1c1c1e !important;
}

.pg-dots {
  padding: 8px 6px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
}

.pg-info {
  margin-left: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Responsive */
@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .site-header { padding: 12px 20px; gap: 16px; }
}

/* Fullstory / Movie Page additions */
.movie-top {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
}
.movie-poster-wrap {
  flex: 0 0 320px;
  position: relative;
}
.movie-poster {
  width: 100%;
  aspect-ratio: 1 / 1.4;
  object-fit: cover;
  border-radius: var(--card-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  display: block;
}
.movie-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.movie-info h1 {
  font-size: 40px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.5px;
}
.movie-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}
.movie-meta .type {
  background: rgba(0,0,0,0.05);
  padding: 4px 12px;
  border-radius: 6px;
  text-transform: uppercase;
}
.movie-title-block {
  margin-bottom: 4px;
}
.movie-title-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
}
.movie-title-block h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin: 0;
  min-width: 0;
}
.movie-year {
  font-size: 22px;
  font-weight: 400;
  color: var(--text-secondary);
  white-space: nowrap;
  flex: 0 0 auto;
}
.movie-original-title {
  font-size: 17px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: -2px;
}
.movie-desc {
  font-size: 16px;
  line-height: 1.6;
  color: #444;
  margin-bottom: 4px;
  text-align: justify;
}
.movie-tags {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tag-group {
  font-size: 16px;
  color: #333;
  display: flex;
  gap: 8px;
}
.tag-group strong {
  color: var(--text-secondary);
  min-width: 100px;
  flex-shrink: 0;
  font-weight: 500;
}
.tag-group span {
  color: var(--text-primary);
}
.movie-player {
  margin-top: 10px;
}
.movie-player h3 {
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: 700;
}
.movie-player iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto !important;
  border-radius: var(--card-radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  background: #000;
}

@media (max-width: 900px) {
  .movie-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .movie-poster-wrap {
    flex: 0 0 280px;
  }
  .movie-info h1 {
    font-size: 32px;
  }
  .movie-meta {
    justify-content: center;
  }
}/* Filter Sidebar */
.filter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.filter-overlay.active {
  opacity: 1;
  visibility: visible;
}

.filter-sidebar {
  position: fixed;
  top: 20px;
  right: -420px;
  width: 400px;
  max-width: 90%;
  height: calc(100% - 40px);
  background: #fff;
  z-index: 2001;
  border-radius: 24px;
  box-shadow: -10px 0 40px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.filter-sidebar.active {
  right: 20px;
}

.filter-header {
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
}

.filter-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.close-filter {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.close-filter:hover {
  color: var(--text-primary);
}

.filter-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.filter-section {
  margin-bottom: 32px;
}

.filter-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.filter-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.filter-chip {
  display: block;
  cursor: pointer;
}

.filter-chip input {
  display: none;
}

.filter-chip span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
  text-align: center;
}

.filter-chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(92, 98, 246, 0.3);
}

.filter-chip:hover span {
  border-color: var(--accent);
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.more-years {
  margin-top: 12px;
}

.more-years-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.hidden-years {
  display: none;
  margin-top: 8px;
}

.hidden-years.show {
  display: grid;
}

.filter-select {
  display: none; /* We will use custom dropdown instead */
}

/* Custom Dropdown Component */
.dropdown-container {
  position: relative;
  width: 100%;
}

.dropdown-trigger {
  width: 100%;
  padding: 14px 18px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.dropdown-trigger:hover {
  border-color: var(--accent);
  background: #fff;
}

.dropdown-trigger::after {
  content: '▼';
  font-size: 10px;
  color: var(--text-secondary);
  transition: transform 0.3s;
}

.dropdown-container.active .dropdown-trigger::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  max-height: 300px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  z-index: 100;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: dropdownSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownSlide {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-container.active .dropdown-menu {
  display: flex;
}

.dropdown-search {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown-search input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  background: #f8f9fa;
  outline: none;
  font-size: 14px;
}

.dropdown-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
}

.dropdown-item:hover {
  background: #f8f9fa;
}

.dropdown-item input {
  margin-right: 12px;
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.dropdown-item span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.dropdown-item.selected {
  background: rgba(0, 0, 0, 0.04);
}


.filter-footer {
  padding: 24px 32px;
  border-top: 1px solid #f0f0f0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btn-filter-apply {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.btn-filter-apply:hover {
  opacity: 0.9;
}

.btn-filter-apply:active {
  transform: scale(0.98);
}

.btn-filter-reset {
  background: #f0f0f0;
  color: var(--text-primary);
  border: none;
  padding: 14px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-filter-reset:hover {
  background: #e5e5e5;
}

/* Custom Multiselect styles could go here if needed */
.movie-player {
  margin-top: 40px;
}

/* Empty States (404 and Empty Search) */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: var(--card);
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.03);
  margin: 40px auto;
  max-width: 600px;
}

.empty-state-icon {
  margin-bottom: 24px;
  color: var(--text-secondary);
  opacity: 0.8;
  display: flex;
  justify-content: center;
}

.empty-state-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.empty-state-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: #1c1c1e;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #000000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Franchise Section & Sidebar */
.franchise-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f1f1f4;
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  margin-top: 15px;
  width: 100%;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.franchise-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.franchise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.franchise-overlay.active {
  opacity: 1;
  visibility: visible;
}

.franchise-drawer {
  position: fixed;
  top: 20px;
  left: -420px;
  width: 400px;
  max-width: 90%;
  height: calc(100% - 40px);
  background: #fff;
  z-index: 1001;
  border-radius: 24px;
  box-shadow: 20px 0 50px rgba(0,0,0,0.15);
  transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.franchise-drawer.active {
  left: 20px;
}

@media (max-width: 500px) {
  .franchise-drawer { width: 85%; left: -100%; border-radius: 0; top: 0; height: 100%; }
  .franchise-drawer.active { left: 0; }
}

.drawer-header {
  padding: 24px;
  border-bottom: 1px solid #f0f0f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.close-drawer {
  background: #f1f1f4;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.close-drawer:hover {
  background: #e5e5e7;
  transform: rotate(90deg);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-item {
  display: flex;
  gap: 15px;
  padding: 12px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  background: #fff;
  border: 1px solid transparent;
}

.drawer-item:hover {
  background: #f9f9fb;
  border-color: #eee;
  transform: translateX(5px);
}

.drawer-item-poster {
  flex: 0 0 60px;
  height: 85px;
  border-radius: 8px;
  overflow: hidden;
  background: #eee;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

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

.drawer-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.drawer-item-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}

.drawer-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.drawer-rating {
  color: var(--text-primary);
  font-weight: 700;
  opacity: 0.8;
}

.drawer-type {
  color: var(--text-secondary);
  background: #f1f1f4;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.drawer-year {
  color: var(--text-secondary);
}

/* ========================
   FAVORITES FEATURE
   ======================== */

/* Heart button on poster */
.fav-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  right: auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
  transition: background 0.2s, color 0.2s, transform 0.15s;
  padding: 0;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.poster-wrapper .fav-btn {
  top: 8px;
  left: 8px;
  right: auto;
}

.fav-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  pointer-events: none;
}

.fav-btn:hover {
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  transform: scale(1.12);
}

.fav-btn--active {
  color: #ff3b5c;
  background: rgba(255, 59, 92, 0.18);
}

.fav-btn--active:hover {
  background: rgba(255, 59, 92, 0.28);
  color: #ff3b5c;
}

/* Large heart on fullstory poster */
.movie-poster-wrap .fav-btn {
  top: 12px;
  left: 12px;
  right: auto;
  width: 40px;
  height: 40px;
}

.movie-poster-wrap .fav-btn svg {
  width: 20px;
  height: 20px;
}

/* Header favorites icon */
.fav-header-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.fav-header-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.fav-header-btn:hover {
  background: #f9f9f9;
  color: #ff3b5c;
}

.fav-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ff3b5c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

/* Favorites page header */
.fav-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  margin-bottom: 24px;
}



.fav-page-header-left {
  flex: 1;
}

.fav-page-header-left h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 4px;
}

.fav-page-header-left p {
  font-size: 14px;
  color: var(--text-secondary, #888);
  margin: 0;
}

/* Empty state on favorites page */
.fav-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  gap: 12px;
}

.fav-empty-icon {
  color: #ccc;
  margin-bottom: 8px;
}

.fav-empty-state h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.fav-empty-state p {
  font-size: 15px;
  color: var(--text-secondary, #888);
  margin: 0 0 12px;
}



/* Animated Card Removal */
.card-removing {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  transform: scale(0.9) !important;
  opacity: 0 !important;
  pointer-events: none;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.suggest-header-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.suggest-header-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.suggest-header-btn:hover {
  background: #f9f9f9;
  color: #007aff;
}

/* Suggest page */
.suggest-wrap {
  max-width: 560px;
  margin: 50px auto;
  padding: 0 20px 60px;
}

.suggest-card {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 36px 40px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.suggest-card h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.suggest-card .subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 30px;
}

.suggest-field {
  margin-bottom: 20px;
}

.suggest-field label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.suggest-field input,
.suggest-field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1.5px solid #e8e8ec;
  background: var(--bg-color);
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  transition: border-color 0.2s;
  outline: none;
}

.suggest-field input:focus,
.suggest-field textarea:focus {
  border-color: #1c1c1e;
}

.suggest-field textarea {
  resize: vertical;
  min-height: 90px;
}

.suggest-alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 24px;
  font-weight: 500;
  font-size: 15px;
  text-align: center;
}

.suggest-alert.success {
  background: rgba(52,199,89,0.1);
  color: #1e8a3a;
  border: 1px solid rgba(52,199,89,0.25);
}

.suggest-alert.error {
  background: rgba(255,59,48,0.08);
  color: #cc2200;
  border: 1px solid rgba(255,59,48,0.2);
}

.suggest-submit {
  width: 100%;
  margin-top: 4px;
  padding: 15px;
  background: #1c1c1e;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.1px;
}

.suggest-submit:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.suggest-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px;
  background: #1c1c1e;
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  margin-top: 10px;
}

.suggest-back-btn:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Header button tooltips */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #1c1c1e;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 7px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 200;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (hover: none) {
  [data-tooltip]::after {
    display: none;
  }
}

/* ===================== UPDATES SIDEBAR ===================== */

.updates-btn {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
  z-index: 101;
  -webkit-tap-highlight-color: transparent;
}

.updates-btn:hover {
  background: #f9f9f9;
}

.updates-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.updates-overlay.active {
  opacity: 1;
  visibility: visible;
}

.updates-sidebar {
  position: fixed;
  top: 20px;
  left: -420px;
  width: 400px;
  max-width: calc(100% - 40px);
  height: calc(100% - 40px);
  background: #fff;
  z-index: 2001;
  border-radius: 24px;
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.updates-sidebar.active {
  left: 20px;
}

.updates-header {
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.updates-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.updates-header-left h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.close-updates {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.close-updates:hover {
  color: var(--text-primary);
}

.updates-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
}

.updates-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 32px;
  color: var(--text-secondary);
  font-size: 14px;
}

.updates-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e0e0e0;
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: updates-spin 0.7s linear infinite;
}

@keyframes updates-spin {
  to { transform: rotate(360deg); }
}

.updates-empty {
  padding: 48px 32px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.updates-group {
  margin-bottom: 8px;
}

.updates-date-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  padding: 6px 28px 10px;
}

.updates-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 28px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s ease;
  border-radius: 0;
}

.updates-item:hover {
  background: #f5f5f7;
}

.updates-poster {
  width: 42px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e8e8e8;
}

.updates-poster--empty {
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.updates-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.updates-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .updates-sidebar {
    width: calc(100% - 20px);
    max-width: none;
    top: 10px;
    height: calc(100% - 20px);
  }

  .updates-sidebar.active {
    left: 10px;
  }
}

