/* ===== STYLE BLOCK 1 ===== */
:root {
      --primary: #e50914;
      --primary-hover: #f40612;
      --primary-glow: rgba(229, 9, 20, 0.4);
      --bg-dark: #000000;
      --bg-card: #141414;
      --bg-elevated: #1a1a1a;
      --bg-modal: rgba(0, 0, 0, 0.85);
      --text-primary: #f3eee3;
      --text-secondary: #c2b8ab;
      --text-muted: #8f857a;
      --border-color: #333333;
      --success: #46d369;
      --warning: #f5c518;
      --gradient-hero: linear-gradient(to top, var(--bg-dark) 0%, transparent 60%),
                       linear-gradient(to right, rgba(0,0,0,0.9) 0%, transparent 50%);
      --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.5);
      --shadow-glow: 0 0 30px var(--primary-glow);
      --transition-fast: 0.15s ease;
      --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
      --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
      --header-height: 60px;
      --sidebar-width: 248px;
      --sidebar-collapsed-width: 88px;
    }

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

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      background-color: var(--bg-dark);
      color: var(--text-primary);
      min-height: 100vh;
      overflow-x: hidden;
      padding-bottom: 70px;
      transition: padding-left var(--transition-normal), padding-bottom var(--transition-normal);
    }

    svg {
      fill: currentColor;
    }

    body.no-scroll {
      overflow: hidden;
    }

    a {
      text-decoration: none;
      color: inherit;
    }

    button {
      font-family: inherit;
      cursor: pointer;
      border: none;
      outline: none;
      background: transparent;
    }

    img {
      display: block;
      max-width: 100%;
    }

    .hide-scrollbar {
      -ms-overflow-style: none;
      scrollbar-width: none;
    }

    .hide-scrollbar::-webkit-scrollbar {
      display: none;
    }
.right-back {
  position: absolute;
  top: 10px;
  right: 10px;
}
.back-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
  color: #000;
  height: 32px;          /* 🔥 fixed height */
  padding: 0 12px;       /* 🔥 vertical padding remove */
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
}


.back-tag i {
  font-size: 12px;
}
.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.hide-header .header {
  display: none;
}


    /* ==================== APPEARANCE MODES ==================== */
    body.white-mode {
      --bg-dark: #f5f7fb;
      --bg-card: #ffffff;
      --bg-elevated: #eef2f7;
      --bg-modal: rgba(245, 247, 251, 0.88);
      --text-primary: #101828;
      --text-secondary: #475467;
      --text-muted: #667085;
      --border-color: #d0d5dd;
      --shadow-card: 0 10px 30px rgba(16, 24, 40, 0.08);
      --shadow-glow: 0 0 0 rgba(0,0,0,0);
    }

    body.white-mode {
      background: var(--bg-dark);
      color: var(--text-primary);
    }

    body.white-mode .header.scrolled,
    body.white-mode .header:not(.scrolled) {
      background: rgba(255, 255, 255, 0.82);
      backdrop-filter: blur(18px);
      box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
      border-bottom: 1px solid rgba(16, 24, 40, 0.06);
    }

    body.white-mode .menu-toggle,
    body.white-mode .header-icon,
    body.white-mode .cine-sidebar-toggle,
    body.white-mode .top-search-shell,
    body.white-mode .cine-side-item,
    body.white-mode .cine-quick-card,
    body.white-mode .search-input-wrapper,
    body.white-mode .settings-card,
    body.white-mode .settings-item,
    body.white-mode .language-popup,
    body.white-mode .telegram-card,
    body.white-mode .community-section,
    body.white-mode .comment-box,
    body.white-mode .season-select,
    body.white-mode .episode-item,
    body.white-mode .details-rating,
    body.white-mode .bottom-nav,
    body.white-mode .player-close,
    body.white-mode .toast,
    body.white-mode .continue-watching-card {
      background: rgba(255, 255, 255, 0.88);
      border-color: rgba(16, 24, 40, 0.08);
      color: var(--text-primary);
      box-shadow: 0 12px 28px rgba(16, 24, 40, 0.06);
    }

    body.white-mode .top-search-shell {
      background: rgba(255, 255, 255, 0.76);
      border-color: rgba(16, 24, 40, 0.08);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 10px 24px rgba(16, 24, 40, 0.06);
      color: var(--text-secondary);
    }

    body.white-mode .top-search-shell:hover {
      background: rgba(255, 255, 255, 0.92);
      color: var(--text-primary);
    }

    body.white-mode .cine-sidebar {
      background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,249,252,0.98));
      border-right: 1px solid rgba(16, 24, 40, 0.08);
      box-shadow: 24px 0 60px rgba(16, 24, 40, 0.08);
    }

    body.white-mode .sidebar-backdrop {
      background: rgba(15, 23, 42, 0.18);
    }

    body.white-mode .cine-safe-pill {
      background: rgba(16, 24, 40, 0.04);
      border-color: rgba(16, 24, 40, 0.08);
    }

    body.white-mode .cine-side-item,
    body.white-mode .cine-quick-card {
      background: rgba(16, 24, 40, 0.03);
      border-color: rgba(16, 24, 40, 0.06);
      color: var(--text-secondary);
    }

    body.white-mode .cine-side-item.active {
      background: linear-gradient(135deg, rgba(229, 9, 20, 0.14), rgba(16, 24, 40, 0.03));
      color: var(--text-primary);
    }

    body.white-mode .movie-card,
    body.white-mode .settings-card,
    body.white-mode .search-card,
    body.white-mode .continue-watching-card {
      background: var(--bg-card);
      border: 1px solid rgba(16, 24, 40, 0.06);
    }

    body.white-mode .card-overlay,
    body.white-mode .continue-watching-overlay {
      background: linear-gradient(to top, rgba(15,23,42,0.84) 0%, transparent 50%);
    }

    body.white-mode .hero-overview,
    body.white-mode .details-overview,
    body.white-mode .bookmarks-subtitle,
    body.white-mode .settings-subtitle,
    body.white-mode .settings-item-value,
    body.white-mode .empty-state,
    body.white-mode .comment-item,
    body.white-mode .community-rating-hint,
    body.white-mode .episode-name,
    body.white-mode .episode-overview {
      color: var(--text-secondary);
    }

    body.white-mode .continue-watching-title,
    body.white-mode .hero-title,
    body.white-mode .details-title,
    body.white-mode .bookmarks-title,
    body.white-mode .settings-title,
    body.white-mode .community-title,
    body.white-mode .card-title,
    body.white-mode .cast-name,
    body.white-mode .cast-character,
    body.white-mode .search-results-title {
      color: var(--text-primary);
    }

    body.white-mode .back-tag,
    body.white-mode .details-tag,
    body.white-mode .hero-tag {
      background: rgba(229, 9, 20, 0.12);
      color: #a1141a;
      border: 1px solid rgba(229, 9, 20, 0.18);
    }

    body.white-mode .profile-input,
    body.white-mode .community-input,
    body.white-mode .community-textarea,
    body.white-mode .search-input,
    body.white-mode .season-select {
      background: rgba(255, 255, 255, 0.92);
      color: var(--text-primary);
      border-color: rgba(16, 24, 40, 0.12);
    }

    body.white-mode .nav-item,
    body.white-mode .settings-item-right,
    body.white-mode .row-see-all,
    body.white-mode .card-meta,
    body.white-mode .continue-watching-meta,
    body.white-mode .hero-year,
    body.white-mode .hero-rating,
    body.white-mode .details-meta {
      color: var(--text-secondary);
    }
    body.white-mode .continue-badge,
    body.white-mode .continue-remove,
    body.white-mode .continue-progress-text,
    body.white-mode .continue-progress-text span:last-child {
      color: var(--text-primary);
    }

    body.white-mode .continue-badge,
    body.white-mode .continue-remove,
    body.white-mode .continue-progress-wrap {
      background: rgba(15, 23, 42, 0.05);
      border-color: rgba(15, 23, 42, 0.08);
      box-shadow: none;
    }

    body.white-mode .continue-watching-title {
      color: var(--text-primary);
      text-shadow: none;
    }

    body.white-mode .continue-watching-meta span {
      background: rgba(15, 23, 42, 0.05);
      border-color: rgba(15, 23, 42, 0.08);
      color: var(--text-secondary);
    }

    body.white-mode .telegram-title {
      color: var(--text-primary);
    }

    body.white-mode .telegram-text,
    body.white-mode .settings-item-value,
    body.white-mode .bookmarks-subtitle,
    body.white-mode .empty-state p {
      color: var(--text-secondary);
    }

    body.white-mode .settings-item-icon,
    body.white-mode .menu-toggle,
    body.white-mode .header-icon,
    body.white-mode .cine-sidebar-toggle,
    body.white-mode .search-clear,
    body.white-mode .player-close {
      color: var(--text-primary);
    }
    /* ==================== ANIMATIONS ==================== */
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    @keyframes fadeOut {
      from { opacity: 1; }
      to { opacity: 0; }
    }

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

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

    @keyframes slideLeft {
      from { opacity: 0; transform: translateX(50px); }
      to { opacity: 1; transform: translateX(0); }
    }

    @keyframes slideRight {
      from { opacity: 0; transform: translateX(-50px); }
      to { opacity: 1; transform: translateX(0); }
    }

    @keyframes scaleIn {
      from { opacity: 0; transform: scale(0.9); }
      to { opacity: 1; transform: scale(1); }
    }

    @keyframes scaleOut {
      from { opacity: 1; transform: scale(1); }
      to { opacity: 0; transform: scale(0.9); }
    }

    @keyframes popIn {
      0% { opacity: 0; transform: scale(0.5); }
      70% { transform: scale(1.05); }
      100% { opacity: 1; transform: scale(1); }
    }

    @keyframes shimmer {
      0% { background-position: -200% 0; }
      100% { background-position: 200% 0; }
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.5; }
    }

    @keyframes ripple {
      to { transform: scale(4); opacity: 0; }
    }

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

    @keyframes glow {
      0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
      50% { box-shadow: 0 0 40px var(--primary-glow), 0 0 60px var(--primary-glow); }
    }

    @keyframes heroTextIn {
      from { opacity: 0; transform: translateY(40px) scale(0.95); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    @keyframes zoomSlow {
      from { transform: scale(1); }
      to { transform: scale(1.1); }
    }

    .animate-fade-in { animation: fadeIn var(--transition-normal) forwards; }
    .animate-fade-out { animation: fadeOut var(--transition-normal) forwards; }
    .animate-slide-up { animation: slideUp var(--transition-normal) forwards; }
    .animate-slide-down { animation: slideDown var(--transition-normal) forwards; }
    .animate-scale-in { animation: scaleIn var(--transition-normal) forwards; }
    .animate-pop-in { animation: popIn var(--transition-bounce) forwards; }
    #serverList button {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  background: #222;
  color: #fff;
}

#serverList button.active {
  background: red;
}

#inlinePlayer {
  width: 100%;
  height: 100%;
  border: none;
}
#serverList button {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  background: #ffffff;   /* 🔥 white background */
  color: #000;           /* 🔥 black text */
  font-weight: 600;
  border: none;
  transition: all 0.2s ease;
}

#serverList button:hover {
  background: #e6e6e6;
  transform: scale(1.05);
}

#serverList button.active {
  background: var(--primary); /* red active */
  color: #fff;
}
.details-video {
  z-index: 1 !important;
}

.details-gradient {
  z-index: 2 !important;
}
.details-back {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 50;
  width: 44px;
  height: 44px;
  background: #fff;
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.details-gradient {
  display: none;
}
.details-video iframe {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover;
}
.details-info {
  position: relative;
}
.details-back {
  position: absolute;
  top: 5px;
  right: 10px;
  z-index: 100;
  width: 40px;
  height: 40px;
  background: #fff;
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#serverList {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
    /* ==================== LANGUAGE POPUP ==================== */
    .language-overlay {
      position: fixed;
      inset: 0;
      background: var(--bg-modal);
      backdrop-filter: blur(10px);
      z-index: 10000;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      visibility: hidden;
      transition: all var(--transition-normal);
    }

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

    .language-popup {
      background: linear-gradient(145deg, var(--bg-elevated), var(--bg-card));
      border-radius: 20px;
      padding: 40px;
      max-width: 500px;
      width: 90%;
      text-align: center;
      transform: scale(0.8) translateY(50px);
      opacity: 0;
      transition: all var(--transition-slow);
      border: 1px solid var(--border-color);
      box-shadow: var(--shadow-card);
    }

    .language-overlay.active .language-popup {
      transform: scale(1) translateY(0);
      opacity: 1;
    }

    .language-popup-logo {
      font-family: 'Bebas Neue', cursive;
      font-size: 48px;
      color: var(--primary);
      letter-spacing: 4px;
      margin-bottom: 10px;
      text-shadow: 0 0 30px var(--primary-glow);
    }

    .language-popup-title {
      font-size: 24px;
      font-weight: 700;
      margin-bottom: 8px;
    }

    .language-popup-subtitle {
      color: var(--text-secondary);
      font-size: 14px;
      margin-bottom: 30px;
    }

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

    .language-btn {
      padding: 16px 20px;
      background: rgba(255, 255, 255, 0.05);
      border: 2px solid transparent;
      border-radius: 12px;
      color: var(--text-primary);
      font-size: 15px;
      font-weight: 600;
      transition: all var(--transition-normal);
      position: relative;
      overflow: hidden;
    }

    .language-btn:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: var(--primary);
      transform: translateY(-2px);
    }

    .language-btn.selected {
      background: var(--primary);
      border-color: var(--primary);
      box-shadow: var(--shadow-glow);
    }

    .language-btn span {
      display: block;
      font-size: 12px;
      font-weight: 400;
      color: var(--text-muted);
      margin-top: 4px;
    }

    .language-btn.selected span {
      color: rgba(255, 255, 255, 0.8);
    }


    /* ==================== DESKTOP SIDEBAR / TOP BAR ==================== */
    .desktop-only {
      display: none !important;
    }

    .mobile-search {
      display: inline-flex;
    }

    .header-left {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .header-center {
      display: none;
    }

    .header-right {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }

    .menu-toggle,
    .header-icon,
    .cine-sidebar-toggle,
    .top-search-shell,
    .cine-side-item,
    .cine-quick-card {
      color: var(--text-primary);
    }

    .menu-toggle,
    .header-icon,
    .cine-sidebar-toggle {
      width: 42px;
      height: 42px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.08);
      backdrop-filter: blur(14px);
      transition: transform var(--transition-normal), background var(--transition-normal), border-color var(--transition-normal), color var(--transition-normal);
      flex-shrink: 0;
    }

    .menu-toggle:hover,
    .header-icon:hover,
    .cine-sidebar-toggle:hover {
      background: rgba(255,255,255,0.08);
      border-color: rgba(255,255,255,0.16);
      transform: translateY(-1px);
    }

    .menu-toggle svg,
    .header-icon svg,
    .cine-sidebar-toggle svg,
    .top-search-shell svg,
    .cine-side-item svg,
    .cine-quick-card svg {
      width: 20px;
      height: 20px;
      fill: currentColor;
      flex-shrink: 0;
      display: block;
    }
    .menu-toggle,
    .menu-toggle svg {
      color: var(--text-primary);
      opacity: 1;
    }

    body.white-mode .menu-toggle,
    body.white-mode .menu-toggle svg {
      color: var(--text-primary);
    }

    body.sidebar-open .menu-toggle.is-open {
      color: #ffffff;
    }

    .menu-toggle.is-open svg {
      transform: scale(0.98);
    }


    .header {
      padding: 0 16px;
      height: 60px;
    }

    .header-logo {
      display: inline-flex;
      align-items: center;
      transition: transform var(--transition-normal), opacity var(--transition-normal);
    }

    .header-logo:hover {
      transform: scale(1.05);
      opacity: 0.88;
    }

    .header-logo-image {
      height: 34px;
      width: auto;
      max-width: 130px;
      object-fit: contain;
      display: block;
    }

    .header-avatar {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      font-weight: 800;
      box-shadow: 0 10px 24px rgba(229, 9, 20, 0.24);
      background: linear-gradient(135deg, var(--primary), #ff6b6b);
    }

    .top-search-shell {
      width: min(520px, 42vw);
      height: 46px;
      padding: 0 16px;
      display: flex;
      align-items: center;
      gap: 10px;
      border-radius: 999px;
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(255,255,255,0.10);
      color: var(--text-secondary);
      cursor: pointer;
      transition: all var(--transition-normal);
      overflow: hidden;
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 24px rgba(0,0,0,0.18);
    }

    .top-search-shell:hover {
      background: rgba(255,255,255,0.11);
      border-color: rgba(255,255,255,0.18);
      transform: translateY(-1px);
      color: var(--text-primary);
    }

    .top-search-shell span {
      font-size: 14px;
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .cine-sidebar {
      position: fixed;
      top: 0;
      left: 0;
      width: min(86vw, 320px);
      height: 100dvh;
      z-index: 2600;
      transform: translateX(-105%);
      transition: transform var(--transition-normal), width var(--transition-normal), box-shadow var(--transition-normal);
      background: linear-gradient(180deg, rgba(10,10,10,0.98), rgba(16,16,16,0.96));
      border-right: 1px solid rgba(255,255,255,0.08);
      box-shadow: 24px 0 60px rgba(0,0,0,0.45);
      backdrop-filter: blur(18px);
      overflow: hidden;
    }

    .cine-sidebar.open {
      transform: translateX(0);
    }

    .cine-sidebar-inner {
      height: 100%;
      display: flex;
      flex-direction: column;
      gap: 16px;
      padding: 16px;
      overflow-y: auto;
      scrollbar-width: none;
    }

    .cine-sidebar-inner::-webkit-scrollbar {
      display: none;
    }

    .cine-sidebar-brand {
      display: flex;
      align-items: center;
      gap: 12px;
      min-height: 58px;
    }

    .cine-brand {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .cine-brand-mark {
      width: 42px;
      height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 14px;
      background: linear-gradient(135deg, var(--primary), rgba(255, 107, 107, 0.75));
      color: #fff;
      font-family: 'Bebas Neue', cursive;
      font-size: 22px;
      letter-spacing: 1px;
      box-shadow: 0 14px 28px rgba(229, 9, 20, 0.24);
      flex-shrink: 0;
    }
    .cine-brand-mark {
      overflow: hidden;
    }

    .cine-brand-mark img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      border-radius: inherit;
    }


    .cine-brand-text {
      font-family: 'Bebas Neue', cursive;
      font-size: 24px;
      letter-spacing: 2px;
      color: var(--text-primary);
      white-space: nowrap;
    }

    .cine-sidebar-section {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 4px 0;
    }

    .cine-sidebar-label {
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 1.4px;
      text-transform: uppercase;
      color: var(--text-muted);
      padding: 0 6px;
    }

    .cine-side-item,
    .cine-quick-card {
      width: 100%;
      border-radius: 18px;
      padding: 14px 14px;
      display: flex;
      align-items: center;
      gap: 12px;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.06);
      text-align: left;
      transition: transform var(--transition-normal), background var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
      color: var(--text-secondary);
    }

    .cine-side-item:hover,
    .cine-quick-card:hover {
      transform: translateY(-1px);
      background: rgba(255,255,255,0.07);
      border-color: rgba(255,255,255,0.12);
      color: var(--text-primary);
      box-shadow: 0 12px 26px rgba(0,0,0,0.25);
    }

    .cine-side-item.active {
      background: linear-gradient(135deg, rgba(229,9,20,0.18), rgba(255,255,255,0.04));
      border-color: rgba(229,9,20,0.4);
      color: #fff;
      box-shadow: 0 0 0 1px rgba(229,9,20,0.12), 0 12px 32px rgba(229,9,20,0.12);
    }

    .cine-side-item span,
    .cine-quick-card strong,
    .cine-quick-card span {
      line-height: 1.2;
    }

    .cine-side-item svg,
    .cine-quick-card svg {
      width: 20px;
      height: 20px;
      flex-shrink: 0;
      color: currentColor;
      opacity: 0.95;
    }

    .cine-side-item span {
      font-size: 15px;
      font-weight: 600;
    }

    .cine-quick-card strong {
      display: block;
      font-size: 14px;
      color: var(--text-primary);
      margin-bottom: 2px;
    }

    .cine-quick-card span {
      display: block;
      font-size: 12px;
      color: var(--text-muted);
    }

    .cine-sidebar-footer {
      margin-top: auto;
      padding: 8px 6px 6px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .cine-safe-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      width: fit-content;
      padding: 8px 12px;
      border-radius: 999px;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.08);
      font-size: 12px;
      font-weight: 700;
      color: var(--text-primary);
    }

    .cine-safe-pill span {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--success);
      box-shadow: 0 0 14px rgba(70, 211, 105, 0.5);
      flex-shrink: 0;
    }

    .cine-footer-note {
      font-size: 12px;
      color: var(--text-muted);
      padding: 0 4px;
    }

    .sidebar-backdrop {
      position: fixed;
      inset: 0;
      z-index: 2550;
      background: rgba(0,0,0,0.58);
      backdrop-filter: blur(4px);
      opacity: 0;
      visibility: hidden;
      transition: opacity var(--transition-normal), visibility var(--transition-normal);
    }

    .sidebar-backdrop.active {
      opacity: 1;
      visibility: visible;
    }

    @media (min-width: 1024px) {
      body {
        padding-bottom: 0;
      }

      body.sidebar-open {
        padding-left: var(--sidebar-width);
      }

      body.sidebar-collapsed {
        padding-left: var(--sidebar-collapsed-width);
      }

      body.sidebar-open .header {
        top: 0;
        left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
        height: 68px;
        padding: 0 20px;
      }

      body.sidebar-collapsed .header {
        top: 0;
        left: var(--sidebar-collapsed-width);
        width: calc(100% - var(--sidebar-collapsed-width));
        height: 68px;
        padding: 0 20px;
      }

      .desktop-only {
        display: flex !important;
      }

      .mobile-search {
        display: none !important;
      }

      .header-center {
        display: flex;
        align-items: center;
        flex: 1 1 auto;
        padding: 0 18px;
        min-width: 0;
      }

      .bottom-nav {
        display: none !important;
      }

      .cine-sidebar {
        transform: none;
        width: var(--sidebar-width);
        max-width: none;
      }

      .cine-sidebar.collapsed {
        width: var(--sidebar-collapsed-width);
      }

      .cine-sidebar-inner {
        padding: 18px 12px;
      }

      body.sidebar-collapsed .cine-sidebar-brand {
        justify-content: center;
      }

      body.sidebar-collapsed .cine-sidebar-toggle {
        display: none !important;
      }

      body.sidebar-collapsed .cine-brand {
        width: 100%;
        justify-content: center;
      }

      body.sidebar-collapsed .cine-brand-mark {
        margin: 0 auto;
      }

      body.sidebar-collapsed .cine-brand-text,
      body.sidebar-collapsed .cine-sidebar-label,
      body.sidebar-collapsed .cine-quick-card div,
      body.sidebar-collapsed .cine-footer-note,
      body.sidebar-collapsed .cine-safe-pill {
        display: none !important;
      }

      body.sidebar-collapsed .cine-sidebar-section {
        align-items: center;
      }

      body.sidebar-collapsed .cine-side-item,
      body.sidebar-collapsed .cine-quick-card {
        justify-content: center;
        padding: 14px 10px;
      }

      body.sidebar-collapsed .cine-side-item span {
        display: none;
      }

      body.sidebar-collapsed .cine-quick-card svg {
        margin-right: 0;
      }

      .sidebar-backdrop {
        display: none !important;
      }
    }

    /* ==================== HEADER ==================== */
    .header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1000;
      padding: 0 16px;
      height: 60px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: all var(--transition-normal);
    }

    .header.scrolled {
      background: rgba(0, 0, 0, 0.95);
      backdrop-filter: blur(10px);
      box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    }

    .header:not(.scrolled) {
      background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    }

@media (min-width: 768px) {
  .header {
    padding: 0 48px;
    height: 68px;
  }

 
  :root {
    --header-height: 68px;
  }
}

    .header-logo {
      display: inline-flex;
      align-items: center;
      transition: transform var(--transition-normal), opacity var(--transition-normal);
    }

    .header-logo:hover {
      transform: scale(1.05);
      opacity: 0.88;
    }

    @media (min-width: 768px) {
      .header-logo-image {
        height: 40px;
        max-width: 150px;
      }
    }

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

    .search-toggle {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-primary);
      font-size: 18px;
      transition: all var(--transition-normal);
    }

    .search-toggle:hover {
      background: rgba(255, 255, 255, 0.1);
      transform: scale(1.1);
    }

    .header-avatar {
      width: 32px;
      height: 32px;
      border-radius: 6px;
      background: linear-gradient(135deg, var(--primary), #ff6b6b);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 14px;
      transition: all var(--transition-normal);
    }

    .header-avatar:hover {
      transform: scale(1.1);
      box-shadow: var(--shadow-glow);
    }

    /* ==================== PAGES ==================== */
    .page {
      display: none;
      opacity: 0;
      min-height: 100vh;
    }

    .page.active {
      display: block;
      animation: fadeIn var(--transition-normal) forwards;
    }

    .page.exit {
      animation: fadeOut var(--transition-fast) forwards;
    }

    /* ==================== HERO SECTION ==================== */
    .hero {
      position: relative;
      width: 100%;
      height: 75vh;
      min-height: 450px;
      max-height: 800px;
      overflow: hidden;
    }

    @media (min-width: 768px) {
      .hero {
        height: 85vh;
      }
    }

    .hero-slider {
      position: relative;
      width: 100%;
      height: 100%;
    }

    .hero-slide {
      position: absolute;
      inset: 0;
      opacity: 0;
      transition: opacity 1s ease;
    }

    .hero-slide.active {
      opacity: 1;
      z-index: 1;
    }

    .hero-backdrop {
      position: absolute;
      inset: 0;
      background-size: cover;
      background-position: center top;
      animation: zoomSlow 20s ease-in-out infinite alternate;
    }

    .hero-slide.active .hero-backdrop {
      animation-play-state: running;
    }

    .hero-slide:not(.active) .hero-backdrop {
      animation-play-state: paused;
    }

    .hero-video {
      position: absolute;
      inset: 0;
      pointer-events: none;
      opacity: 0;
      transition: opacity 1s ease;
      z-index: 2;
    }

    .hero-video.playing {
      opacity: 1;
    }

    .hero-video iframe {
      width: 100%;
      height: 100%;
      border: none;
      transform: scale(1.3);
    }

    .hero-gradient {
      position: absolute;
      inset: 0;
      background: linear-gradient(to top, rgba(0,0,0,0.62) 0%, transparent 58%),
                  linear-gradient(to right, rgba(0,0,0,0.58) 0%, transparent 38%);
      z-index: 3;
    }

    .hero-backdrop {
      filter: brightness(1.06) contrast(1.04) saturate(1.05);
    }

    .hero-content {
      position: absolute;
      bottom: 15%;
      left: 16px;
      right: 16px;
      z-index: 10;
      max-width: 600px;
    }

    @media (min-width: 768px) {
      .hero-content {
        left: 48px;
        bottom: 20%;
      }
    }

    .hero-slide.active .hero-content {
      animation: heroTextIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
      opacity: 0;
    }

    .hero-tag {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: var(--primary);
      padding: 6px 14px;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 16px;
    }

    .hero-title {
      font-family: 'Bebas Neue', cursive;
      font-size: 36px;
      line-height: 1.1;
      margin-bottom: 12px;
      text-shadow: 2px 4px 20px rgba(0, 0, 0, 0.8);
      letter-spacing: 2px;
    }

    @media (min-width: 768px) {
      .hero-title {
        font-size: 56px;
        margin-bottom: 16px;
      }
    }

    @media (min-width: 1024px) {
      .hero-title {
        font-size: 72px;
      }
    }

    .hero-meta {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 12px;
      font-size: 13px;
      flex-wrap: wrap;
    }

    .hero-rating {
      display: flex;
      align-items: center;
      gap: 4px;
      color: var(--warning);
      font-weight: 600;
    }

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

    .hero-overview {
      font-size: 14px;
      line-height: 1.6;
      color: var(--text-secondary);
      margin-bottom: 24px;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
      text-shadow: 1px 2px 10px rgba(0, 0, 0, 0.8);
    }

    @media (min-width: 768px) {
      .hero-overview {
        font-size: 16px;
        -webkit-line-clamp: 4;
      }
    }

    .hero-buttons {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 12px 28px;
      border-radius: 6px;
      font-size: 15px;
      font-weight: 600;
      transition: all var(--transition-normal);
      position: relative;
      overflow: hidden;
    }

    .btn::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
      transform: scale(0);
      opacity: 0;
      transition: all 0.5s ease;
    }

    .btn:active::before {
      transform: scale(2);
      opacity: 1;
      transition: 0s;
    }

    .btn-primary {
      background: var(--text-primary);
      color: var(--bg-dark);
    }

    .btn-primary:hover {
      background: rgba(255, 255, 255, 0.85);
      transform: scale(1.05);
      box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
    }

    .btn-secondary {
      background: rgba(109, 109, 110, 0.7);
      color: var(--text-primary);
      backdrop-filter: blur(10px);
    }

    .btn-secondary:hover {
      background: rgba(109, 109, 110, 0.5);
      transform: scale(1.05);
    }

    .btn-icon {
      width: 44px;
      height: 44px;
      padding: 0;
      border-radius: 50%;
      background: rgba(42, 42, 42, 0.6);
      border: 2px solid rgba(255, 255, 255, 0.5);
      color: var(--text-primary);
      font-size: 16px;
      backdrop-filter: blur(10px);
    }

    .btn-icon:hover {
      border-color: var(--text-primary);
      background: rgba(42, 42, 42, 0.9);
      transform: scale(1.15);
    }

    .hero-indicators {
      position: absolute;
      bottom: 5%;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 8px;
      z-index: 10;
    }

    .hero-indicator {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.4);
      transition: all var(--transition-normal);
      cursor: pointer;
    }

    .hero-indicator.active {
      width: 24px;
      border-radius: 4px;
      background: var(--primary);
    }

    .hero-indicator:hover:not(.active) {
      background: rgba(255, 255, 255, 0.7);
      transform: scale(1.2);
    }

    /* ==================== CONTENT SECTION ==================== */
    .content-section {
      position: relative;
      margin-top: -80px;
      z-index: 20;
      padding-bottom: 30px;
    }

    @media (min-width: 768px) {
      .content-section {
        margin-top: -120px;
      }
    }

    /* ==================== MOVIE ROW ==================== */
    .movie-row {
      padding: 20px 0;
    }

    .row-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 16px;
      margin-bottom: 12px;
    }

    @media (min-width: 768px) {
      .row-header {
        padding: 0 48px;
      }
    }

    .row-title {
      font-size: 18px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    @media (min-width: 768px) {
      .row-title {
        font-size: 22px;
      }
    }

    .row-title i {
      color: var(--primary);
    }

    .row-see-all {
      font-size: 13px;
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      gap: 4px;
      transition: all var(--transition-normal);
    }

    .row-see-all:hover {
      color: var(--primary);
      gap: 8px;
    }

    .row-container {
      position: relative;
    }

    .row-slider {
      display: flex;
      gap: 10px;
      padding: 10px 16px;
      overflow-x: auto;
      scroll-behavior: smooth;
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
    }

    @media (min-width: 768px) {
      .row-slider {
        padding: 10px 48px;
        gap: 14px;
      }
    }

    .row-arrow {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 44px;
      height: 100%;
      background: linear-gradient(to right, rgba(0,0,0,0.8), transparent);
      color: var(--text-primary);
      font-size: 24px;
      z-index: 10;
      opacity: 0;
      transition: opacity var(--transition-normal);
      display: none;
      align-items: center;
      justify-content: center;
    }

    @media (min-width: 768px) {
      .row-arrow {
        display: flex;
      }
    }

    .row-container:hover .row-arrow {
      opacity: 1;
    }

    .row-arrow:hover {
      color: var(--primary);
    }

    .row-arrow.left {
      left: 0;
    }

    .row-arrow.right {
      right: 0;
      background: linear-gradient(to left, rgba(0,0,0,0.8), transparent);
    }

    /* ==================== MOVIE CARD ==================== */
    .movie-card {
      flex-shrink: 0;
      scroll-snap-align: start;
      position: relative;
      border-radius: 8px;
      overflow: hidden;
      cursor: pointer;
      transition: all var(--transition-normal);
      background: var(--bg-card);
    }

    .movie-card:hover {
      transform: scale(1.08) translateY(-8px);
      z-index: 100;
      box-shadow: var(--shadow-card), var(--shadow-glow);
    }

    .movie-card.poster {
      width: 130px;
      aspect-ratio: 2/3;
    }

    .movie-card.backdrop {
      width: 200px;
      aspect-ratio: 16/9;
    }

    @media (min-width: 768px) {
      .movie-card.poster {
        width: 160px;
      }
      .movie-card.backdrop {
        width: 280px;
      }
    }

    .movie-card img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform var(--transition-slow);
      filter: brightness(1.02) contrast(1.03) saturate(1.03);
    }

    .movie-card:hover img {
      transform: scale(1.1);
    }

    .card-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 50%);
      opacity: 0;
      transition: opacity var(--transition-normal);
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      padding: 12px;
    }

    .movie-card:hover .card-overlay {
      opacity: 1;
    }

    .card-title {
      font-size: 13px;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 4px;
    }

    .card-meta {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 11px;
      color: var(--text-secondary);
    }

    .card-rating {
      display: flex;
      align-items: center;
      gap: 3px;
      color: var(--warning);
    }

    .card-badge {
      position: absolute;
      top: 8px;
      right: 8px;
      background: rgba(0, 0, 0, 0.75);
      padding: 4px 8px;
      border-radius: 4px;
      font-size: 10px;
      font-weight: 700;
      backdrop-filter: blur(4px);
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .card-badge i {
      color: var(--warning);
    }

    .card-play {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) scale(0);
      width: 50px;
      height: 50px;
      background: var(--primary);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      transition: all var(--transition-bounce);
      box-shadow: var(--shadow-glow);
    }

    .movie-card:hover .card-play {
      transform: translate(-50%, -50%) scale(1);
    }

    /* ==================== CONTINUE WATCHING / WATCH HISTORY ==================== */
    .cw-row .row-title {
      letter-spacing: 0.2px;
    }

    .continue-watching-card {
      position: relative;
      flex-shrink: 0;
      scroll-snap-align: start;
      width: clamp(180px, 18vw, 230px);
      aspect-ratio: 2 / 3;
      border-radius: 18px;
      overflow: hidden;
      cursor: pointer;
      background: linear-gradient(180deg, rgba(24,24,24,0.95), rgba(10,10,10,0.98));
      border: 1px solid rgba(255,255,255,0.08);
      box-shadow: 0 10px 28px rgba(0,0,0,0.45);
      transform: translateY(0);
      transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    }

    .continue-watching-card:hover {
      transform: translateY(-6px) scale(1.03);
      box-shadow: 0 16px 38px rgba(0,0,0,0.65), 0 0 32px rgba(229,9,20,0.2);
      border-color: rgba(229,9,20,0.55);
      z-index: 10;
    }

    .continue-watching-card img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      filter: brightness(0.92) contrast(1.05) saturate(1.08);
      transform: scale(1.001);
      transition: transform var(--transition-slow), filter var(--transition-slow);
    }

    .continue-watching-card:hover img {
      transform: scale(1.08);
      filter: brightness(1) contrast(1.08) saturate(1.1);
    }

    .continue-watching-overlay {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 12px;
      background:
        linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.3) 45%, rgba(0,0,0,0.9) 100%),
        linear-gradient(135deg, rgba(229,9,20,0.16), rgba(0,0,0,0) 48%);
      pointer-events: none;
    }

    .continue-watching-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 8px;
      pointer-events: auto;
    }

    .continue-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      color: #fff;
      background: rgba(0,0,0,0.55);
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255,255,255,0.12);
      box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    }

    .continue-badge.movie {
      background: linear-gradient(135deg, rgba(220,40,60,0.72), rgba(160,20,50,0.6));
      border-color: rgba(220,70,90,0.5);
    }

    .continue-badge.tv {
      background: linear-gradient(135deg, rgba(50,100,200,0.72), rgba(60,60,160,0.6));
      border-color: rgba(80,130,220,0.5);
    }

    .continue-remove {
      width: 30px;
      height: 30px;
      flex: 0 0 30px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(0,0,0,0.58);
      color: #fff;
      border: 1px solid rgba(255,255,255,0.12);
      backdrop-filter: blur(8px);
      transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
      pointer-events: auto;
    }

    .continue-remove:hover {
      background: rgba(229,9,20,0.95);
      transform: scale(1.08);
    }

    .continue-watching-title {
      margin-top: auto;
      font-size: 16px;
      line-height: 1.2;
      font-weight: 800;
      color: #fff;
      text-shadow: 0 2px 12px rgba(0,0,0,0.85);
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      pointer-events: none;
    }

    .continue-watching-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 10px;
      margin-top: 8px;
      font-size: 11px;
      color: rgba(255,255,255,0.82);
      pointer-events: none;
    }

    .continue-watching-meta span {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 5px 8px;
      border-radius: 999px;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.08);
      backdrop-filter: blur(10px);
    }

    .continue-watching-meta i {
      color: var(--warning);
    }

    .continue-progress-wrap {
      margin-top: 10px;
      padding: 10px 10px 11px;
      border-radius: 14px;
      background: rgba(0,0,0,0.36);
      border: 1px solid rgba(255,255,255,0.08);
      backdrop-filter: blur(10px);
      pointer-events: none;
    }

    .continue-progress-text {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      font-size: 11px;
      font-weight: 700;
      color: rgba(255,255,255,0.92);
      margin-bottom: 8px;
    }

    .continue-progress-text span:last-child {
      color: #fff;
    }

    .continue-progress-bar {
      width: 100%;
      height: 10px;
      border-radius: 999px;
      overflow: hidden;
      background: rgba(255,255,255,0.10);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
    }

    .continue-progress-bar span {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, #ff3cac 0%, #784ba0 32%, #2b86c5 66%, #00c853 100%);
      box-shadow: 0 0 18px rgba(43,134,197,0.55);
      position: relative;
      overflow: hidden;
    }

    .continue-progress-bar span::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
      transform: translateX(-100%);
      animation: shimmer 2.2s linear infinite;
    }

    @media (max-width: 767px) {
      .continue-watching-card {
        width: clamp(150px, 42vw, 190px);
        border-radius: 16px;
      }

      .continue-watching-overlay {
        padding: 10px;
      }

      .continue-watching-title {
        font-size: 14px;
      }

      .continue-progress-bar {
        height: 9px;
      }
    }

    /* ==================== SKELETON LOADER ==================== */
    .skeleton {
      background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s infinite;
      border-radius: 8px;
    }

    .skeleton-card {
      flex-shrink: 0;
    }

    .skeleton-card.poster {
      width: 130px;
      aspect-ratio: 2/3;
    }

    .skeleton-card.backdrop {
      width: 200px;
      aspect-ratio: 16/9;
    }

    @media (min-width: 768px) {
      .skeleton-card.poster {
        width: 160px;
      }
      .skeleton-card.backdrop {
        width: 280px;
      }
    }

    /* ==================== DETAILS PAGE ==================== */
.details-page {
  padding-top: 0;
}

/* ==================== BANNER ==================== */
.details-banner {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg-dark);
}


@media (min-width: 768px) {.details-banner {
  position: relative;
  height: 380px; /* একটু বাড়াইলাম */
  overflow: hidden;
}
  .details-poster {
    display: none !important;
  }.details-content {
  position: relative;
  margin-top: 0px;
  padding: 16px;
  background: var(--bg-dark);
  z-index: 10;
}

}
/* ==================== BACKDROP IMAGE ==================== */
.details-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}
/* ==================== VIDEO ==================== */
.details-video.playing {
  opacity: 1;
}
.details-video {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.details-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}


/* ==================== GRADIENT ==================== */
.details-gradient {
  display: none;
}
/* ==================== BACK BUTTON ==================== */
@media (min-width: 768px) {
  .details-back {
    left: 48px;
  }
}

.details-back:hover {
  background: var(--primary);
  transform: scale(1.1);
}

/* ==================== CONTENT OVERLAP ==================== */.details-content {
  position: relative;
  margin-top: -10px; /* একটু বেশি overlap */
  padding: 12px;
  background: var(--bg-dark);
  z-index: 10;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
@media (min-width: 768px) {
  .details-content {
    margin-top: 0 !important;
    padding: 0 48px 30px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 30px;
    max-width: 1200px;
  }
}

/* ==================== POSTER ==================== */
.details-poster {
  display: none;
}

@media (min-width: 768px) {
  .details-poster {
    display: block;
    width: 220px;
    aspect-ratio: 2/3;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    animation: slideUp var(--transition-slow) forwards;
  }

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

/* ==================== INFO ==================== */
.details-info {
  animation: slideUp var(--transition-slow) 0.1s forwards;
  opacity: 0;
}

.details-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary);
  height: 32px;          /* 🔥 same height */
  padding: 0 12px;       /* 🔥 fix alignment */
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
}

    .details-title {
      font-family: 'Bebas Neue', cursive;
      font-size: 36px;
      line-height: 1.1;
      margin-bottom: 12px;
      letter-spacing: 2px;
    }

    @media (min-width: 768px) {
      .details-title {
        font-size: 52px;
      }
    }

    .details-meta {
      display: flex;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;
      margin-bottom: 16px;
      font-size: 14px;
    }

    .details-rating {
      display: flex;
      align-items: center;
      gap: 6px;
      background: rgba(255, 255, 255, 0.1);
      padding: 6px 12px;
      border-radius: 6px;
    }

    .details-rating i {
      color: var(--warning);
    }

    .details-rating span {
      font-weight: 700;
    }

    .match-score {
      color: var(--success);
      font-weight: 700;
    }

    .details-genres {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 20px;
    }

    .genre-pill {
      background: rgba(255, 255, 255, 0.1);
      padding: 6px 14px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 500;
      transition: all var(--transition-normal);
      animation: popIn var(--transition-bounce) forwards;
      opacity: 0;
    }

    .genre-pill:hover {
      background: var(--primary);
      transform: scale(1.05);
    }

    .details-overview {
      font-size: 15px;
      line-height: 1.7;
      color: var(--text-secondary);
      margin-bottom: 24px;
    }

    .details-actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      align-items: center;
      margin-bottom: 30px;
      width: 100%;
    }

    .details-actions .btn-play-large {
      flex: 1 1 170px;
      min-width: 150px;
    }

    .details-actions .btn-icon {
      flex: 0 0 44px;
    }

    .btn-play-large {
      padding: 14px 32px;
      font-size: 16px;
      font-weight: 700;
    }

    /* ==================== CAST SECTION ==================== */
    .cast-section {
      margin-top: 30px;
    }

    .cast-title {
      font-size: 18px;
      font-weight: 700;
      margin-bottom: 16px;
    }

    .cast-list {
      display: flex;
      gap: 16px;
      overflow-x: auto;
      padding-bottom: 10px;
    }

    .cast-item {
      flex-shrink: 0;
      text-align: center;
      width: 80px;
      animation: slideUp var(--transition-normal) forwards;
      opacity: 0;
    }

    .cast-photo {
      width: 70px;
      height: 70px;
      border-radius: 50%;
      object-fit: cover;
      margin: 0 auto 8px;
      background: var(--bg-card);
      border: 3px solid transparent;
      transition: all var(--transition-normal);
    }

    .cast-item:hover .cast-photo {
      border-color: var(--primary);
      transform: scale(1.1);
      box-shadow: var(--shadow-glow);
    }

    .cast-name {
      font-size: 12px;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .cast-character {
      font-size: 10px;
      color: var(--text-muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* ==================== SEASONS & EPISODES ==================== */
    .seasons-section {
      margin-top: 30px;
    }

    .season-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
    }

    .season-title {
      font-size: 18px;
      font-weight: 700;
    }

    .season-select {
      background: var(--bg-elevated);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
      padding: 10px 16px;
      border-radius: 6px;
      font-size: 14px;
      cursor: pointer;
      transition: all var(--transition-normal);
    }

    .season-select:hover {
      border-color: var(--primary);
    }

    .episode-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .episode-item {
      display: flex;
      gap: 14px;
      padding: 14px;
      background: var(--bg-elevated);
      border-radius: 10px;
      cursor: pointer;
      transition: all var(--transition-normal);
      animation: slideRight var(--transition-normal) forwards;
      opacity: 0;
    }

    .episode-item:hover {
      background: var(--bg-card);
      transform: translateX(8px);
      box-shadow: var(--shadow-card);
    }

    .episode-item.active {
      border: 2px solid var(--primary);
      box-shadow: var(--shadow-glow);
    }

    .episode-thumb {
      width: 120px;
      aspect-ratio: 16/9;
      border-radius: 6px;
      object-fit: cover;
      flex-shrink: 0;
      background: var(--bg-card);
    }

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

    .episode-number {
      font-size: 14px;
      font-weight: 700;
      margin-bottom: 4px;
    }

    .episode-name {
      font-size: 12px;
      color: var(--text-secondary);
      margin-bottom: 6px;
    }

    .episode-overview {
      font-size: 11px;
      color: var(--text-muted);
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

.episode-thumb {
  width: 120px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #141414;
}


.episode-thumb.hide {
  display: none;
}
    /* ==================== SEARCH PAGE ==================== */
.search-container {
  padding: 0 16px 20px;
  margin-top: calc(var(--header-height) + 10px);
}

    .search-container {
      padding: 0 16px 20px;
    }

    @media (min-width: 768px) {
  .search-container {
    padding: 0 48px 20px;
    margin-top: calc(var(--header-height) + 10px);
  }
}

    .search-input-wrapper {
      display: flex;
      align-items: center;
      background: var(--bg-elevated);
      border: 2px solid var(--border-color);
      border-radius: 12px;
      padding: 0 16px;
      transition: all var(--transition-normal);
    }

    .search-input-wrapper:focus-within {
      border-color: var(--primary);
      box-shadow: 0 0 20px var(--primary-glow);
    }

    .search-input-wrapper i {
      font-size: 20px;
      color: var(--text-muted);
      margin-right: 12px;
    }

    .search-input {
      flex: 1;
      background: transparent;
      border: none;
      padding: 16px 0;
      font-size: 16px;
      color: var(--text-primary);
    }

    .search-input::placeholder {
      color: var(--text-muted);
    }

    .search-input:focus {
      outline: none;
    }

    .search-clear {
      padding: 8px;
      color: var(--text-muted);
      font-size: 16px;
      transition: all var(--transition-normal);
    }

    .search-clear:hover {
      color: var(--primary);
      transform: scale(1.2);
    }

    .search-results-title {
      font-size: 20px;
      font-weight: 700;
      padding: 20px 16px 16px;
    }

    @media (min-width: 768px) {
      .search-results-title {
        padding: 20px 48px 16px;
      }
    }

    .search-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
      gap: 12px;
      padding: 0 16px;
    }

    @media (min-width: 768px) {
      .search-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
        padding: 0 48px;
      }
    }

    .search-card {
      aspect-ratio: 2/3;
      border-radius: 8px;
      overflow: hidden;
      cursor: pointer;
      position: relative;
      background: var(--bg-card);
      animation: scaleIn var(--transition-normal) forwards;
      opacity: 0;
    }

    .search-card:hover {
      transform: scale(1.05);
      box-shadow: var(--shadow-card);
    }

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

    /* ==================== BOOKMARKS PAGE ==================== */
    .bookmarks-page {
      padding-top: 80px;
    }

    .bookmarks-header {
  padding: 0 16px 20px;
  margin-top: calc(var(--header-height) + 10px);
}

    @media (min-width: 768px) {
  .bookmarks-header {
    padding: 0 48px 20px;
    margin-top: calc(var(--header-height) + 10px);
  }
}

    .bookmarks-title {
      font-size: 28px;
      font-weight: 800;
      margin-bottom: 8px;
    }

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

    .bookmarks-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
      gap: 12px;
      padding: 0 16px;
    }


    .history-toolbar {
      padding: 0 16px 14px;
      display: flex;
      justify-content: flex-end;
    }

    @media (min-width: 768px) {
      .history-toolbar {
        padding: 0 48px 14px;
      }
    }

    .history-clear-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 10px 14px;
      border-radius: 999px;
      background: rgba(229, 9, 20, 0.12);
      border: 1px solid rgba(229, 9, 20, 0.18);
      color: var(--text-primary);
      font-weight: 700;
      transition: transform var(--transition-normal), background var(--transition-normal);
    }

    .history-clear-btn:hover {
      transform: translateY(-1px);
      background: rgba(229, 9, 20, 0.18);
    }

    .history-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 16px;
      padding: 0 16px 24px;
    }

    @media (min-width: 768px) {
      .history-grid {
        padding: 0 48px 24px;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      }
    }

    .history-grid .continue-watching-card {
      width: 100%;
      min-height: 320px;
    }

    .appearance-mode-row {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      width: min(100%, 360px);
    }

    .mode-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 12px 14px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.04);
      color: var(--text-secondary);
      font-weight: 700;
      transition: all var(--transition-normal);
    }

    .mode-pill:hover {
      transform: translateY(-1px);
      border-color: rgba(229, 9, 20, 0.24);
    }

    .mode-pill.active {
      background: linear-gradient(135deg, rgba(229,9,20,0.18), rgba(229,9,20,0.08));
      color: var(--text-primary);
      border-color: rgba(229,9,20,0.28);
      box-shadow: 0 10px 24px rgba(229, 9, 20, 0.08);
    }

    @media (min-width: 768px) {
      .bookmarks-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
        padding: 0 48px;
      }
    }

    .empty-state {
      text-align: center;
      padding: 60px 20px;
      color: var(--text-muted);
    }

    .empty-state i {
      font-size: 60px;
      margin-bottom: 20px;
      opacity: 0.3;
    }

    .empty-state h3 {
      font-size: 20px;
      margin-bottom: 8px;
      color: var(--text-secondary);
    }

    .empty-state p {
      font-size: 14px;
    }

    /* ==================== SETTINGS PAGE ==================== */
    .settings-page {
      padding-top: 80px;
    }

    .settings-header {
  padding: 0 16px 30px;
  margin-top: calc(var(--header-height) + 10px);
}

    @media (min-width: 768px) {
  .settings-header {
    padding: 0 48px 30px;
    margin-top: calc(var(--header-height) + 10px);
  }
}

    .settings-title {
      font-size: 28px;
      font-weight: 800;
      margin-bottom: 8px;
    }

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

    .settings-content {
      padding: 0 16px;
      max-width: 600px;
    }

    @media (min-width: 768px) {
      .settings-content {
        padding: 0 48px;
      }
    }

    .settings-section {
      margin-bottom: 30px;
      animation: slideUp var(--transition-normal) forwards;
      opacity: 0;
    }

    .settings-section-title {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 16px;
    }

    .settings-card {
      background: var(--bg-elevated);
      border-radius: 12px;
      overflow: hidden;
    }

    .settings-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      border-bottom: 1px solid var(--border-color);
      transition: all var(--transition-normal);
    }

    .settings-item:last-child {
      border-bottom: none;
    }

    .settings-item:hover {
      background: rgba(255, 255, 255, 0.02);
    }

    .settings-item-left {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .settings-item-icon {
      width: 40px;
      height: 40px;
      background: rgba(255, 255, 255, 0.05);
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      color: var(--primary);
    }

    .settings-item-label {
      font-size: 15px;
      font-weight: 500;
    }

    .settings-item-value {
      font-size: 13px;
      color: var(--text-muted);
    }

    .settings-item-right {
      color: var(--text-muted);
    }

    /* Profile Input */
    .profile-input {
      background: var(--bg-card);
      border: 2px solid var(--border-color);
      border-radius: 8px;
      padding: 12px 16px;
      font-size: 15px;
      color: var(--text-primary);
      width: 180px;
      transition: all var(--transition-normal);
    }

    .profile-input:focus {
      outline: none;
      border-color: var(--primary);
    }

    /* Theme Colors */
    .theme-colors {
      display: flex;
      gap: 10px;
      overflow-x: auto;
      padding-bottom: 6px;
      max-width: min(100%, 420px);
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: thin;
    }

    .theme-color {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      cursor: pointer;
      transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
      border: 3px solid transparent;
      flex: 0 0 auto;
      scroll-snap-align: center;
    }

    .theme-color:hover {
      transform: translateY(-2px) scale(1.08);
    }

    .theme-color.active {
      border-color: var(--text-primary);
      box-shadow: 0 0 0 2px rgba(255,255,255,0.18), 0 0 15px currentColor;
    }

    .theme-color.red { background: #e50914; }
    .theme-color.blue { background: #0077ff; }
    .theme-color.green { background: #00c853; }
    .theme-color.purple { background: #9c27b0; }
    .theme-color.orange { background: #ff5722; }
    .theme-color.pink { background: #e91e63; }
    .theme-color.teal { background: #00bcd4; }
    .theme-color.indigo { background: #3f51b5; }
    .theme-color.amber { background: #ffb300; }
    .theme-color.lime { background: #cddc39; }
    .theme-color.cyan { background: #18ffff; }
    .theme-color.rose { background: #ff4d6d; }


    .profile-settings-item {
      flex-wrap: wrap;
      gap: 14px;
    }

    .profile-settings-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: flex-end;
    }

    .profile-settings-actions .mode-pill {
      min-height: 42px;
    }

    .profile-settings-actions .mode-pill.danger,
    .profile-action-btn.danger {
      border-color: rgba(229, 9, 20, 0.18);
      color: #b42318;
    }

    .profile-modal-overlay {
      position: fixed;
      inset: 0;
      z-index: 12000;
      display: none;
      align-items: center;
      justify-content: center;
      background: rgba(0,0,0,0.62);
      backdrop-filter: blur(14px);
      padding: 16px;
    }

    .profile-modal-overlay.active {
      display: flex;
    }

    .profile-modal {
      width: min(94vw, 560px);
      border-radius: 24px;
      background: linear-gradient(180deg, rgba(18,18,18,0.98), rgba(10,10,10,0.98));
      border: 1px solid rgba(255,255,255,0.08);
      box-shadow: 0 24px 60px rgba(0,0,0,0.4);
      padding: 18px;
      color: var(--text-primary);
    }

    .profile-modal-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 14px;
    }

    .profile-modal-kicker {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 1.4px;
      color: var(--text-muted);
      margin-bottom: 4px;
      font-weight: 800;
    }

    .profile-modal-header h3 {
      font-size: 22px;
      line-height: 1.15;
      color: var(--text-primary);
    }

    .profile-modal-close {
      width: 42px;
      height: 42px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(255,255,255,0.06);
      color: var(--text-primary);
      border: 1px solid rgba(255,255,255,0.08);
      flex-shrink: 0;
    }

    .profile-avatar-preview {
      width: 88px;
      height: 88px;
      border-radius: 24px;
      margin: 0 auto 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      background: linear-gradient(135deg, var(--primary), #ff7a18);
      color: #fff;
      font-size: 34px;
      font-weight: 900;
      box-shadow: 0 14px 30px rgba(229, 9, 20, 0.22);
      text-transform: uppercase;
    }

    .profile-avatar-preview img,
    .header-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .profile-modal-note {
      color: var(--text-secondary);
      font-size: 14px;
      line-height: 1.5;
      margin-bottom: 16px;
      text-align: center;
    }

    .profile-form-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
      margin-bottom: 14px;
    }

    @media (min-width: 520px) {
      .profile-form-grid {
        grid-template-columns: 1fr 1fr;
      }
    }

    .profile-field {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .profile-field span {
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      color: var(--text-muted);
    }

    .profile-field input {
      width: 100%;
      height: 46px;
      border-radius: 14px;
      padding: 0 14px;
      background: rgba(255,255,255,0.06);
      color: var(--text-primary);
      border: 1px solid rgba(255,255,255,0.08);
      outline: none;
    }

    .profile-field input:focus {
      border-color: rgba(229, 9, 20, 0.5);
      box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.12);
    }

    .profile-action-row {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
    }

    @media (min-width: 520px) {
      .profile-action-row {
        grid-template-columns: 1fr 1fr 1fr;
      }
    }

    .profile-action-btn {
      height: 46px;
      border-radius: 14px;
      background: rgba(255,255,255,0.06);
      color: var(--text-primary);
      border: 1px solid rgba(255,255,255,0.08);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-weight: 700;
      transition: transform var(--transition-normal), background var(--transition-normal), border-color var(--transition-normal);
      padding: 0 12px;
    }

    .profile-action-btn:hover {
      transform: translateY(-1px);
      background: rgba(255,255,255,0.10);
      border-color: rgba(255,255,255,0.14);
    }

    .profile-action-btn.primary {
      background: linear-gradient(135deg, var(--primary), #ff7a18);
      border-color: transparent;
      color: #fff;
    }

    body.white-mode .card-badge {
      background: rgba(15, 23, 42, 0.92);
      color: #fff !important;
      border: 1px solid rgba(255,255,255,0.08);
    }

    body.white-mode .card-badge i {
      color: #f5c518;
    }

    body.white-mode .movie-card img,
    body.white-mode .continue-watching-card img {
      filter: brightness(1) contrast(1.04) saturate(1.03);
    }

    body.white-mode .card-overlay {
      background: linear-gradient(to top, rgba(15,23,42,0.92) 0%, transparent 52%);
    }

    body.white-mode .hero-gradient {
      background: linear-gradient(to top, rgba(255,255,255,0.08) 0%, transparent 58%),
                  linear-gradient(to right, rgba(255,255,255,0.02) 0%, transparent 38%);
    }

    body.white-mode .hero-tag,
    body.white-mode .details-tag,
    body.white-mode .back-tag {
      color: #a1141a;
    }

    body.white-mode .settings-card,
    body.white-mode .settings-item,
    body.white-mode .profile-modal {
      background: rgba(255,255,255,0.94);
      color: var(--text-primary);
      border-color: rgba(16, 24, 40, 0.08);
    }

    body.white-mode .profile-modal-close,
    body.white-mode .profile-field input,
    body.white-mode .profile-action-btn {
      background: rgba(15, 23, 42, 0.04);
      color: var(--text-primary);
      border-color: rgba(15, 23, 42, 0.08);
    }

    body.white-mode .profile-action-btn.primary {
      background: linear-gradient(135deg, rgba(229,9,20,0.95), rgba(255,122,24,0.95));
      color: #fff;
      border-color: transparent;
    }

    /* ==================== BOTTOM NAVIGATION ==================== */
    .bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      height: 60px;
      background: linear-gradient(to top, var(--bg-dark) 60%, transparent);
      backdrop-filter: blur(20px);
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: space-around;
      padding: 0 16px;
    }

    @media (min-width: 768px) {
      .bottom-nav {
        height: 70px;
      }
    }

    .nav-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      padding: 8px 16px;
      color: var(--text-muted);
      font-size: 10px;
      font-weight: 500;
      transition: all var(--transition-normal);
      position: relative;
    }

    .nav-item i {
      font-size: 22px;
      transition: all var(--transition-normal);
    }

    .nav-item.active {
      color: var(--primary);
    }

    .nav-item.active i {
      transform: scale(1.15);
    }

    .nav-item::before {
      content: '';
      position: absolute;
      top: -4px;
      left: 50%;
      transform: translateX(-50%) scaleX(0);
      width: 20px;
      height: 3px;
      background: var(--primary);
      border-radius: 2px;
      transition: transform var(--transition-normal);
    }

    .nav-item.active::before {
      transform: translateX(-50%) scaleX(1);
    }

    .nav-item:hover:not(.active) {
      color: var(--text-secondary);
    }

    .nav-item:hover:not(.active) i {
      transform: translateY(-2px);
    }

    /* ==================== PLAYER MODAL ==================== */
    .player-modal {
      position: fixed;
      inset: 0;
      background: var(--bg-dark);
      z-index: 5000;
      display: none;
      opacity: 0;
    }

    .player-modal.active {
      display: block;
      animation: fadeIn var(--transition-normal) forwards;
    }

    .player-modal.closing {
      animation: fadeOut var(--transition-normal) forwards;
    }

    .player-topbar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 56px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 12px;
      background: linear-gradient(to bottom, rgba(0,0,0,0.92), transparent);
      z-index: 9999;
      pointer-events: all;
    }

    .player-back-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: rgba(255,255,255,0.12);
      border: 1.5px solid rgba(255,255,255,0.18);
      color: #fff;
      font-size: 13px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
      padding: 0 16px;
      height: 40px;
      border-radius: 8px;
      cursor: pointer;
      backdrop-filter: blur(10px);
      transition: all 0.2s ease;
    }

    .player-back-btn:hover, .player-back-btn:active {
      background: var(--primary);
      border-color: var(--primary);
    }

    .player-close {
      width: 40px;
      height: 40px;
      background: rgba(0, 0, 0, 0.6);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      border: 1.5px solid rgba(255,255,255,0.15);
      cursor: pointer;
      transition: all var(--transition-normal);
      backdrop-filter: blur(10px);
    }

    .player-close:hover {
      background: var(--primary);
      transform: scale(1.1) rotate(90deg);
    }

    .player-iframe {
      width: 100%;
      height: 100%;
      border: none;
    }

    /* ==================== TOAST ==================== */
    .toast-container {
      position: fixed;
      bottom: 80px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 6000;
      display: flex;
      flex-direction: column;
      gap: 10px;
      align-items: center;
    }

    .toast {
      background: var(--bg-elevated);
      color: var(--text-primary);
      padding: 14px 24px;
      border-radius: 10px;
      font-size: 14px;
      font-weight: 500;
      box-shadow: var(--shadow-card);
      animation: popIn var(--transition-bounce) forwards;
      display: flex;
      align-items: center;
      gap: 10px;
      backdrop-filter: blur(10px);
      border: 1px solid var(--border-color);
    }

    .toast i {
      font-size: 18px;
    }

    .toast.success i { color: var(--success); }
    .toast.error i { color: var(--primary); }
    .toast.info i { color: #00bcd4; }

    .toast.exit {
      animation: fadeOut var(--transition-normal) forwards;
    }

    /* ==================== RIPPLE EFFECT ==================== */
    .ripple {
      position: absolute;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.4);
      transform: scale(0);
      animation: ripple 0.6s linear;
      pointer-events: none;
    }

    /* ==================== LOADING OVERLAY ==================== */
    .loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(229, 9, 20, 0.18), transparent 30%),
    radial-gradient(circle at 80% 30%, rgba(120, 75, 160, 0.18), transparent 28%),
    radial-gradient(circle at 50% 80%, rgba(43, 134, 197, 0.14), transparent 26%),
    rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.loading-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.08) 20%, transparent 40%),
    linear-gradient(300deg, transparent 0%, rgba(255,255,255,0.06) 25%, transparent 50%);
  pointer-events: none;
}

.loading-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
}
.glass-content {
  text-align: center !important;
  width: 100% !important;
  max-width: 600px;
  padding: 20px;
}


.main-bolt-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.8rem, 6vw, 4rem);
  color: var(--primary);
  letter-spacing: 4px;
  line-height: 1;
  margin: 0;
  text-shadow: 0 0 18px var(--primary-glow);
}

.cinepeace-tag {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.55rem, 1vw, 0.7rem);
  font-weight: 800;
  color: rgba(255,255,255,0.28);
  letter-spacing: 6px;
  margin-top: 10px;
  text-transform: uppercase;
}

/* 🔥 Ultra Smooth Glass Progress */
.bolt-progress-container {
  width: 130px;
  height: 2px;
  background: rgba(255,255,255,0.08);
  margin: 30px auto 0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

/* moving beam */
.bolt-progress-fill {
  position: absolute;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary),
    transparent
  );

  /* 🔥 KEY FIX */
  transform: translate3d(-100%, 0, 0);
  animation: bolt-move 1.2s linear infinite;

  will-change: transform;
}

/* smooth GPU animation */
@keyframes bolt-move {
  0% {
    transform: translate3d(-120%, 0, 0);
  }
  100% {
    transform: translate3d(220%, 0, 0);
  }
}
@media (min-width: 1024px) {
  .glass-content {
    transform: scale(0.85);
  }
}

    /* ==================== UTILITY CLASSES ==================== */
    .text-center { text-align: center; }
    .hidden { display: none !important; }


    /* ==================== COMMUNITY / REACTION / RATING ==================== */
    .community-section {
      margin-top: 28px;
      background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 18px;
      padding: 18px;
      box-shadow: var(--shadow-card);
      backdrop-filter: blur(10px);
    }

    .community-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 14px;
      margin-bottom: 18px;
      flex-wrap: wrap;
    }

    .community-kicker {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 1px;
      text-transform: uppercase;
      color: var(--primary);
      margin-bottom: 6px;
    }

    .community-title {
      font-size: 22px;
      line-height: 1.1;
      margin: 0;
    }

    .community-summary {
      text-align: right;
      min-width: 120px;
    }

    .community-score {
      font-size: 30px;
      font-weight: 800;
      line-height: 1;
      color: var(--warning);
    }

    .community-count {
      font-size: 12px;
      color: var(--text-secondary);
      margin-top: 4px;
    }

    .community-rating-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
      margin-bottom: 18px;
      padding: 14px 16px;
      background: rgba(0,0,0,0.22);
      border: 1px solid rgba(255,255,255,0.06);
      border-radius: 14px;
    }

    .community-star-strip {
      display: inline-flex;
      flex-direction: row-reverse;
      gap: 6px;
      direction: rtl;
      flex-wrap: nowrap;
    }

    .community-star {
      width: 42px;
      height: 42px;
      border-radius: 12px;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.08);
      color: #777;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
    }

    .community-star:hover {
      transform: translateY(-2px) scale(1.03);
      border-color: rgba(255,255,255,0.18);
    }

    .community-star.active,
    .community-star.hovered {
      color: var(--warning);
      background: rgba(245, 197, 24, 0.12);
      border-color: rgba(245, 197, 24, 0.3);
      box-shadow: 0 0 18px rgba(245, 197, 24, 0.12);
    }

    .community-rating-hint {
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.4;
      flex: 1 1 180px;
    }

    .reaction-row {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 18px;
    }

    .reaction-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 12px 10px;
      border-radius: 12px;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.08);
      color: var(--text-primary);
      font-weight: 700;
      transition: transform .2s ease, background .2s ease, border-color .2s ease;
      min-width: 0;
    }

    .reaction-btn:hover {
      transform: translateY(-2px);
      background: rgba(255,255,255,0.08);
    }

    .reaction-btn.active {
      border-color: rgba(255,255,255,0.22);
      box-shadow: 0 0 18px rgba(229, 9, 20, 0.15);
    }

    .reaction-emoji {
      font-size: 18px;
      line-height: 1;
    }

    .reaction-count {
      font-size: 12px;
      opacity: .82;
      font-weight: 600;
    }

    .comment-box {
      background: rgba(0,0,0,0.18);
      border: 1px solid rgba(255,255,255,0.06);
      border-radius: 14px;
      padding: 16px;
      margin-bottom: 14px;
    }

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

    .comment-box-title {
      font-size: 16px;
      font-weight: 800;
    }

    .comment-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 10px;
    }

    .community-input,
    .community-textarea {
      width: 100%;
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(255,255,255,0.04);
      color: var(--text-primary);
      border-radius: 12px;
      padding: 12px 14px;
      font: inherit;
      outline: none;
      transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
    }

    .community-input:focus,
    .community-textarea:focus {
      border-color: var(--primary);
      background: rgba(255,255,255,0.06);
      box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
    }

    .community-textarea {
      min-height: 110px;
      resize: vertical;
      margin-bottom: 12px;
    }

    .comment-actions {
      display: flex;
      gap: 10px;
      justify-content: flex-end;
      flex-wrap: wrap;
    }

    .comment-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .comment-item {
      display: flex;
      gap: 12px;
      padding: 14px;
      border-radius: 14px;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.05);
    }

    .comment-avatar {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--primary), #ff7a18);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      flex-shrink: 0;
      text-transform: uppercase;
    }

    .comment-body {
      min-width: 0;
      flex: 1;
    }

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

    .comment-name {
      font-weight: 700;
      font-size: 14px;
    }

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

    .comment-text {
      font-size: 14px;
      line-height: 1.65;
      color: var(--text-secondary);
      word-break: break-word;
    }

    .comment-reaction {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-top: 8px;
      padding: 5px 10px;
      border-radius: 999px;
      font-size: 12px;
      background: rgba(255,255,255,0.05);
      color: var(--text-primary);
      width: fit-content;
    }

    .comment-empty {
      padding: 20px 14px;
      border-radius: 14px;
      border: 1px dashed rgba(255,255,255,0.14);
      color: var(--text-secondary);
      text-align: center;
      font-size: 14px;
    }

    @media (max-width: 768px) {
      .community-section {
        padding: 14px;
        border-radius: 16px;
      }

      .community-title {
        font-size: 18px;
      }

      .community-score {
        font-size: 26px;
      }

      .community-rating-row {
        padding: 12px;
      }

      .community-star {
        width: 38px;
        height: 38px;
      }

      .reaction-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .comment-grid {
        grid-template-columns: 1fr;
      }
    }

    /* ==================== FIX OVERRIDES ==================== */
    :root {
      --content-max: 1560px;
      --content-pad: clamp(16px, 3vw, 56px);
    }

    html, body {
      width: 100%;
      min-height: 100%;
      background: var(--bg-dark);
    }

    #mainContent,
    .page {
      width: 100%;
    }

    .page {
      overflow-x: clip;
    }

    .details-page {
      width: 100%;
      padding-top: 0;
      overflow-x: clip;
    }

    .details-banner {
      width: 100%;
      height: clamp(220px, 42vw, 420px);
      transition: height 0.25s ease;
    }

    .details-banner.player-active {
      height: clamp(240px, 46vw, 460px);
    }

    .details-content {
      width: min(100%, var(--content-max));
      margin-inline: auto !important;
      margin-top: 0 !important;
      padding: 12px var(--content-pad) 32px;
      display: block;
      position: relative;
      z-index: 10;
      box-sizing: border-box;
    }

    .details-poster,
    .details-info {
      min-width: 0;
    }

    .details-info {
      width: 100%;
    }

    .top-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 12px;
      width: 100%;
    }

    .details-tag,
    .back-tag {
      min-height: 32px;
      white-space: nowrap;
      flex: 0 0 auto;
    }

    .back-tag {
      margin-left: auto;
    }

    .details-actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      align-items: center;
      margin-bottom: 30px;
      width: 100%;
    }

    .details-actions .btn-play-large {
      flex: 1 1 220px;
      min-width: 160px;
    }

    .details-actions .btn-icon {
      flex: 0 0 44px;
    }

    #serverList {
      display: flex !important;
      gap: 8px;
      flex-wrap: wrap;
      margin: 10px 0 16px;
      width: 100%;
      align-items: stretch;
    }

    #serverList button {
      flex: 1 1 clamp(160px, 24vw, 280px);
      min-width: 120px;
      max-width: 100%;
      padding: 10px 12px;
      font-size: 12px;
      border-radius: 6px;
      background: #ffffff;
      color: #000;
      font-weight: 600;
      border: none;
      transition: all 0.2s ease;
    }

    #serverList button:hover {
      background: #e6e6e6;
      transform: scale(1.03);
    }

    #serverList button.active {
      background: var(--primary);
      color: #fff;
    }

    .details-video.playing {
      opacity: 1;
    }

    @media (min-width: 768px) {
      .details-content {
        padding: 18px var(--content-pad) 36px;
        display: grid;
        grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
        gap: clamp(20px, 3vw, 36px);
        align-items: start;
      }

      .top-row {
        grid-column: 1 / -1;
        margin-bottom: 18px;
        align-self: start;
      }

      .details-poster {
        display: block;
        grid-column: 1;
        grid-row: 2;
        width: 100%;
        max-width: 280px;
        aspect-ratio: 2 / 3;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: var(--shadow-card);
        animation: slideUp var(--transition-slow) forwards;
      }

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

      .details-info {
        grid-column: 2;
        grid-row: 2;
      }

      .details-back {
        left: 48px;
        right: auto;
      }

      .details-banner {
        height: clamp(300px, 30vw, 460px);
      }

      .details-banner.player-active {
        height: clamp(320px, 32vw, 500px);
      }
    }

    @media (max-width: 767px) {
      .details-poster {
        display: none !important;
      }

      .details-content {
        padding: 12px 16px 28px;
      }

      .details-actions {
        gap: 10px;
      }

      .details-actions .btn-play-large {
        width: 100%;
        flex-basis: 100%;
      }

      .details-actions .btn-icon {
        width: 44px;
        height: 44px;
      }

      #serverList button {
        flex-basis: 100%;
      }
    }

    @media (min-width: 1200px) {
      .hero-gradient {
        background: linear-gradient(to top, rgba(0,0,0,0.38) 0%, transparent 62%),
                    linear-gradient(to right, rgba(0,0,0,0.38) 0%, transparent 30%);
      }

      .hero-backdrop,
      .movie-card img {
        filter: brightness(1.08) contrast(1.04) saturate(1.04);
      }

      .movie-card.poster {
        width: clamp(150px, 10vw, 180px);
      }

      .movie-card.backdrop {
        width: clamp(240px, 16vw, 320px);
      }
    }

    @media (min-width: 1600px) {
      .hero-content {
        max-width: 760px;
      }

      .details-content {
        width: min(100%, 1640px);
      }
    }

    .search-grid .empty-state {
      padding: 40px 16px;
    }

  
    /* ==================== FINAL FLUID LAYOUT OVERRIDES ==================== */
    .details-page {
      width: 100%;
      overflow-x: hidden;
    }

    .details-banner {
      width: 100%;
      height: clamp(220px, 38vw, 500px) !important;
    }

    .details-banner.player-active {
      height: clamp(240px, 42vw, 540px) !important;
    }

    .details-content {
      width: 100% !important;
      max-width: none !important;
      margin: 0 !important;
      padding: clamp(14px, 2vw, 28px) clamp(14px, 3vw, 56px) clamp(28px, 4vw, 48px) !important;
      display: grid !important;
      grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)) !important;
      gap: clamp(16px, 3vw, 40px) !important;
      align-items: start !important;
      box-sizing: border-box !important;
    }

    .top-row {
      grid-column: 1 / -1 !important;
      width: 100% !important;
      display: flex !important;
      justify-content: space-between !important;
      align-items: center !important;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 12px;
    }

    .details-tag,
    .back-tag {
      min-height: 32px;
      white-space: nowrap;
      flex: 0 0 auto;
    }

    .back-tag {
      margin-left: auto;
    }

    .details-poster {
      display: block !important;
      width: min(100%, 320px) !important;
      max-width: 320px !important;
      aspect-ratio: 2 / 3;
      justify-self: start;
      margin: 0;
    }

    .details-info {
      width: 100% !important;
      min-width: 0;
      max-width: none !important;
      overflow: hidden;
    }

    .details-title {
      font-size: clamp(34px, 4vw, 72px);
      line-height: 1.05;
      letter-spacing: 1.5px;
    }

    .details-meta {
      gap: 10px 14px;
    }

    .details-overview {
      max-width: 70ch;
      text-wrap: pretty;
    }

    .details-actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      align-items: center;
      margin-bottom: 30px;
      width: 100%;
    }

    .details-actions .btn-play-large {
      flex: 1 1 220px;
      min-width: 180px;
    }

    .details-actions .btn-icon {
      flex: 0 0 44px;
    }

    #serverList {
      display: grid !important;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 8px;
      width: 100%;
      margin: 10px 0 16px !important;
      align-items: stretch;
    }

    #serverList button {
      width: 100%;
      min-width: 0;
      flex: none;
      padding: 10px 12px;
      font-size: 12px;
      border-radius: 6px;
      background: #ffffff;
      color: #000;
      font-weight: 600;
      border: none;
      transition: all 0.2s ease;
    }

    #serverList button:hover {
      background: #e6e6e6;
      transform: scale(1.02);
    }

    #serverList button.active {
      background: var(--primary);
      color: #fff;
    }

    .cast-list {
      gap: 14px;
      padding-bottom: 6px;
    }

    .cast-item {
      width: 78px;
    }

    .episode-item {
      align-items: center;
    }

    @media (max-width: 767px) {
      .details-content {
        grid-template-columns: 1fr !important;
        padding: 12px 14px 28px !important;
      }

      .details-poster {
        width: 100% !important;
        max-width: 100% !important;
        justify-self: center;
      }

      .details-actions .btn-play-large,
      #serverList button {
        flex-basis: 100%;
      }

      .top-row {
        align-items: flex-start;
      }
    }

    @media (min-width: 1200px) {
      .details-content {
        padding-inline: clamp(28px, 4vw, 80px) !important;
      }

      .details-overview {
        max-width: 78ch;
      }
    }

    /* ==================== FINAL FLUID DETAILS OVERRIDES ==================== */
    .details-page {
      overflow-x: hidden;
    }

    .details-banner {
      height: clamp(220px, 36vw, 460px) !important;
    }

    .details-content {
      width: 100%;
      max-width: none !important;
      margin: 0 !important;
      padding: clamp(16px, 3vw, 64px) clamp(16px, 4vw, 72px) 40px !important;
      display: block !important;
      box-sizing: border-box;
    }

    .details-poster,
    #detailsPoster {
      display: none !important;
    }

    .details-info,
    #detailsInfo {
      width: 100%;
      max-width: none !important;
      opacity: 1 !important;
    }

    .top-row {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 16px;
    }

    .details-tag,
    .back-tag {
      flex: 0 0 auto;
    }

    .details-title {
      max-width: none;
      font-size: clamp(34px, 4vw, 64px);
      line-height: 1.05;
    }

    .details-meta,
    .details-genres,
    .details-actions,
    .cast-section,
    .seasons-section,
    .search-grid,
    .bookmarks-grid {
      width: 100%;
      max-width: none;
    }

    .details-overview {
      max-width: none;
      overflow-wrap: anywhere;
    }

    #serverList {
      width: 100% !important;
      display: flex !important;
      flex-wrap: wrap;
      gap: 10px;
      margin: 10px 0 16px;
    }

    #serverList button {
      flex: 1 1 180px;
      min-width: 140px;
    }

    .details-actions {
      align-items: center;
    }

    .cast-list {
      width: 100%;
    }

    @media (min-width: 768px) {
      .details-content {
        padding: clamp(20px, 2.5vw, 72px) clamp(24px, 5vw, 96px) 50px !important;
      }

      .top-row {
        margin-bottom: 20px;
      }

      #serverList button {
        flex-basis: 190px;
      }
    }


    /* ==================== CATEGORY / SIDEBAR / HISTORY OVERRIDES ==================== */
    :root {
      --sidebar-width: 248px;
      --sidebar-collapsed-width: 88px;
    }

    .mobile-menu-section {
      display: flex;
    }

    .mobile-menu-section .cine-side-item {
      justify-content: flex-start;
    }

    /* ---- Sidebar category chip grid ---- */
    .category-chip-list {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 7px;
      width: 100%;
    }

    .category-chip-list--page {
      padding: 0 16px;
      margin-bottom: 12px;
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .category-chip {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 9px 11px;
      border-radius: 14px;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.07);
      color: var(--text-secondary);
      font-weight: 600;
      font-size: 12px;
      transition: all var(--transition-normal);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      cursor: pointer;
    }

    .category-chip i {
      color: var(--primary);
      font-size: 11px;
      flex-shrink: 0;
    }

    .category-chip:hover,
    .category-chip.active {
      transform: translateY(-1px);
      background: linear-gradient(135deg, rgba(229,9,20,0.20), rgba(255,80,80,0.08));
      border-color: rgba(229,9,20,0.40);
      color: #fff;
      box-shadow: 0 4px 14px rgba(229,9,20,0.12);
    }

    .category-chip.active i {
      color: #fff;
    }

    .sidebar-qr-card {
      border-radius: 20px;
      padding: 14px;
      background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
      border: 1px solid rgba(255,255,255,0.08);
      box-shadow: 0 12px 28px rgba(0,0,0,0.22);
    }

    .qr-img-wrap {
      width: 100%;
      aspect-ratio: 1 / 1;
      border-radius: 14px;
      overflow: hidden;
      background: #fff;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .qr-real-img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
      border-radius: 12px;
    }

    .sidebar-qr-card strong,
    .sidebar-qr-card span {
      display: block;
    }

    .sidebar-qr-card strong {
      font-size: 15px;
      color: var(--text-primary);
      margin-bottom: 2px;
    }

    .sidebar-qr-card span {
      font-size: 12px;
      color: var(--text-secondary);
    }

    .category-header .bookmarks-title,
    .category-header .bookmarks-subtitle {
      padding-inline: 16px;
    }

    .category-toolbar {
      padding: 0 0 10px;
    }

    .category-hero {
      width: min(100%, var(--content-max));
      margin: 0 auto;
      padding: 0 var(--content-pad) 16px;
    }

    .category-results {
      width: min(100%, var(--content-max));
      margin: 0 auto;
      padding: 0 0 24px;
    }

    .category-results .movie-row {
      padding-top: 10px;
    }

    .history-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      padding: 0 16px 24px;
    }

    @media (min-width: 480px) {
      .history-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }

    @media (min-width: 768px) {
      .history-grid {
        padding: 0 48px 24px;
        gap: 18px;
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }
    }

    @media (min-width: 1100px) {
      .history-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
      }
    }

    @media (min-width: 1440px) {
      .history-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
      }
    }

    .history-grid .continue-watching-card {
      width: 100%;
      min-height: 180px;
    }

    .history-grid .continue-watching-title {
      font-size: 13px;
      line-height: 1.25;
    }

    .history-grid .continue-progress-text,
    .history-grid .continue-watching-meta {
      font-size: 10px;
    }

    .history-toolbar {
      padding: 0 16px 16px;
      display: flex;
      justify-content: flex-end;
    }

    @media (min-width: 768px) {
      .history-toolbar {
        padding: 0 48px 16px;
      }
    }

    .history-clear-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 10px 14px;
      border-radius: 999px;
      background: rgba(255,255,255,0.06);
      color: var(--text-primary);
      border: 1px solid rgba(255,255,255,0.08);
      font-weight: 700;
    }

    @media (max-width: 1023px) {
      .mobile-menu-section {
        display: flex;
      }

      .category-menu-section,
      .qr-section {
        display: flex;
      }
    }

    @media (min-width: 1024px) {
      .mobile-menu-section {
        display: none !important;
      }

      .category-menu-section {
        display: flex;
      }

      .qr-section {
        display: flex;
      }
    }

    body.white-mode .category-chip,
    body.white-mode .sidebar-qr-card,
    body.white-mode .history-clear-btn {
      background: rgba(255,255,255,0.92);
      border-color: rgba(16,24,40,0.08);
      color: var(--text-primary);
      box-shadow: 0 12px 28px rgba(16,24,40,0.06);
    }

    body.white-mode .qr-frame {
      background: rgba(255,255,255,0.98);
    }

    body.white-mode .qr-frame span {
      background: #101828;
    }

    body.white-mode .sidebar-qr-card span,
    body.white-mode .history-clear-btn,
    body.white-mode .category-chip {
      color: var(--text-secondary);
    }

    body.white-mode .category-chip.active,
    body.white-mode .category-chip:hover {
      color: var(--text-primary);
    }

    body.white-mode .category-hero,
    body.white-mode .category-toolbar,
    body.white-mode .history-toolbar {
      color: var(--text-primary);
    }

  

    /* ==================== FINAL POLISH OVERRIDES ==================== */
    .menu-toggle svg {
      transition: transform var(--transition-normal), opacity var(--transition-normal);
    }

    .menu-toggle.is-open {
      background: rgba(229, 9, 20, 0.10);
      border-color: rgba(229, 9, 20, 0.22);
    }

    .menu-toggle.is-open svg {
      transform: scale(0.96);
    }

    .sidebar-qr-card {
      width: min(100%, 200px);
      margin-inline: auto;
    }

    .qr-section {
      align-items: center;
    }

    .qr-section .cine-sidebar-label,
    .category-menu-section .cine-sidebar-label {
      width: 100%;
    }

    .qr-img-wrap {
      width: 100%;
      aspect-ratio: 1 / 1;
    }

    .sidebar-qr-card strong,
    .sidebar-qr-card span {
      display: block;
      text-align: center;
    }

    body.white-mode .hero-gradient {
      background:
        linear-gradient(to top, rgba(245, 247, 251, 0.96) 0%, rgba(245, 247, 251, 0.08) 60%),
        linear-gradient(to right, rgba(245, 247, 251, 0.72) 0%, rgba(245, 247, 251, 0) 42%);
    }

    body.white-mode .card-overlay,
    body.white-mode .continue-watching-overlay {
      background:
        linear-gradient(to top, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.84) 52%, rgba(255,255,255,0.02) 100%),
        linear-gradient(135deg, rgba(229,9,20,0.08), rgba(255,255,255,0) 48%);
    }

    body.white-mode .card-title,
    body.white-mode .hero-title,
    body.white-mode .details-title,
    body.white-mode .bookmarks-title,
    body.white-mode .settings-title,
    body.white-mode .community-title,
    body.white-mode .continue-watching-title,
    body.white-mode .search-results-title,
    body.white-mode .cast-name,
    body.white-mode .cast-character {
      color: #111827 !important;
      text-shadow: none !important;
    }

    body.white-mode .hero-overview,
    body.white-mode .details-overview,
    body.white-mode .bookmarks-subtitle,
    body.white-mode .settings-subtitle,
    body.white-mode .settings-item-value,
    body.white-mode .empty-state,
    body.white-mode .comment-item,
    body.white-mode .community-rating-hint,
    body.white-mode .episode-name,
    body.white-mode .episode-overview,
    body.white-mode .card-meta,
    body.white-mode .hero-meta,
    body.white-mode .details-meta,
    body.white-mode .continue-watching-meta,
    body.white-mode .row-see-all,
    body.white-mode .nav-item,
    body.white-mode .settings-item-right {
      color: #344054 !important;
    }

    body.white-mode .hero-rating,
    body.white-mode .card-rating,
    body.white-mode .details-rating {
      color: #7c2d12 !important;
    }

    body.white-mode .card-rating i,
    body.white-mode .hero-rating i,
    body.white-mode .details-rating i {
      color: #b45309 !important;
    }

    body.white-mode .continue-progress-wrap,
    body.white-mode .continue-badge,
    body.white-mode .continue-remove {
      color: #111827;
    }

    body.white-mode .continue-progress-bar {
      background: rgba(15, 23, 42, 0.08);
    }

    body.white-mode .continue-progress-bar span {
      box-shadow: 0 0 16px rgba(43, 134, 197, 0.28);
    }

    body.white-mode .history-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    body.white-mode .history-grid .continue-watching-card {
      min-height: 240px;
    }

    body.white-mode .details-rating,
    body.white-mode .season-select,
    body.white-mode .search-input-wrapper,
    body.white-mode .community-section,
    body.white-mode .comment-box,
    body.white-mode .settings-card,
    body.white-mode .settings-item,
    body.white-mode .language-popup,
    body.white-mode .telegram-card,
    body.white-mode .continue-watching-card {
      border: 1px solid rgba(16, 24, 40, 0.10);
    }

    @media (min-width: 1024px) {
      .cine-sidebar {
        width: var(--sidebar-width);
      }

      body.sidebar-collapsed .cine-sidebar {
        width: var(--sidebar-collapsed-width);
      }

      .history-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
      }
    }

    /* ==================== SETTINGS LAYOUT FIX ==================== */
    #settingsPage {
      padding: 18px 0 30px;
    }

    #settingsPage .settings-header {
      width: min(100%, 1200px);
      margin: 0 auto 14px;
      padding: 84px 16px 18px;
    }

    #settingsPage .settings-title {
      line-height: 1.05;
      letter-spacing: 0.4px;
    }

    #settingsPage .settings-subtitle {
      margin-top: 4px;
    }

    #settingsPage .settings-content,
    #settingsPage > .settings-section {
      width: min(100%, 1200px);
      margin-left: auto;
      margin-right: auto;
      padding-left: 16px;
      padding-right: 16px;
    }

    #settingsPage .settings-content {
      display: grid;
      grid-template-columns: 1fr;
      gap: 18px;
      align-items: stretch;
    }

    #settingsPage .settings-section {
      margin: 0;
      opacity: 1 !important;
      animation: none !important;
    }

    #settingsPage .settings-section-title {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      margin: 0 0 12px;
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 2px;
      color: var(--text-secondary);
      text-transform: uppercase;
    }

    #settingsPage .settings-section-title::before {
      content: '';
      width: 10px;
      height: 10px;
      border-radius: 3px;
      background: linear-gradient(135deg, var(--primary), rgba(255,255,255,0.25));
      box-shadow: 0 0 14px var(--primary-glow);
      flex-shrink: 0;
    }

    #settingsPage .settings-card {
      border-radius: 22px;
      overflow: hidden;
      border: 1px solid rgba(255,255,255,0.06);
      background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
      box-shadow: 0 18px 50px rgba(0,0,0,0.16);
    }

    #settingsPage .settings-card .settings-item {
      padding: 16px 18px;
      gap: 14px;
      flex-wrap: wrap;
      align-items: center;
    }

    #settingsPage .settings-card .settings-item + .settings-item {
      border-top: 1px solid rgba(255,255,255,0.06);
    }

    #settingsPage .settings-item-left {
      min-width: 0;
      flex: 1 1 240px;
    }

    #settingsPage .settings-item-right {
      margin-left: auto;
      flex: 0 0 auto;
    }

    #settingsPage .settings-item-value {
      word-break: break-word;
    }

    #settingsPage .profile-input {
      width: min(100%, 280px);
      flex: 1 1 220px;
      min-width: 180px;
    }

    #settingsPage .profile-settings-item {
      align-items: center !important;
    }

    #settingsPage .profile-settings-actions {
      justify-content: flex-start;
      flex: 1 1 280px;
    }

    #settingsPage .appearance-mode-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: flex-start;
      flex: 1 1 280px;
    }

    #settingsPage .mode-pill {
      min-height: 44px;
      border-radius: 14px;
    }

    #settingsPage .theme-colors {
      width: 100%;
      min-width: 0;
      max-width: none;
      flex: 1 1 320px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: flex-start;
      align-content: flex-start;
      min-height: 58px;
      overflow: visible;
      padding: 2px 0 8px;
      touch-action: pan-x;
      overscroll-behavior-x: contain;
      scrollbar-width: thin;
    }

    #settingsPage .theme-color {
      width: 42px;
      height: 42px;
      border-radius: 14px;
      border: 2px solid rgba(255,255,255,0.12);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
      flex: 0 0 auto;
    }

    @media (min-width: 900px) {
      #settingsPage .settings-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (min-width: 1280px) {
      #settingsPage .settings-content {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }

    #settingsPage > .settings-section {
      padding-top: 16px;
      padding-bottom: 8px;
    }

    @media (max-width: 767px) {
      #settingsPage .settings-header,
      #settingsPage .settings-content,
      #settingsPage > .settings-section {
        padding-left: 16px;
        padding-right: 16px;
      }

      #settingsPage .settings-header {
        padding-top: 78px;
      }
    }

/* ===== STYLE BLOCK 2 ===== */
/* ===== FINAL UI FIXES ===== */
    .header-avatar {
      border-radius: 14px !important;
      overflow: hidden !important;
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .header-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: inherit;
      display: block;
    }

    .profile-avatar-preview {
      border-radius: 22px !important;
    }

    .profile-modal-overlay {
      display: flex !important;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity var(--transition-normal), visibility var(--transition-normal);
    }

    .profile-modal-overlay .profile-modal {
      transform: translateY(18px) scale(0.985);
      opacity: 0;
      transition: transform var(--transition-normal), opacity var(--transition-normal);
    }

    .profile-modal-overlay.active {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .profile-modal-overlay.active .profile-modal {
      transform: translateY(0) scale(1);
      opacity: 1;
    }

    .settings-content {
      width: 100%;
      max-width: min(100%, 1320px);
      margin-inline: auto;
      display: grid;
      grid-template-columns: 1fr;
      gap: 20px;
      align-items: stretch;
    }

    @media (min-width: 1100px) {
      .settings-content {
        grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
      }
    }

    .settings-section {
      margin-bottom: 0;
      opacity: 1;
      animation: none;
    }

    .settings-card {
      height: 100%;
      display: flex;
      flex-direction: column;
    }

    .settings-item {
      flex-wrap: wrap;
      gap: 12px;
      align-items: center;
    }

    .settings-item-left {
      min-width: 0;
      flex: 1 1 240px;
    }

    .profile-settings-item {
      align-items: center !important;
    }

    .profile-input {
      width: min(100%, 280px);
      flex: 1 1 220px;
      min-width: 180px;
    }

    .profile-settings-actions {
      justify-content: flex-start;
      flex: 1 1 280px;
    }

    .appearance-mode-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: flex-start;
      flex: 1 1 280px;
    }

    .mode-pill {
      min-height: 44px;
      border-radius: 14px;
    }

    .theme-colors {
      width: 100%;
      min-width: 0;
      max-width: none;
      flex: 1 1 320px;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: flex-start;
      align-content: flex-start;
      min-height: 58px;
      overflow-x: auto;
      overflow-y: hidden;
      padding: 2px 0 8px;
      touch-action: pan-x;
      overscroll-behavior-x: contain;
      scrollbar-width: thin;
    }

    .theme-color {
      width: 42px;
      height: 42px;
      border-radius: 14px;
      border: 2px solid rgba(255,255,255,0.12);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
      flex: 0 0 auto;
      scroll-snap-align: start;
      position: relative;
      overflow: hidden;
    }

    .theme-color::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0));
      pointer-events: none;
    }

    .theme-color.active {
      border-color: rgba(255,255,255,0.95);
      box-shadow: 0 0 0 3px rgba(255,255,255,0.14), 0 0 16px rgba(0,0,0,0.22);
      transform: translateY(-1px) scale(1.04);
    }

    .theme-color.gradient {
      border-color: rgba(255,255,255,0.18);
    }

    .theme-color.gradient.active {
      box-shadow: 0 0 0 3px rgba(255,255,255,0.16), 0 0 18px rgba(0,0,0,0.20);
    }

    .settings-item-value, .settings-item-label {
      word-break: break-word;
    }

    #serverList {
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: stretch;
      margin-top: 10px;
    }

    #serverList button {
      font-family: 'Bebas Neue', 'Inter', sans-serif !important;
      letter-spacing: 1px;
      text-transform: uppercase;
      font-size: clamp(12px, 1.05vw, 15px);
      line-height: 1;
      min-height: 38px;
      min-width: 108px;
      padding: 9px 14px;
      border-radius: 14px;
      flex: 1 1 128px;
      background: rgba(255,255,255,0.84);
      color: #111827;
      border: 1px solid rgba(255,255,255,0.16);
      box-shadow: 0 10px 24px rgba(0,0,0,0.10);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
      white-space: nowrap;
      animation: serverWobble 2.8s ease-in-out infinite;
      animation-play-state: paused;
    }

    #serverList button:hover {
      transform: translateY(-1px) scale(1.02);
      background: rgba(255,255,255,0.98);
      border-color: rgba(229,9,20,0.24);
      animation-play-state: running;
    }

    #serverList button.active {
      background: linear-gradient(135deg, var(--primary), var(--primary-hover));
      color: #fff;
      border-color: transparent;
      box-shadow: 0 12px 26px rgba(229,9,20,0.22);
      animation: none;
    }

    @media (max-width: 767px) {
      #serverList button {
        flex: 1 1 calc(50% - 10px);
        min-width: 0;
      }
    }

    body.white-mode #serverList button {
      background: rgba(255,255,255,0.96);
      color: #111827;
      border-color: rgba(16, 24, 40, 0.08);
    }

    body.white-mode #serverList button.active {
      color: #fff;
      background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    }

    .details-content {
      width: 100%;
      max-width: min(100%, 1320px);
      margin-inline: auto;
    }

    .details-info {
      min-width: 0;
    }

    body.white-mode .hero-rating,
    body.white-mode .card-rating,
    body.white-mode .details-rating {
      color: #fff !important;
    }

    body.white-mode .hero-rating i,
    body.white-mode .card-rating i,
    body.white-mode .details-rating i {
      color: #f59e0b !important;
    }

    body.white-mode .details-rating span,
    body.white-mode .hero-rating,
    body.white-mode .card-rating {
      color: #fff !important;
    }

    body.white-mode .card-badge {
      background: rgba(17, 24, 39, 0.92) !important;
      color: #fff !important;
    }

    .header-right .header-icon,
    .header-right .header-avatar,
    .header-left .menu-toggle {
      flex-shrink: 0;
    }

    @media (min-width: 1024px) {
      body.sidebar-collapsed .cine-sidebar-inner {
        padding: 16px 10px;
        gap: 14px;
      }

      body.sidebar-collapsed .cine-side-item,
      body.sidebar-collapsed .cine-quick-card {
        padding: 12px 10px;
        border-radius: 16px;
        justify-content: center;
      }

      body.sidebar-collapsed .cine-side-item svg,
      body.sidebar-collapsed .cine-quick-card svg {
        width: 18px;
        height: 18px;
      }

      body.sidebar-collapsed .cine-brand-mark {
        width: 40px;
        height: 40px;
      }
    }

/* ===== STYLE BLOCK 3 ===== */
/* Theme swatches: visible, responsive, fewer, with gradients */
  .theme-colors {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
    width: min(100%, 280px);
    padding-bottom: 0;
  }

  @media (max-width: 767px) {
    .theme-colors {
      display: flex !important;
      gap: 10px;
      overflow-x: auto;
      overflow-y: visible;
      width: 100%;
      max-width: 100%;
      padding-bottom: 6px;
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
    }
  }

  .theme-color {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
    background-repeat: no-repeat;
    background-size: cover;
  }

  .theme-color.gradient {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  .theme-color.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18), 0 0 16px rgba(255,255,255,0.12);
  }

  .theme-color:hover {
    transform: translateY(-2px) scale(1.06);
  }

  /* Accent surfaces use gradient instead of flat color */
  .hero-tag,
  .details-tag,
  .back-tag,
  .btn-primary,
  .language-btn.selected,
  .profile-action-btn.primary,
  .mode-pill.active,
  #serverList button.active,
  .cine-side-item.active,
  .end-credit-mark {
    background: var(--primary-gradient, linear-gradient(135deg, var(--primary), var(--primary-hover))) !important;
    color: #fff !important;
  }

  .btn-primary,
  .language-btn.selected,
  .profile-action-btn.primary,
  .mode-pill.active,
  #serverList button.active,
  .cine-side-item.active {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18), 0 0 24px var(--primary-glow);
  }

  .btn-primary:hover,
  .language-btn.selected:hover,
  .profile-action-btn.primary:hover,
  .mode-pill.active:hover,
  #serverList button.active:hover {
    filter: brightness(1.03);
  }

  /* Smaller, glassy server buttons */
  #serverList {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
  }

  #serverList button {
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    font-family: 'Bebas Neue', 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    animation: serverWobble 7s ease-in-out infinite;
    flex: 0 1 auto;
    white-space: nowrap;
  }

  #serverList button:hover {
    transform: translateY(-1px) scale(1.03);
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.22);
  }

  #serverList button.active {
    animation-duration: 2.8s;
  }

  @keyframes serverWobble {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-1px) rotate(-0.4deg); }
    50% { transform: translateY(0.5px) rotate(0.4deg); }
    75% { transform: translateY(-0.5px) rotate(-0.25deg); }
  }

  @media (min-width: 768px) {
    #serverList button {
      min-height: 32px;
      padding: 6px 12px;
      font-size: 12px;
    }
  }

  /* Details banner loading / ready overlay */
  .details-banner {
    position: relative;
  }

  .details-banner.player-loading .details-backdrop {
    filter: blur(1.4px) brightness(0.72) saturate(1.02);
    transform: scale(1.03);
  }

  .details-banner.player-ready .details-backdrop {
    filter: brightness(0.92) saturate(1.05);
  }

  .details-player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.34));
    opacity: 0;
    transition: opacity 220ms ease;
  }

  .details-banner.player-loading .details-player-overlay,
  .details-banner.player-ready .details-player-overlay {
    opacity: 1;
  }

  .details-player-loader {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(10, 10, 10, 0.58);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
  }

  .details-banner.player-loading .details-player-loader {
    display: inline-flex;
  }

  .mini-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
  }

  .details-player-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow: 0 18px 40px rgba(0,0,0,0.42), 0 0 0 8px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease, box-shadow 220ms ease;
  }

  .details-player-play i {
    margin-left: 4px;
    font-size: 20px;
  }

  .details-banner.player-ready .details-player-play {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
  }

  .details-player-play:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 18px 42px rgba(0,0,0,0.44), 0 0 0 10px rgba(0,0,0,0.14);
  }

  .details-banner.player-started .details-player-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .details-banner.player-started .details-player-play {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.78);
  }

  
  /* Dynamic end credit footer */
  .end-credit-footer {
  min-height: 180px; /* মোবাইলে */
  /* বাকি স্টাইল ঠিক থাকবে */
}
@media (min-width: 768px) {
  .end-credit-footer {
    min-height: 160px;
  }
}

  .end-credit-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    text-align: center;
  }

  .end-credit-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .end-credit-title {
    font-family: 'Bebas Neue', cursive;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: 3px;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 20px rgba(229, 9, 20, 0.18);
  }

  .end-credit-links {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .end-credit-link {
    aspect-ratio: auto;
    min-height: 86px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-primary);
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.6px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  }

  .end-credit-link:hover {
    transform: translateY(-2px) scale(1.01);
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.14);
    box-shadow: 0 10px 22px rgba(0,0,0,0.16);
  }

  .end-credit-note {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
  }

  .end-credit-note a {
    color: inherit;
    font-weight: 800;
    text-decoration: none;
  }

  @media (max-width: 767px) {
    .end-credit-footer {
      margin: 18px 12px 84px;
      padding: 14px;
      border-radius: 16px;
    }

    .end-credit-link {
      min-height: 72px;
      border-radius: 12px;
      font-size: 10px;
    }
  }

  @media (min-width: 1024px) {
    .end-credit-footer {
      max-width: 100%;
      width: calc(100% - 48px);
      margin: 20px 24px 12px;
      padding: 20px 24px;
    }

    .end-credit-links {
      gap: 12px;
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .end-credit-link {
      min-height: 86px;
      border-radius: 16px;
      font-size: 12px;
    }
  }

  @media (min-width: 1400px) {
    .end-credit-footer {
      width: calc(100% - 64px);
      margin: 24px 32px 20px;
      padding: 24px 32px;
    }

    .end-credit-title {
      font-size: 42px;
    }

    .end-credit-link {
      min-height: 96px;
      font-size: 13px;
    }
  }

  @media (min-width: 1800px) {
    .end-credit-footer {
      max-width: 1400px;
      margin: 24px auto 20px;
      width: calc(100% - 80px);
    }
  }

  body.white-mode .end-credit-footer {
    background:
      radial-gradient(circle at top left, rgba(229, 9, 20, 0.12), transparent 34%),
      linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,247,251,0.96));
    border-color: rgba(16, 24, 40, 0.08);
    box-shadow: 0 18px 42px rgba(16, 24, 40, 0.08);
  }

  body.white-mode .end-credit-title,
  body.white-mode .end-credit-link,
  body.white-mode .end-credit-note {
    color: var(--text-primary);
  }

  body.white-mode .end-credit-link {
    background: rgba(16, 24, 40, 0.04);
    border-color: rgba(16, 24, 40, 0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
  }

  body.white-mode .end-credit-link:hover {
    background: rgba(16, 24, 40, 0.07);
    border-color: rgba(229, 9, 20, 0.16);
  }

/* ==================== NO INTERNET / 404 / ADBLOCK OVERLAYS ==================== */

/* ---- SHARED OVERLAY BASE ---- */
.cine-system-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: radial-gradient(ellipse at center, #0a0a0a 0%, #000 100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  padding: 24px;
  text-align: center;
}
.cine-system-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ---- ICON WRAPPER ---- */
.cso-icon-wrap {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  position: relative;
}

/* ---- NO INTERNET ---- */
#cineNoInternet .cso-icon-wrap {
  background: radial-gradient(circle, rgba(229,9,20,0.18), transparent 70%);
  animation: cso-pulse-ring 2s ease-in-out infinite;
}
@keyframes cso-pulse-ring {
  0%,100% { box-shadow: 0 0 0 0 rgba(229,9,20,0.35); }
  50%      { box-shadow: 0 0 0 22px rgba(229,9,20,0); }
}

.cso-wifi-icon {
  width: 64px;
  height: 64px;
  animation: cso-wifi-shake 1.8s ease-in-out infinite;
}
@keyframes cso-wifi-shake {
  0%,100% { transform: translateY(0) rotate(0deg); }
  25%     { transform: translateY(-5px) rotate(-4deg); }
  75%     { transform: translateY(5px) rotate(4deg); }
}

/* wifi arcs animation - each arc flashes off */
.wifi-arc { animation: cso-arc-blink 1.8s ease-in-out infinite; }
.wifi-arc:nth-child(1) { animation-delay: 0s; }
.wifi-arc:nth-child(2) { animation-delay: 0.3s; }
.wifi-arc:nth-child(3) { animation-delay: 0.6s; }
@keyframes cso-arc-blink {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.1; }
}
.wifi-dot { animation: cso-dot-pulse 1.8s ease-in-out infinite; }
@keyframes cso-dot-pulse {
  0%,100% { transform: scale(1); opacity:1; }
  50%     { transform: scale(1.5); opacity:0.4; }
}

/* ---- 404 ---- */
#cine404 .cso-icon-wrap {
  background: radial-gradient(circle, rgba(245,197,24,0.15), transparent 70%);
}
.cso-404-text {
  font-family: 'Bebas Neue', cursive;
  font-size: 72px;
  letter-spacing: 6px;
  color: #f5c518;
  line-height: 1;
  animation: cso-404-float 3s ease-in-out infinite;
  text-shadow: 0 0 30px rgba(245,197,24,0.4);
}
@keyframes cso-404-float {
  0%,100% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(-10px) scale(1.04); }
}
.cso-star {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f5c518;
  animation: cso-star-fly 3s ease-in-out infinite;
}
.cso-star:nth-child(1){ top:10%; left:15%; animation-delay:0s; }
.cso-star:nth-child(2){ top:20%; right:10%; animation-delay:0.5s; }
.cso-star:nth-child(3){ bottom:15%; left:20%; animation-delay:1s; }
.cso-star:nth-child(4){ bottom:10%; right:15%; animation-delay:1.5s; }
@keyframes cso-star-fly {
  0%,100% { transform: scale(1) translateY(0); opacity:0.6; }
  50%     { transform: scale(1.8) translateY(-6px); opacity:1; }
}

/* ---- AD BLOCK ---- */
#cineAdBlock .cso-icon-wrap {
  background: radial-gradient(circle, rgba(70,211,105,0.15), transparent 70%);
}
.cso-shield {
  width: 62px;
  height: 62px;
  animation: cso-shield-bounce 2.5s ease-in-out infinite;
}
@keyframes cso-shield-bounce {
  0%,100% { transform: scale(1) rotate(0deg); }
  30%     { transform: scale(1.12) rotate(-5deg); }
  60%     { transform: scale(1.08) rotate(5deg); }
}

/* ---- SHARED TEXT STYLES ---- */
.cso-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 32px;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 10px;
}
.cso-sub {
  font-size: 14px;
  color: #8f857a;
  line-height: 1.6;
  max-width: 300px;
  margin-bottom: 28px;
}
.cso-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 10px;
  background: var(--primary, #e50914);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px rgba(229,9,20,0.3);
}
.cso-btn:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(229,9,20,0.5); }
.cso-btn-outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.2);
  color: #c2b8ab;
  box-shadow: none;
  margin-left: 10px;
}
.cso-btn-outline:hover { background: rgba(255,255,255,0.06); }

/* no-internet banner (small top bar when goes offline mid-session) */
#cineOfflineBanner {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 0;
  overflow: hidden;
  background: linear-gradient(90deg, #e50914, #ff4d4d);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  z-index: 99998;
  transition: height 0.35s ease;
  letter-spacing: 0.5px;
}
#cineOfflineBanner.show { height: 40px; }
#cineOfflineBanner svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ==================== NOTIFICATION SYSTEM ==================== */
.notif-btn {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  border: 1.5px solid var(--bg-dark);
  display: none;
  animation: notif-pop 0.4s cubic-bezier(0.68,-0.55,0.27,1.55) forwards;
}

.notif-badge.show {
  display: block;
}

@keyframes notif-pop {
  0%   { transform: scale(0); }
  100% { transform: scale(1); }
}

.notif-panel {
  position: fixed;
  top: 68px;
  right: 12px;
  width: min(380px, calc(100vw - 24px));
  max-height: 70vh;
  background: linear-gradient(145deg, #1a1a1a, #111);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.97);
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notif-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.notif-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.notif-mark-read {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.notif-mark-read:hover { background: rgba(229,9,20,0.1); }

.notif-list {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
  animation: notif-slide-in 0.3s ease forwards;
}

@keyframes notif-slide-in {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.notif-item:hover { background: rgba(255,255,255,0.04); }
.notif-item.unread { background: rgba(229,9,20,0.05); }
.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

.notif-thumb {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.notif-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.notif-thumb svg {
  width: 24px;
  height: 24px;
  opacity: 0.5;
}

.notif-body { flex: 1; min-width: 0; }

.notif-body-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.notif-body-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.notif-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.notif-empty svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  opacity: 0.3;
  display: block;
  fill: currentColor;
}

.notif-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid;
  vertical-align: middle;
  margin-left: 4px;
  text-transform: uppercase;
}

.notif-thumb-svg {
  background: rgba(255,255,255,0.04);
}

.notif-thumb-svg svg {
  width: 30px;
  height: 30px;
}

.notif-thumb-default {
  background: rgba(255,255,255,0.04);
}

.notif-thumb-default svg {
  width: 26px;
  height: 26px;
  opacity: 0.4;
}

/* white mode */
body.white-mode .notif-panel {
  background: linear-gradient(145deg, #fff, #f5f7fb);
  border-color: rgba(16,24,40,0.08);
  box-shadow: 0 24px 60px rgba(16,24,40,0.12);
}
body.white-mode .notif-item.unread { background: rgba(229,9,20,0.04); }

/* ===== STYLE BLOCK 4 ===== */
.movie-card .card-desc {
    font-size: 11px;
    line-height: 1.35;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 6px;
  }

  .movie-card:hover .card-desc {
    color: rgba(255, 255, 255, 0.92);
  }

  .details-banner.player-trailer .details-player-overlay,
  .details-banner.player-trailer .details-player-play {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .details-banner.player-trailer .details-backdrop {
    filter: brightness(0.75) saturate(1.02);
    transform: scale(1.02);
  }

/* ===== STYLE BLOCK 5 ===== */
.details-banner,
  .details-banner.player-active,
  .details-banner.player-loading,
  .details-banner.player-ready,
  .details-banner.player-started,
  .details-banner.player-trailer {
    width: 100% !important;
    height: clamp(220px, 36vw, 460px) !important;
    min-height: 220px;
    max-height: 460px;
    transition: none !important;
    contain: layout paint;
  }

  @media (min-width: 768px) {
    .details-banner,
    .details-banner.player-active,
    .details-banner.player-loading,
    .details-banner.player-ready,
    .details-banner.player-started,
    .details-banner.player-trailer {
      min-height: 360px;
    }
  }

  .details-video,
  .details-video iframe,
  #detailsVideo,
  #inlinePlayer {
    width: 100% !important;
    height: 100% !important;
  }

  .profile-modal-overlay {
    display: flex !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 200ms ease, visibility 200ms ease;
  }

  .profile-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .profile-modal-overlay .profile-modal {
    transform: translateY(12px) scale(0.98);
    opacity: 0;
    transition: transform 200ms ease, opacity 200ms ease;
    will-change: transform, opacity;
  }

  .profile-modal-overlay.active .profile-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  .sidebar-backdrop,
  .sidebar-backdrop.active {
    will-change: opacity;
  }

  .hero-slide,
  .hero-backdrop,
  .hero-video {
    contain: paint;
  }

  #mainContent,
  #homePage,
  #endCreditFooter {
    min-height: 1px;
  }

  #mainContent {
    min-height: 100vh;
  }

  #homePage {
    min-height: 100vh;
  }

  #endCreditFooter {
    min-height: 72px;
  }

  #serverList {
    contain: layout paint;
  }

  #serverList button {
    touch-action: manipulation;
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation: none !important;
      transition: none !important;
      scroll-behavior: auto !important;
    }
  }