/* ===== CSS Variables ===== */
:root {
  --bg-primary: #0a0806;       /* Cinema warm cocoa black */
  --bg-secondary: #14110e;     /* Dark butter warm cocoa */
  --bg-tertiary: #1e1a15;      /* Medium warm cocoa */
  --surface-glass: rgba(255, 255, 255, 0.04);
  --text-primary: #fdfdfc;     /* Cream white */
  --text-secondary: #c2bbb5;   /* Warm soft silver */
  --text-muted: #8c837a;       /* Warm muted brown-gray */
  --accent: #ffb703;           /* Popcorn Yellow */
  --accent2: #ffd166;          /* Popcorn Cream Gold */
  --accent-gradient: linear-gradient(135deg, #ffb703, #ffd166);
  --logo-gradient: linear-gradient(135deg, #ffb703, #ffffff);
  --badge-hd: #ffd166;         /* Popcorn Gold */
  --badge-lang: #fdfdfc;       /* White */
  --badge-ep: #ffb703;         /* Popcorn Yellow */
  --border: rgba(255, 255, 255, 0.06);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  --radius: 16px;              /* Bubbly, cute, relaxing style */
  --radius-sm: 10px;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth
}

body {
  font-family: 'Be Vietnam Pro', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color .2s
}

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

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

ul {
  list-style: none
}

h1,
h2,
h3,
h4 {
  font-family: 'Be Vietnam Pro', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px
}

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background .3s
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
  flex-wrap: nowrap
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.header__logo:hover {
  transform: scale(1.02);
}

.logo__svg {
  display: flex;
  align-items: center;
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 10px rgba(123, 47, 247, 0.4));
}

.logo__text {
  background: var(--logo-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.header__nav {
  flex: 1
}

.nav__list {
  display: flex;
  gap: 4px
}

.nav__link {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all .2s;
  white-space: nowrap
}

.nav__link:hover,
.nav__link--active {
  color: var(--text-primary);
  background: var(--surface-glass)
}

.nav__link--active {
  color: var(--accent)
}

.nav__dropdown {
  position: relative
}

.dropdown__arrow {
  font-size: .7rem;
  margin-left: 2px
}

.dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 400px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  z-index: 100
}

.dropdown__menu--wide {
  min-width: 480px
}

.nav__dropdown:hover .dropdown__menu {
  display: block
}

.dropdown__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px
}

.dropdown__item {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: .85rem;
  color: var(--text-secondary);
  transition: all .2s
}

.dropdown__item:hover {
  background: var(--surface-glass);
  color: var(--text-primary)
}

.header__search {
  margin-left: auto;
  flex-shrink: 1;
  min-width: 0
}

.search__form {
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
  transition: border-color .2s
}

.search__form:focus-within {
  border-color: var(--accent)
}

.search__input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  padding: 8px 16px;
  font-size: .9rem;
  width: 200px;
  min-width: 0
}

.search__input::placeholder {
  color: var(--text-muted)
}

.search__btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 8px 12px;
  cursor: pointer;
  display: flex
}

.search__icon {
  width: 18px;
  height: 18px
}



.header__mobile-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
  position: relative
}

.hamburger {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all .3s
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  left: 0;
  transition: all .3s
}

.hamburger::before {
  top: -8px
}

.hamburger::after {
  top: 8px
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .9rem;
  border: none;
  cursor: pointer;
  transition: all .3s;
  white-space: nowrap
}

.btn--primary {
  background: var(--accent-gradient);
  color: #080c14;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.25)
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 240, 255, 0.35);
  color: #080c14
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border)
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.btn--lg {
  padding: 14px 32px;
  font-size: 1rem
}

.btn--sm {
  padding: 6px 16px;
  font-size: .8rem
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  line-height: 1;
  white-space: nowrap;
  width: max-content;
}

.badge--quality {
  background: var(--badge-hd);
  color: #000
}

.badge--lang {
  background: rgba(255, 183, 3, 0.12);
  border: 1px solid rgba(255, 183, 3, 0.3);
  color: var(--accent);
}

.badge--episode {
  background: var(--badge-ep);
  color: #000
}

.badge--source {
  font-size: .65rem;
  padding: 2px 5px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: .3px;
}

.badge--source-ophim {
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.badge--source-kkphim {
  background: rgba(255, 183, 3, 0.1);
  color: var(--accent2);
  border: 1px solid rgba(255, 183, 3, 0.3);
}

.badge--status {
  background: var(--accent);
  color: #fff
}

.badge--completed {
  background: var(--badge-hd)
}

.badge--year {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border)
}

/* ===== Hero Banner ===== */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #04060a;
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(4px) brightness(0.45);
  transform: scale(1.02);
}

.hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(8, 12, 20, 0.95) 0%, rgba(8, 12, 20, 0.7) 40%, rgba(8, 12, 20, 0.2) 100%),
              linear-gradient(to top, rgba(8, 12, 20, 1) 0%, rgba(8, 12, 20, 0) 25%);
}

.hero__content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 60px;
  padding: 80px 20px;
}

.hero__info {
  flex: 1;
}

.hero__badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.hero__title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 6px;
  color: var(--text-primary);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero__origin {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-weight: 500;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.hero__meta-item {
  color: var(--text-secondary);
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.hero__poster {
  flex-shrink: 0;
  width: 280px;
  display: block;
}

.hero__poster-img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border);
  transition: transform 0.3s;
}

.hero__poster-img:hover {
  transform: scale(1.02);
}

/* Custom cobephim tags and buttons for Hero */
.tag-imdb {
  background: var(--accent2);
  color: #080c14;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
}

.tag-classic {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.hero__description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 650px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.button-play-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--accent-gradient);
  border-radius: 50%;
  color: #080c14;
  font-size: 1.3rem;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.4);
  text-decoration: none;
}

.button-play-hero:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(0, 240, 255, 0.6);
  color: #080c14;
}

/* ===== Sections ===== */
.section {
  padding: 48px 0
}

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

.section__title {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px
}

.section__title-icon {
  font-size: 1.3rem
}

.section__viewall {
  color: var(--accent);
  font-weight: 500;
  font-size: .9rem
}

.section__viewall:hover {
  text-decoration: underline
}

.section__count {
  color: var(--text-muted);
  font-size: .9rem
}

/* ===== Movie Grid ===== */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-bottom: 32px
}

/* ===== Movie Card ===== */
.movie-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: all .3s
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(0, 240, 255, 0.2)
}

.movie-card__poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  flex-shrink: 0;
}

.movie-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s
}

.movie-card:hover .movie-card__img {
  transform: scale(1.08)
}

.movie-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 12, 20, 0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s;
  display: flex;
  align-items: center;
  justify-content: center
}

.movie-card:hover .movie-card__overlay {
  opacity: 1
}

.movie-card__play {
  width: 52px;
  height: 52px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #080c14;
  transform: scale(0);
  transition: transform .3s;
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3)
}

.movie-card:hover .movie-card__play {
  transform: scale(1)
}

.movie-card__badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: calc(100% - 16px);
}

.movie-card__episode {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px
}

.movie-card__info {
  padding: 12px
}

.movie-card__title {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
  height: 2.34rem; /* 2 lines of text (0.9rem * 1.3 * 2) to align cards */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px
}

.movie-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--text-muted)
}

.movie-card__origin {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden
}

/* ===== Category Grid ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .3s;
  text-align: center
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--bg-tertiary)
}

.category-card__icon {
  font-size: 2rem
}

.category-card__name {
  font-weight: 600;
  font-size: .95rem
}

/* ===== Tag Grid (Genre/Country list) ===== */
.tag-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px
}

.tag-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all .3s
}

.tag-card:hover {
  border-color: var(--accent);
  background: var(--bg-tertiary);
  transform: translateX(4px)
}

.tag-card__name {
  font-weight: 500
}

.tag-card__arrow {
  color: var(--text-muted);
  transition: color .2s
}

.tag-card:hover .tag-card__arrow {
  color: var(--accent)
}

/* ===== Detail Hero ===== */
.detail-hero {
  position: relative;
  padding: 48px 0;
  min-height: 480px;
  display: flex;
  align-items: center
}

.detail-hero__backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  filter: blur(4px) brightness(0.45);
  transform: scale(1.02);
  opacity: 0.3;
}

.detail-hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 10, 15, .7), var(--bg-primary))
}

.detail-hero__content {
  position: relative;
  display: flex;
  gap: 40px;
  align-items: flex-start
}

.detail-hero__poster {
  flex-shrink: 0;
  width: 280px
}

.detail-hero__poster-img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow)
}

.detail-hero__info {
  flex: 1
}

.detail-hero__title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 4px
}

.detail-hero__origin {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 16px
}

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

.detail-hero__meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px
}

.meta-item {
  display: flex;
  gap: 8px;
  font-size: .92rem
}

.meta-item__label {
  color: var(--text-muted);
  min-width: 100px;
  flex-shrink: 0
}

.meta-item__value {
  color: var(--text-secondary)
}

.meta-link {
  color: var(--accent);
  transition: opacity .2s
}

.meta-link:hover {
  opacity: .8;
  color: var(--accent)
}

.detail-hero__actions {
  display: flex;
  gap: 12px
}

/* ===== Content Block ===== */
.content-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px
}

.content-block__title {
  font-size: 1.2rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border)
}

.content-block__text {
  color: var(--text-secondary);
  font-size: .95rem;
  line-height: 1.8
}

.content-block__text p {
  margin-bottom: 12px
}

/* ===== Episodes ===== */
.episode-server {
  margin-bottom: 20px
}

.episode-server__name {
  font-size: .95rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 500
}

.episode-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.episode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all .2s
}

.episode-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 240, 255, 0.1)
}

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

/* ===== Watch / Player ===== */
.watch-section {
  padding-top: 20px
}

.watch__breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-wrap: wrap
}

.watch__breadcrumb a {
  color: var(--text-secondary)
}

.watch__breadcrumb a:hover {
  color: var(--accent)
}

.breadcrumb__sep {
  color: var(--text-muted)
}

.breadcrumb__current {
  color: var(--text-primary)
}

.player-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 0, 0, .6)
}

.player__iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none
}

.player__error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted)
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  flex-wrap: wrap;
  gap: 12px
}

.player-controls__title {
  font-size: 1.1rem;
  font-weight: 600
}

.player-controls__title a {
  color: var(--text-primary)
}

.player-controls__title a:hover {
  color: var(--accent)
}

.player-controls__ep {
  color: var(--accent);
  font-weight: 400
}

.player-controls__meta {
  display: flex;
  gap: 6px;
  margin-top: 6px
}

.player-controls__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.player-controls__actions .btn {
  min-width: 140px;
  justify-content: center;
}

.btn--next-episode[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 768px) {
  .player-controls__actions {
    width: 100%;
    align-items: stretch;
  }
  
  .player-controls__actions .btn {
    width: 100%;
  }
}


.watch__info-summary {
  margin-top: 8px
}

.watch__summary-row {
  display: flex;
  gap: 20px
}

.watch__poster {
  flex-shrink: 0;
  width: 120px
}

.watch__poster img {
  width: 100%;
  border-radius: var(--radius-sm)
}

.watch__details h3 {
  font-size: 1.1rem;
  margin-bottom: 4px
}

.watch__details h3 a {
  color: var(--text-primary)
}

.watch__origin {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 8px
}

.watch__genre {
  color: var(--text-secondary);
  font-size: .85rem;
  margin-bottom: 12px
}

body.lights-off .header,
body.lights-off .footer,
body.lights-off #episodeSelector {
  opacity: .1;
  pointer-events: none;
  transition: opacity .4s
}

body.lights-off {
  background: #000
}

body.lights-off .watch-section {
  position: relative;
  z-index: 10
}

/* ===== Search Page ===== */
.search-page__form {
  text-align: center;
  margin-bottom: 40px
}

.search-page__form .section__title {
  justify-content: center;
  margin-bottom: 20px
}

.search-page__input-group {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  gap: 12px
}

.search-page__input {
  flex: 1;
  padding: 14px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: border-color .2s
}

.search-page__input:focus {
  border-color: var(--accent)
}

.search-page__result-title {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 24px
}

.highlight {
  color: var(--accent);
  font-weight: 600
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap
}

.breadcrumb__item {
  color: var(--text-secondary)
}

.breadcrumb__item:hover {
  color: var(--accent)
}

.breadcrumb__item--current {
  color: var(--text-primary)
}

.breadcrumb__sep {
  color: var(--text-muted)
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px
}

.empty-state__icon {
  font-size: 4rem;
  margin-bottom: 16px
}

.empty-state__title {
  font-size: 1.3rem;
  margin-bottom: 8px
}

.empty-state__desc {
  color: var(--text-muted);
  margin-bottom: 24px
}

/* ===== Error Page ===== */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh
}

.error-page__content {
  text-align: center
}

.error-page__code {
  font-size: 8rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1
}

.error-page__title {
  font-size: 1.5rem;
  margin: 16px 0 8px
}

.error-page__desc {
  color: var(--text-muted);
  margin-bottom: 28px
}

.error-page__actions {
  display: flex;
  gap: 12px;
  justify-content: center
}

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

.pagination__btn,
.pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  color: var(--text-secondary);
  transition: all .2s;
  min-width: 40px
}

.pagination__btn:hover,
.pagination__page:hover {
  border-color: var(--accent);
  color: var(--accent)
}

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

.pagination__btn--disabled {
  opacity: .3;
  pointer-events: none
}

.pagination__dots {
  color: var(--text-muted);
  padding: 0 4px
}

.pagination__pages {
  display: flex;
  gap: 4px
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 48px
}

.footer__inner {
  display: flex;
  gap: 48px;
  margin-bottom: 32px
}

.footer__brand {
  flex: 1;
  max-width: 320px
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px
}

.footer__desc {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.6
}

.footer__links {
  flex: 1;
  display: flex;
  gap: 40px
}

.footer__heading {
  font-size: .95rem;
  margin-bottom: 12px;
  color: var(--text-primary)
}

.footer__list li {
  margin-bottom: 8px
}

.footer__list a {
  color: var(--text-muted);
  font-size: .85rem;
  transition: color .2s
}

.footer__list a:hover {
  color: var(--accent)
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .8rem
}

@media (max-width: 768px) {
  .footer {
    padding: 32px 0 20px;
    margin-top: 32px;
  }

  .footer__inner {
    flex-direction: column;
    gap: 24px;
    margin-bottom: 20px;
  }

  .footer__brand {
    max-width: 100%;
  }

  .footer__desc {
    font-size: 0.82rem;
  }

  .footer__links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .footer__heading {
    font-size: 0.85rem;
  }

  .footer__list a {
    font-size: 0.78rem;
  }
}

.footer__online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-glass);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: .8rem;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
  transition: transform .2s ease, border-color .2s ease;
}

.footer__online:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 240, 255, 0.25);
}

.online-dot {
  width: 7px;
  height: 7px;
  background-color: var(--badge-hd);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.online-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--badge-hd);
  animation: pulse-dot 1.8s infinite ease-in-out;
}

.online-text strong {
  color: var(--text-primary);
  font-weight: 700;
}

@keyframes pulse-dot {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

/* ===== Main Content ===== */
.main-content {
  min-height: calc(100vh - 64px - 200px)
}

/* ===== Responsive ===== */
@media(max-width:1200px) {
  .movie-grid {
    grid-template-columns: repeat(5, 1fr)
  }
}

@media(max-width:992px) {
  .movie-grid {
    grid-template-columns: repeat(4, 1fr)
  }

  .hero__content {
    flex-direction: column-reverse;
    text-align: center;
    gap: 24px
  }

  .hero__poster {
    width: 180px
  }

  .hero__title {
    font-size: 2rem
  }

  .hero__meta,
  .hero__actions {
    justify-content: center
  }

  .detail-hero__content {
    flex-direction: column;
    align-items: center;
    text-align: center
  }

  .detail-hero__poster {
    width: 200px
  }

  .detail-hero__meta {
    align-items: center
  }

  .meta-item {
    justify-content: center
  }

  .detail-hero__actions {
    justify-content: center
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr)
  }

  .tag-grid {
    grid-template-columns: repeat(3, 1fr)
  }

  .footer__inner {
    flex-direction: column;
    gap: 32px
  }
}

@media(max-width:768px) {
  .movie-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px
  }

  /* Hide logo text on mobile, only show ▶ icon */
  .logo__text {
    display: none
  }

  .header__logo {
    font-size: 1.2rem
  }

  .logo__icon {
    width: 36px;
    height: 36px;
    font-size: .9rem;
    border-radius: 10px
  }

  /* Search box takes available space */
  .header__search {
    flex: 1;
    min-width: 0;
    margin-left: 8px
  }

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

  .search__form {
    width: 100%
  }

  /* Mobile nav */
  .header__nav {
    display: block;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    padding: 0;
    overflow-y: auto;
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .35s ease;
    border-bottom: 1px solid transparent
  }

  .header__nav.active {
    max-height: calc(100vh - 64px);
    padding: 16px 20px 24px;
    overflow-y: auto;
    border-bottom-color: var(--border)
  }

  .nav__list {
    flex-direction: column;
    gap: 2px
  }

  .nav__link {
    display: block;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all .2s
  }

  .nav__link:hover,
  .nav__link--active {
    background: var(--surface-glass);
    color: var(--text-primary)
  }

  .dropdown__menu {
    position: static;
    min-width: 100%;
    box-shadow: none;
    border: none;
    background: var(--bg-tertiary);
    margin-top: 4px;
    border-radius: var(--radius-sm)
  }

  .nav__dropdown:hover .dropdown__menu {
    display: none
  }

  .nav__dropdown.active .dropdown__menu {
    display: block
  }

  .dropdown__grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .dropdown__item {
    padding: 12px 14px;
    font-size: .9rem
  }

  .header__mobile-btn {
    display: block
  }

  .hero {
    min-height: auto
  }

  .hero__title {
    font-size: 1.6rem
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .tag-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .watch__summary-row {
    flex-direction: column
  }

  .watch__poster {
    width: 160px
  }
}

@media(max-width:480px) {
  .movie-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px
  }

  .movie-card__info {
    padding: 8px
  }

  .movie-card__title {
    font-size: .8rem;
    height: 2.08rem; /* 2 lines of text (0.8rem * 1.3 * 2) on mobile */
  }

  .hero__poster {
    width: 140px
  }

  .search-page__input-group {
    flex-direction: column
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .tag-grid {
    grid-template-columns: 1fr
  }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.movie-card {
  animation: fadeInUp .4s ease both
}

.movie-card:nth-child(1) {
  animation-delay: .02s
}

.movie-card:nth-child(2) {
  animation-delay: .04s
}

.movie-card:nth-child(3) {
  animation-delay: .06s
}

.movie-card:nth-child(4) {
  animation-delay: .08s
}

.movie-card:nth-child(5) {
  animation-delay: .1s
}

.movie-card:nth-child(6) {
  animation-delay: .12s
}

/* ==========================================================================
   VibeFlix Homepage & Swiper Layout Updates
   ========================================================================== */

/* Hero Section & Sliders */
.hero-section {
  position: relative;
  background: #04060a;
  overflow: hidden;
  margin-bottom: 40px;
}

.hero-swiper {
  width: 100%;
  min-height: 560px;
}

.hero-slide {
  position: relative;
  width: 100%;
  min-height: 560px;
  display: flex !important;
  align-items: center;
}

@media (max-width: 768px) {
  .hero-swiper {
    min-height: 420px;
  }
  .hero-slide {
    min-height: 420px;
  }
}

@media (max-width: 480px) {
  .hero-swiper {
    min-height: 340px;
  }
  .hero-slide {
    min-height: 340px;
  }
}

/* Thêm CSS hỗ trợ cho Swiper fade effect và chống giật/chồng đè text */
.hero-swiper.swiper-fade .swiper-slide {
  position: absolute !important;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition-property: opacity;
  z-index: 1;
  pointer-events: none;
}

.hero-swiper.swiper-fade .swiper-slide-active {
  opacity: 1 !important;
  z-index: 2;
  pointer-events: auto;
}

/* Khi Swiper chưa khởi tạo, ẩn tất cả slide trừ slide đầu tiên để tránh chồng chữ */
.hero-swiper:not(.swiper-initialized) .hero-slide:not(:first-child) {
  display: none !important;
  opacity: 0 !important;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.4);
  transform: scale(1.02);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(8, 12, 20, 0.98) 0%, rgba(8, 12, 20, 0.75) 50%, rgba(8, 12, 20, 0.2) 100%),
              linear-gradient(to top, rgba(8, 12, 20, 1) 0%, rgba(8, 12, 20, 0) 25%);
  z-index: 2;
}

@media (max-width: 768px) {
  .hero-overlay {
    background: linear-gradient(to bottom, rgba(8, 12, 20, 0.5) 0%, rgba(8, 12, 20, 0.8) 50%, rgba(8, 12, 20, 1) 85%),
                rgba(8, 12, 20, 0.35);
  }
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 50px;
  width: 100%;
  padding: 60px 0;
}

.hero-info {
  flex: 1;
  max-width: 650px;
}

.hero-poster-wrapper {
  display: none;
}

/* Hero text elements */
.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-family: 'Be Vietnam Pro', 'Outfit', sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-weight: 500;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .hero-content {
    padding: 32px 0 120px; /* bottom padding for thumbs */
    gap: 20px;
  }

  .hero-info {
    max-width: 100%;
  }

  .hero-title {
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 4px;
  }

  .hero-subtitle {
    font-size: 0.85rem;
  }

  .hero-badges-row-1,
  .hero-badges-row-2 {
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
  }

  .hero-desc {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
    margin-bottom: 16px;
  }

  .hero-btn-play {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .hero-btn-action {
    width: 44px;
    height: 44px;
    font-size: 0.95rem;
  }

  .hero-actions-new {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .hero-content {
    padding: 24px 0 100px;
  }

  .hero-title {
    font-size: 1.25rem;
  }

  .hero-desc {
    -webkit-line-clamp: 2;
    font-size: 0.8rem;
  }
}

@media (min-width: 1024px) {
  .hero-poster-wrapper {
    display: block;
    width: 220px;
    height: 310px;
    flex-shrink: 0;
    border-radius: 4px;
    border: 1px solid rgba(0, 240, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 240, 255, 0.15);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    align-self: center;
    margin-left: 50px;
  }

  .hero-poster-wrapper:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: rgba(0, 240, 255, 0.6);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 240, 255, 0.3);
  }

  .hero-poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    border-radius: 4px;
  }

  .hero-poster-wrapper:hover .hero-poster-img {
    transform: scale(1.06);
  }
}

.hero-badges-row-1 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.hero-badges-row-2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.tag-imdb {
  background: #facf33;
  color: #080c14;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.75rem;
}

.tag-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tag-genre {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.hero-actions-new {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: #facf33;
  border-radius: 50%;
  color: #080c14;
  font-size: 1.25rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 15px rgba(250, 207, 51, 0.35);
}

.hero-btn-play:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(250, 207, 51, 0.55);
  background: #fbe066;
}

.hero-btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.hero-btn-action:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  transform: translateY(-2px);
}

/* Thumbnail slider */
.hero-thumbs-swiper {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 10;
  padding: 10px 0;
}

@media (max-width: 768px) {
  .hero-thumbs-swiper {
    bottom: 10px;
    left: 12px;
    right: 12px;
  }

  .thumb-inner {
    border-radius: 4px;
  }

  .thumb-title {
    font-size: 0.6rem;
  }
}

@media (max-width: 480px) {
  /* Hide thumbs on very small screens to save space */
  .hero-thumbs-swiper {
    display: none;
  }
  .hero-content {
    padding-bottom: 32px;
  }
}

@media (min-width: 1024px) {
  .hero-thumbs-swiper {
    bottom: 40px;
    right: 60px;
    left: auto;
    width: 380px;
  }
}

.thumb-slide {
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.3s, transform 0.3s;
}

.thumb-slide-active, .thumb-slide:hover {
  opacity: 1;
}

.thumb-inner {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
}

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

.thumb-title-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.thumb-slide-active .thumb-title-overlay, .thumb-slide:hover .thumb-title-overlay {
  opacity: 1;
}

.thumb-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Topic Grid */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .topic-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .topic-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.topic-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(255,255,255,0.05);
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.topic-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.topic-btn {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  gap: 4px;
}

.topic-card:hover .topic-btn {
  color: #fff;
}

/* Topic Card Gradients */
.bg-gradient-1 { background: linear-gradient(135deg, #ff5f6d, #ffc371); }
.bg-gradient-2 { background: linear-gradient(135deg, #2193b0, #6dd5ed); }
.bg-gradient-3 { background: linear-gradient(135deg, #ee0979, #ff6a00); }
.bg-gradient-4 { background: linear-gradient(135deg, #1f4068, #162447); }
.bg-gradient-5 { background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); }
.bg-gradient-6 { background: linear-gradient(135deg, #f857a6, #ff5858); }

/* Carousels */
.carousel-wrapper {
  margin-bottom: 40px;
  position: relative;
}

.movie-carousel {
  overflow: hidden;
  padding: 10px 4px 20px;
}

.movie-carousel .swiper-button-next,
.movie-carousel .swiper-button-prev {
  width: 40px;
  height: 40px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  transition: all 0.3s;
}

.movie-carousel .swiper-button-next::after,
.movie-carousel .swiper-button-prev::after {
  font-size: 1.1rem;
}

.movie-carousel .swiper-button-next:hover,
.movie-carousel .swiper-button-prev:hover {
  background: var(--accent);
  color: #080c14;
  border-color: var(--accent);
}

/* Hide nav arrows on mobile - use swipe gesture */
@media (max-width: 768px) {
  .movie-carousel .swiper-button-next,
  .movie-carousel .swiper-button-prev {
    display: none;
  }

  .carousel-wrapper {
    margin-bottom: 28px;
  }

  .movie-carousel {
    padding: 6px 0 12px;
  }
}

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

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 768px) {
  .section-header {
    margin-bottom: 12px;
  }

  .section-title {
    font-size: 1.1rem;
  }
}

.view-all-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.view-all-link:hover {
  color: var(--accent);
}

/* Community & Rankings Grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.stats-col {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stats-col-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Discuss cards */
.discuss-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.discuss-card {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 14px;
  border: 1px solid var(--border);
}

.discuss-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--accent);
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  display: block;
}

.user-badge {
  font-size: 0.6rem;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
}

.badge-vip {
  background: rgba(255, 183, 3, 0.15);
  color: var(--accent2);
  border: 1px solid var(--accent2);
}

.badge-free {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.discuss-content {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
  font-style: italic;
}

.discuss-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.discuss-reactions {
  display: flex;
  gap: 10px;
}

.discuss-reactions button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.discuss-reactions button:hover {
  color: var(--accent);
}

.discuss-movie-tag {
  color: var(--accent);
  font-weight: 600;
}

/* Rankings list */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

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

.rank-index {
  font-size: 1.15rem;
  font-weight: 800;
  width: 24px;
  text-align: center;
  color: var(--text-muted);
}

.rank-index-1 { color: var(--accent2); }
.rank-index-2 { color: #cbd5e1; }
.rank-index-3 { color: #b45309; }

.rank-thumb {
  width: 40px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

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

.rank-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-name:hover {
  color: var(--accent);
}

.rank-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.rank-trend {
  font-size: 0.8rem;
}

/* Genre ranks */
.genre-rank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.genre-rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

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

.genre-rank-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.genre-rank-bullet {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.genre-rank-name {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}

.genre-rank-name:hover {
  color: var(--accent);
}

.genre-rank-trend {
  font-size: 0.75rem;
  font-weight: 600;
}

/* Realtime comments swiper */
.vertical-comment-swiper {
  overflow: hidden;
  height: 240px;
}

.comment-slide {
  height: auto !important;
}

.comment-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.comment-author {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.comment-txt {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Mobile Sticky Bottom Nav */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  height: 56px;
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(15px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
}

.mobile-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.65rem;
  transition: color 0.2s;
  flex: 1;
}

.mobile-nav__item:hover,
.mobile-nav__item--active {
  color: var(--accent);
}

.mobile-nav__icon {
  font-size: 1.1rem;
  margin-bottom: 3px;
}

/* Hide on desktop */
@media (min-width: 769px) {
  .mobile-nav {
    display: none !important;
  }
}

/* Mobile category pills scroll */
.mobile-category-scroll {
  display: none;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none; /* Hide scrollbar Firefox */
  background: rgba(8, 12, 20, 0.5);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
}

.mobile-category-scroll::-webkit-scrollbar {
  display: none; /* Hide scrollbar Webkit */
}

.pills-container {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.pill-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.pill-item--active, .pill-item:hover {
  background: var(--accent);
  color: #080c14;
  border-color: var(--accent);
}

.pill-arrow {
  font-size: 0.6rem;
}

/* Mobile responsive fixes for Header */
@media (max-width: 768px) {
  .header__nav {
    display: none; /* Let navigation collapse on mobile since we have bottom nav & pills */
  }
  
  .header__search {
    display: none; /* Desktop search hidden */
  }
  
  .header__right-actions {
    display: none; /* App download & user actions hidden */
  }
  
  .header__inner {
    justify-content: space-between;
  }
  
  .header__logo {
    margin: 0 auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .header__logo:hover {
    transform: translateX(-50%) scale(1.02);
  }
  
  .header__mobile-btn {
    display: block; /* Show hamburger toggle */
  }

  .mobile-category-scroll {
    display: block; /* Show horizontal pills */
  }
}

/* Mobile search bar toggle */
/* Mobile search bar - fixed position (outside header) */
.mobile-search-bar {
  display: none;
  background: rgba(10, 12, 20, 0.96);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.mobile-search-bar.active {
  display: block;
}

.mobile-search-bar .search__form {
  max-width: 100%;
}

.header__mobile-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .header__mobile-actions {
    display: flex;
  }
}

.mobile-action-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.05rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-action-btn:hover {
  color: var(--accent);
}

/* Footer elements updates */
.footer__sovereignty {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ef4444; /* Signal Red */
}

.footer__socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 20px 0;
  padding: 15px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  transition: all 0.2s;
}

.social-icon:hover {
  transform: translateY(-2px);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 10px rgba(0,240,255,0.15);
}

.telegram:hover { background: #0088cc; }
.discord:hover { background: #5865F2; }
.x-twitter:hover { background: #000000; }
.facebook:hover { background: #1877F2; }
.tiktok:hover { background: #000000; }
.youtube:hover { background: #FF0000; }

/* Subpages Styling Polish */
.detail-hero__backdrop {
  filter: blur(4px) brightness(0.45) !important;
  opacity: 0.3 !important;
}

/* SV2 buttons & active episode colors */
.episode-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px !important; /* Sharp Net Geometry 0px-4px */
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s;
}

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

.episode-btn--active,
.episode-btn--active:hover {
  background: var(--accent) !important;
  color: #080c14 !important;
  border-color: var(--accent) !important;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 240, 255, 0.3);
}

.player-controls__title a {
  color: var(--accent);
}

.player-controls__title a:hover {
  text-decoration: underline;
}

/* Adjust main content container padding for mobile bottom nav */
@media (max-width: 768px) {
  body {
    padding-bottom: 64px; /* Space for sticky bottom bar */
  }
}

/* =====================================================
   MOBILE RESPONSIVE - COMPREHENSIVE OPTIMIZATION
   ===================================================== */

/* --- Detail Hero Mobile --- */
@media (max-width: 768px) {
  .detail-hero {
    padding: 28px 0 32px;
    min-height: auto;
  }

  .detail-hero__content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .detail-hero__poster {
    width: 150px;
  }

  .detail-hero__title {
    font-size: 1.5rem;
    margin-bottom: 4px;
  }

  .detail-hero__origin {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  .detail-hero__badges {
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
  }

  .detail-hero__meta {
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
  }

  .meta-item {
    flex-direction: column;
    gap: 2px;
    align-items: center;
  }

  .meta-item__label {
    min-width: auto;
    font-size: 0.78rem;
    color: var(--text-muted);
  }

  .meta-item__value {
    font-size: 0.85rem;
    text-align: center;
  }

  .detail-hero__actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .detail-hero__poster {
    width: 120px;
  }

  .detail-hero__title {
    font-size: 1.25rem;
  }
}

/* --- Watch / Player Page Mobile --- */
@media (max-width: 768px) {
  .watch-section {
    padding-top: 12px;
  }

  .watch__breadcrumb {
    font-size: 0.78rem;
    margin-bottom: 10px;
  }

  .player-wrapper {
    border-radius: 0; /* Full-width on mobile */
    margin: 0 -20px; /* Break out of container */
  }

  .player-controls {
    padding: 12px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .player-controls__title {
    font-size: 0.95rem;
  }

  .player-controls__actions {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .player-controls__actions .btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
    font-size: 0.78rem;
    padding: 8px 12px;
  }

  #episodeSelector .content-block {
    padding: 16px;
  }

  .content-block {
    padding: 18px 14px;
    border-radius: 8px;
  }

  .content-block__title {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .episode-grid {
    gap: 6px;
  }

  .episode-btn {
    min-width: 56px;
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .watch__poster {
    width: 100px;
  }

  .watch__summary-row {
    gap: 14px;
  }
}

/* --- Section Spacing Mobile --- */
@media (max-width: 768px) {
  .section {
    padding: 28px 0;
  }

  .movie-carousels-section .container {
    padding: 0 12px;
  }
}

/* --- Movie List Page Mobile --- */
@media (max-width: 768px) {
  .search-page__form {
    margin-bottom: 24px;
  }

  .search-page__input {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .breadcrumb {
    font-size: 0.78rem;
  }

  .pagination {
    gap: 4px;
  }

  .pagination__btn,
  .pagination__page {
    padding: 6px 10px;
    font-size: 0.78rem;
    min-width: 32px;
  }
}

/* --- Mobile Bottom Nav Improvements --- */
.mobile-nav {
  /* Ensure safe area for phones with home indicators */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: calc(56px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

/* --- Mobile Category Pills: hide completely (moved to drawer) --- */
.mobile-category-scroll {
  display: none !important;
}

/* --- Header Mobile Fine-Tuning --- */
@media (max-width: 768px) {
  .header__inner {
    height: 56px;
    gap: 0;
  }

  /* Hide hamburger button in header on mobile - menu moved to bottom nav */
  .header__mobile-btn {
    display: none !important;
  }

  .mobile-action-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

/* --- Hide full header on mobile - bottom nav replaces it --- */
@media (max-width: 768px) {
  .header {
    display: none !important;
  }

  /* No top padding needed without header */
  .main-content {
    min-height: 100vh;
  }

  /* Search bar floats at top on mobile */
  .mobile-search-bar {
    top: 0;
  }
}

/* --- Movie Grid Mobile adjustments --- */
@media (max-width: 768px) {
  .movie-grid {
    gap: 10px;
  }

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

/* Touch feedback for mobile cards */
@media (hover: none) and (pointer: coarse) {
  .movie-card:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: none;
  }

  .movie-card:active {
    transform: scale(0.97);
    border-color: var(--accent);
  }

  .movie-card:hover .movie-card__overlay {
    opacity: 0;
  }

  .hero-btn-play:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(250, 207, 51, 0.35);
    background: #facf33;
  }

  .hero-btn-play:active {
    transform: scale(0.95);
  }

  .hero-btn-action:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: none;
  }
}

/* --- Reduce motion for accessibility --- */
@media (prefers-reduced-motion: reduce) {
  .movie-card {
    animation: none;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* =====================================================
   MOBILE DRAWER (SLIDE-UP MENU)
   ===================================================== */

/* Overlay backdrop */
.mobile-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.3s ease;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.mobile-drawer-overlay.active {
  opacity: 1;
}

/* Drawer panel */
.mobile-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1101;
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px 20px 0 0;
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.mobile-drawer.active {
  transform: translateY(0);
}

/* Scrollbar hide for drawer */
.mobile-drawer::-webkit-scrollbar {
  display: none;
}

.mobile-drawer {
  scrollbar-width: none;
}

/* Handle bar */
.mobile-drawer__handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.18);
  border-radius: 2px;
  margin: 12px auto 0;
}

/* Drawer header */
.mobile-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--border);
}

.mobile-drawer__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}

.mobile-drawer__close {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-drawer__close:hover,
.mobile-drawer__close:active {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

/* Drawer content wrapper */
.mobile-drawer__content {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Section within drawer */
.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-section__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* 3x2 Nav Grid */
.drawer-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.drawer-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  transition: all 0.2s;
  text-decoration: none;
}

.drawer-nav-item:hover,
.drawer-nav-item:active {
  border-color: var(--accent);
  background: rgba(0, 240, 255, 0.06);
  color: var(--accent);
}

.drawer-nav-icon {
  font-size: 1.4rem;
  line-height: 1;
}

/* Tags (genres / countries) */
.drawer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
}

.drawer-tag:hover,
.drawer-tag:active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 240, 255, 0.06);
}

.drawer-tag--more {
  border-style: dashed;
  color: var(--accent);
  border-color: rgba(0, 240, 255, 0.35);
}

/* Misc links */
.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: all 0.2s;
  text-decoration: none;
}

.drawer-link-item i {
  width: 18px;
  color: var(--accent);
  font-size: 0.9rem;
}

.drawer-link-item:hover,
.drawer-link-item:active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Bottom nav menu button styling */
.mobile-nav__menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.mobile-nav__menu-btn.active {
  color: var(--accent);
}

/* Only show drawer on mobile */
@media (min-width: 769px) {
  .mobile-drawer,
  .mobile-drawer-overlay {
    display: none !important;
  }
}