:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(28, 25, 23, 0.14);
  --shadow-soft: 0 10px 30px rgba(28, 25, 23, 0.1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--stone-50), var(--stone-100));
  color: var(--stone-800);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--stone-800), var(--stone-700), var(--stone-800));
  box-shadow: 0 10px 30px rgba(28, 25, 23, 0.22);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

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

.brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--amber-600);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.28);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand__sub {
  margin-top: 3px;
  color: var(--stone-300);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav__link,
.mobile-nav__link {
  border-radius: 12px;
  color: var(--stone-200);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav__link {
  padding: 9px 16px;
}

.site-nav__link:hover,
.site-nav__link.is-active,
.mobile-nav__link:hover,
.mobile-nav__link.is-active {
  background: var(--amber-600);
  color: var(--white);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: var(--white);
}

.mobile-nav {
  display: none;
  padding: 8px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-nav__link {
  display: block;
  padding: 12px 14px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: var(--stone-900);
}

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

.hero__media img,
.detail-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.hero__shade,
.detail-hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(28, 25, 23, 0.98), rgba(28, 25, 23, 0.48), rgba(28, 25, 23, 0.16));
}

.hero__content,
.detail-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 70vh;
  align-items: flex-end;
  padding: 96px 0 64px;
}

.hero__copy {
  max-width: 760px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 18px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--amber-600);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1,
.detail-hero h1,
.page-hero h1 {
  margin: 0 0 18px;
  color: var(--white);
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p,
.detail-hero p,
.page-hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--stone-200);
  font-size: 18px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero__meta span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--stone-100);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  font-size: 13px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

.button--primary {
  background: var(--amber-600);
  color: var(--white);
  box-shadow: 0 16px 30px rgba(217, 119, 6, 0.28);
}

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

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

.hero-picks {
  margin-top: -44px;
  position: relative;
  z-index: 3;
}

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

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

.quick-search {
  padding: 56px 0 28px;
}

.quick-search__box {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 24px;
  align-items: center;
  border-radius: 26px;
  padding: 26px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.quick-search h2 {
  margin: 0 0 4px;
  font-size: 28px;
  color: var(--stone-800);
}

.quick-search p {
  margin: 0;
  color: var(--stone-600);
}

.search-inline {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  background: var(--stone-50);
}

.search-inline input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0 16px;
  color: var(--stone-800);
  background: transparent;
  outline: none;
}

.search-inline button {
  border: 0;
  padding: 0 20px;
  background: var(--amber-600);
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
}

.content-section {
  padding: 44px 0;
}

.content-section:nth-of-type(even) {
  background: rgba(255, 255, 255, 0.56);
}

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

.section-heading h2 {
  margin: 0 0 6px;
  color: var(--stone-800);
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.15;
  font-weight: 900;
}

.section-heading p {
  margin: 0;
  color: var(--stone-600);
}

.section-more {
  flex: none;
  color: var(--amber-700);
  font-weight: 800;
}

.movie-card {
  min-width: 0;
}

.movie-card__link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card__poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--stone-300), var(--stone-100));
}

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

.movie-card__link:hover .movie-card__poster img {
  transform: scale(1.06);
}

.movie-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.movie-card__kicker,
.movie-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--stone-500);
  font-size: 12px;
}

.movie-card__kicker {
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--amber-700);
  font-weight: 800;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 50px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--stone-800);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card__desc {
  display: -webkit-box;
  min-height: 44px;
  margin-bottom: 12px;
  overflow: hidden;
  color: var(--stone-600);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card__meta {
  margin-top: auto;
}

.movie-card--large .movie-card__poster {
  aspect-ratio: 16 / 9;
}

.movie-card--large h3 {
  font-size: 22px;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--amber-600);
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.3);
}

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

.page-hero {
  position: relative;
  color: var(--white);
  background: radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.34), transparent 30%), linear-gradient(135deg, var(--stone-900), var(--stone-700));
}

.page-hero--compact .container {
  padding: 76px 0 62px;
}

.page-hero h1 {
  max-width: 860px;
  color: var(--white);
}

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

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

.category-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 46px 0;
}

.category-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.category-card > a {
  display: block;
  padding: 24px;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.12), rgba(28, 25, 23, 0.04));
}

.category-card__label {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--amber-600);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
  color: var(--stone-800);
}

.category-card p {
  margin: 0 0 18px;
  color: var(--stone-600);
}

.category-card__more {
  color: var(--amber-700);
  font-weight: 900;
}

.category-card__links {
  display: grid;
  gap: 6px;
  padding: 18px 24px 24px;
}

.category-card__links a {
  overflow: hidden;
  color: var(--stone-600);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-card__links a:hover {
  color: var(--amber-700);
}

.listing-panel {
  padding: 38px 0 64px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 220px;
  gap: 16px;
  margin-bottom: 26px;
  border-radius: 22px;
  padding: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-bar--wide {
  grid-template-columns: minmax(280px, 1fr) 240px 240px;
}

.filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--stone-600);
  font-size: 13px;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  padding: 12px 13px;
  color: var(--stone-800);
  background: var(--stone-50);
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

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

.rank-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  padding: 42px 0 68px;
  align-items: start;
}

.rank-side {
  position: sticky;
  top: 88px;
  border-radius: 22px;
  padding: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-side h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

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

.rank-links a {
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 10px;
  border-radius: 12px;
  padding: 9px;
  background: var(--stone-50);
}

.rank-links a:hover {
  background: rgba(245, 158, 11, 0.12);
}

.rank-links span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--stone-800);
  color: var(--white);
  font-weight: 900;
}

.rank-links strong {
  overflow: hidden;
  color: var(--stone-800);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-links em {
  color: var(--stone-500);
  font-size: 12px;
  font-style: normal;
}

.detail-hero {
  position: relative;
  min-height: 58vh;
  overflow: hidden;
  background: var(--stone-900);
}

.detail-hero__content {
  min-height: 58vh;
}

.player-section {
  margin-top: -72px;
  position: relative;
  z-index: 5;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.68));
  color: var(--white);
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.player-overlay__icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: var(--amber-600);
  box-shadow: 0 20px 50px rgba(217, 119, 6, 0.38);
  font-size: 34px;
}

.player-overlay__text {
  font-size: 18px;
  font-weight: 900;
}

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

.detail-article,
.detail-meta-card {
  border-radius: 22px;
  padding: 26px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-article h2,
.detail-meta-card h2 {
  margin: 0 0 12px;
  color: var(--stone-800);
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 22px;
  color: var(--stone-700);
  font-size: 17px;
}

.detail-meta-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
  margin: 0 0 18px;
}

.detail-meta-card dt {
  color: var(--stone-500);
  font-weight: 800;
}

.detail-meta-card dd {
  margin: 0;
  color: var(--stone-800);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(217, 119, 6, 0.1);
  color: var(--amber-700);
  font-size: 13px;
  font-weight: 800;
}

.related-section {
  padding-top: 22px;
}

.site-footer {
  margin-top: 40px;
  color: var(--stone-300);
  background: linear-gradient(180deg, var(--stone-800), var(--stone-900));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  padding: 46px 0;
}

.footer-logo {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  max-width: 460px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 16px;
  text-align: center;
  color: var(--stone-400);
}

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

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

  .rank-side {
    position: static;
  }
}

@media (max-width: 820px) {
  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero__content {
    min-height: 620px;
  }

  .feature-grid,
  .movie-grid,
  .movie-grid--listing,
  .category-overview,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-search__box,
  .filter-bar,
  .filter-bar--wide {
    grid-template-columns: 1fr;
  }
}

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

  .brand__name {
    font-size: 17px;
  }

  .brand__sub {
    font-size: 11px;
  }

  .hero h1,
  .detail-hero h1,
  .page-hero h1 {
    font-size: 36px;
  }

  .hero p,
  .detail-hero p,
  .page-hero p {
    font-size: 16px;
  }

  .feature-grid,
  .movie-grid,
  .movie-grid--listing,
  .category-overview,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero__actions,
  .search-inline {
    flex-direction: column;
  }

  .search-inline input,
  .search-inline button {
    min-height: 46px;
  }

  .player-section {
    margin-top: -34px;
  }

  .detail-article,
  .detail-meta-card {
    padding: 20px;
  }
}
