html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: #080604;
  color: #fffaf0;
  line-height: 1.6;
}

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: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(120, 53, 15, .96), rgba(146, 64, 14, .96), rgba(120, 53, 15, .96));
  border-bottom: 1px solid rgba(252, 211, 77, .24);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .38);
  backdrop-filter: blur(16px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 900;
  color: #fff7d6;
  letter-spacing: .5px;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #451a03;
  background: radial-gradient(circle at 30% 20%, #fff7ad, #f59e0b 48%, #b45309);
  box-shadow: 0 0 22px rgba(245, 158, 11, .48);
}

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

.nav-link {
  padding: 10px 13px;
  border-radius: 999px;
  color: #fffbeb;
  font-size: 15px;
  font-weight: 700;
  opacity: .9;
  transition: transform .2s ease, background .2s ease, opacity .2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, .14);
  opacity: 1;
  transform: translateY(-1px);
}

.header-search {
  width: min(290px, 30vw);
  display: flex;
  align-items: center;
  border: 1px solid rgba(253, 230, 138, .32);
  border-radius: 999px;
  background: rgba(69, 26, 3, .42);
  overflow: hidden;
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #fff7ed;
  background: transparent;
  padding: 10px 12px;
}

.header-search input::placeholder {
  color: rgba(255, 251, 235, .66);
}

.header-search button,
.menu-toggle {
  border: 0;
  cursor: pointer;
  color: #451a03;
  background: #facc15;
  font-weight: 900;
}

.header-search button {
  align-self: stretch;
  padding: 0 14px;
}

.menu-toggle {
  display: none;
  padding: 9px 13px;
  border-radius: 12px;
}

.hero-slider {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #120b05;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity .7s ease, transform 1.2s ease, visibility .7s ease;
  background-position: center;
  background-size: cover;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 30%, rgba(250, 204, 21, .18), transparent 34%),
    linear-gradient(90deg, rgba(8, 6, 4, .92) 0%, rgba(8, 6, 4, .68) 42%, rgba(8, 6, 4, .12) 100%),
    linear-gradient(0deg, #080604 0%, rgba(8, 6, 4, 0) 42%);
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 660px;
  display: flex;
  align-items: flex-end;
  padding: 110px 0 88px;
}

.hero-copy {
  max-width: 710px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fef08a;
  background: rgba(113, 63, 18, .46);
  border: 1px solid rgba(250, 204, 21, .38);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}

.hero-title {
  margin: 22px 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -2.4px;
  text-shadow: 0 18px 36px rgba(0, 0, 0, .58);
}

.hero-desc {
  max-width: 660px;
  margin: 0 0 24px;
  color: #f4e8cf;
  font-size: clamp(17px, 2vw, 21px);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.meta-pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff8dc;
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff7ed;
  background: rgba(255, 255, 255, .1);
  font-weight: 900;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .16);
}

.btn-primary {
  color: #451a03;
  border-color: rgba(250, 204, 21, .88);
  background: linear-gradient(135deg, #fde047, #f59e0b);
  box-shadow: 0 15px 35px rgba(245, 158, 11, .3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fef08a, #f59e0b);
}

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

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

.hero-dot.is-active {
  background: #facc15;
}

.main-section {
  padding: 70px 0;
}

.main-section.compact {
  padding: 42px 0;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: #facc15;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
}

.section-title,
.page-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -.9px;
}

.section-desc,
.page-desc {
  max-width: 760px;
  margin: 12px 0 0;
  color: #d9c8ac;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(45, 22, 6, .92), rgba(15, 10, 6, .96));
  border: 1px solid rgba(252, 211, 77, .13);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .26);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(250, 204, 21, .48);
  box-shadow: 0 24px 70px rgba(120, 53, 15, .38);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #1c1209;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0, 0, 0, .76), transparent);
}

.card-rating {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  padding: 3px 8px;
  border-radius: 999px;
  color: #451a03;
  background: #facc15;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 14px;
}

.card-title {
  display: block;
  min-height: 45px;
  color: #fff7ed;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.36;
}

.card-title:hover {
  color: #fde68a;
}

.card-meta {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #f8e6bd;
  font-size: 12px;
}

.card-desc {
  min-height: 58px;
  margin: 10px 0 0;
  color: #d8c7ab;
  font-size: 13px;
  line-height: 1.48;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-tile {
  min-height: 176px;
  padding: 22px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 12%, rgba(250, 204, 21, .24), transparent 35%),
    linear-gradient(135deg, rgba(146, 64, 14, .82), rgba(35, 18, 7, .92));
  border: 1px solid rgba(252, 211, 77, .18);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .2s ease, border-color .2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(250, 204, 21, .56);
}

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

.category-tile span {
  color: #e8d5b5;
  margin-top: 10px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 74px 1fr auto;
  gap: 15px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .065);
  border: 1px solid rgba(255, 255, 255, .1);
}

.rank-no {
  color: #facc15;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  width: 74px;
  height: 102px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-title {
  font-size: 18px;
  font-weight: 900;
}

.rank-desc {
  margin: 6px 0 0;
  color: #d8c7ab;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero {
  padding: 70px 0 42px;
  background:
    radial-gradient(circle at 74% 12%, rgba(250, 204, 21, .16), transparent 34%),
    linear-gradient(180deg, rgba(120, 53, 15, .38), rgba(8, 6, 4, 0));
}

.filter-panel {
  margin: 26px 0 30px;
  padding: 18px;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(253, 230, 138, .2);
  outline: 0;
  color: #fff7ed;
  background: rgba(15, 10, 6, .86);
  border-radius: 12px;
  padding: 12px 14px;
}

.filter-panel select {
  min-width: 190px;
}

.empty-state {
  display: none;
  padding: 38px;
  border-radius: 18px;
  text-align: center;
  color: #e9d5ae;
  background: rgba(255, 255, 255, .06);
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 52px 0 38px;
  background: #080604;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: .28;
  background-position: center;
  background-size: cover;
  filter: blur(6px);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 6, 4, .96), rgba(8, 6, 4, .62)),
    linear-gradient(0deg, #080604 0%, rgba(8, 6, 4, .4) 100%);
}

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 28px;
  align-items: start;
}

.player-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(250, 204, 21, .2);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .48);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  cursor: pointer;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(250, 204, 21, .22), transparent 24%),
    linear-gradient(0deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .18));
  display: grid;
  place-items: center;
  transition: opacity .2s ease, visibility .2s ease;
}

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

.play-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #451a03;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  font-size: 34px;
  box-shadow: 0 18px 50px rgba(245, 158, 11, .42);
}

.detail-panel {
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(69, 26, 3, .76), rgba(15, 10, 6, .9));
  border: 1px solid rgba(250, 204, 21, .16);
}

.detail-title {
  margin: 14px 0 12px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08;
}

.detail-desc {
  margin: 14px 0 0;
  color: #f1dec0;
  font-size: 17px;
}

.content-card {
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-card p {
  color: #ead8ba;
  margin: 0 0 16px;
  font-size: 16px;
}

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

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

.side-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
}

.side-card img {
  width: 76px;
  height: 104px;
  object-fit: cover;
  border-radius: 12px;
}

.side-card strong {
  display: block;
  margin-bottom: 6px;
}

.side-card span {
  color: #d9c8ac;
  font-size: 13px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.breadcrumb {
  margin-bottom: 18px;
  color: #f6d78d;
  font-size: 14px;
}

.site-footer {
  padding: 38px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: #d4bf9e;
  background: #060403;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

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

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

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

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .nav-links {
    order: 4;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
  }

  .nav-links.is-open {
    display: flex;
  }

  .header-search {
    order: 3;
    width: 100%;
  }

  .hero-slider,
  .hero-content {
    min-height: 560px;
  }

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

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

  .ranking-item {
    grid-template-columns: 44px 58px 1fr;
  }

  .ranking-item .btn {
    grid-column: 3;
    justify-self: start;
  }

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

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

  .movie-grid {
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .hero-title {
    letter-spacing: -1px;
  }

  .main-section {
    padding: 46px 0;
  }

  .content-card,
  .detail-panel {
    padding: 18px;
  }
}
