* {
  box-sizing: border-box;
}

:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --dark: #261407;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(217, 119, 6, 0.18);
  --shadow: 0 24px 70px rgba(120, 53, 15, 0.16);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, var(--amber-50), var(--orange-50) 45%, #fff 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.95), rgba(255, 237, 213, 0.95));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(146, 64, 14, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.logo {
  flex: 0 0 auto;
  font-size: 24px;
  color: var(--amber-700, #b45309);
}

.logo-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.32);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  white-space: nowrap;
  font-size: 15px;
  color: #5f3b15;
}

.main-nav a {
  position: relative;
  padding: 22px 0;
  font-weight: 700;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 15px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--amber-600);
  transition: width 0.25s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form input,
.search-large input,
.year-select {
  border: 2px solid var(--amber-200);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input {
  width: 210px;
  padding: 10px 16px;
}

.search-form input:focus,
.search-large input:focus,
.year-select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.search-form button,
.search-large button,
.btn,
.category-card a,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: #fff;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.24);
  cursor: pointer;
  font-weight: 800;
}

.btn.ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 0;
  border-radius: 14px;
  color: #6b3507;
  background: var(--amber-100);
}

.mobile-panel {
  display: none;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.mobile-panel a {
  display: block;
  padding: 12px 10px;
  border-radius: 12px;
  color: #6b3507;
  font-weight: 800;
}

.mobile-panel a:hover {
  background: var(--amber-50);
}

.hero-carousel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: #1f1205;
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(8px) saturate(1.08);
  transform: scale(1.08);
  opacity: 0.48;
}

.hero-slide::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.42), transparent 34%),
    linear-gradient(110deg, rgba(29, 17, 4, 0.95), rgba(74, 31, 7, 0.72) 52%, rgba(249, 115, 22, 0.34));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.56fr);
  align-items: center;
  gap: 60px;
  max-width: 1280px;
  min-height: 720px;
  margin: 0 auto;
  padding: 78px 24px 120px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber-400);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-desc,
.detail-copy .lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.85;
}

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

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 34px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

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

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

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

.hero-category-strip {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 5;
  display: flex;
  gap: 12px;
  width: min(100% - 32px, 980px);
  padding: 12px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.hero-category-strip a {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.content-section,
.rail-section,
.ranking-home,
.player-section {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 70px 0;
}

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

.section-heading h2,
.ranking-copy h2,
.detail-text h2 {
  margin: 0;
  color: #261407;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.045em;
}

.section-more {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(217, 119, 6, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 42px rgba(146, 64, 14, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.48);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), var(--orange-100));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 10px;
  color: #fff;
  border-radius: 999px;
  background: rgba(38, 20, 7, 0.72);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-meta-row,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 10px;
  color: var(--amber-700, #b45309);
  font-size: 13px;
  font-weight: 800;
}

.movie-meta-row a,
.movie-meta-row span,
.detail-meta span,
.rank-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--amber-100);
}

.movie-card h3 {
  margin: 0;
  color: #211407;
  font-size: 20px;
  line-height: 1.35;
}

.movie-card p {
  margin: 10px 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

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

.tag-list span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #8a4b0a;
  background: #fff7ed;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags {
  margin-top: 20px;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.rail-section {
  width: 100%;
  max-width: none;
  padding: 70px max(24px, calc((100vw - 1280px) / 2));
  background: linear-gradient(90deg, var(--amber-100), var(--orange-100));
}

.rail-controls {
  display: flex;
  gap: 10px;
}

.rail-controls button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 12px 26px rgba(146, 64, 14, 0.14);
  cursor: pointer;
  font-size: 28px;
}

.movie-rail {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar,
.hero-category-strip::-webkit-scrollbar {
  display: none;
}

.rail-item {
  flex: 0 0 310px;
}

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

.category-tile,
.category-card {
  min-height: 170px;
  padding: 26px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 24px 48px rgba(249, 115, 22, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 32px 64px rgba(249, 115, 22, 0.3);
}

.category-tile span,
.category-card h2 {
  display: block;
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile em,
.category-card p {
  color: rgba(255, 255, 255, 0.88);
  font-style: normal;
  line-height: 1.7;
}

.tile-1 {
  background: linear-gradient(135deg, #fb923c, #ef4444);
}

.tile-2 {
  background: linear-gradient(135deg, #facc15, #f59e0b);
}

.tile-3 {
  background: linear-gradient(135deg, #f97316, #ec4899);
}

.ranking-home {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: center;
  width: 100%;
  max-width: none;
  padding: 82px max(24px, calc((100vw - 1280px) / 2));
  background: linear-gradient(135deg, #3b1d06, #7c2d12 60%, #f97316);
}

.ranking-copy h2,
.ranking-copy p {
  color: #fff;
}

.ranking-copy p:not(.eyebrow) {
  max-width: 520px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.84);
}

.ranking-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.ranking-list li span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--amber-500);
  font-weight: 900;
}

.ranking-list li a {
  font-weight: 900;
}

.ranking-list li em {
  color: rgba(255, 255, 255, 0.72);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #4a2105, #f97316);
}

.small-hero {
  padding: 90px 24px;
}

.small-hero > div {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.small-hero h1 {
  margin-bottom: 18px;
}

.small-hero p:not(.eyebrow) {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.8;
}

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

.category-card {
  color: #fff;
}

.category-card a {
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.75);
}

.filter-btn {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--amber-200);
  border-radius: 999px;
  color: #7c3f09;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.filter-btn.is-active,
.filter-btn:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
}

.year-select {
  min-height: 42px;
  padding: 0 16px;
  color: #7c3f09;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: #1f1205;
}

.detail-inner {
  position: relative;
  z-index: 3;
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 38px 78px rgba(0, 0, 0, 0.45);
}

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

.detail-meta {
  margin: 24px 0 18px;
}

.detail-meta span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.player-section {
  padding-top: 54px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 34px;
  background: #120a04;
  box-shadow: 0 32px 80px rgba(38, 20, 7, 0.3);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(38, 20, 7, 0.12), rgba(38, 20, 7, 0.62));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 24px 58px rgba(249, 115, 22, 0.38);
  font-size: 36px;
}

.player-shell.is-playing .play-overlay {
  display: none;
}

.detail-text {
  padding-top: 20px;
}

.detail-text p {
  margin: 16px 0 32px;
  color: #4b5563;
  font-size: 18px;
  line-height: 2;
}

.rank-page {
  display: grid;
  gap: 18px;
}

.rank-card {
  display: grid;
  grid-template-columns: 70px 140px 1fr;
  gap: 24px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(146, 64, 14, 0.1);
}

.rank-num {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  font-size: 22px;
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  border-radius: 18px;
}

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

.rank-card h2 {
  margin: 0 0 10px;
  color: #261407;
}

.rank-card p {
  color: var(--muted);
  line-height: 1.8;
}

.search-large {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 12px;
  margin-bottom: 26px;
}

.search-large input {
  min-height: 54px;
  padding: 0 22px;
}

.search-result-heading {
  margin: 20px 0;
}

.site-footer {
  margin-top: 40px;
  color: #fffbeb;
  background: linear-gradient(180deg, #78350f, #451a03);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 54px 0;
}

.footer-logo {
  margin-bottom: 18px;
  font-size: 22px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--amber-300);
  font-size: 18px;
}

.site-footer p,
.site-footer li {
  color: rgba(255, 251, 235, 0.74);
  line-height: 1.8;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  padding: 18px 24px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 251, 235, 0.68);
  text-align: center;
}

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

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

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

  .search-form {
    margin-left: auto;
  }

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

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

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

  .header-inner > .search-form {
    display: none;
  }

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

  .hero-content,
  .detail-layout,
  .ranking-home,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 280px;
    margin: 0 auto;
  }

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

  .rank-card {
    grid-template-columns: 54px 96px 1fr;
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .logo span:last-child {
    font-size: 18px;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
  }

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

  .hero-content {
    gap: 28px;
    padding-top: 48px;
  }

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

  .hero-desc,
  .detail-copy .lead {
    font-size: 16px;
  }

  .content-section,
  .rail-section,
  .ranking-home,
  .player-section {
    width: min(100% - 28px, 1280px);
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .rail-section,
  .ranking-home {
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .rail-item {
    flex-basis: 280px;
  }

  .ranking-list li {
    grid-template-columns: 40px 1fr;
  }

  .ranking-list li em {
    grid-column: 2;
  }

  .detail-inner {
    width: min(100% - 28px, 1280px);
  }

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

  .rank-card {
    grid-template-columns: 48px 1fr;
  }

  .rank-poster {
    display: none;
  }

  .search-large {
    grid-template-columns: 1fr;
  }
}
