:root {
  --coffee-950: #1f130d;
  --coffee-900: #2f1d14;
  --coffee-800: #4b3023;
  --coffee-700: #654631;
  --coffee-600: #7a5840;
  --coffee-500: #9a7554;
  --cream-50: #fffdf8;
  --cream-100: #fbf4e7;
  --cream-200: #f3e6cf;
  --cream-300: #e6cfaa;
  --ink: #2d211a;
  --muted: #765f4c;
  --line: rgba(101, 70, 49, 0.16);
  --shadow: 0 20px 50px rgba(47, 29, 20, 0.14);
  --radius: 26px;
  --poster-image: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream-50);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 248, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--cream-50);
  background: linear-gradient(135deg, var(--coffee-700), var(--coffee-500));
  box-shadow: 0 12px 24px rgba(101, 70, 49, 0.22);
  font-weight: 800;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  color: var(--coffee-800);
  font-size: 22px;
}

.brand-text em {
  color: var(--coffee-500);
  font-size: 12px;
  font-style: normal;
  margin-top: 5px;
}

.main-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: var(--coffee-600);
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--coffee-900);
}

.search-form {
  width: 270px;
  display: flex;
  align-items: center;
  background: var(--cream-100);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.search-form input,
.mobile-search input,
.search-large input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--coffee-900);
  background: transparent;
  padding: 11px 14px;
}

.search-form button,
.mobile-search button,
.search-large button {
  border: 0;
  color: white;
  background: var(--coffee-700);
  padding: 11px 16px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--coffee-700);
  background: var(--cream-100);
  border-radius: 12px;
  padding: 10px 12px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--cream-50);
}

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

.mobile-panel-inner {
  display: grid;
  gap: 12px;
  padding: 18px 0;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
}

.mobile-link.active,
.mobile-link:hover {
  background: var(--cream-100);
}

.mobile-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: var(--coffee-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(31, 19, 13, 0.96), rgba(31, 19, 13, 0.64), rgba(31, 19, 13, 0.2)), var(--poster-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.hero-bg::after,
.detail-hero::after,
.channel-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 28% 32%, rgba(243, 230, 207, 0.26), transparent 32%), linear-gradient(180deg, transparent, rgba(31, 19, 13, 0.88));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 78vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 54px;
  align-items: end;
  padding: 120px 0 95px;
}

.hero-copy {
  max-width: 760px;
  color: var(--cream-50);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  color: var(--cream-200);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.sub-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-copy p,
.sub-hero p,
.detail-copy p {
  max-width: 720px;
  color: rgba(255, 253, 248, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.hero-meta span,
.detail-meta span {
  color: var(--cream-100);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn.primary {
  color: var(--coffee-900);
  background: var(--cream-100);
  box-shadow: 0 18px 42px rgba(255, 253, 248, 0.2);
}

.btn.soft {
  color: var(--cream-50);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-poster,
.detail-cover,
.poster-frame,
.mini-poster {
  background-image: linear-gradient(150deg, rgba(47, 29, 20, 0.1), rgba(47, 29, 20, 0.72)), var(--poster-image);
  background-size: cover;
  background-position: center;
}

.hero-poster {
  aspect-ratio: 3 / 4.3;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 34px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.hero-poster span,
.detail-cover span,
.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 66px;
  height: 66px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--coffee-900);
  background: rgba(255, 253, 248, 0.9);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: var(--shadow);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-controls button {
  border: 0;
  color: var(--cream-50);
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  font-size: 26px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
}

.hero-dots button.active {
  width: 28px;
  background: var(--cream-100);
}

.section {
  padding: 76px 0;
}

.cream-section {
  background: linear-gradient(180deg, var(--cream-100), var(--cream-50));
}

.dark-section {
  background: var(--coffee-950);
}

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

.section-head h2 {
  margin: 0;
  color: var(--coffee-900);
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  color: var(--coffee-700);
  background: var(--cream-200);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
}

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

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

.movie-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(47, 29, 20, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 2.85;
  overflow: hidden;
}

.poster-frame::after,
.hero-poster::after,
.detail-cover::after,
.category-card::after,
.channel-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(31, 19, 13, 0.82));
}

.play-badge {
  width: 52px;
  height: 52px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 3;
}

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

.poster-meta {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  color: var(--cream-50);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.card-title {
  display: block;
  color: var(--coffee-900);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.card-body p {
  min-height: 48px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-tags span {
  color: var(--coffee-700);
  background: var(--cream-100);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 220px;
  gap: 18px;
  overflow-x: auto;
  padding: 6px 2px 18px;
  scroll-snap-type: x proximity;
}

.horizontal-scroll .movie-card {
  scroll-snap-align: start;
}

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

.category-card,
.channel-card {
  position: relative;
  min-height: 180px;
  display: flex;
  align-items: end;
  overflow: hidden;
  color: white;
  border-radius: 28px;
  background-image: linear-gradient(180deg, rgba(47, 29, 20, 0.1), rgba(47, 29, 20, 0.72)), var(--poster-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.category-card span,
.category-card em,
.channel-card a {
  position: relative;
  z-index: 2;
}

.category-card {
  padding: 22px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}

.category-card span {
  font-size: 20px;
  font-weight: 900;
}

.category-card em {
  min-height: 40px;
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.5;
  font-style: normal;
  opacity: 0.82;
}

.channel-card {
  min-height: 300px;
}

.channel-card a {
  display: block;
  width: 100%;
  padding: 28px;
}

.channel-card h2 {
  margin: 0;
  font-size: 30px;
}

.channel-card p {
  line-height: 1.7;
  opacity: 0.86;
}

.channel-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.channel-card div span {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

.rank-panel,
.content-card,
.info-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.rank-panel {
  position: sticky;
  top: 98px;
  padding: 28px;
}

.rank-panel h2 {
  margin: 0;
  color: var(--coffee-900);
}

.rank-panel p {
  color: var(--muted);
}

.rank-panel ol,
.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rank-panel li a,
.ranking-list li a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.rank-panel strong,
.ranking-list strong {
  color: var(--cream-50);
  background: var(--coffee-700);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rank-panel em,
.heat,
.rank-info em {
  color: var(--coffee-500);
  font-size: 12px;
  font-style: normal;
}

.sub-hero {
  position: relative;
  overflow: hidden;
  color: white;
  background: radial-gradient(circle at 18% 20%, rgba(230, 207, 170, 0.35), transparent 30%), linear-gradient(135deg, var(--coffee-950), var(--coffee-700));
  padding: 96px 0 74px;
}

.sub-hero .container,
.channel-hero .container {
  position: relative;
  z-index: 2;
}

.sub-hero p {
  margin-bottom: 0;
}

.channel-hero {
  background-image: linear-gradient(90deg, rgba(31, 19, 13, 0.92), rgba(31, 19, 13, 0.45)), var(--poster-image);
  background-size: cover;
  background-position: center;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 0 0 28px;
}

.pagination:last-child {
  margin: 32px 0 0;
}

.pagination a,
.pagination span,
.pagination i {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--coffee-700);
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-style: normal;
  font-weight: 800;
}

.pagination a.active {
  color: white;
  background: var(--coffee-700);
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-list li a {
  grid-template-columns: 44px 68px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(47, 29, 20, 0.06);
}

.mini-poster {
  width: 68px;
  height: 88px;
  border-radius: 16px;
}

.rank-info {
  display: grid;
  gap: 8px;
}

.rank-info b {
  color: var(--coffee-900);
  font-size: 18px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: white;
  background-image: linear-gradient(90deg, rgba(31, 19, 13, 0.94), rgba(31, 19, 13, 0.42)), var(--poster-image);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  min-height: 600px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 46px;
  align-items: end;
  padding: 100px 0 72px;
}

.detail-cover {
  position: relative;
  aspect-ratio: 2 / 2.9;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}

.detail-copy h1 {
  max-width: 880px;
}

.detail-tags {
  margin-bottom: 22px;
}

.detail-tags span {
  color: var(--cream-50);
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.2);
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: white;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.player-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--coffee-900);
  background: var(--cream-50);
  border-radius: 50%;
  font-size: 32px;
}

.player-overlay b {
  font-size: 20px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.content-card,
.info-card {
  padding: 30px;
}

.content-card h2,
.info-card h2 {
  margin: 0 0 16px;
  color: var(--coffee-900);
  font-size: 26px;
}

.content-card p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.95;
}

.info-card {
  position: sticky;
  top: 98px;
}

.info-card dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

.info-card dt {
  color: var(--coffee-500);
  font-size: 12px;
  font-weight: 900;
}

.info-card dd {
  margin: 0;
  color: var(--coffee-900);
  font-weight: 800;
}

.info-card a {
  color: var(--coffee-700);
}

.search-large {
  display: flex;
  max-width: 720px;
  overflow: hidden;
  margin-top: 28px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
}

.search-large input {
  color: white;
  padding: 16px 20px;
}

.search-large input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.search-summary {
  margin-bottom: 24px;
  color: var(--muted);
  font-weight: 800;
}

.site-footer {
  color: var(--cream-200);
  background: var(--coffee-900);
  padding: 58px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-brand .brand-mark {
  box-shadow: none;
}

.site-footer p {
  max-width: 520px;
  color: var(--cream-300);
  line-height: 1.8;
}

.site-footer h3 {
  color: var(--cream-50);
  margin: 0 0 14px;
}

.site-footer a {
  display: block;
  color: var(--cream-300);
  margin: 9px 0;
}

.footer-bottom {
  margin-top: 48px;
  padding: 22px 0;
  text-align: center;
  color: var(--cream-300);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 1100px) {
  .movie-grid,
  .small-grid,
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .split-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel,
  .info-card {
    position: static;
  }
}

@media (max-width: 860px) {
  .main-nav,
  .search-form {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .hero-content,
  .detail-hero-inner {
    grid-template-columns: 1fr;
    padding-top: 100px;
  }

  .hero-poster,
  .detail-cover {
    max-width: 280px;
    order: -1;
  }

  .hero h1,
  .sub-hero h1,
  .detail-copy h1 {
    font-size: clamp(36px, 14vw, 58px);
  }

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

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

  .brand-text em {
    display: none;
  }

  .movie-grid,
  .small-grid,
  .library-grid,
  .category-grid,
  .channel-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-body {
    padding: 14px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-body p {
    display: none;
  }

  .section {
    padding: 48px 0;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ranking-list li a {
    grid-template-columns: 38px 58px minmax(0, 1fr);
  }

  .heat {
    grid-column: 3;
  }
}
