/* ==========================================================================
   Kinopopusk — Stylesheet (Kinopoisk Aesthetic & Dark Cinematic Theme)
   ========================================================================== */

:root {
  --bg-main: #141414;
  --bg-surface: #1f1f1f;
  --bg-surface-elevated: #282828;
  --bg-card: #181818;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 102, 0, 0.4);

  --accent-orange: #ff5500;
  --accent-orange-hover: #ff6a00;
  --accent-gradient: linear-gradient(135deg, #ff6600, #ff3300);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.45);

  --rating-green: #3bb33b;
  --rating-silver: #a0a0a0;
  --rating-red: #ff3333;

  --shadow-card: 0 10px 24px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(255, 85, 0, 0.25);

  --header-height: 72px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #333333;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-orange);
}

/* Utilities */
.hidden {
  display: none !important;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(20, 20, 20, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
}

.header__container {
  max-width: 1440px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header__left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.logo__img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  display: block;
}

.logo__icon {
  width: 28px;
  height: 28px;
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo__accent {
  color: var(--accent-orange);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav__btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav__btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.header__center {
  flex: 1;
  max-width: 480px;
}

.search-bar {
  position: relative;
  width: 100%;
}

.search-bar__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-bar__input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 42px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  border-radius: 24px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: var(--transition-fast);
}

.search-bar__input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 102, 0, 0.5);
  box-shadow: 0 0 15px rgba(255, 102, 0, 0.2);
}

.search-bar__clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

/* ==========================================================================
   Search Autocomplete Suggestions Dropdown
   ========================================================================== */
.search-suggestions-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 320px;
  max-height: 440px;
  overflow-y: auto;
  background: rgba(18, 20, 29, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(255, 102, 0, 0.12);
  z-index: 1200;
  padding: 6px 0;
  animation: fadeInDown 0.18s ease-out;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  border-left: 3px solid transparent;
  user-select: none;
}

.search-suggestion-item:hover,
.search-suggestion-item.active {
  background: rgba(255, 102, 0, 0.14);
  border-left-color: var(--accent-orange, #ff6600);
}

.suggestion-poster {
  width: 38px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
}

.suggestion-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
  min-width: 0;
}

.suggestion-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #ffffff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-title mark {
  background: transparent;
  color: var(--accent-orange, #ff6600);
  font-weight: 700;
}

.suggestion-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted, #8e95a5);
}

.suggestion-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #cccccc);
}

.suggestion-badge--anime {
  background: rgba(235, 87, 87, 0.15);
  color: #ff6b81;
}

.suggestion-badge--serial {
  background: rgba(45, 156, 219, 0.15);
  color: #56ccf2;
}

.suggestion-badge--movie {
  background: rgba(39, 174, 96, 0.15);
  color: #6fcf97;
}

.suggestion-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #ffb800;
  margin-left: auto;
  flex-shrink: 0;
}

.suggestion-rating svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.search-suggestion-hint {
  padding: 8px 14px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

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


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

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.action-btn svg {
  width: 16px;
  height: 16px;
  color: var(--accent-orange);
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.downloads-badge-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.downloads-badge-btn svg {
  width: 20px;
  height: 20px;
}

.downloads-badge-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-orange);
}

.downloads-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid var(--bg-main);
}

/* ==========================================================================
   Shared Badges & Labels
   ========================================================================== */
.badge {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.badge--kp {
  background: var(--rating-green);
  color: #fff;
}

.badge--year {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.badge--quality {
  background: rgba(255, 102, 0, 0.2);
  color: var(--accent-orange);
  border: 1px solid rgba(255, 102, 0, 0.4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 28px;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn--primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 85, 0, 0.4);
}

.btn--primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(255, 85, 0, 0.6);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(10px);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn--accent {
  background: var(--accent-gradient);
  color: #fff;
}

.btn--accent:hover {
  filter: brightness(1.1);
}

.btn--block {
  width: 100%;
}

.btn--large {
  padding: 14px 28px;
  font-size: 16px;
}

.btn--icon {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 50%;
}

.btn--icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ==========================================================================
   Catalog Section & Movies Grid
   ========================================================================== */
.catalog-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 24px;
}

.catalog-section__header {
  margin-bottom: 28px;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
  min-height: 520px;
  transition: opacity 0.2s ease;
}

/* Movie Card */
.movie-card {
  position: relative;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.movie-card__poster-box {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #202020;
  overflow: hidden;
}

.movie-card__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .movie-card__poster {
  transform: scale(1.05);
}

.movie-card__rating {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--rating-green);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.movie-card__rating--mid {
  background: var(--rating-silver);
}

.movie-card__rating--low {
  background: var(--rating-red);
}

.movie-card__rating--unrated {
  background: rgba(28, 30, 36, 0.88);
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
}

.movie-card__type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.85);
  z-index: 2;
}

.movie-card__info {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.movie-card__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card__meta {
  font-size: 12px;
  color: var(--text-muted);
}

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

.pagination__btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination__btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.pagination__btn.active {
  background: var(--accent-orange);
  color: #fff;
  border-color: var(--accent-orange);
  box-shadow: 0 2px 10px rgba(255, 85, 0, 0.35);
}

.pagination__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination__btn--nav {
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
}

.pagination__ellipsis {
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 700;
  padding: 0 4px;
  user-select: none;
}

/* Scroll-locking for open modals to prevent double scrollbars and background touch chaining */
html.modal-open,
body.modal-open {
  overflow: hidden !important;
  height: 100% !important;
  overscroll-behavior: none !important;
}

body.modal-open {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

/* ==========================================================================
   Details Modal
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow: hidden;
  overscroll-behavior: contain;
}

.modal.active,
.modal.modal--open {
  opacity: 1;
  pointer-events: auto;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
}

.modal__container {
  position: relative;
  width: min(1000px, 100%);
  max-height: 90vh;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  z-index: 2;
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal__container,
.modal.modal--open .modal__container {
  transform: scale(1);
}

.modal__close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-fast);
}

.modal__close:hover {
  background: var(--accent-orange);
}

.modal__backdrop {
  height: 220px;
  background-size: cover;
  background-position: center 25%;
  position: relative;
}

.modal__backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24,24,24,0.1) 0%, #181818 100%);
}

.modal__body {
  padding: 0 36px 36px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 36px;
  margin-top: -80px;
  position: relative;
  z-index: 3;
}

.modal__poster-wrapper {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,0.8);
  margin-bottom: 16px;
}

.modal__poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
}

.modal__rating-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--rating-green);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.modal__title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 4px;
}

.modal__orig-title {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.modal__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.meta-tag {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 6px;
}

.modal__table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.table-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
}

.table-label {
  color: var(--text-muted);
}

.table-value {
  color: var(--text-primary);
}

.modal__synopsis {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* Series Block */
.block-heading {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #fff;
}

.seasons-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.season-tab {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.season-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.season-tab.active {
  background: var(--accent-orange);
  color: #fff;
  border-color: var(--accent-orange);
}

.episodes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 28px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 2px;
}

.episode-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 104px;
  box-sizing: border-box;
  position: relative;
  user-select: none;
}

.episode-btn__label {
  flex: 1;
  text-align: left;
  white-space: nowrap;
}

.episode-btn__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: transparent;
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.episode-btn:hover .episode-btn__check {
  border-color: rgba(255, 255, 255, 0.45);
}

.episode-btn__check:hover {
  transform: scale(1.15);
  border-color: #22c55e !important;
  color: #22c55e !important;
  background: rgba(34, 197, 94, 0.15) !important;
}

/* Marked as watched state */
.episode-btn--watched {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.35);
  color: #f1f5f9;
}

.episode-btn--watched .episode-btn__check {
  border-color: #22c55e;
  background: #22c55e;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.episode-btn--watched:hover {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.55);
  color: #ffffff;
}

.episode-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  transform: translateY(-1px);
}

.episode-btn.active {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 85, 0, 0.4);
  transform: translateY(-1px);
}

.episode-btn.active.episode-btn--watched {
  background: linear-gradient(135deg, var(--accent-orange), #d946ef);
  border-color: var(--accent-orange);
  color: #ffffff;
}

.episode-btn.active.episode-btn--watched .episode-btn__check {
  background: #ffffff;
  border-color: #ffffff;
  color: #15803d;
}

.episode-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-fast);
}

.episode-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-orange);
}

.episode-card.active {
  border-color: var(--accent-orange);
  background: rgba(255, 102, 0, 0.15);
}

.episode-card__num {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.episode-card__label {
  font-size: 11px;
  color: var(--text-muted);
}

/* Modal Action Buttons (Left Column) */
.modal__action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 2px;
}

/* Modal Navigation Tabs */
.modal-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.modal-tabs::-webkit-scrollbar {
  display: none;
}

.modal-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  flex: 0 0 auto;
  flex-shrink: 0;
  min-width: max-content;
  box-sizing: border-box;
}

.modal-tab span {
  white-space: nowrap;
  display: inline-block;
}

.modal-tab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.modal-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.modal-tab--active {
  background: var(--accent-gradient);
  border-color: var(--accent-orange);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 85, 0, 0.35);
}

/* Embedded Player Block */
.player-block {
  margin-bottom: 24px;
  animation: fadeIn 0.25s ease-out;
}

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.player-sources-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.player-sources-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.player-sources-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.player-source-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.player-source-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.player-source-btn--active {
  background: rgba(255, 85, 0, 0.2);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.player-theater-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.player-theater-btn svg {
  width: 14px;
  height: 14px;
}

.player-theater-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.cinema-player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #09090b;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85);
}

.cinema-player-loader {
  position: absolute;
  inset: 0;
  background: #0f0f11;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.cinema-player-loader.hidden {
  opacity: 0;
  pointer-events: none;
  display: none !important;
}

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

/* Theater Mode for Modal */
.modal--theater .modal__container {
  width: min(1360px, 96vw);
  max-height: 96vh;
}

.modal--theater .modal__body {
  grid-template-columns: 200px 1fr;
}

/* Poster fallback background */
.movie-card__poster-box {
  background: linear-gradient(145deg, #1f1f23, #131316);
}

/* Download Box */
.download-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}

.download-box__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.form-select {
  background: #242424;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.form-select:focus {
  border-color: var(--accent-orange);
}

.download-box__footer {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hint-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Paste Link Modal
   ========================================================================== */
.modal--small .modal__container {
  width: min(540px, 100%);
}

.modal__content-box {
  padding: 32px 28px;
}

.modal-heading {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-subtext {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-subtext code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-orange);
}

.input-group {
  display: flex;
  gap: 10px;
}

.form-input {
  flex: 1;
  background: #222222;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-orange);
}

.resolve-error {
  margin-top: 12px;
  font-size: 13px;
  color: var(--rating-red);
}

/* ==========================================================================
   Downloads Drawer
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 140;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-overlay.active,
.drawer-overlay.drawer-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(460px, 100vw);
  height: 100vh;
  background: #181818;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
  z-index: 150;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.drawer.active,
.drawer.drawer--open,
.drawer--open {
  transform: translateX(0);
}

.drawer__header {
  height: var(--header-height);
  padding: 0 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer__title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer__title-group svg {
  width: 20px;
  height: 20px;
  color: var(--accent-orange);
}

.drawer__title-group h3 {
  font-size: 16px;
  font-weight: 700;
}

.drawer__header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer__close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
}

.drawer__close:hover {
  color: #fff;
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer__empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  gap: 16px;
}

.drawer__empty svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

/* Download Item Card */
.dl-card,
.download-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dl-card__header,
.download-item__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dl-card__title,
.download-item__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.dl-card__stage,
.download-item__status {
  font-size: 12px;
  color: var(--text-muted);
}

.dl-card__progress-bar,
.download-item .progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.dl-card__progress-fill,
.download-item .progress-bar__fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.dl-card__meta,
.download-item__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.dl-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-cancel,
.btn-cancel-dl {
  background: transparent;
  border: 1px solid rgba(255, 51, 51, 0.4);
  color: #ff5555;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-cancel:hover,
.btn-cancel-dl:hover {
  background: rgba(255, 51, 51, 0.15);
}

.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.status-badge--completed {
  background: rgba(59, 179, 59, 0.2);
  color: var(--rating-green);
  border: 1px solid rgba(59, 179, 59, 0.4);
}

.status-badge--failed {
  background: rgba(255, 51, 51, 0.2);
  color: var(--rating-red);
}

.btn-save-device {
  background: var(--accent-gradient);
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(255, 85, 0, 0.3);
  cursor: pointer;
}

.btn-save-device:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 85, 0, 0.45);
}

.btn-save-device svg {
  flex-shrink: 0;
}

/* Server Files Storage Modal */
.server-storage-badge {
  background: rgba(255, 85, 0, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(255, 85, 0, 0.3);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.server-files-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 50vh;
  overflow-y: auto;
  margin-top: 14px;
  padding-right: 4px;
}

.server-files-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 36px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.server-file-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.server-file-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: #242424;
}

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

.server-file-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  word-break: break-word;
  line-height: 1.3;
}

.server-file-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.server-file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-server-delete {
  background: transparent;
  border: 1px solid rgba(255, 51, 51, 0.3);
  color: #ff5555;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s ease;
}

.btn-server-delete:hover {
  background: rgba(255, 51, 51, 0.15);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #222222;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

.toast--success {
  border-left: 4px solid var(--rating-green);
}

.toast--error {
  border-left: 4px solid var(--rating-red);
}

.toast--info {
  border-left: 4px solid var(--accent-orange);
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}



/* ==========================================================================
   User Profile & Authentication Header
   ========================================================================== */
.auth-header-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.btn--outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  transition: var(--transition-fast);
}

.btn--outline:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  background: rgba(255, 85, 0, 0.08);
}

.btn--sm {
  padding: 8px 14px;
  font-size: 13px;
}

.user-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 30px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  color: #fff;
  transition: var(--transition-fast);
}

.user-avatar-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-orange);
}

.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.user-avatar-name {
  font-size: 13px;
  font-weight: 600;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chevron-icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  background: #1c1c1c;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(20px);
  z-index: 200;
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

.profile-dropdown__header {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
}

.profile-dropdown__username {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.profile-dropdown__role {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-dropdown__items {
  padding: 6px;
}

.profile-dropdown__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
}

.profile-dropdown__item svg {
  width: 16px;
  height: 16px;
}

.profile-dropdown__item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.profile-dropdown__item--danger:hover {
  background: rgba(255, 51, 51, 0.15);
  color: var(--rating-red);
}

.profile-dropdown__divider {
  border: none;
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

/* ==========================================================================
   Dynamic Hero Banner & Slider (Cinematic Two-Column Crossfade)
   ========================================================================== */
.hero {
  position: relative;
  min-height: 520px;
  height: 520px;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  background: #111113;
}

.hero__slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
}

.hero__slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.hero__backdrop {
  position: absolute;
  inset: -15px;
  background-size: cover;
  background-position: center 25%;
  background-repeat: no-repeat;
  filter: brightness(0.48) saturate(1.2);
  transform: scale(1.03);
  transition: transform 7s ease-out;
}

.hero__slide.active .hero__backdrop {
  transform: scale(1);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    /* Top edge fade into header */
    linear-gradient(180deg, #111113 0%, rgba(17, 17, 19, 0.75) 12%, transparent 35%),
    /* Bottom edge fade into catalog */
    linear-gradient(0deg, #111113 0%, rgba(17, 17, 19, 0.95) 20%, transparent 60%),
    /* Left strong shadow protecting text readability */
    linear-gradient(90deg, #111113 0%, rgba(17, 17, 19, 0.98) 32%, rgba(17, 17, 19, 0.75) 55%, rgba(17, 17, 19, 0.25) 85%, rgba(17, 17, 19, 0.35) 100%),
    /* Right edge subtle fade */
    linear-gradient(270deg, #111113 0%, rgba(17, 17, 19, 0.5) 8%, transparent 22%),
    /* Soft ambient vignette */
    radial-gradient(ellipse at 70% 50%, rgba(17, 17, 19, 0.1) 0%, rgba(17, 17, 19, 0.6) 75%, #111113 100%);
}

.hero__slide-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero__content {
  max-width: 660px;
}

.hero__badges {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hero__title {
  font-size: 46px;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
}

.hero__description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 26px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero__poster-showcase {
  position: relative;
  flex: 0 0 240px;
  aspect-ratio: 2/3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 35px rgba(255, 85, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.35s ease;
}

.hero__poster-showcase:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 45px rgba(255, 85, 0, 0.4);
  border-color: rgba(255, 85, 0, 0.6);
}

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

.hero__controls {
  position: absolute;
  bottom: 24px;
  right: 48px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero__arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: var(--transition-fast);
}

.hero__arrow:hover {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
}

.hero__dots {
  display: flex;
  gap: 8px;
}

.hero__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: var(--transition-fast);
}

.hero__dot.active {
  width: 24px;
  border-radius: 10px;
  background: var(--accent-orange);
}

/* ==========================================================================
   Continue Watching Section ("Продолжить просмотр")
   ========================================================================== */
.continue-watching-section {
  max-width: 1440px;
  margin: 36px auto 0;
  padding: 0 24px;
  position: relative;
}

.continue-watching-wrapper {
  position: relative;
  width: 100%;
}

.continue-watching-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px 20px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.continue-watching-carousel::-webkit-scrollbar {
  display: none;
}

.continue-card {
  flex: 0 0 260px;
  position: relative;
  background: #141416;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.continue-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 85, 0, 0.6);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85), 0 0 20px rgba(255, 85, 0, 0.25);
}

.continue-card__poster-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a1a1c;
  overflow: hidden;
}

.continue-card__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth), filter var(--transition-fast);
}

.continue-card:hover .continue-card__poster {
  transform: scale(1.05);
  filter: brightness(0.85);
}

.continue-card__play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 85, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 16px rgba(255, 85, 0, 0.5);
  pointer-events: none;
}

.continue-card:hover .continue-card__play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.continue-card__remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: all var(--transition-fast);
  z-index: 5;
}

.continue-card:hover .continue-card__remove-btn {
  opacity: 1;
}

.continue-card__remove-btn:hover {
  background: rgba(255, 51, 51, 0.9);
  color: #fff;
  border-color: transparent;
}

.continue-card__progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 3;
}

.continue-card__progress-fill {
  height: 100%;
  background: var(--accent-orange);
  box-shadow: 0 0 8px var(--accent-orange);
  transition: width 0.3s ease;
}

.continue-card__info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #141416;
}

.continue-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.continue-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.continue-card__badge {
  font-weight: 600;
  color: var(--accent-orange);
}

.continue-card__time {
  font-size: 11px;
}

.continue-watching-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(18, 18, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.continue-watching-nav-btn:hover {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  transform: translateY(-50%) scale(1.1);
}

.continue-watching-nav-btn--prev {
  left: -14px;
}

.continue-watching-nav-btn--next {
  right: -14px;
}

/* ==========================================================================
   Top 10 Section (Netflix / Kinopoisk Style with Floating Nav)
   ========================================================================== */
.top10-section {
  max-width: 1440px;
  margin: 40px auto 0;
  padding: 0 24px;
}

.section-title-group {
  margin-bottom: 20px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fire-icon {
  font-size: 22px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.top10-wrapper {
  position: relative;
  width: 100%;
}

.top10-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(20, 20, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  transition: var(--transition-fast);
  opacity: 0.85;
}

.top10-nav-btn:hover {
  opacity: 1;
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  box-shadow: 0 0 20px rgba(255, 85, 0, 0.5);
  transform: translateY(-50%) scale(1.08);
}

.top10-nav-btn--prev {
  left: -14px;
}

.top10-nav-btn--next {
  right: -14px;
}

.top10-carousel {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 24px 8px 32px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.top10-carousel::-webkit-scrollbar {
  display: none;
}

.top10-card {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.2, 0, 0, 1);
}

.top10-card:hover {
  transform: translateY(-8px) scale(1.03);
}

.top10-card__rank {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 140px;
  font-weight: 900;
  line-height: 0.75;
  letter-spacing: -6px;
  color: #111113;
  -webkit-text-stroke: 3.5px rgba(255, 85, 0, 0.85);
  text-shadow: 0 4px 20px rgba(255, 85, 0, 0.35), 0 0 40px rgba(0, 0, 0, 0.9);
  position: relative;
  margin-right: -42px;
  z-index: 1;
  user-select: none;
  pointer-events: none;
  flex-shrink: 0;
  transition: -webkit-text-stroke 0.25s ease, text-shadow 0.25s ease;
}

/* Double digit 10 spacing to keep poster full size without distortion */
.top10-card__rank--double {
  letter-spacing: -14px;
  margin-right: -52px;
}

.top10-card:hover .top10-card__rank {
  -webkit-text-stroke: 4px #ff6600;
  text-shadow: 0 0 25px rgba(255, 102, 0, 0.6);
}

.top10-card__poster-box {
  position: relative;
  flex: 0 0 180px;
  width: 180px;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 2/3;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--bg-card);
  z-index: 2;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.top10-card:hover .top10-card__poster-box {
  border-color: rgba(255, 85, 0, 0.6);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 24px rgba(255, 85, 0, 0.3);
}

.top10-card__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.top10-card:hover .top10-card__poster {
  transform: scale(1.05);
}

.top10-card__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 12px 10px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
  color: #fff;
}

.top10-card__title {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.top10-card__meta {
  font-size: 12px;
  color: var(--accent-orange);
  font-weight: 600;
}

/* ==========================================================================
   Thematic Collections
   ========================================================================== */
.collections-section {
  max-width: 1440px;
  margin: 40px auto;
  padding: 0 24px;
}

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

.collection-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16/9;
  background: #1e1e1e;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.collection-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-orange);
}

.collection-card__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65);
  transition: transform var(--transition-smooth);
}

.collection-card:hover .collection-card__cover {
  transform: scale(1.05);
}

.collection-card__content {
  position: absolute;
  inset: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

.collection-card__badge {
  align-self: flex-start;
  background: var(--accent-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.collection-card__title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.collection-card__desc {
  font-size: 12px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Filter & Sorting Bar
   ========================================================================== */
.filters-bar {
  max-width: 1440px;
  margin: 30px auto 0;
  padding: 0 24px;
}

.filters-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  flex-wrap: wrap;
}

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

.filter-group label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.filter-select {
  background: #202020;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: var(--transition-fast);
}

.filter-select:focus,
.filter-select:hover {
  border-color: var(--accent-orange);
}

.filter-reset-btn {
  margin-left: auto;
}

/* ==========================================================================
   Personal User Actions in Details Modal
   ========================================================================== */
.modal__user-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 14px;
}

.btn-action-fav,
.btn-action-watched {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  min-height: 42px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  transition: var(--transition-fast);
  box-sizing: border-box;
}

.btn-action-fav:hover,
.btn-action-watched:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-action-fav svg,
.btn-action-watched svg {
  width: 15px;
  height: 15px;
}

.btn-action-fav.active {
  background: rgba(255, 85, 0, 0.15);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.btn-action-watched.active {
  background: rgba(59, 179, 59, 0.15);
  border-color: var(--rating-green);
  color: var(--rating-green);
}

.modal__user-score-box {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.user-score-badge strong {
  color: var(--accent-orange);
  font-size: 14px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  font-size: 11px;
}

.btn-link:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   Rating Dialog Modal (1-10 Stars)
   ========================================================================== */
.rating-dialog-box {
  padding: 24px;
  text-align: center;
}

.rating-dialog-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.rating-dialog-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.rating-stars-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}

.star-btn {
  background: transparent;
  border: none;
  font-size: 32px;
  color: #444;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
  padding: 2px;
}

.star-btn:hover,
.star-btn.hovered,
.star-btn.selected {
  color: #ffaa00;
  transform: scale(1.2);
}

.rating-feedback-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-orange);
  min-height: 22px;
  margin-bottom: 24px;
}

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

/* ==========================================================================
   User Library Modal (Favorites & History)
   ========================================================================== */
.library-modal-container {
  max-width: 900px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.library-modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.library-tabs {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.library-tab {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.library-tab.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
}

.library-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.library-item-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: var(--transition-fast);
}

.library-item-row:hover {
  border-color: var(--border-hover);
}

.library-item-poster {
  width: 50px;
  height: 75px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.library-item-info {
  flex: 1;
}

.library-item-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

.library-item-title:hover {
  color: var(--accent-orange);
}

.library-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.library-item-score {
  background: rgba(255, 85, 0, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(255, 85, 0, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 12px;
}

/* ==========================================================================
   Auth Modal (Login / Register)
   ========================================================================== */
.auth-box {
  padding: 24px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 24px;
}

.auth-tab {
  padding: 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.auth-tab.active {
  background: var(--accent-orange);
  color: #fff;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-error {
  background: rgba(255, 51, 51, 0.15);
  border: 1px solid var(--rating-red);
  color: #ff8888;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}

/* Player Voice, Quality & Toolbar enhancements */
.player-voice-group,
.player-quality-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-select--inline {
  padding: 4px 8px;
  font-size: 12px;
  background: #252525;
  border-radius: 6px;
  color: #fff;
}

/* --- Live New Releases Toast --- */
.live-toast {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  background: rgba(22, 24, 38, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 85, 0, 0.45);
  border-radius: 50px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 24px rgba(255, 85, 0, 0.25);
  margin: 0 auto 24px auto;
  animation: liveToastSlide 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 20;
}

.live-toast__icon {
  font-size: 16px;
  animation: pulseIcon 1.5s infinite ease-in-out;
}

.live-toast__text {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

.live-toast__btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  background: linear-gradient(135deg, #ff5500 0%, #ff7733 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.live-toast__btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(255, 85, 0, 0.5);
}

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

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

/* --- Catalog Infinite Scroll Sentinel --- */
.catalog-sentinel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 0;
  gap: 12px;
  width: 100%;
  transition: opacity 0.3s ease;
}

.catalog-sentinel.hidden {
  display: none !important;
}

.catalog-sentinel__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-orange, #ff5500);
  border-radius: 50%;
  animation: spinSentinel 0.8s linear infinite;
}

.catalog-sentinel__text {
  font-size: 13px;
  color: var(--text-muted, #8b8f9e);
  font-weight: 500;
  letter-spacing: 0.3px;
}

@keyframes spinSentinel {
  to { transform: rotate(360deg); }
}

/* --- Smooth Card Entrance --- */
.card--fade-in {
  animation: cardFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Comprehensive Mobile Responsive System (iPhone, Android, Tablets)
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --header-height: auto;
  }

  /* Global Container Overflows */
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
  }

  /* --- Mobile Header & Navigation --- */
  .header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    min-height: auto;
    padding: 10px 0 6px;
    background: rgba(18, 18, 20, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
  }

  .header__container {
    padding: 0 14px;
    display: grid;
    grid-template-areas:
      "logo right"
      "search search"
      "nav nav";
    grid-template-columns: 1fr auto;
    gap: 10px 8px;
    align-items: center;
    max-width: 100%;
    overflow: visible;
  }

  .header__left {
    display: contents;
  }

  .logo {
    grid-area: logo;
    font-size: 17px;
    gap: 8px;
    min-width: 0;
  }

  .logo__img {
    width: 32px;
    height: 32px;
  }

  .header__right {
    grid-area: right;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .header__right .action-btn {
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
  }

  .header__right .action-btn svg {
    width: 17px;
    height: 17px;
  }

  .header__right .btn-label-desktop {
    display: none !important;
  }

  .downloads-badge-btn {
    width: 36px;
    height: 36px;
    padding: 0;
  }

  .downloads-badge-btn svg {
    width: 17px;
    height: 17px;
  }

  #authOpenBtn {
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
  }

  #authOpenBtn svg {
    width: 17px;
    height: 17px;
    margin: 0;
  }

  #authOpenBtn span {
    display: none !important;
  }

  .user-avatar-btn {
    padding: 0 !important;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .user-avatar-circle {
    margin: 0;
    width: 32px;
    height: 32px;
  }

  .user-avatar-name,
  .user-avatar-btn .chevron-icon {
    display: none !important;
  }

  .profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 270px;
    max-width: calc(100vw - 20px);
    z-index: 1000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
  }

  .header__center {
    grid-area: search;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .search-bar__input {
    height: 38px;
    font-size: 13px;
    padding: 0 34px 0 36px;
  }

  .search-bar__icon {
    left: 12px;
    width: 16px;
    height: 16px;
  }

  .nav {
    grid-area: nav;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding: 2px 0 4px;
    width: 100%;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav__btn {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 16px;
  }

  /* --- Mobile Hero Banner --- */
  .hero {
    position: relative;
    display: block;
    height: 510px;
    min-height: 510px;
    padding: 0;
    overflow: hidden;
  }

  .hero__slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .hero__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 0;
  }

  .hero__backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
  }

  .hero__overlay {
    background:
      linear-gradient(180deg, rgba(17, 17, 19, 0.92) 0%, rgba(17, 17, 19, 0.2) 20%, transparent 35%),
      linear-gradient(0deg, #111113 0%, rgba(17, 17, 19, 0.97) 55%, rgba(17, 17, 19, 0.4) 80%, transparent 100%);
  }

  .hero__slide-inner {
    position: relative;
    z-index: 3;
    padding: 16px 16px 58px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    max-width: 100%;
  }

  .hero__content {
    max-width: 100%;
    width: 100%;
  }

  .hero__poster-showcase {
    display: none !important;
  }

  .hero__title {
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 6px;
    font-weight: 800;
  }

  .hero__description {
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 12px;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
  }

  .badge {
    font-size: 11px;
    padding: 3px 8px;
  }

  .hero__actions {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-bottom: 0;
  }

  .hero__actions .btn {
    flex: 1;
    padding: 12px 10px;
    font-size: 13px;
    font-weight: 600;
    justify-content: center;
    border-radius: 22px;
  }

  .hero__controls {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 5;
    pointer-events: auto;
  }

  .hero__arrow {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .hero__dot {
    width: 8px;
    height: 8px;
  }

  .hero__dot.active {
    width: 20px;
  }

  /* --- Mobile Continue Watching Section --- */
  .continue-watching-section {
    margin-top: 24px;
    padding: 0 16px;
  }

  .continue-card {
    flex: 0 0 210px;
  }

  .continue-card__remove-btn {
    opacity: 1; /* Always visible on mobile for easy dismissal */
  }

  .continue-card__play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.85);
    background: rgba(255, 85, 0, 0.85);
  }

  .continue-watching-nav-btn {
    display: none !important;
  }

  /* --- Mobile Top 10 Section --- */
  .top10-section {
    margin-top: 28px;
    padding: 0 16px;
  }

  .section-title {
    font-size: 20px;
  }

  .section-subtitle {
    font-size: 13px;
  }

  .top10-nav-btn {
    display: none !important;
  }

  .top10-carousel {
    padding: 14px 4px 22px;
    gap: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .top10-carousel::-webkit-scrollbar {
    display: none;
  }

  .top10-card {
    scroll-snap-align: start;
  }

  .top10-card__rank {
    font-size: 88px;
    margin-right: -24px;
    -webkit-text-stroke: 2.5px rgba(255, 85, 0, 0.9);
  }

  .top10-card__rank--double {
    letter-spacing: -8px;
    margin-right: -32px;
  }

  .top10-card__poster-box {
    flex: 0 0 130px;
    width: 130px;
    border-radius: 10px;
  }

  .top10-card__title {
    font-size: 12px;
  }

  /* --- Mobile Collections Section --- */
  .collections-section {
    margin: 28px auto;
    padding: 0 16px;
  }

  .collections-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* --- Mobile Filters Bar --- */
  .filters-bar {
    margin-top: 20px;
    padding: 0 16px;
  }

  .filters-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
  }

  .filter-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
  }

  .filter-group:nth-of-type(3) {
    grid-column: 1 / -1;
  }

  .filter-group label {
    font-size: 12px;
  }

  .filter-select {
    width: 100%;
    padding: 9px 10px;
    font-size: 13px;
    border-radius: 8px;
  }

  .filter-reset-btn {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
    justify-content: center;
    padding: 9px;
    font-size: 13px;
  }

  /* --- Mobile Catalog Grid & Cards --- */
  .catalog-section {
    margin-top: 24px;
    padding: 0 16px;
  }

  .movies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    min-height: 300px;
  }

  .movie-card__info {
    padding: 8px 10px 10px;
  }

  .movie-card__title {
    font-size: 13px;
  }

  .movie-card__meta {
    font-size: 12px;
  }

  @media (hover: none) {
    .movie-card:hover {
      transform: none;
      box-shadow: none;
    }
  }

  .pagination {
    margin-top: 20px;
    gap: 4px;
  }

  .pagination__btn {
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    font-size: 12px;
    border-radius: 6px;
  }

  .pagination__btn--nav {
    padding: 0 8px;
    font-size: 11px;
  }

  /* --- Mobile Media Details Modal --- */
  .modal {
    padding: 0;
    overflow: hidden;
  }

  .modal__container {
    width: 100vw;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    transform: none !important;
    transition: none !important;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .modal__close {
    position: fixed;
    top: max(14px, env(safe-area-inset-top, 14px));
    right: 14px;
    width: 42px;
    height: 42px;
    font-size: 20px;
    z-index: 10001;
    background: rgba(18, 18, 22, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.85);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
  }

  .modal__close svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
  }

  .modal__close:active {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    transform: scale(0.92);
  }

  .modal__backdrop {
    height: 180px;
  }

  .modal__body {
    padding: 0 16px 36px;
    grid-template-columns: 1fr;
    margin-top: -60px;
    gap: 18px;
  }

  .modal__left {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: static;
  }

  .modal__poster-wrapper {
    width: 150px;
    max-width: 150px;
    margin: 0 auto 14px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
  }

  .modal__user-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin: 0 0 10px 0;
  }

  .btn-action-fav,
  .btn-action-watched {
    padding: 10px 8px;
    font-size: 12px;
    min-height: 40px;
  }

  .modal__action-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 6px;
  }

  .modal__action-buttons .btn {
    width: 100% !important;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    justify-content: center;
  }

  .modal__user-score-box {
    width: 100%;
    margin-top: 6px;
    margin-bottom: 8px;
  }

  .modal__right {
    width: 100%;
    min-width: 0;
  }

  .modal__title {
    font-size: 22px;
    text-align: center;
    line-height: 1.25;
    margin-bottom: 4px;
  }

  .modal__orig-title {
    font-size: 13px;
    text-align: center;
    margin-bottom: 12px;
  }

  .modal__meta-row {
    justify-content: center;
    gap: 6px;
    margin-bottom: 14px;
  }

  .modal__synopsis {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 18px;
  }

  .table-row {
    grid-template-columns: 95px 1fr;
    font-size: 13px;
    gap: 8px;
  }

  .table-label {
    font-size: 12px;
  }

  .table-value {
    font-size: 13px;
  }

  .modal-tabs {
    display: flex !important;
    width: 100% !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 4px !important;
    flex-wrap: nowrap !important;
  }

  .modal-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .modal-tab {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    min-width: max-content !important;
    width: auto !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    justify-content: center !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  .modal-tab span {
    white-space: nowrap !important;
    overflow: visible !important;
    display: inline-block !important;
  }

  .modal-tab svg {
    flex-shrink: 0 !important;
  }

  .player-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 10px;
  }

  .player-sources-group {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
  }

  .player-source-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .player-voice-group,
  .player-quality-group {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .player-voice-group .form-select,
  .player-quality-group .form-select {
    flex: 1;
    margin-left: 8px;
  }

  .player-theater-btn {
    display: none !important;
  }

  .cinema-player-wrapper {
    aspect-ratio: 16 / 9;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
  }

  .series-block {
    margin-top: 14px;
  }

  .seasons-tabs {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 8px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .seasons-tabs::-webkit-scrollbar {
    display: none;
  }

  .season-tab {
    flex-shrink: 0;
    padding: 7px 14px;
    font-size: 12px;
    border-radius: 6px;
  }

  .episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 6px;
    max-height: 240px;
    padding: 2px;
  }

  .episode-btn {
    min-width: unset;
    width: 100%;
    padding: 8px 8px;
    font-size: 12px;
    border-radius: 6px;
  }

  .download-box__options {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .download-box__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .download-box__footer .btn {
    width: 100%;
    justify-content: center;
  }
}


