@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&display=swap");

:root {
  --slate-950: #0a0e13;
  --slate-900: #111827;
  --zen-950: #0f1318;
  --zen-900: #151a20;
  --zen-850: #1b2027;
  --zen-800: #252b33;
  --zen-700: #3a3328;
  --zen-500: #998d6e;
  --zen-400: #aa9c7f;
  --zen-300: #c4baa4;
  --zen-200: #d8d1c1;
  --zen-100: #edeae3;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --danger: #f87171;
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.28);
  --shadow-card: 0 16px 30px rgba(0, 0, 0, 0.2);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--zen-100);
  background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.1), transparent 32%), var(--slate-950);
  font-family: Inter, "Noto Serif SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.text-gradient {
  color: transparent;
  background: linear-gradient(135deg, var(--amber-400), #fff4cc 52%, var(--amber-600));
  -webkit-background-clip: text;
  background-clip: text;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(170, 156, 127, 0.16);
  background: rgba(10, 14, 19, 0.94);
  backdrop-filter: blur(16px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 12px 25px rgba(217, 119, 6, 0.22);
}

.brand-text strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  color: transparent;
  background: linear-gradient(135deg, var(--amber-400), #fff4cc 52%, var(--amber-600));
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-text small {
  display: block;
  margin-top: 4px;
  color: var(--zen-400);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--zen-200);
  font-weight: 600;
}

.desktop-nav a,
.mobile-links a,
.mobile-cats a {
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-links a:hover,
.mobile-links a.active,
.mobile-cats a:hover {
  color: var(--amber-400);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
}

.nav-search input,
.mobile-panel input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(170, 156, 127, 0.28);
  border-radius: 12px;
  color: var(--zen-100);
  background: rgba(21, 26, 32, 0.7);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  padding: 10px 14px;
}

.nav-search input:focus,
.mobile-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.08);
}

.nav-search button,
.mobile-panel button,
.btn-primary,
.btn-secondary {
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-search button,
.mobile-panel button,
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--amber-600), var(--amber-700));
  box-shadow: 0 14px 28px rgba(217, 119, 6, 0.18);
}

.nav-search button {
  padding: 10px 15px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  color: var(--zen-100);
  border: 1px solid rgba(170, 156, 127, 0.24);
  background: rgba(15, 19, 24, 0.58);
}

.nav-search button:hover,
.mobile-panel button:hover,
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(170, 156, 127, 0.24);
  border-radius: 12px;
  color: var(--zen-100);
  background: rgba(21, 26, 32, 0.72);
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(170, 156, 127, 0.14);
  padding: 16px;
  background: rgba(10, 14, 19, 0.98);
}

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

.mobile-panel form {
  display: flex;
  gap: 10px;
  margin: 0 auto 14px;
  width: min(100%, 720px);
}

.mobile-panel input {
  padding: 12px 14px;
}

.mobile-panel button {
  padding: 0 16px;
}

.mobile-links,
.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 18px;
  color: var(--zen-200);
}

.mobile-cats {
  margin-top: 12px;
  color: var(--zen-400);
  font-size: 14px;
}

.hero-carousel {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: var(--zen-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--slate-950) 2%, rgba(10, 14, 19, 0.86) 32%, rgba(10, 14, 19, 0.22) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  min-height: 600px;
  padding: 0 0 76px;
}

.hero-copy {
  width: min(680px, 100%);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.rank-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(217, 119, 6, 0.32);
  border-radius: 999px;
  color: var(--amber-400);
  background: rgba(217, 119, 6, 0.16);
}

.hero-tags span {
  padding: 6px 12px;
  font-size: 14px;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 16px;
  color: #fff;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0 0 24px;
  color: var(--zen-300);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: #fff;
  background: rgba(10, 14, 19, 0.55);
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.section-block {
  padding: 68px 0;
}

.section-muted {
  background: linear-gradient(to bottom, rgba(15, 19, 24, 0.64), rgba(15, 19, 24, 0));
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: var(--zen-100);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

.section-head p,
.page-title p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--zen-400);
  line-height: 1.8;
}

.section-link {
  color: var(--amber-500);
  font-weight: 700;
  white-space: nowrap;
}

.card-zen,
.movie-card,
.category-card,
.info-panel,
.player-panel,
.rank-row,
.compact-card,
.search-result-empty {
  border: 1px solid rgba(170, 156, 127, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(21, 26, 32, 0.72);
  box-shadow: var(--shadow-card);
}

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

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

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.compact-card:hover,
.rank-row:hover {
  border-color: rgba(245, 158, 11, 0.38);
  transform: translateY(-3px);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.26);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--zen-900);
}

.movie-card:not(.list-card) .poster-wrap {
  aspect-ratio: 3 / 4;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(10, 14, 19, 0.94), transparent);
}

.poster-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--zen-200);
  background: rgba(10, 14, 19, 0.78);
  font-size: 12px;
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--zen-100);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-title:hover {
  color: var(--amber-400);
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: var(--zen-400);
  font-size: 14px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span,
.detail-tags span {
  padding: 4px 9px;
  font-size: 12px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--zen-500);
  font-size: 12px;
}

.list-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 170px;
}

.list-card .poster-wrap {
  height: 100%;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 26px;
}

.feature-card {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--zen-900);
}

.feature-card img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 19, 0.96), rgba(10, 14, 19, 0.12));
}

.feature-card-body {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px;
}

.feature-card-body h3 {
  margin: 14px 0 12px;
  font-size: 30px;
}

.feature-card-body p {
  color: var(--zen-300);
  line-height: 1.75;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card strong {
  color: var(--zen-100);
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: var(--zen-400);
  font-size: 14px;
  line-height: 1.75;
}

.category-card span {
  margin-top: auto;
  color: var(--amber-500);
  font-weight: 700;
}

.page-hero {
  padding: 64px 0 34px;
  background: radial-gradient(circle at 18% 18%, rgba(245, 158, 11, 0.14), transparent 30%), linear-gradient(to bottom, rgba(15, 19, 24, 0.7), transparent);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--zen-500);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--zen-300);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 0.9fr 0.9fr;
  gap: 14px;
  margin: 28px 0;
}

.filter-bar input,
.filter-bar select {
  padding: 13px 14px;
}

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 58px 138px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.rank-index {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-600), var(--amber-700));
  font-weight: 900;
}

.rank-row img {
  width: 138px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-main h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-main p {
  margin: 0;
  color: var(--zen-400);
  line-height: 1.7;
}

.rank-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--zen-400);
  text-align: right;
  white-space: nowrap;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background: var(--zen-950);
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.35;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--slate-950), rgba(10, 14, 19, 0.7), rgba(10, 14, 19, 0.3));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: end;
  padding: 62px 0 46px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(170, 156, 127, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

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

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--zen-300);
}

.detail-meta span {
  border: 1px solid rgba(170, 156, 127, 0.16);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(21, 26, 32, 0.6);
}

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

.player-panel {
  overflow: hidden;
  margin-bottom: 28px;
}

.player-box {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.15), rgba(0, 0, 0, 0.35));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 18px 45px rgba(217, 119, 6, 0.36);
  font-size: 28px;
}

.player-box.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
}

.player-info {
  padding: 18px 22px;
  color: var(--zen-300);
}

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

.info-panel {
  padding: 24px;
}

.info-panel h2,
.info-panel h3 {
  margin: 0 0 14px;
  color: var(--zen-100);
  font-size: 24px;
}

.info-panel p {
  margin: 0;
  color: var(--zen-300);
  line-height: 2;
}

.side-panel {
  position: sticky;
  top: 98px;
  align-self: start;
  display: grid;
  gap: 16px;
}

.compact-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.compact-card img {
  width: 86px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.compact-card span {
  display: block;
  color: var(--zen-100);
  font-weight: 700;
  line-height: 1.4;
}

.compact-card small {
  display: block;
  margin-top: 5px;
  color: var(--zen-500);
}

.search-result-empty {
  padding: 42px;
  color: var(--zen-400);
  text-align: center;
}

.site-footer {
  border-top: 1px solid rgba(170, 156, 127, 0.16);
  padding: 38px 0 24px;
  color: var(--zen-400);
  background: rgba(10, 14, 19, 0.88);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-grid strong {
  color: var(--zen-100);
  font-size: 20px;
}

.footer-grid p {
  max-width: 640px;
  margin: 10px 0 0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--zen-300);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(170, 156, 127, 0.12);
  font-size: 13px;
}

@media (max-width: 1080px) {
  .desktop-nav,
  .nav-search {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

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

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

  .side-panel {
    position: static;
  }
}

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

  .brand {
    min-width: auto;
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel,
  .hero-content {
    min-height: 520px;
  }

  .hero-arrow {
    display: none;
  }

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

  .section-head,
  .footer-grid,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .movie-list-grid,
  .category-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .list-card,
  .detail-hero-inner,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .list-card .poster-wrap {
    height: auto;
  }

  .detail-hero-inner {
    gap: 22px;
  }

  .detail-poster {
    max-width: 220px;
  }

  .rank-meta {
    text-align: left;
  }
}
