* {
  box-sizing: border-box;
}

:root {
  --twilight-950: #090818;
  --twilight-900: #121026;
  --twilight-800: #1d1938;
  --twilight-700: #32255f;
  --twilight-600: #5d3fd3;
  --twilight-500: #7c5cff;
  --twilight-400: #a58bff;
  --dusk-700: #9629b7;
  --dusk-600: #c026d3;
  --sunset-500: #f59e0b;
  --sunset-400: #fbbf24;
  --paper: rgba(255, 255, 255, 0.82);
  --muted: rgba(255, 255, 255, 0.66);
  --line: rgba(255, 255, 255, 0.12);
  --glass: rgba(18, 16, 38, 0.68);
  --glass-strong: rgba(18, 16, 38, 0.88);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #ffffff;
  background:
    radial-gradient(circle at 15% 8%, rgba(124, 92, 255, 0.28), transparent 32rem),
    radial-gradient(circle at 82% 12%, rgba(192, 38, 211, 0.20), transparent 28rem),
    linear-gradient(135deg, #090818 0%, #121026 42%, #1d1938 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 8, 24, 0.74);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 14px 34px rgba(124, 92, 255, 0.34);
}

.brand-name {
  font-size: 22px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #ffffff, var(--twilight-400), #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  overflow: hidden;
}

.nav-link {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 270px;
}

.header-search input,
.mobile-search input,
.search-main-form input,
.filter-row input,
.filter-row select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  outline: none;
  padding: 11px 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-main-form input:focus,
.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--twilight-400);
  background: rgba(255, 255, 255, 0.12);
}

.header-search button,
.mobile-search button,
.filter-row button {
  border: 0;
  border-radius: 14px;
  padding: 11px 14px;
  color: #ffffff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 10px 13px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px;
  background: rgba(9, 8, 24, 0.95);
}

.mobile-panel.open {
  display: block;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

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

.main-content {
  min-height: 70vh;
}

.page-top {
  padding-top: 76px;
}

.hero-carousel {
  position: relative;
  min-height: 78vh;
  margin-bottom: 42px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-backdrop,
.detail-hero img,
.page-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 8, 24, 0.96), rgba(9, 8, 24, 0.66), rgba(9, 8, 24, 0.18)),
    linear-gradient(0deg, var(--twilight-950), rgba(9, 8, 24, 0.12) 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 340px;
  align-items: end;
  gap: 44px;
  min-height: 78vh;
  padding-top: 120px;
  padding-bottom: 76px;
}

.hero-copy h1 {
  margin: 16px 0;
  max-width: 780px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.65);
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.75;
}

.hero-tags,
.tag-list,
.detail-meta,
.hero-stats,
.movie-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-list span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(124, 92, 255, 0.24);
  backdrop-filter: blur(12px);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 13px 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 18px 34px rgba(124, 92, 255, 0.28);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
}

.btn-primary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
}

.hero-stats {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 650;
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
  transform: translateY(18px) rotate(1deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.36);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.glass-card,
.movie-card,
.player-shell {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.05));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.quick-search-panel,
.ranking-entry,
.channel-tools,
.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: center;
  gap: 28px;
  border-radius: 28px;
  padding: 28px;
  margin-bottom: 60px;
}

.quick-search-panel h2,
.ranking-entry h2,
.channel-tools h2 {
  margin: 8px 0 10px;
  font-size: clamp(26px, 4vw, 42px);
}

.quick-search-panel p,
.ranking-entry p,
.channel-tools p,
.section-heading p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.quick-search-panel form,
.search-main-form {
  display: flex;
  gap: 12px;
}

.quick-search-panel input,
.search-main-form input {
  flex: 1;
}

.eyebrow {
  margin: 0;
  color: var(--twilight-400);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.content-section {
  margin-bottom: 70px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 36px);
}

.section-link {
  color: var(--twilight-400);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
}

.movie-grid.six-col,
.related-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(165, 139, 255, 0.42);
  box-shadow: 0 28px 80px rgba(93, 63, 211, 0.20);
  transform: translateY(-4px);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-wrap img,
.category-tile:hover img,
.category-cover:hover img {
  transform: scale(1.06);
}

.poster-gradient,
.category-tile span,
.category-cover span,
.page-hero span,
.detail-hero span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.72));
}

.poster-year,
.poster-rating,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  background: rgba(9, 8, 24, 0.68);
  backdrop-filter: blur(12px);
}

.poster-year {
  top: 10px;
  left: 10px;
}

.poster-rating {
  right: 10px;
  bottom: 10px;
  color: var(--sunset-400);
}

.rank-badge {
  right: 10px;
  top: 10px;
  background: linear-gradient(135deg, var(--sunset-500), var(--dusk-600));
}

.movie-card-body {
  padding: 14px 14px 16px;
}

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card-body h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card-body p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta-line {
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.category-tile {
  position: relative;
  min-height: 184px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-tile strong,
.category-tile em {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
}

.category-tile strong {
  bottom: 56px;
  font-size: 22px;
}

.category-tile em {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.page-hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: end;
  overflow: hidden;
  margin-bottom: 44px;
}

.compact-hero .container {
  position: relative;
  z-index: 2;
  padding-top: 130px;
  padding-bottom: 56px;
}

.page-hero h1 {
  max-width: 820px;
  margin: 8px 0 14px;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.04;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.7;
}

.category-overview-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 70px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  border-radius: 26px;
  padding: 18px;
}

.category-cover {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.category-cover img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-overview-card h2 {
  margin: 6px 0 10px;
  font-size: 28px;
}

.sample-line {
  margin-top: 12px !important;
  color: rgba(255, 255, 255, 0.52) !important;
}

.channel-tools,
.search-panel {
  margin-bottom: 42px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 130px 160px 82px;
  gap: 10px;
}

.filter-row select option {
  color: #101010;
}

.detail-main {
  position: relative;
}

.detail-hero {
  position: fixed;
  z-index: -1;
  inset: 0 0 auto 0;
  height: 70vh;
  opacity: 0.3;
  filter: blur(2px);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding-top: 44px;
  padding-bottom: 70px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--twilight-400);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  margin-bottom: 24px;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #ffffff;
  background: #000000;
}

.player-cover.hidden {
  display: none;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
}

.play-icon {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--twilight-600), var(--dusk-600));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  font-size: 30px;
}

.player-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  pointer-events: none;
}

.detail-info-card,
.poster-side-card,
.side-list-card {
  border-radius: 26px;
  padding: 24px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.detail-title-row h1 {
  margin: 6px 0 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
}

.score-pill {
  min-width: max-content;
  border-radius: 18px;
  padding: 12px 16px;
  color: var(--sunset-400);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.10);
}

.detail-meta {
  margin: 20px 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.72);
}

.detail-info-card h2 {
  margin: 26px 0 12px;
  font-size: 24px;
}

.detail-info-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.9;
}

.detail-sidebar {
  position: sticky;
  top: 98px;
  align-self: start;
  display: grid;
  gap: 22px;
}

.poster-side-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 18px;
}

.poster-side-card .btn-primary {
  width: 100%;
}

.side-list-card h2 {
  margin: 0 0 16px;
}

.side-list-card a {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.82);
}

.side-list-card a:last-child {
  border-bottom: 0;
}

.side-list-card span {
  color: var(--sunset-400);
  font-weight: 900;
}

.related-section {
  margin-top: 40px;
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(9, 8, 24, 0.56);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
  color: rgba(255, 255, 255, 0.66);
}

.footer-inner strong {
  color: #ffffff;
}

.footer-inner p {
  margin: 6px 0 0;
}

.fade-in {
  animation: fadeIn 0.55s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

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

@media (max-width: 1180px) {
  .movie-grid,
  .movie-grid.six-col,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 900px) {
  .header-search {
    display: none;
  }

  .hero-content,
  .quick-search-panel,
  .ranking-entry,
  .channel-tools,
  .search-panel,
  .detail-layout,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 74px;
  }

  .hero-poster {
    display: none;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }

  .footer-inner {
    display: block;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .header-inner {
    min-height: 66px;
  }

  .brand-name {
    font-size: 18px;
  }

  .hero-carousel,
  .hero-content {
    min-height: 72vh;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-copy p {
    font-size: 15px;
  }

  .movie-grid,
  .movie-grid.six-col,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .quick-search-panel,
  .ranking-entry,
  .channel-tools,
  .search-panel,
  .detail-info-card,
  .poster-side-card,
  .side-list-card {
    border-radius: 20px;
    padding: 18px;
  }

  .quick-search-panel form,
  .search-main-form {
    flex-direction: column;
  }

  .section-heading {
    display: block;
  }

  .page-hero {
    min-height: 38vh;
  }

  .compact-hero .container {
    padding-top: 90px;
    padding-bottom: 36px;
  }

  .detail-title-row {
    display: block;
  }

  .score-pill {
    display: inline-flex;
    margin-top: 16px;
  }
}
