/* ==========================================================================
   Story Cinema — Netflix Aesthetic Design System CSS
   ========================================================================== */

:root {
  --bg-primary: #141414;
  --bg-darker: #0b0b0b;
  --bg-surface: #181818;
  --bg-surface-elevated: #232323;
  --bg-glass: rgba(20, 20, 20, 0.85);
  --bg-glass-heavy: rgba(14, 14, 14, 0.95);
  
  --netflix-red: #e50914;
  --netflix-red-hover: #f40612;
  --netflix-red-glow: rgba(229, 9, 20, 0.45);
  --netflix-green: #46d369;
  --accent-cyan: #00f0ff;
  --accent-gold: #ffb800;

  --text-primary: #ffffff;
  --text-secondary: #e5e5e5;
  --text-muted: #808080;
  --text-subtle: #aaaaaa;

  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-medium: rgba(255, 255, 255, 0.2);
  --border-glow: rgba(229, 9, 20, 0.35);

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --font-main: 'Be Vietnam Pro', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;

  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.9);
  --shadow-popup: 0 24px 60px rgba(0, 0, 0, 0.95);

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.012em;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

@media (max-width: 768px) {
  body:not(.cinema-reader-body) {
    padding-bottom: 70px;
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
  background: #333333;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #555555;
}

/* Layout */
.container-fluid {
  width: 100%;
  max-width: 1680px;
  padding: 0 4%;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .container-fluid {
    padding: 0 16px;
  }
}

/* Netflix Header */
.cinema-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  transition: background-color var(--transition-smooth), padding var(--transition-smooth);
}

.cinema-header.is-scrolled {
  background-color: var(--bg-darker);
  padding: 12px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 36px;
}

.mobile-menu-toggle-btn {
  display: none;
  font-size: 1.25rem;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-menu-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 900px) {
  .mobile-menu-toggle-btn {
    display: flex;
  }
}

.site-brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  white-space: nowrap;
  transition: transform var(--transition-fast);
}

.site-brand-logo:hover {
  transform: scale(1.03);
}

.brand-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.brand-logo-mark svg {
  display: block;
  border-radius: var(--radius-xs);
  box-shadow: 0 0 12px var(--netflix-red-glow);
}

.brand-text-name {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: #ffffff;
  font-family: var(--font-main);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  font-weight: 700;
}

.badge-live-hot {
  font-size: 0.65rem;
  font-weight: 800;
  background: var(--netflix-red);
  color: #fff;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-trigger-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.search-trigger-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.search-key-badge {
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-header-action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-header-action:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Language Switcher Dropdown */
.header-lang-wrapper {
  position: relative;
}

.header-lang-btn {
  gap: 4px;
  width: auto;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.header-lang-btn .lang-short-code {
  font-size: 0.76rem;
  letter-spacing: 0.5px;
}

.header-lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 170px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all var(--transition-fast);
}

.header-lang-wrapper.is-open .header-lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.lang-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.lang-dropdown-item.is-active {
  background: rgba(229, 9, 20, 0.15);
  color: #ffffff;
}

.lang-dropdown-item .lang-flag {
  font-size: 1.1rem;
}

.lang-dropdown-item .lang-name {
  flex: 1;
}

.lang-dropdown-item .lang-check-icon {
  color: var(--netflix-red);
  font-size: 0.95rem;
}

/* Drawer Language Selector */
.drawer-lang-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.drawer-lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  /* Ô rộng 112px trên máy 320px: "Tiếng Việt" bị bẻ thành hai dòng còn "English"
     một dòng, hai nút cạnh nhau cao thấp lệch nhau. */
  white-space: nowrap;
  min-width: 0;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.drawer-lang-btn.is-active {
  background: rgba(229, 9, 20, 0.2);
  border-color: var(--netflix-red);
  color: #fff;
}

@media (max-width: 900px) {
  .header-nav {
    display: none;
  }
  .search-trigger-btn span {
    display: none;
  }
  .search-trigger-btn {
    padding: 0;
    width: 36px;
    height: 36px;
    justify-content: center;
    border-radius: 50%;
  }
}

/* Mobile Slide-In Navigation Drawer */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
}

.mobile-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  background: var(--bg-darker);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--transition-smooth);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.9);
}

.mobile-drawer-overlay.is-open .mobile-drawer-content {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-close-btn {
  font-size: 1.4rem;
  color: var(--text-muted);
}

.drawer-close-btn:hover {
  color: #fff;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.drawer-search-box {
  margin-bottom: 24px;
}

.drawer-search-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.drawer-nav-section {
  margin-bottom: 24px;
}

.drawer-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.drawer-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drawer-link-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.drawer-link-list a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--netflix-red);
}

.drawer-link-list a i {
  font-size: 1.2rem;
  color: var(--netflix-red);
}

.drawer-genre-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-genre-pills .genre-pill-tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
}

/* Netflix Hero Billboard */
.cinema-hero-billboard {
  position: relative;
  width: 100%;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-bottom: 36px;
}

@media (max-width: 768px) {
  .cinema-hero-billboard {
    min-height: 520px;
    margin-bottom: 24px;
  }
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-backdrop-container {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-backdrop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-vignette-overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(90deg, var(--bg-primary) 0%, rgba(20, 20, 20, 0.95) 36%, rgba(20, 20, 20, 0.4) 75%, transparent 100%),
    linear-gradient(0deg, var(--bg-primary) 0%, rgba(20, 20, 20, 0.7) 40%, transparent 100%);
}

.hero-content-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 100px;
  padding-bottom: 50px;
}

@media (max-width: 768px) {
  .hero-content-wrapper {
    padding-top: 88px;
    padding-bottom: 30px;
  }
}

@media (max-width: 480px) {
  .hero-content-wrapper {
    padding-top: 92px;
    padding-bottom: 24px;
  }
}

.hero-info-card {
  max-width: 650px;
}

.hero-badges-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.badge-pill-neon {
  background: var(--netflix-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-pill-rating {
  background: rgba(70, 211, 105, 0.15);
  border: 1px solid rgba(70, 211, 105, 0.4);
  color: var(--netflix-green);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.badge-pill-status {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.hero-main-title {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 8px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.hero-original-title {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 14px;
}

.hero-synopsis {
  font-size: 0.96rem;
  color: #e5e5e5;
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.hero-meta-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item i {
  color: var(--netflix-red);
}

.hero-cta-group, .detail-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.btn-hero-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #000000;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-hero-play:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: scale(1.02);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(109, 109, 110, 0.7);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-hero-secondary:hover {
  background: rgba(109, 109, 110, 0.4);
  transform: scale(1.02);
}

.btn-hero-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(42, 42, 42, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  cursor: pointer;
}

.btn-hero-icon:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.btn-text-desktop { display: inline; }
.btn-text-mobile { display: none; }

@media (max-width: 600px) {
  .hero-cta-group, .detail-action-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    width: 100%;
  }
  .btn-text-desktop { display: none; }
  .btn-text-mobile { display: inline; }
  .btn-hero-play {
    flex: 1 1 auto;
    padding: 8px 10px;
    font-size: 0.82rem;
    gap: 5px;
    justify-content: center;
  }
  .btn-hero-secondary {
    flex: 1 1 auto;
    padding: 8px 10px;
    font-size: 0.82rem;
    gap: 5px;
    justify-content: center;
  }
  .btn-hero-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    flex: 0 0 36px;
  }
}

.hero-slider-pagination {
  position: absolute;
  bottom: 24px;
  right: 4%;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.3);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.slider-dot.is-active {
  width: 24px;
  background: var(--netflix-red);
}

/* Netflix Horizontal Rails */
.cinema-rail-section {
  position: relative;
  z-index: 5;
  margin-bottom: 40px;
}

.rail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.rail-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rail-title-bar {
  width: 4px;
  height: 18px;
  background: var(--netflix-red);
  border-radius: 2px;
  flex-shrink: 0;
}

.rail-title {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 800;
  color: #e5e5e5;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.rail-nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.rail-view-all {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.rail-view-all:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.rail-arrow-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  flex-shrink: 0;
}

.rail-arrow-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {
  .rail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
  }
  .rail-title-group {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }
  .rail-title {
    font-size: 0.92rem;
    white-space: normal;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .rail-nav-controls {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .rail-view-all {
    padding: 3px 8px;
    font-size: 0.72rem;
    white-space: nowrap;
  }
  .rail-arrow-btn {
    display: none; /* Native touch swipe is used on mobile */
  }
}

.rail-track-container {
  overflow: visible;
  position: relative;
}

.rail-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 0 16px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  transform: translateZ(0);
  /* Vuốt xong thì hàng thẻ dừng lại đúng mép một thẻ thay vì đứng giữa chừng.
     Dùng proximity chứ không phải mandatory: mandatory ép dính ở mọi cú vuốt,
     kể cả khi người dùng chỉ muốn nhích nhẹ. */
  scroll-snap-type: x proximity;
  scroll-padding-left: 2px;
}

.rail-track > * {
  scroll-snap-align: start;
}
.rail-track::-webkit-scrollbar {
  display: none;
}

/* Nút cuộn của hàng thẻ.
   Trước đây hai mũi tên luôn hiện với cùng độ đậm, kể cả khi hàng đã ở đầu, ở cuối,
   hoặc ngắn đến mức không cuộn được — bấm vào thì không có gì xảy ra. */
.rail-arrow-btn {
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.rail-arrow-btn.is-edge {
  opacity: 0.25;
  pointer-events: none;
}

.rail-nav-controls.is-static .rail-arrow-btn {
  display: none;
}

/* Story Card Component */
.cinema-card-wrapper {
  flex: 0 0 calc(16.666% - 10px);
  min-width: 175px;
  position: relative;
}

@media (max-width: 1300px) {
  .cinema-card-wrapper { flex: 0 0 calc(20% - 10px); min-width: 160px; }
}
@media (max-width: 1000px) {
  .cinema-card-wrapper { flex: 0 0 calc(25% - 9px); min-width: 145px; }
}
@media (max-width: 768px) {
  .cinema-card-wrapper { flex: 0 0 calc(33.333% - 8px); min-width: 110px; }
}
@media (max-width: 480px) {
  .cinema-card-wrapper { flex: 0 0 calc(33.333% - 8px); min-width: 105px; }
}

.cinema-card {
  position: relative;
  transition: transform var(--transition-fast);
}

.poster-media {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.1) 45%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

.card-single-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  background: var(--netflix-red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
}

.quick-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  background: rgba(0, 0, 0, 0.4);
  transition: opacity var(--transition-fast);
}

.play-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transform: scale(0.85);
  transition: transform var(--transition-fast);
}

.cinema-card:hover {
  transform: translateY(-4px);
}

.cinema-card:hover .poster-img {
  transform: scale(1.04);
}

.cinema-card:hover .quick-play-overlay {
  opacity: 1;
}

.cinema-card:hover .play-circle-btn {
  transform: scale(1);
}

.poster-bottom-meta {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}

.meta-rating {
  color: var(--netflix-green);
  display: flex;
  align-items: center;
  gap: 2px;
}

.meta-year {
  color: var(--text-secondary);
}

/* Card details */
.card-details {
  padding: 8px 2px 2px 2px;
}

.card-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  letter-spacing: -0.01em;
}

.card-title a:hover {
  color: var(--netflix-red);
}

.card-sub-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .card-title {
    font-size: 0.8rem;
    line-height: 1.24;
    -webkit-line-clamp: 2;
    margin-top: 3px;
  }
  /* Không hạ xuống 0.65rem (10.4px): trên điện thoại đây đã là dòng chữ nhỏ nhất
     của thẻ truyện, thu thêm nữa thì tên thể loại gần như không đọc được. */
  .card-sub-meta {
    font-size: 0.72rem;
  }
}

/* Netflix Top 10 3D Metal Numbers */
.cinema-card-wrapper.is-ranked-card {
  display: flex;
  align-items: center;
  padding-left: 28px;
}

.rank-number-svg {
  position: absolute;
  left: -10px;
  bottom: 12px;
  font-size: 5.5rem;
  font-weight: 900;
  line-height: 0.8;
  color: #0b0b0b;
  -webkit-text-stroke: 3px #595959;
  z-index: 1;
  pointer-events: none;
}

.cinema-card-wrapper.is-ranked-card .cinema-card {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* Continue Watching Progress Row */
.continue-reading-rail {
  margin-bottom: 36px;
}

.continue-card {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-surface);
}

.progress-bar-container {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
}

.progress-fill {
  height: 100%;
  background: var(--netflix-red);
}

/* Mobile Bottom Navigation Bar */
.cinema-mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  padding: 8px 0;
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
  .cinema-mobile-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  flex: 1;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.mobile-nav-item i {
  font-size: 1.3rem;
}

.mobile-nav-item:hover, .mobile-nav-item.is-active {
  color: #ffffff;
}

/* Instant Live Search Modal */
.cinema-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 16px 40px 16px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
}

.cinema-search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.search-modal-box {
  width: 100%;
  max-width: 660px;
  background: var(--bg-darker);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-popup);
  overflow: hidden;
}

.search-input-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.search-icon-lg {
  font-size: 1.4rem;
  color: var(--netflix-red);
}

.search-main-input {
  /* flex:1 giữ nguyên chiều rộng cơ sở của ô input nên trên máy 320px cả hàng cần
     342px, đẩy nút đóng ra ngoài mép — người dùng không tắt được lớp tìm kiếm.
     flex-basis 0 kèm min-width 0 mới cho ô thu lại đúng phần còn trống. */
  flex: 1 1 0;
  min-width: 0;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  outline: none;
}

.search-close-btn {
  font-size: 1.4rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Màn hẹp: rút gọn khoảng đệm để ô nhập còn đủ chỗ hiển thị chữ. */
@media (max-width: 430px) {
  .search-input-header {
    gap: 8px;
    padding: 12px 12px;
  }

  .search-main-input {
    font-size: 1rem;
  }
}

.search-results-wrapper {
  max-height: 460px;
  overflow-y: auto;
  padding: 14px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.search-result-item:hover {
  background: var(--bg-surface);
}

.search-result-thumb {
  width: 46px;
  height: 66px;
  border-radius: var(--radius-xs);
  object-fit: cover;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Footer */
.cinema-footer {
  background: #0b0b0b;
  border-top: 1px solid var(--border-subtle);
  padding: 50px 0 30px 0;
  margin-top: 60px;
  color: var(--text-muted);
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 36px;
  margin-bottom: 36px;
}

@media (max-width: 900px) {
  .footer-top-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-top-grid { grid-template-columns: 1fr; }
}

.footer-brand-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-bottom-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* Ken Burns Billboard Animation */
.hero-slide.is-active .hero-backdrop-img {
  animation: heroKenBurns 12s ease-out forwards;
}

@keyframes heroKenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

/* Global Floating Toast Notification (Netflix Style) */
.cinema-global-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999999;
  background: #232323;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-left: 4px solid var(--netflix-red);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.cinema-global-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cinema-global-toast i {
  color: var(--netflix-red);
  font-size: 1.3rem;
}

@media (max-width: 768px) {
  .cinema-global-toast {
    bottom: 80px;
    right: 16px;
    left: 16px;
    font-size: 0.82rem;
  }
}

/* ==========================================================================
   Genre Spotlight Section (Visual Cards Grid)
   ========================================================================== */
.cinema-genre-spotlight-section {
  position: relative;
  z-index: 5;
  margin-bottom: 48px;
}

.genre-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

@media (max-width: 1200px) {
  .genre-spotlight-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

@media (max-width: 600px) {
  .genre-spotlight-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

.genre-spotlight-card {
  position: relative;
  height: 160px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.genre-spotlight-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
}

.genre-card-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.genre-card-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.genre-spotlight-card:hover .genre-card-bg img {
  transform: scale(1.08);
}

.genre-card-gradient {
  position: absolute;
  inset: 0;
  mix-blend-mode: multiply;
  opacity: 0.9;
}

.genre-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.genre-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 8px;
}

.genre-card-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.genre-card-desc {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.genre-explore-link {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--transition-fast);
}

.genre-spotlight-card:hover .genre-explore-link {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================================================
   Leaderboard Matrix Section (3 Columns)
   ========================================================================== */
.cinema-leaderboard-section {
  position: relative;
  z-index: 5;
  margin-bottom: 48px;
}

.leaderboard-columns-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 992px) {
  .leaderboard-columns-grid { grid-template-columns: 1fr; gap: 16px; }
}

.leaderboard-col-card {
  min-width: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.col-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.col-badge-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.col-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-row-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
}

.leaderboard-row-item:hover {
  background: var(--bg-surface-elevated);
  transform: translateX(4px);
}

.rank-badge-box {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-badge-box.is-top-1 {
  background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
  color: #000;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.rank-badge-box.is-top-2 {
  background: linear-gradient(135deg, #e0e0e0 0%, #9e9e9e 100%);
  color: #000;
}

.rank-badge-box.is-top-3 {
  background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
  color: #fff;
}

.leaderboard-thumb {
  width: 44px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}

.leaderboard-meta {
  flex: 1 1 auto;
  /* overflow ẩn để phần chữ dài không đẩy cả hàng rộng ra: nếu thiếu, chiều rộng
     tối thiểu của bảng xếp hạng kéo theo cả trang không co xuống dưới 409px và trình
     duyệt điện thoại phải thu nhỏ toàn bộ giao diện. */
  min-width: 0;
  overflow: hidden;
}

.item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.item-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.btn-read-quick {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: color var(--transition-fast);
}

.leaderboard-row-item:hover .btn-read-quick {
  color: var(--netflix-red);
}

/* ==========================================================================
   Bỏ qua tới nội dung chính
   Liên kết đầu tiên trong tab order, chỉ hiện khi được focus bằng bàn phím.
   ========================================================================== */
.skip-to-content {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-to-content:focus,
.skip-to-content:focus-visible {
  position: fixed;
  top: 12px;
  left: 50%;
  width: auto;
  height: auto;
  margin: 0 0 0 -118px;
  padding: 12px 22px;
  overflow: visible;
  clip: auto;
  clip-path: none;
  z-index: 10000;
  border-radius: 10px;
  background: var(--netflix-red, #e50914);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Vòng focus thấy rõ cho thao tác bằng bàn phím trên nền tối. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 2px solid var(--netflix-red, #e50914);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Không ép người dùng xem hiệu ứng nếu họ đã tắt chuyển động trong hệ điều hành. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Màn hình rất hẹp (≤ 430px)

   Ở 900px thanh tìm kiếm đã co thành nút tròn, nhưng trên máy 320–375px thì phần
   bên phải của header vẫn rộng 203px và đẩy nút mở menu ra ngoài mép màn hình —
   người dùng không bấm được vào menu. Rút gọn khoảng cách, cỡ chữ thương hiệu và
   nhãn ngôn ngữ để mọi nút nằm gọn trong khung.
   ========================================================================== */
@media (max-width: 430px) {
  .header-inner {
    gap: 8px;
  }

  .header-left {
    gap: 10px;
    min-width: 0;
  }

  .header-right {
    gap: 6px;
    flex-shrink: 0;
  }

  .brand-text-name {
    font-size: 1.05rem;
  }

  .site-brand-logo {
    min-width: 0;
  }

  .btn-header-action,
  .search-trigger-btn,
  .mobile-menu-toggle-btn {
    width: 34px;
    height: 34px;
  }

  /* Nhãn VI/EN đã có sẵn trong danh sách xổ xuống, ở đây chỉ cần biểu tượng quả cầu. */
  .lang-short-code {
    display: none;
  }

  .header-lang-btn {
    width: 34px;
    padding: 0;
  }
}

/* Màn 360px trở xuống: bỏ nốt chữ thương hiệu, giữ lại dấu hiệu nhận diện. */
@media (max-width: 360px) {
  .brand-text-name {
    display: none;
  }
}

/* ==========================================================================
   Vùng chạm tối thiểu trên thiết bị cảm ứng

   Nút đóng của ngăn menu và lớp tìm kiếm chỉ rộng 22px, ô nhập tìm kiếm cao 21px và
   các liên kết chân trang cao 20px — đều dưới mức 24px mà WCAG 2.2 AA yêu cầu, trong
   khi đây lại là những thứ người dùng bấm bằng ngón tay.
   ========================================================================== */
@media (pointer: coarse) {
  .drawer-close-btn,
  .search-close-btn {
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .search-main-input {
    min-height: 44px;
  }

  .footer-links a {
    display: inline-block;
    padding: 6px 0;
  }

  /* Bổ sung 27/10/2026 sau khi quét lại bằng Playwright có bật cảm ứng.

     Tiêu đề truyện trong thẻ card là một liên kết riêng, cao đúng 16px — thẻ
     card KHÔNG phải một liên kết bao ngoài, nên trên điện thoại người dùng
     đang bấm vào vạch chữ 16px. Thêm đệm dọc cho đủ 24px mà không đổi bố cục
     vì chữ vẫn nằm nguyên chỗ cũ. */
  /* Tiêu đề truyện trong thẻ card xem ở luật chung phía dưới — để ở đây thì
     luật chung (đứng sau, cùng độ ưu tiên) ghi đè mất và máy tính bảng tụt
     xuống 22px. Gặp 29/10/2026. */
}

/* ==========================================================================
   Vùng chạm tối thiểu trên chuột — WCAG 2.5.8 áp dụng cho mọi loại con trỏ,
   không riêng cảm ứng. Bổ sung 29/10/2026 sau khi quét bằng Playwright ở
   1440x900:

     A.nav-link            71x21  — 6 liên kết điều hướng đầu trang
     A trong H3.card-title 137x18 — 31 tiêu đề truyện
     BUTTON.drawer-close-btn 22x28 và .search-close-btn 22x28

   Chỉ nới theo chiều dọc bằng min-height và đệm, nên chữ vẫn nằm nguyên chỗ
   cũ và bố cục không xô.
   ========================================================================== */
.header-nav .nav-link {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}

/* Một luật chung cho mọi bề ngang. Chữ tiêu đề cao 16–18px tuỳ bề ngang, nên
   đệm 5px cho ra 26–28px — dư biên so với mức 24px, tránh chuyện làm tròn
   khiến 23,99px vẫn bị chấm là thiếu. */
h2.card-title a,
h3.card-title a,
h4.card-title a {
  display: inline-block;
  padding: 5px 0;
}

.drawer-close-btn,
.search-close-btn {
  min-width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Ô tìm kiếm trong ngăn menu giữ nguyên phần chữ.
   Nút này dùng chung lớp .search-trigger-btn với nút trên header, mà từ 900px trở
   xuống lớp đó bị thu thành hình tròn chỉ còn biểu tượng — trong ngăn menu thì thừa
   chỗ, và một ô vuông trống không nói lên nó dùng để làm gì. */
.drawer-search-trigger.search-trigger-btn {
  width: 100%;
  height: auto;
  padding: 11px 14px;
  border-radius: var(--radius-xs);
  justify-content: flex-start;
  gap: 10px;
}

.drawer-search-trigger.search-trigger-btn span {
  display: inline;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dòng thông tin phụ trong kết quả tìm kiếm.
   Trên máy 320px chuỗi "Đô Thị Dị Năng" bị bẻ xuống bốn dòng, mỗi dòng một chữ, làm
   mỗi kết quả cao gấp ba lần bình thường. Giữ mỗi mảnh trên một dòng và cắt bớt tên
   thể loại nếu quá dài. */
.search-result-sub {
  flex-wrap: nowrap;
  min-width: 0;
}

.search-result-sub > span {
  white-space: nowrap;
}

.search-result-sub .search-result-genre {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ===========================================================
   Breadcrumb trên trang truyện
   Một dòng mảnh đặt ngay trên tiêu đề, trong khung thông tin —
   không cắt ngang ảnh nền toàn khổ phía sau.
   =========================================================== */
.story-breadcrumb {
  margin-bottom: 14px;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.story-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.story-breadcrumb li {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.story-breadcrumb li + li::before {
  content: "/";
  color: rgba(255, 255, 255, 0.3);
}
.story-breadcrumb a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.15s ease;
}
.story-breadcrumb a:hover,
.story-breadcrumb a:focus-visible {
  color: #fff;
  text-decoration: underline;
}
/* Tên truyện có thể rất dài; cắt bớt để breadcrumb không đẩy tiêu đề xuống hai dòng. */
.story-breadcrumb [aria-current="page"] {
  color: rgba(255, 255, 255, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(100%, 32ch);
}
@media (max-width: 600px) {
  .story-breadcrumb {
    font-size: 0.75rem;
    margin-bottom: 10px;
  }
  /* Trên màn hẹp chỉ giữ hai bậc gần nhất, nếu không nó chiếm cả hai dòng. */
  .story-breadcrumb li:nth-child(1),
  .story-breadcrumb li:nth-child(2) {
    display: none;
  }
  .story-breadcrumb li:nth-child(3)::before {
    content: none;
  }
}
