:root {
  --primary-50: #fdf8f3;
  --primary-100: #faeee0;
  --primary-400: #e1a06a;
  --primary-600: #cb6f3f;
  --primary-700: #a95636;
  --secondary-50: #f5f5f4;
  --secondary-100: #e7e5e4;
  --secondary-200: #d1ccc9;
  --secondary-300: #b1aaa6;
  --secondary-400: #948c87;
  --secondary-500: #7c746e;
  --secondary-600: #6b645f;
  --secondary-700: #59534f;
  --secondary-800: #4d4845;
  --secondary-900: #433f3d;
  --secondary-950: #2a2725;
  --white: #ffffff;
  --black: #000000;
  --radius: 18px;
  --shadow: 0 14px 38px rgba(42, 39, 37, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--secondary-900);
  background: var(--secondary-50);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: var(--secondary-950);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

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

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--secondary-950);
  background: var(--primary-400);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(203, 111, 63, 0.28);
}

.brand-text {
  font-size: 22px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-link {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-400);
}

.header-search,
.mobile-search,
.search-page-form,
.inline-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.inline-filter input {
  width: 240px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--secondary-800);
  outline: 0;
  padding: 10px 16px;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.search-page-form input::placeholder,
.inline-filter input::placeholder {
  color: var(--secondary-300);
}

.header-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--primary-600);
  padding: 10px 16px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--secondary-800);
  background: var(--secondary-900);
}

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

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mobile-link {
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.9);
}

.hero-carousel {
  position: relative;
  height: min(72vh, 720px);
  min-height: 520px;
  overflow: hidden;
  background: var(--secondary-900);
}

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

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

.hero-bg,
.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-mask,
.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--secondary-900), rgba(67, 63, 61, 0.72), rgba(42, 39, 37, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  left: 0;
  right: 0;
  max-width: 1180px;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  color: var(--white);
  background: var(--primary-600);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.compact-hero h1,
.detail-info h1 {
  max-width: 840px;
  margin: 18px 0 16px;
  color: var(--white);
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-content p,
.compact-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--secondary-200);
  font-size: clamp(16px, 2.2vw, 21px);
  line-height: 1.65;
}

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

.hero-meta span,
.detail-meta span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.small-actions {
  margin-top: 20px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 800;
  padding: 12px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--white);
  background: var(--primary-600);
  box-shadow: 0 16px 34px rgba(203, 111, 63, 0.34);
}

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

.primary-button:hover {
  background: var(--primary-700);
}

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--primary-400);
}

.section {
  padding: 54px 0;
}

.muted-section {
  background: var(--secondary-100);
}

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

.section-head h2 {
  margin: 0;
  color: var(--secondary-900);
  font-size: clamp(24px, 3vw, 34px);
}

.section-head a {
  color: var(--primary-600);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

.five-col {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.four-col {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(42, 39, 37, 0.09);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--secondary-200);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.08);
}

.poster-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  opacity: 0;
  padding: 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12), transparent);
  transition: opacity 0.25s ease;
}

.poster-layer span {
  font-weight: 800;
}

.movie-card:hover .poster-layer {
  opacity: 1;
}

.poster-link em,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.68);
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  padding: 5px 9px;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: var(--primary-600);
}

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

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

.movie-card-body h3 a:hover {
  color: var(--primary-600);
}

.movie-card-body p {
  display: -webkit-box;
  margin: 0 0 12px;
  min-height: 44px;
  overflow: hidden;
  color: var(--secondary-600);
  font-size: 14px;
  line-height: 1.58;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  justify-content: space-between;
  color: var(--secondary-500);
  font-size: 13px;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span,
.detail-tags a {
  color: var(--primary-700);
  background: var(--primary-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.ranking-panel,
.side-card,
.article-card,
.player-card,
.category-card-large {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(42, 39, 37, 0.09);
}

.ranking-panel {
  align-self: start;
  padding: 24px;
  position: sticky;
  top: 86px;
}

.ranking-panel h2,
.side-card h2,
.article-card h2,
.player-card h2 {
  margin: 0 0 18px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--secondary-100);
}

.rank-row b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--white);
  background: var(--primary-600);
  border-radius: 10px;
}

.rank-row span {
  font-weight: 700;
}

.rank-row em {
  color: var(--secondary-500);
  font-style: normal;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  color: var(--white);
  background: var(--secondary-900);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.category-tile:hover img,
.category-card-large:hover .category-cover img {
  transform: scale(1.07);
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.08));
}

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

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

.category-tile em {
  bottom: 20px;
  overflow: hidden;
  color: var(--secondary-200);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-hero,
.detail-hero {
  position: relative;
  color: var(--white);
  background: linear-gradient(135deg, var(--secondary-950), var(--secondary-900));
}

.compact-hero {
  padding: 84px 0 70px;
}

.compact-hero h1 {
  color: var(--white);
  font-size: clamp(34px, 5vw, 58px);
}

.search-page-form {
  max-width: 680px;
  margin-top: 24px;
}

.search-page-form input {
  flex: 1;
  width: auto;
  min-height: 48px;
}

.category-list-large {
  display: grid;
  gap: 22px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  overflow: hidden;
  padding: 18px;
}

.category-cover {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  color: var(--white);
  background: var(--secondary-900);
  border-radius: 16px;
}

.category-cover span {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-size: 24px;
  font-weight: 800;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.category-card-large h2 {
  margin: 4px 0 10px;
}

.category-card-large p {
  color: var(--secondary-600);
  line-height: 1.7;
}

.category-card-large ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  padding: 0;
  list-style: none;
}

.category-card-large li a {
  color: var(--primary-700);
  font-weight: 700;
}

.inline-filter input {
  color: var(--secondary-900);
  background: var(--white);
  border: 1px solid var(--secondary-200);
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.small-link-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(42, 39, 37, 0.08);
}

.small-link-card img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.small-link-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.small-link-card em {
  display: block;
  margin-top: 6px;
  color: var(--secondary-500);
  font-size: 12px;
  font-style: normal;
}

.ranking-grid {
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding: 14px;
}

.ranking-poster {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 3 / 4;
}

.ranking-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-poster b {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--white);
  background: var(--primary-600);
  border-radius: 10px;
}

.ranking-info h2 {
  margin: 4px 0 10px;
  font-size: 22px;
}

.ranking-info p {
  color: var(--secondary-600);
  line-height: 1.7;
}

.detail-hero {
  min-height: 560px;
  overflow: hidden;
}

.detail-backdrop,
.detail-mask {
  position: absolute;
  inset: 0;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 38px 0 56px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--secondary-200);
  margin-bottom: 36px;
}

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

.detail-main {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-cover {
  width: 260px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.32);
}

.detail-info h1 {
  margin-top: 16px;
  font-size: clamp(36px, 5.5vw, 64px);
}

.detail-tags a {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

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

.detail-content {
  display: grid;
  gap: 22px;
}

.player-card,
.article-card,
.side-card {
  padding: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: var(--black);
  border-radius: 18px;
  aspect-ratio: 16 / 9;
}

.video-player,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.video-player {
  display: block;
  background: var(--black);
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--black);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.72;
}

.player-shell.is-ready .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.big-play {
  position: absolute;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  color: var(--white);
  background: var(--primary-600);
  border-radius: 999px;
  font-size: 32px;
  box-shadow: 0 18px 42px rgba(203, 111, 63, 0.4);
}

.player-message {
  position: absolute;
  left: 16px;
  bottom: 16px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.58);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.player-message.is-visible {
  opacity: 1;
}

.article-card p {
  color: var(--secondary-700);
  font-size: 17px;
  line-height: 1.86;
}

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.prev-next a {
  color: var(--primary-700);
  background: var(--primary-100);
  border-radius: 16px;
  font-weight: 800;
  padding: 14px 16px;
}

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

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

.site-footer {
  margin-top: 30px;
  color: var(--secondary-300);
  background: var(--secondary-950);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

.footer-brand {
  color: var(--white);
  font-size: 22px;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a:hover {
  color: var(--primary-400);
}

.is-hidden {
  display: none !important;
}

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

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

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

  .ranking-panel,
  .detail-side {
    position: static;
  }
}

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

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

  .hero-carousel {
    min-height: 520px;
    height: 68vh;
  }

  .hero-content h1,
  .compact-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .movie-grid,
  .six-col,
  .five-col,
  .four-col,
  .category-grid,
  .feature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-card-large,
  .detail-main,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    width: 220px;
  }

  .prev-next {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .shell,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 19px;
  }

  .hero-carousel {
    min-height: 560px;
  }

  .hero-meta span,
  .detail-meta span {
    font-size: 12px;
  }

  .section {
    padding: 38px 0;
  }

  .movie-card-body {
    padding: 13px;
  }

  .movie-card-body h3 {
    font-size: 16px;
  }

  .mobile-search input,
  .search-page-form input,
  .inline-filter input {
    width: 100%;
  }

  .search-page-form,
  .inline-filter {
    align-items: stretch;
    flex-direction: column;
  }

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

  .player-card,
  .article-card,
  .side-card {
    padding: 18px;
  }
}
