﻿:root {
  --bg-color: #111113;
  --header-bg: rgba(18,18,20,0.85);
  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --card-bg: #1e1e20;
  --card-radius: 14px;
  --accent: #f5f5f7;
  --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: rgba(255, 255, 255, 0.65); /* Сделали шапку полупрозрачной */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  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;
  position: relative;
  z-index: 1;
}

/* Featured Carousel */
.carousel-wrapper {
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.04); /* Слегка затемненный фон */
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 32px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.03),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4); /* Блик внутри для объема */
  padding: 30px 0 0 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;
  z-index: 1;
}

/* On mobile: kill backdrop-filter and background animation — too heavy for GPU */
@media (hover: none) and (pointer: coarse) {
  .carousel-wrapper {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(0, 0, 0, 0.06);
  }
  .carousel-wrapper::before {
    animation: none;
  }
  .nav-btn {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.carousel-wrapper::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  /* Уменьшил размер плитки (220x140 вместо 280x200), чтобы надписей стало гораздо больше и они были плотнее */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='140'%3E%3Cg transform='translate(110,70) rotate(-35)'%3E%3Ctext x='0' y='0' text-anchor='middle' font-size='26' font-family='-apple-system, BlinkMacSystemFont, Arial, sans-serif' font-weight='900' letter-spacing='5' fill='rgba(0,0,0,0.03)'%3EVEOVEO.RU%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  z-index: -1;
  pointer-events: none;
  /* Добавил анимацию бегущей строки */
  animation: moveVeoText 15s linear infinite;
}

@keyframes moveVeoText {
  0% { background-position: 0 0; }
  /* Сдвиг ровно на размер одной плитки (220px / 140px) создает идеальную бесконечную петлю */
  100% { background-position: -220px -140px; }
}

.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-top: 10px;
  padding-bottom: 40px;
  cursor: grab;
  user-select: none;
}
.carousel-container.is-dragging {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  gap: 20px;
  width: max-content;
  will-change: transform;
}

.carousel-item {
  flex: 0 0 285px;
  width: 285px;
  min-width: 285px;
}

@media (hover: hover) and (pointer: fine) {
  .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.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  min-width: 280px;
  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: 4px;
  width: 32px;
  margin: 16px auto 40px auto;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.08); /* Сверхлегкий современный pill-виждет вместо длинной полосы */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  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 */

/* Shuffle Toggle (iPhone-style switch) */
.shuffle-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 8px 14px 8px 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  transition: all 0.3s;
  margin-left: 10px;
}

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

.shuffle-toggle-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
}

.shuffle-toggle-switch {
  width: 44px;
  height: 26px;
  background: #e5e5ea;
  border-radius: 13px;
  position: relative;
  transition: background 0.35s ease;
  flex-shrink: 0;
}

.shuffle-toggle.is-on .shuffle-toggle-switch {
  background: #34c759;
}

.shuffle-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shuffle-toggle.is-on .shuffle-toggle-thumb {
  transform: translateX(18px);
}

/* 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 */
}

@media (hover: hover) and (pointer: fine) {
  .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;
  perspective: 700px;
}

.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;
  z-index: 5;
}

.rating-badge.rating-low {
  background: rgba(155, 30, 30, 0.68);
}

.rating-badge.rating-high {
  background: rgba(28, 110, 55, 0.68);
}

.poster-inner {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.52s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.poster-wrapper.flipped .poster-inner {
  transform: rotateY(180deg);
}

.poster-front,
.poster-back {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.poster-back {
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  box-sizing: border-box;
  overflow: hidden;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: #111;
}

.poster-back-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  /* filter: blur() внутри preserve-3d не рендерится в Chrome — используем backdrop-filter на оверлее */
}

.poster-back-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px) saturate(0.8);
  -webkit-backdrop-filter: blur(18px) saturate(0.8);
  z-index: 1;
}

.poster-desc {
  color: rgba(255, 255, 255, 0.95);
  font-size: 11.5px;
  line-height: 1.6;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Info button (i) on poster */
.info-btn {
  position: absolute;
  top: 38px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, 'Times New Roman', serif;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  line-height: 1;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  -webkit-appearance: none;
  appearance: none;
}

.info-btn:not(.has-rating) {
  top: 8px;
}

.info-btn:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: scale(1.15);
}

.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;
}

/* ── Плашка недоступности плеера ── */
.player-error {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--card-radius);
  background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
  border: 1px solid #ffe082;
  box-shadow: 0 4px 20px rgba(255,160,0,0.12);
  margin-bottom: 16px;
}
.player-error__icon {
  font-size: 36px;
  flex-shrink: 0;
  line-height: 1;
}
.player-error__body {
  flex: 1;
  min-width: 0;
}
.player-error__body strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #7a4f00;
  margin-bottom: 4px;
}
.player-error__body p {
  margin: 0;
  font-size: 14px;
  color: #8a6210;
  line-height: 1.5;
}

[data-theme="dark"] .player-error {
  background: linear-gradient(135deg, #2a2000 0%, #1e1800 100%);
  border-color: #5a4000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
[data-theme="dark"] .player-error__body strong { color: #ffd54f; }
[data-theme="dark"] .player-error__body p { color: #ffb74d; }

@media (max-width: 600px) {
  .player-error { flex-wrap: wrap; gap: 12px; padding: 16px; }
}


@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: rgba(255, 255, 255, 0.7); /* Сделал кнопку полупрозрачной стекло-панелью */
  backdrop-filter: blur(12px);         
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03); /* Добавил легкую тень без жестких бордеров */
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  margin-top: 15px;
  width: 100%;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.franchise-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.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;
}

/* Share button — in title row, always visible */
.movie-title-row .share-btn {
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.07);
  color: #86868b;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  padding: 0;
  line-height: 1;
}

.movie-title-row .share-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}

.movie-title-row .share-btn:hover {
  background: rgba(0, 113, 227, 0.12);
  color: #0071e3;
  transform: scale(1.12);
}

.movie-title-row .share-btn:active {
  transform: scale(0.94);
}

/* Notify button (serial episode notifications) — in title row */
.movie-title-row .notify-btn {
  margin-left: 6px;
  flex-shrink: 0;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.07);
  color: #86868b;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  padding: 0;
  line-height: 1;
}

.movie-title-row .notify-btn svg {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
}

.movie-title-row .notify-btn:hover {
  background: rgba(0, 113, 227, 0.12);
  color: #0071e3;
  transform: scale(1.12);
}

.movie-title-row .notify-btn.notify-btn--active {
  color: #0071e3;
  background: rgba(0, 113, 227, 0.12);
}

.movie-title-row .notify-btn.notify-btn--active svg {
  fill: #0071e3;
  stroke: none;
}

/* 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;
  position: relative;
  z-index: 50;
}

.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;
}

/* ========================================
   ACCOUNT HEADER BUTTON
   ======================================== */
.account-header-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #2c2c2e;
  color: #f5f5f7;
  text-decoration: none;
  transition: var(--transition);
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.account-header-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}
.account-header-btn:hover {
  background: #3a3a3c;
  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);
}

/* Right-anchored tooltips for buttons near the right edge of screen */
.movie-title-row .share-btn[data-tooltip]::after,
.movie-title-row .notify-btn[data-tooltip]::after,
.fav-header-btn[data-tooltip]::after,
#watchedHeaderBtn[data-tooltip]::after,
.suggest-header-btn[data-tooltip]::after,
.account-header-btn[data-tooltip]::after,
.updates-btn[data-tooltip]::after,
.filter-btn[data-tooltip]::after {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(-4px);
}

.movie-title-row .share-btn[data-tooltip]:hover::after,
.movie-title-row .notify-btn[data-tooltip]:hover::after,
.fav-header-btn[data-tooltip]:hover::after,
#watchedHeaderBtn[data-tooltip]:hover::after,
.suggest-header-btn[data-tooltip]:hover::after,
.account-header-btn[data-tooltip]:hover::after,
.updates-btn[data-tooltip]:hover::after,
.filter-btn[data-tooltip]:hover::after {
  transform: translateX(0) 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;
}

/* Notify sidebar — slides in from right, same style as updates-sidebar */
.notify-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;
}

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

.notify-sidebar {
  position: fixed;
  top: 20px;
  right: -420px;
  width: 380px;
  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: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.notify-sidebar.active {
  right: 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;
  }
}

/* � 3D Спецэффекты для постеров */
.movie-poster-wrap {
  position: relative;
  z-index: 1;
  will-change: transform;
}

/* 🃏 Плавающие глянцевые карточки */
.card, .carousel-item {
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .card::after, .carousel-item > a::after, .movie-poster-wrap::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 14px;
    background: radial-gradient(
      circle at var(--gx, 50%) var(--gy, 50%),
      rgba(255, 255, 255, 0.45) 0%,
      rgba(255, 255, 255, 0) 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
    mix-blend-mode: overlay;
  }

  .card:hover::after, .carousel-item:hover > a::after, .movie-poster-wrap:hover::after {
    opacity: 1;
  }
}

/* ✉️ Кнопка почты (в подвале вместе с пагинацией) */
.site-footer-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 40px;
  margin-bottom: 40px;
  padding: 0 32px;
  width: 100%;
  box-sizing: border-box;
}

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

.site-footer-actions .pagination {
  margin: 0 !important; /* Убираем стандартные отступы */
}
.site-footer-actions .page-info {
  margin: 0 !important; /* убираем margin-top */
}

.footer-right {
  display: flex;
  justify-content: flex-end;
}

.footer-right.no-pag {
  grid-column: 3; /* Сдвигаем направо всегда */
}

.bottom-support-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 9px;
  background: linear-gradient(135deg, #1c1c1e 0%, #2d2d30 100%);
  color: #ffffff;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.1px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: transform 0.22s cubic-bezier(0.2,0.8,0.2,1),
              box-shadow 0.22s cubic-bezier(0.2,0.8,0.2,1),
              background 0.22s ease;
  will-change: transform;
  white-space: nowrap;
}

.bottom-support-btn .mail-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: rgba(255,255,255,0.10);
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.22s ease;
}

.bottom-support-btn .mail-label {
  opacity: 0.82;
}

.bottom-support-btn svg {
  display: block;
  color: #fff;
  opacity: 1;
  transition: transform 0.22s cubic-bezier(0.2,0.8,0.2,1);
}

.bottom-support-btn:hover {
  background: linear-gradient(135deg, #111113 0%, #26262a 100%);
  transform: translateY(-2px) scale(1.025);
  box-shadow: 0 6px 20px rgba(0,0,0,0.28), 0 0 0 3px rgba(255,255,255,0.06);
}

.bottom-support-btn:hover .mail-icon-wrap {
  background: rgba(255,255,255,0.18);
}

.bottom-support-btn:hover svg {
  transform: scale(1.12) rotate(-6deg);
}

.bottom-support-btn:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

@media (max-width: 768px) {
  .site-footer-actions {
    grid-template-columns: 1fr;
    gap: 24px;
    justify-items: center;
    padding: 0 16px;
    margin-top: 30px;
  }
  .footer-center {
    grid-row: 1;
  }
  .footer-right {
    grid-row: 2;
    justify-content: center;
    grid-column: auto;
  }
  .bottom-support-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 18px 10px 12px;
    font-size: 13px;
    border-radius: 100px;
  }
}

/* ===== Contact / Legal Footer ===== */
.legal-footer {
  border-top: 1px solid rgba(0,0,0,0.08);
  margin-top: 60px;
  padding: 28px 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.legal-footer-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.legal-footer-text {
  font-size: 13px;
  color: #888;
  margin: 0;
  line-height: 1.5;
}

.legal-mail-btn {
  font-size: 13px !important;
  padding: 7px 14px 7px 10px !important;
}

.legal-footer-copy {
  font-size: 12px;
  color: #bbb;
  letter-spacing: 0.2px;
}

/* --- Expandable description --- */
.desc-wrap { margin-bottom: 4px; }

.desc-body {
  position: relative;
}
.desc-collapsible .desc-body {
  max-height: 78px;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.desc-open .desc-body {
  max-height: 2000px;
}
.desc-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 68px;
  background: linear-gradient(to bottom, transparent, var(--bg-color, #f6f6f8));
  pointer-events: none;
  transition: opacity 0.35s;
}
.desc-open .desc-fade {
  opacity: 0;
}
.desc-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, #888);
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: color 0.2s;
}
.desc-toggle:hover { color: var(--text-primary, #111); }
.desc-arrow {
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.desc-open .desc-arrow { transform: rotate(180deg); }

@media (max-width: 600px) {
  .legal-footer {
    padding: 24px 16px 20px;
    margin-top: 40px;
  }
  .legal-footer-inner {
    flex-direction: column;
    gap: 10px;
  }
  .legal-mail-btn {
    width: 100%;
    justify-content: center;
  }
}


/* ========================================
   SIMILAR MOVIES SECTION
   ======================================== */
.similar-section {
  margin-top: 48px;
  padding-bottom: 16px;
}
.similar-section h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.similar-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
@media (max-width: 1400px) { .similar-row { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1100px) { .similar-row { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 800px)  { .similar-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 500px)  { .similar-row { grid-template-columns: repeat(2, 1fr); } }

/* ========================================
   DARK THEME
   ======================================== */
[data-theme="dark"] {
  --bg-color: #111113;
  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --card-bg: #1e1e20;
  --accent: #f5f5f7;
}

[data-theme="dark"] .site-header {
  background: rgba(18,18,20,0.85);
  border-bottom-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .search-input {
  background: #2c2c2e;
  color: #f5f5f7;
  border-color: transparent;
}
[data-theme="dark"] .search-input:focus {
  background: #3a3a3c;
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.04);
}
[data-theme="dark"] .search-input::placeholder { color: #636366; }

[data-theme="dark"] .search-dropdown {
  background: #2c2c2e;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
[data-theme="dark"] .search-dropdown a { color: #f5f5f7; border-bottom-color: rgba(255,255,255,0.05); }
[data-theme="dark"] .search-dropdown a:hover { background: #3a3a3c; }

[data-theme="dark"] .filter-btn,
[data-theme="dark"] .fav-header-btn,
[data-theme="dark"] .suggest-header-btn,
[data-theme="dark"] .updates-btn,

[data-theme="dark"] .sort-menu {
  background: #2c2c2e;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 15px 45px rgba(0,0,0,0.5);
}
[data-theme="dark"] .sort-menu a { color: #f5f5f7; }
[data-theme="dark"] .sort-menu a:hover,
[data-theme="dark"] .sort-menu a.active { background: #3a3a3c; }

[data-theme="dark"] .carousel-wrapper {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.06);
  box-shadow: none;
}
[data-theme="dark"] .carousel-wrapper::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='140'%3E%3Cg transform='translate(110,70) rotate(-35)'%3E%3Ctext x='0' y='0' text-anchor='middle' font-size='26' font-family='-apple-system, BlinkMacSystemFont, Arial, sans-serif' font-weight='900' letter-spacing='5' fill='rgba(255,255,255,0.04)'%3EVEOVEO.RU%3C/text%3E%3C/g%3E%3C/svg%3E");
}
[data-theme="dark"] .carousel-separator { background: rgba(255,255,255,0.1); }

[data-theme="dark"] .toggle-btn-featured {
  background: #2c2c2e;
  border-color: rgba(255,255,255,0.08);
  color: #f5f5f7;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
[data-theme="dark"] .toggle-btn-featured:hover { background: #3a3a3c; }

[data-theme="dark"] .shuffle-toggle {
  background: #2c2c2e;
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
[data-theme="dark"] .shuffle-toggle:hover { background: #3a3a3c; }
[data-theme="dark"] .shuffle-toggle-label { color: #f5f5f7; }
[data-theme="dark"] .shuffle-toggle-switch { background: #48484a; }
[data-theme="dark"] .shuffle-toggle.is-on .shuffle-toggle-switch { background: #34c759; }

[data-theme="dark"] .nav-btn {
  background: rgba(44,44,46,0.95);
  border-color: rgba(255,255,255,0.1);
  color: #f5f5f7;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
[data-theme="dark"] .nav-btn:hover { background: #f5f5f7; color: #111113; }

[data-theme="dark"] .pg-btn {
  background: #2c2c2e;
  border-color: rgba(255,255,255,0.06);
  color: #f5f5f7;
}
[data-theme="dark"] .pg-btn:hover { background: #3a3a3c; }
[data-theme="dark"] .pg-active {
  background: #f5f5f7 !important;
  color: #111113 !important;
  border-color: #f5f5f7 !important;
}

[data-theme="dark"] .movie-desc { color: #aaaab0; }
[data-theme="dark"] .tag-group { color: #aaaab0; }
[data-theme="dark"] .tag-group span { color: #f5f5f7; }
[data-theme="dark"] .movie-player iframe { box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
[data-theme="dark"] .movie-poster { box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
[data-theme="dark"] .movie-player h3 { color: #f5f5f7; }

[data-theme="dark"] .franchise-btn {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  color: #f5f5f7;
}
[data-theme="dark"] .franchise-btn:hover {
  background: rgba(255,255,255,0.12);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

[data-theme="dark"] .franchise-drawer,
[data-theme="dark"] .filter-sidebar,
[data-theme="dark"] .updates-sidebar,
[data-theme="dark"] .notify-sidebar { background: #1c1c1e; }

[data-theme="dark"] .drawer-header,
[data-theme="dark"] .filter-header,
[data-theme="dark"] .filter-footer,
[data-theme="dark"] .updates-header { border-color: rgba(255,255,255,0.08); }

[data-theme="dark"] .drawer-item { background: #1c1c1e; color: #f5f5f7; }
[data-theme="dark"] .drawer-item:hover { background: #2c2c2e; border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .drawer-type { background: #3a3a3c; color: #86868b; }
[data-theme="dark"] .close-drawer { background: #3a3a3c; color: #f5f5f7; }
[data-theme="dark"] .close-filter { color: #86868b; }

[data-theme="dark"] .updates-item:hover { background: #2c2c2e; }
[data-theme="dark"] .updates-spinner { border-color: #3a3a3c; border-top-color: #f5f5f7; }

[data-theme="dark"] .filter-chip span {
  background: #2c2c2e;
  border-color: #3a3a3c;
  color: #86868b;
}
[data-theme="dark"] .filter-chip input:checked + span {
  background: #f5f5f7;
  border-color: #f5f5f7;
  color: #111113;
}
[data-theme="dark"] .dropdown-trigger {
  background: #2c2c2e;
  border-color: #3a3a3c;
  color: #f5f5f7;
}
[data-theme="dark"] .dropdown-menu {
  background: #2c2c2e;
  border-color: #3a3a3c;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
[data-theme="dark"] .dropdown-search { border-bottom-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .dropdown-search input {
  background: #3a3a3c;
  border-color: #4a4a4c;
  color: #f5f5f7;
}
[data-theme="dark"] .dropdown-item:hover { background: #3a3a3c; }
[data-theme="dark"] .dropdown-item.selected { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .dropdown-item span { color: #f5f5f7; }
[data-theme="dark"] .btn-filter-reset { background: #3a3a3c; color: #f5f5f7; }
[data-theme="dark"] .btn-filter-apply { background: #0a84ff; color: #ffffff; }

[data-theme="dark"] .empty-state { background: #1e1e20; }
[data-theme="dark"] .fav-page-header { border-bottom-color: rgba(255,255,255,0.08); }

[data-theme="dark"] .suggest-card { background: #1e1e20; }
[data-theme="dark"] .suggest-field input,
[data-theme="dark"] .suggest-field textarea {
  background: #2c2c2e;
  border-color: #3a3a3c;
  color: #f5f5f7;
}
[data-theme="dark"] .suggest-field input:focus,
[data-theme="dark"] .suggest-field textarea:focus { border-color: #86868b; }
[data-theme="dark"] .suggest-submit,
[data-theme="dark"] .suggest-back-btn { background: #f5f5f7; color: #111113; }
[data-theme="dark"] .suggest-submit:hover,
[data-theme="dark"] .suggest-back-btn:hover { background: #ffffff; box-shadow: none; }

[data-theme="dark"] .legal-footer { border-top-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .legal-footer-text { color: #636366; }
[data-theme="dark"] .legal-footer-copy { color: #48484a; }

[data-theme="dark"] .toast-notification { background: rgba(58,58,60,0.95); }

[data-theme="dark"] .btn-primary { background: #f5f5f7; color: #111113; }
[data-theme="dark"] .btn-primary:hover { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }

[data-theme="dark"] .bottom-support-btn {
  background: linear-gradient(135deg, #2c2c2e 0%, #3a3a3c 100%);
  border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .bottom-support-btn:hover {
  background: linear-gradient(135deg, #3a3a3c 0%, #48484a 100%);
}

[data-theme="dark"] .desc-toggle { color: #636366; }
[data-theme="dark"] .desc-toggle:hover { color: #f5f5f7; }

/* ═══════════════════════════════════════
   History page — row list
   ═══════════════════════════════════════ */

/* ═══════════════════════════════════════
   Preloader
   ═══════════════════════════════════════ */
#veo-preloader {
  position: fixed;
  inset: 0;
  background-color: var(--bg-primary, #111);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#veo-preloader.veo-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.veo-spinner {
  width: 52px;
  height: 52px;
  border: 4px solid rgba(255, 255, 255, 0.08);
  border-top-color: #e50914;
  border-radius: 50%;
  animation: veo-spin 0.9s linear infinite;
}

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

body.veo-loading {
  overflow: hidden;
}

/* ═══════════════════════════════════════════
   WATCHED / ПРОСМОТРЕННЫЕ
   ═══════════════════════════════════════════ */

/* Header badge — точная копия fav-badge */
.watched-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;
}

/* Active state for current page header btn */
.fav-header-btn--current {
  background: #f5f5f7;
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
}

/* Watched button next to "Смотреть онлайн" */
.movie-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.movie-player-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.movie-player-header h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}
.watched-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 10px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.watched-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}
.watched-btn--active {
  color: #e53935;
  border-color: rgba(229, 57, 53, 0.35);
  background: rgba(229, 57, 53, 0.07);
}
.watched-btn--active:hover {
  background: rgba(229, 57, 53, 0.13);
}

/* Watched strip on movie page poster */
.movie-poster-wrap .watched-poster-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(90deg, #b71c1c 0%, #e53935 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 0 0 var(--card-radius) var(--card-radius);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 5;
}
.movie-poster-wrap.movie-watched .watched-poster-strip {
  opacity: 1;
  transform: translateY(0);
}

/* Watched strip on catalog / watched-page grid cards */
.watched-card-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 26px;
  background: linear-gradient(90deg, #b71c1c 0%, #e53935 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 4;
  pointer-events: none;
}

/* ── Watched page layout ── */
.watched-page-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* "Выбрать" button */
.watched-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.2s;
  white-space: nowrap;
}
.watched-select-btn:hover {
  background: #f5f5f7;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}
.watched-select-btn--active {
  background: rgba(229, 57, 53, 0.08);
  border-color: rgba(229, 57, 53, 0.3);
  color: #e53935;
  box-shadow: none;
  transform: none;
}
.watched-select-btn--active:hover {
  background: rgba(229, 57, 53, 0.13);
  transform: none;
}

/* Remove (X) button on card — only on watched page */
.watched-remove-btn {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.48);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.18s, transform 0.15s;
  padding: 0;
  opacity: 0;
  transition: opacity 0.18s, background 0.18s, transform 0.15s;
}
.watched-card:hover .watched-remove-btn,
.watched-selecting .watched-remove-btn {
  opacity: 1;
}
.watched-remove-btn:hover {
  background: rgba(229, 57, 53, 0.9);
  transform: scale(1.12);
}

/* Checkbox on card — hidden until select mode */
.wcard-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 13;
  transition: background 0.15s, border-color 0.15s;
  pointer-events: none;
}
.wcard-checkbox svg {
  display: none;
  color: #fff;
  pointer-events: none;
}
.wcard-checkbox.checked {
  background: #e53935;
  border-color: #e53935;
}
.wcard-checkbox.checked svg { display: block; }

/* Show checkbox in select mode */
.watched-selecting .wcard-checkbox {
  display: flex;
}

/* Prevent link cursor in select mode */
.watched-selecting .card-link {
  cursor: default;
}

/* Selected card overlay */
.watched-selecting .watched-card.watched-selected .poster-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  box-shadow: inset 0 0 0 3px #e53935;
  z-index: 9;
  pointer-events: none;
}

/* ── Sticky action bar ── */
.watched-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.08);
}
.watched-action-bar.visible {
  transform: translateY(0);
}
.watched-action-count {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
}
.watched-action-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.watched-action-selectall {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.watched-action-selectall:hover {
  background: rgba(0, 0, 0, 0.05);
}
.watched-action-delete {
  padding: 9px 20px;
  border-radius: 10px;
  border: none;
  background: #e53935;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}
.watched-action-delete:hover:not(:disabled) {
  background: #c62828;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(229, 57, 53, 0.4);
}
.watched-action-delete:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.watched-action-cancel {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.watched-action-cancel:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

/* ── Dark mode ── */
[data-theme="dark"] .fav-header-btn--current {
  background: #3a3a3c;
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .watched-btn {
  border-color: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .watched-btn:hover {
  background: rgba(255, 255, 255, 0.07);
}

/* ── Watchlist button ── */
.wl-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: 10px;
  border: 1.5px solid rgba(0,0,0,0.1);
  background: transparent; color: var(--text-secondary);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s; white-space: nowrap;
  outline: none; -webkit-tap-highlight-color: transparent;
}
.wl-btn:focus-visible { outline: 2px solid rgba(0,122,255,0.4); outline-offset: 2px; }
.wl-btn:hover { background: rgba(0,0,0,0.05); color: var(--text-primary); }
.wl-btn--active { color: #007aff; border-color: rgba(0,122,255,0.35); background: rgba(0,122,255,0.07); }
.wl-btn--active:hover { background: rgba(0,122,255,0.13); }
[data-theme="dark"] .wl-btn { border-color: rgba(255,255,255,0.12); }
[data-theme="dark"] .wl-btn:hover { background: rgba(255,255,255,0.07); }
[data-theme="dark"] .movie-player-header h3 {
  color: #f5f5f7;
}
[data-theme="dark"] .watched-select-btn {
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
[data-theme="dark"] .watched-select-btn:hover {
  background: #3a3a3c;
}
[data-theme="dark"] .watched-select-btn--active {
  background: rgba(229, 57, 53, 0.15);
  border-color: rgba(229, 57, 53, 0.35);
}
[data-theme="dark"] .watched-action-bar {
  background: rgba(28, 28, 30, 0.92);
  border-top-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .watched-action-selectall {
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
[data-theme="dark"] .watched-action-selectall:hover {
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .watched-action-cancel {
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}
[data-theme="dark"] .watched-action-cancel:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}
/* ========================================
   VERIFIED BADGE
   ======================================== */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #007aff;
  border-radius: 50%;
  flex-shrink: 0;
  margin-left: 5px;
  vertical-align: middle;
  cursor: help;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}
.verified-badge:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(0,122,255,0.2);
}
.verified-badge svg {
  width: 10px;
  height: 10px;
  display: block;
}
.verified-badge::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1c1c1e;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s;
  z-index: 11;
}
.verified-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1c1c1e;
  color: #f5f5f7;
  font-size: 12px;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s, transform 0.18s;
  z-index: 10;
}
.verified-badge:hover::before,
.verified-badge:hover::after {
  opacity: 1;
}
.verified-badge:hover::after {
  transform: translateX(-50%) translateY(0);
}
