:root {
  --bg: #f9fafb;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --amber: #d97706;
  --amber-dark: #b45309;
  --orange: #ea580c;
  --soft: #fffbeb;
  --shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  box-shadow: 0 10px 25px rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1200px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.28);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 700;
  color: #374151;
}

.nav a {
  position: relative;
  padding: 22px 0;
  transition: color 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--amber);
}

.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.mobile-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
  color: var(--amber-dark);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.icon-button:hover,
.mobile-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.16);
  background: #ffedd5;
}

.mobile-button {
  display: none;
}

.header-search {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
}

.header-search.is-open {
  display: block;
}

.header-search form {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  gap: 10px;
}

.header-search input,
.filter-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 0 16px;
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.header-search button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.header-search button,
.primary-button {
  background: var(--amber);
  color: #fff;
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.22);
}

.header-search button:hover,
.primary-button:hover {
  background: var(--amber-dark);
  transform: translateY(-2px);
}

.secondary-button {
  background: #fff;
  color: var(--amber-dark);
  border: 1px solid rgba(217, 119, 6, 0.18);
}

.secondary-button:hover {
  background: #fff7ed;
  transform: translateY(-2px);
}

.mobile-nav {
  display: none;
  padding: 0 22px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: #fff7ed;
  color: var(--amber-dark);
}

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

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: radial-gradient(circle at 72% 12%, rgba(251, 191, 36, 0.36), transparent 34%), linear-gradient(135deg, #fffbeb 0%, #fff7ed 48%, #fef3c7 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.56) 47%, rgba(255, 255, 255, 0.2) 100%);
  pointer-events: none;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0 0 0 auto;
  width: 58%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  filter: saturate(1.1);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  align-items: center;
  gap: 46px;
  padding: 58px 0;
}

.hero-text {
  max-width: 680px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-dark);
  background: rgba(255, 247, 237, 0.92);
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 900;
}

.hero h1 {
  margin: 24px 0 18px;
  color: var(--ink);
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.065em;
  font-weight: 950;
}

.hero h1 span {
  display: block;
  color: var(--amber-dark);
}

.hero-desc {
  max-width: 650px;
  color: #4b5563;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

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

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-tags a,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: #6b4f1d;
  border: 1px solid rgba(217, 119, 6, 0.15);
  font-size: 13px;
  font-weight: 800;
}

.hero-card {
  position: relative;
  width: min(360px, 100%);
  justify-self: end;
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.88);
}

.hero-card img {
  width: 100%;
  height: 480px;
  object-fit: cover;
}

.hero-card-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.12) 80%, transparent);
}

.hero-card-info h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.18;
}

.hero-card-info p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: rgba(180, 83, 9, 0.28);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
  padding: 74px 0;
}

.section.alt {
  background: #fff;
}

.section.soft {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

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

.section-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.section-subtitle {
  margin: 10px 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 16px;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.86);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(217, 119, 6, 0.34);
  box-shadow: 0 24px 45px rgba(17, 24, 39, 0.14);
}

.poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.poster.tall {
  aspect-ratio: 3 / 4;
}

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

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

.badge-row {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.badge {
  max-width: 72%;
  border-radius: 999px;
  padding: 5px 10px;
  color: #fff;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(12px);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge.accent {
  background: var(--amber);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.card-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-desc {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.watch-link {
  color: var(--amber-dark);
  white-space: nowrap;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 26px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #ffffff, #fff7ed);
  border: 1px solid rgba(217, 119, 6, 0.15);
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(17, 24, 39, 0.13);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -48px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(217, 119, 6, 0.12);
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 25px;
  font-weight: 950;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #6b7280;
}

.filter-panel {
  margin: 28px 0 34px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
}

.page-hero {
  background: linear-gradient(135deg, #d97706, #ea580c);
  color: #fff;
  padding: 68px 0;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #fef3c7;
  font-weight: 800;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 100px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: 0 18px 35px rgba(17, 24, 39, 0.12);
}

.rank-num {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #fff7ed;
  color: var(--amber-dark);
  font-size: 18px;
  font-weight: 950;
}

.rank-item:nth-child(-n+3) .rank-num {
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
}

.rank-cover {
  width: 100px;
  height: 70px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.detail-shell {
  padding: 48px 0 74px;
}

.detail-card {
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(229, 231, 235, 0.86);
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.78fr);
}

.detail-content {
  padding: 34px;
}

.detail-aside {
  padding: 34px;
  border-left: 1px solid var(--line);
  background: #f9fafb;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.pill {
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff7ed;
  color: var(--amber-dark);
  font-size: 13px;
  font-weight: 900;
}

.pill.blue {
  background: #eff6ff;
  color: #1d4ed8;
}

.detail-title {
  margin: 0 0 18px;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 28px;
  color: #4b5563;
  font-weight: 750;
}

.player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #030712;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.25));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 50%;
  background: rgba(217, 119, 6, 0.94);
  color: #fff;
  font-size: 34px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
  transform: scale(1.08);
  background: var(--orange);
}

.player-message {
  display: none;
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(127, 29, 29, 0.92);
  color: #fff;
  font-weight: 800;
}

.player-message.is-visible {
  display: block;
}

.article-block {
  margin-top: 34px;
}

.article-block h2,
.related-section h2,
.aside-title {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.2;
  font-weight: 950;
}

.article-block p {
  margin: 0 0 20px;
  color: #374151;
  font-size: 16px;
}

.review-box {
  padding: 20px 22px;
  border-left: 5px solid var(--amber);
  border-radius: 0 18px 18px 0;
  background: #fffbeb;
  color: #3f3219;
}

.aside-poster {
  width: 100%;
  border-radius: 22px;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.12);
  margin-bottom: 26px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 10px;
  color: #4b5563;
}

.info-list strong {
  color: var(--ink);
}

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

.mini-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.1);
}

.mini-card img {
  width: 88px;
  height: 66px;
  object-fit: cover;
  border-radius: 12px;
}

.mini-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  background: #111827;
  color: #d1d5db;
  padding: 48px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 1fr);
  gap: 28px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer p,
.site-footer a {
  color: #d1d5db;
}

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

.hidden-by-filter {
  display: none !important;
}

.empty-state {
  display: none;
  padding: 50px;
  text-align: center;
  color: var(--muted);
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}

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

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

  .mobile-button {
    display: inline-grid;
    place-items: center;
  }

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

  .hero-card {
    justify-self: start;
  }

  .detail-aside {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

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

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

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

@media (max-width: 640px) {
  .header-inner {
    height: 62px;
    padding: 0 16px;
  }

  .logo {
    font-size: 18px;
  }

  .container {
    width: min(100% - 30px, 1200px);
  }

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 44px 0 76px;
  }

  .hero-bg {
    width: 100%;
    opacity: 0.12;
  }

  .hero-card img {
    height: 360px;
  }

  .section {
    padding: 52px 0;
  }

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

  .movie-grid,
  .category-grid,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 80px minmax(0, 1fr);
  }

  .rank-item .primary-button {
    grid-column: 2 / -1;
  }

  .rank-cover {
    width: 80px;
    height: 62px;
  }

  .detail-content,
  .detail-aside {
    padding: 22px;
  }

  .mini-card {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .mini-card img {
    width: 74px;
    height: 58px;
  }
}
