:root {
  --bg-dark: #0f1115;
  --bg-darker: #090a0d;
  --bg-card: #15181e;
  --bg-card-hover: #1c2028;
  --bg-elevated: #1e222b;
  --border-color: #262a34;
  --border-light: #323846;
  --accent-color: #ff3838;
  --accent-gradient: linear-gradient(135deg, #ff3838 0%, #ff6b3d 100%);
  --accent-orange: #ff5722;
  --star-gold: #ffb703;
  --text-main: #f0f2f5;
  --text-muted: #8e95a5;
  --text-dim: #5c6273;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.4);
  --container-max-width: 1360px;
}

html {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

*, *:before, *:after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-color);
}

/* Header & Top Bar */
.site-header {
  background-color: var(--bg-darker);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: var(--container-max-width, 1360px);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.brand-badge {
  background: var(--accent-gradient);
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-right: 3px;
  font-size: 20px;
}

.brand-text {
  color: #fff;
  font-weight: 800;
}

.brand-tail {
  color: var(--accent-orange);
  margin-left: 2px;
}

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

.nav-link {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: var(--bg-card);
}

/* Dynamic Dropdown Navigation Menu - Luxury Dark Glass Theme */
.nav-item-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Keep the parent nav-link highlighted when menu is open or hovered */
.nav-item-dropdown:hover .dropdown-toggle,
.nav-item-dropdown:focus-within .dropdown-toggle,
.nav-item-dropdown.is-open .dropdown-toggle {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.nav-item-dropdown .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.nav-item-dropdown .dropdown-arrow {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
  opacity: 0.75;
  pointer-events: none;
}

.nav-item-dropdown:hover .dropdown-arrow,
.nav-item-dropdown.is-open .dropdown-arrow {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--accent-orange, #ff6b35);
}

/* Floating Luxury Glass Menu */
.nav-item-dropdown .dropdown-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  min-width: 210px;
  background: #11141d;
  background: linear-gradient(180deg, #151924 0%, #0d1017 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 2px solid var(--accent-orange, #ff6b35);
  border-radius: 10px;
  box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 6px;
  display: none;
  z-index: 9999;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Invisible hover bridge: covers the gap between the nav link and dropdown so hover is never lost */
.nav-item-dropdown .dropdown-menu::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 0;
  right: 0;
  height: 18px;
  background: transparent;
  display: block;
}

.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown.is-open .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu {
  display: block;
  animation: navDropdownEntrance 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes navDropdownEntrance {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Clean, modern sub-item link */
.dropdown-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 7px;
  color: #94a3b8;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.18s ease;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 2px;
  position: relative;
}

.dropdown-link:last-child {
  margin-bottom: 0;
}

/* Glowing micro-dot indicator */
.dropdown-link::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #334155;
  transition: all 0.2s ease;
  flex-shrink: 0;
  display: inline-block;
}

.dropdown-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  padding-left: 17px;
}

.dropdown-link:hover::before {
  background: var(--accent-orange, #ff6b35);
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.9);
  transform: scale(1.3);
}

.dropdown-link:active {
  transform: scale(0.98);
}

/* Mobile elements hidden on desktop */
.mobile-menu-btn {
  display: none;
}
.mobile-drawer-overlay,
.mobile-drawer {
  display: none;
}

.header-search {
  flex: 1;
  max-width: 320px; /* compact rectangle size */
  position: relative;
}

.header-search form {
  display: flex;
  align-items: center;
  position: relative;
}

.header-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px; /* rectangular with subtle curve */
  padding: 7px 72px 7px 14px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
  height: 36px;
}

.header-search input:focus {
  border-color: var(--accent-orange);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 12px rgba(255, 87, 34, 0.2);
}

.search-actions {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
}

.search-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.search-action-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.search-action-btn.search-submit-btn:hover {
  color: var(--accent-orange);
}

/* Voice Mic Button active listening state */
.search-action-btn.voice-btn.listening {
  color: #ff3838;
  background: rgba(255, 56, 56, 0.15);
  animation: micPulse 1.2s infinite ease-in-out;
}

@keyframes micPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 56, 56, 0.6); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(255, 56, 56, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 56, 56, 0); }
}

/* Voice search listening toast banner */
.voice-status-popup {
  position: absolute;
  top: 42px;
  right: 0;
  background: #15181e;
  border: 1px solid rgba(255, 56, 56, 0.4);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.voice-status-popup.active {
  display: inline-flex;
}

.voice-status-popup .listening-wave {
  width: 6px;
  height: 6px;
  background: #ff3838;
  border-radius: 50%;
  animation: pulseDot 1s infinite;
}

/* Alphabet Filter / Glossary Bar */
.glossary-bar-wrap {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: #0a0d14;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.glossary-bar {
  max-width: var(--container-max-width, 1360px);
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.glossary-bar::-webkit-scrollbar {
  display: none;
}

.glossary-item {
  flex: 1;
  min-width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  color: #8b92a4;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.glossary-item:hover {
  background: rgba(255, 56, 56, 0.12);
  color: #ff5722;
  border-color: rgba(255, 87, 34, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 56, 56, 0.25);
}

.glossary-item.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(255, 56, 56, 0.45);
  transform: translateY(-2px);
}

/* Minimalist Hero Notice Banner (Left Content Column) */
.hero-clean-section {
  width: 100%;
  margin-bottom: 24px;
}

.hero-clean-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.hero-clean-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-clean-bar {
  display: inline-block;
  width: 3.5px;
  height: 20px;
  background: #0088cc;
  border-radius: 1px;
  flex-shrink: 0;
}

.hero-clean-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
  margin: 0;
  line-height: 1.25;
}

.hero-telegram-btn {
  background: linear-gradient(135deg, #0088cc 0%, #00a2ed 100%);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(0, 136, 204, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.hero-telegram-btn svg {
  flex-shrink: 0;
}

.hero-telegram-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(0, 136, 204, 0.55);
  filter: brightness(1.12);
  color: #ffffff;
}

.hero-telegram-btn:active {
  transform: translateY(0);
}

.hero-clean-search {
  width: 100%;
}

.hero-clean-search-form {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.hero-clean-search-form input {
  width: 100%;
  background: rgba(255, 255, 255, 0.035); /* theme dark card surface, never pure black */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 84px 12px 18px; /* space for mic + search buttons */
  color: #ffffff;
  font-size: 14px;
  font-weight: 400;
  outline: none;
  height: 46px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}

.hero-clean-search-form input::placeholder {
  color: #7d8597;
  font-size: 13.5px;
}

.hero-clean-search-form input:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: #0088cc;
  box-shadow: 0 0 14px rgba(0, 136, 204, 0.25), inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hero-search-actions {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
}

.hero-search-btn {
  background: transparent;
  border: none;
  color: #8b92a4;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.hero-search-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.hero-search-btn.hero-submit-btn:hover {
  color: #00a2ed;
}

/* Voice Mic Button active listening state */
.hero-search-btn.hero-voice-btn.listening {
  color: #ff3838;
  background: rgba(255, 56, 56, 0.15);
  animation: micPulse 1.2s infinite ease-in-out;
}

.hero-clean-search-form .voice-status-popup {
  top: 52px;
  right: 0;
}

/* Main Layout Grid */
.main-wrapper {
  max-width: var(--container-max-width, 1360px);
  margin: 18px auto 40px;
  padding: 0 20px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  flex: 1;
  align-items: start;
}

.content-area {
  min-width: 0;
  width: 100%;
}

/* Section Titles */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

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

/* Movie Cards Grid */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols-desktop, 5), minmax(0, 1fr));
  gap: 20px 16px;
  margin-bottom: 36px;
  min-width: 0;
  width: 100%;
}

.movie-card {
  background: transparent;
  border-radius: 8px;
  overflow: visible;
  position: relative;
  transition: transform 0.25s ease;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: none;
  border-color: transparent;
}

.movie-poster-wrap {
  position: relative;
  aspect-ratio: 2/3;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #0d0f13;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.28s ease, transform 0.28s ease;
}

.movie-poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.movie-card:hover .movie-poster-wrap {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.75), 0 0 16px rgba(255, 87, 34, 0.15);
}

.movie-card:hover .movie-poster-wrap img {
  transform: scale(1.05);
}

/* Play Overlay Badge */
.play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-circle {
  width: 46px;
  height: 46px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(255, 56, 56, 0.65);
  transform: scale(0.85);
  transition: transform 0.2s ease;
}

.movie-card:hover .play-circle {
  transform: scale(1);
}

.play-icon {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 13px solid #fff;
  margin-left: 3px;
}

/* Badges on Poster */
.badge-rating {
  position: absolute;
  top: 7px;
  right: 7px;
  background: rgba(16, 20, 28, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffb703;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
  border: 1px solid rgba(255, 183, 3, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.badge-rating .star {
  color: #ffb703;
  font-size: 11px;
}

/* Bottom badges container (Quality only) */
.poster-badges-bottom {
  position: absolute;
  bottom: 7px;
  left: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 2;
  pointer-events: none;
}

.badge-quality {
  background: #ff5722;
  background: linear-gradient(135deg, #ff5722 0%, #d84315 100%);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2.5px 7px;
  border-radius: 3px;
  line-height: 1.25;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  display: inline-flex;
  align-items: center;
}

/* Movie Info below Poster */
.movie-info {
  padding: 8px 1px 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.movie-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin: 0 0 3px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  min-width: 0;
  width: 100%;
}

.movie-title a {
  color: #ffffff;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
  min-width: 0;
  width: 100%;
}

.movie-card:hover .movie-title a {
  color: #ff6b35;
}

.movie-meta-row {
  display: flex;
  align-items: center;
  font-size: 12px;
  margin: 0;
  padding: 0;
}

.movie-year {
  color: #718096;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.2;
}

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

.page-num, .page-link {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #cbd5e1;
  font-size: 13.5px;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 14px;
  text-decoration: none;
  user-select: none;
}

.page-num:hover, .page-link:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

.page-num.active, .page-link.current, .page-link.active {
  background: var(--accent-gradient, linear-gradient(135deg, #ff3838 0%, #ff6b3d 100%));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 56, 56, 0.35);
  cursor: default;
  transform: none;
}

.prev-link, .next-link {
  font-weight: 600;
  padding: 0 16px;
  gap: 6px;
}


/* Sidebar Widgets - Premium Cinema Styling */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.widget {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.widget-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 0.6px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
}

.widget-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--accent-gradient);
  margin-right: 10px;
  border-radius: 2px;
}

/* 1. Genres List Widget - tight to right edge, shows 7 then scroll on hover */
.widget-genres {
  padding-right: 4px; /* brings scrollbar right to the edge */
}

.genres-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 290px; /* displays 7 items, remaining scroll on hover */
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px; /* tight right margin for scrollbar */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent; /* invisible by default */
  transition: scrollbar-color 0.3s ease;
}

.genres-list:hover {
  scrollbar-color: var(--accent-orange) rgba(255, 255, 255, 0.05); /* Firefox previous theme color on hover */
}

/* Chrome / Safari / Edge Webkit scrollbar */
.genres-list::-webkit-scrollbar {
  width: 5px;
}

.genres-list::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}

.genres-list::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 10px;
  transition: background 0.3s ease;
}

/* Scrollbar thumb reveals only on hover with previous brand color */
.genres-list:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 87, 34, 0.6); /* Previous theme orange bar */
}

.genres-list::-webkit-scrollbar-thumb:hover {
  background: #ff5722; /* Solid bright orange on direct interaction */
}

.genre-chip {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #a0a6b5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.genre-chip .genre-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.genre-chip:hover {
  background: rgba(255, 56, 56, 0.1);
  border-color: rgba(255, 56, 56, 0.35);
  color: #fff;
  transform: translateX(3px);
}

.genre-count {
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 7px;
  border-radius: 10px;
  color: #cbd5e1;
  flex-shrink: 0;
  transition: all 0.2s;
}

.genre-chip:hover .genre-count {
  background: var(--accent-gradient);
  color: #fff;
}

/* 2. Years Widget - 3 in a row, shows 15 (5 rows) then scroll on hover */
.widget-years {
  padding-right: 4px; /* tight right edge for scrollbar */
}

.years-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 220px; /* shows exactly 15 items (5 rows of 3), remaining scroll */
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent; /* hidden when idle */
  transition: scrollbar-color 0.3s ease;
}

.years-wrap:hover {
  scrollbar-color: var(--accent-orange) rgba(255, 255, 255, 0.05); /* Firefox hover */
}

/* Chrome / Safari / Edge Webkit scrollbar */
.years-wrap::-webkit-scrollbar {
  width: 5px;
}

.years-wrap::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}

.years-wrap::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 10px;
  transition: background 0.3s ease;
}

/* Appears only on hover matching the genres widget */
.years-wrap:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 87, 34, 0.6);
}

.years-wrap::-webkit-scrollbar-thumb:hover {
  background: #ff5722;
}

.year-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 0;
  text-align: center;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #8b92a4;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.year-chip:hover {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(255, 56, 56, 0.3);
}

/* 3. Popular / Top Rated Movies Widget - Premium Cinema Card */
.popular-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 3. Popular / Top Rated Movies Widget - Clean Cinema Card */
.popular-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.popular-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.popular-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 87, 34, 0.3);
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* Slightly cropped up and down: wide 58px x 62px aspect ratio with centered object-fit */
.popular-thumb-wrap {
  width: 58px;
  height: 62px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0d0f14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
  display: block;
}

.popular-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center; /* crops slightly top and bottom */
  transition: transform 0.3s ease;
  display: block;
}

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

.popular-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

/* Single line title with ellipsis */
.popular-title {
  font-size: 13px;
  font-weight: 700;
  color: #f0f2f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.popular-title a {
  color: inherit;
  transition: color 0.2s;
}

.popular-card:hover .popular-title a {
  color: #ff6b3d;
}

.popular-meta-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.popular-rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--star-gold);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.popular-year-text {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
}

.popular-lang-tag {
  color: #9ea5b5;
  font-size: 10px;
  background: rgba(255, 87, 34, 0.12);
  border: 1px solid rgba(255, 87, 34, 0.25);
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
}

/* ========================================================
   GLOBAL MODERN CINEMA FOOTER
   ======================================================== */
.site-footer {
  background: #06090e;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 60px;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff3838 30%, #ff6b3d 60%, transparent);
  opacity: 0.7;
}

.footer-container {
  max-width: var(--container-max-width, 1360px);
  margin: 0 auto;
  padding: 48px 24px 24px;
  box-sizing: border-box;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-brand-text {
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.6;
  max-width: 340px;
  margin: 0;
}

.footer-telegram-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(41, 169, 234, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(41, 169, 234, 0.28);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  width: fit-content;
  transition: all 0.2s ease;
}

.footer-telegram-pill:hover {
  background: #29a9ea;
  color: #ffffff;
  border-color: #29a9ea;
  transform: translateY(-1px);
}

.footer-col-title {
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0 0 16px 0;
  position: relative;
  padding-bottom: 8px;
}

.footer-col-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 24px;
  height: 2px;
  background: #ff3838;
  border-radius: 2px;
}

.footer-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link-list li a {
  color: #94a3b8;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-link-list li a:hover {
  color: #ff6b3d;
  transform: translateX(3px);
}

.footer-disclaimer-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.6;
}

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

.footer-back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.footer-back-to-top:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .site-footer {
    padding: 0;
  }
  .footer-container {
    padding: 32px 3px 18px !important;
  }
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
    row-gap: 24px;
    margin-bottom: 24px;
  }
  .footer-col-brand {
    grid-column: 1 / -1;
    padding: 0 4px;
  }
  .footer-col-nav {
    grid-column: 1 / 2;
    padding: 0 4px;
  }
  .footer-col-links {
    grid-column: 2 / 3;
    padding: 0 4px;
  }
  .footer-col-disclaimer {
    grid-column: 1 / -1;
    padding: 0 2px;
  }
  .footer-disclaimer-card {
    padding: 12px 10px;
    border-radius: 6px;
  }
  .footer-bottom-bar {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 16px 4px 0;
  }
}

/* Responsive Layout & Grid Columns */
@media (max-width: 1024px) {
  .main-wrapper {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }
  .content-area {
    min-width: 0;
    width: 100%;
  }
  .sidebar {
    order: 2;
    min-width: 0;
    width: 100%;
  }
  /* Tablet auto-adjust: uses --grid-cols-tablet (defaults to 4 or desktop - 1) */
  .movies-grid {
    grid-template-columns: repeat(var(--grid-cols-tablet, 4), minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
    width: 100%;
  }
}

/* Tablet Small / Large Mobile */
/* Mobile & Tablet Responsive Header & Drawer (<= 768px) */
@media (max-width: 768px) {
  html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #0f121a;
    width: 100%;
    max-width: 100vw;
  }
  .header-inner {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    padding: 8px 3px !important;
    gap: 0 !important;
  }

  /* Left-aligned brand logo */
  .brand-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }

  /* Completely hide desktop nav and top header search on mobile */
  .header-nav {
    display: none !important;
  }
  .header-search {
    display: none !important;
  }

  /* Clean Modern Animated Hamburger Icon Button */
  .mobile-menu-btn {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4.5px;
    width: 40px;
    height: 40px;
    padding: 9px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    margin-left: auto;
    flex-shrink: 0;
  }
  .mobile-menu-btn:hover,
  .mobile-menu-btn:active {
    background: rgba(255, 107, 53, 0.15);
    border-color: rgba(255, 107, 53, 0.4);
  }
  .mobile-menu-btn .hamburger-bar {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #f1f5f9;
    border-radius: 2px;
    transition: all 0.25s ease;
  }
  .mobile-menu-btn:hover .hamburger-bar {
    background-color: #ff6b35;
  }

  /* Smooth Offcanvas Drawer Overlay */
  .mobile-drawer-overlay {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 12, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  }
  .mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Smooth Offcanvas Drawer Panel */
  .mobile-drawer {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 310px;
    max-width: 86vw;
    background: #0d1017;
    background: linear-gradient(180deg, #131722 0%, #0a0d14 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.85);
    z-index: 10002;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-drawer.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .glossary-bar-wrap {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }
  .glossary-bar {
    justify-content: flex-start;
    padding: 8px 12px;
    -webkit-overflow-scrolling: touch;
  }
  .main-wrapper {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    padding: 0 10px;
  }
  .content-area {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .mobile-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .mobile-drawer-close:hover,
  .mobile-drawer-close:active {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
  }

  .mobile-drawer-body {
    flex: 1;
    padding: 14px 12px;
    overflow-y: auto;
  }
  .mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .mobile-nav-item {
    border-radius: 8px;
    overflow: hidden;
  }
  .mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    color: #e2e8f0;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.18s ease;
    flex: 1;
  }
  .mobile-nav-link:hover,
  .mobile-nav-link:active {
    background: rgba(255, 255, 255, 0.06);
    color: #ff6b35;
  }

  .mobile-nav-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 8px;
    transition: background 0.18s ease;
  }
  .mobile-nav-toggle-row:hover {
    background: rgba(255, 255, 255, 0.04);
  }
  .mobile-submenu-arrow {
    background: none;
    border: none;
    padding: 12px 14px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, color 0.2s ease;
  }
  .mobile-nav-item.open .mobile-submenu-arrow {
    transform: rotate(180deg);
    color: #ff6b35;
  }

  .mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(0, 0, 0, 0.28);
    border-radius: 7px;
    margin: 0 4px;
  }
  .mobile-nav-item.open .mobile-submenu {
    max-height: 400px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 4px;
    margin-bottom: 6px;
    padding: 4px 0;
  }
  .mobile-sub-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 24px;
    color: #94a3b8;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
  }
  .mobile-sub-link .sub-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #475569;
    transition: all 0.15s ease;
  }
  .mobile-sub-link:hover,
  .mobile-sub-link:active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    padding-left: 28px;
  }
  .mobile-sub-link:hover .sub-dot {
    background: #ff6b35;
    box-shadow: 0 0 8px #ff6b35;
  }

  .mobile-drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
  }

  .movies-grid {
    grid-template-columns: repeat(var(--grid-cols-mobile, 3), minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
    width: 100%;
  }
}

/* Mobile Responsive (default 3 columns even on small mobile) */
@media (max-width: 640px) {
  .main-wrapper {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    width: 100%;
    padding: 0 3px;
    margin-top: 8px;
    box-sizing: border-box;
  }
  .content-area {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .movies-grid {
    grid-template-columns: repeat(var(--grid-cols-mobile, 3), minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 24px;
    min-width: 0;
    width: 100%;
  }
  .movie-card {
    border-radius: 6px;
    background: transparent;
    border: none;
    box-shadow: none;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .movie-info {
    padding: 6px 1px 0;
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }
  .movie-title {
    font-size: 11px;
    min-height: auto;
    margin-bottom: 2px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    width: 100%;
  }
  .movie-title a {
    min-width: 0;
    width: 100%;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .movie-meta-row {
    font-size: 10px;
    padding-top: 0;
  }
  .movie-year {
    font-size: 10px;
  }
  .badge-rating {
    top: 4px;
    right: 4px;
    font-size: 9px;
    padding: 2px 4px;
    gap: 2px;
    border-radius: 4px;
  }
  .badge-rating .star {
    font-size: 9px;
  }
  .poster-badges-bottom {
    bottom: 4px;
    left: 4px;
    right: 4px;
    gap: 3px;
  }
  .badge-quality,
  .badge-lang {
    font-size: 8.5px;
    padding: 1.5px 4px;
    border-radius: 3px;
    line-height: 1.2;
  }
  .play-circle {
    width: 32px;
    height: 32px;
  }
  .play-icon {
    border-top-width: 5px;
    border-bottom-width: 5px;
    border-left-width: 9px;
    margin-left: 2px;
  }
  .hero-clean-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }
  .hero-clean-title-group {
    min-width: 0;
    flex: 1 1 auto;
  }
  .hero-clean-title {
    font-size: 14px;
    min-width: 0;
    word-break: break-word;
    line-height: 1.3;
  }
  .hero-telegram-btn {
    padding: 5px 12px;
    font-size: 11.5px;
    flex-shrink: 0;
  }
}

/* Extra Small Mobile Screens (down to 320px) */
@media (max-width: 380px) {
  .main-wrapper {
    padding: 0 5px;
    box-sizing: border-box;
  }
  .movies-grid {
    grid-template-columns: repeat(var(--grid-cols-mobile, 3), minmax(0, 1fr));
    gap: 5px;
    min-width: 0;
    width: 100%;
  }
  .movie-card {
    min-width: 0;
    width: 100%;
  }
  .movie-info {
    padding: 5px 1px 0;
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }
  .movie-title {
    font-size: 10px;
    min-height: auto;
    min-width: 0;
    width: 100%;
  }
  .movie-meta-row {
    font-size: 9px;
  }
  .movie-year, .movie-genre, .movie-cat {
    font-size: 9px;
  }
  .badge-quality, .badge-lang {
    font-size: 7.5px;
    padding: 1px 3px;
  }
  .badge-rating {
    font-size: 8px;
    padding: 1px 3px;
  }
}
