:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --red: #ef4444;
  --pink: #ec4899;
  --yellow: #fde047;
  --blue: #0284c7;
  --cyan: #06b6d4;
  --green: #10b981;
  --purple: #8b5cf6;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 14px 40px rgba(15, 23, 42, 0.16);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand-name {
  font-size: 24px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--orange-dark), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  color: var(--gray-700);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--orange-dark);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search:focus-within,
.mobile-search:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.header-search input,
.mobile-search input {
  width: 220px;
  border: 0;
  background: transparent;
  padding: 10px 14px 10px 18px;
  outline: 0;
}

.header-search button,
.mobile-search button {
  border: 0;
  padding: 10px 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--red));
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  color: var(--gray-800);
  cursor: pointer;
  font-size: 24px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--gray-200);
  padding: 16px;
  background: var(--white);
}

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

.mobile-nav {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.mobile-nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--gray-700);
  background: var(--gray-50);
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange) 0%, var(--red) 48%, var(--pink) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.28), transparent 26%), radial-gradient(circle at 82% 18%, rgba(253, 224, 71, 0.22), transparent 28%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(to top, var(--gray-50), transparent);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.32;
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.78), rgba(17, 24, 39, 0.28) 54%, rgba(17, 24, 39, 0.2));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 42px;
  padding: 54px 0 110px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero h1 span {
  color: var(--yellow);
}

.hero p {
  max-width: 720px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2vw, 24px);
}

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

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--orange-dark);
  background: var(--white);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.18);
}

.secondary-btn {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.primary-btn:hover {
  background: var(--yellow);
}

.hero-panel {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.24);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.hero-panel img {
  height: 240px;
}

.hero-panel-body {
  padding: 22px;
}

.hero-panel-body h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.hero-panel-body p {
  margin: 0 0 16px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.86);
}

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

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

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

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transform: translateY(-50%);
}

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

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

.hero-feature-strip {
  position: relative;
  z-index: 4;
  margin-top: -80px;
  margin-bottom: 58px;
}

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

.section {
  margin-bottom: 64px;
}

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

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

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.24);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-more {
  color: var(--orange-dark);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(236, 72, 153, 0.18));
  overflow: hidden;
}

.large-card .poster-link {
  aspect-ratio: 16 / 10;
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 24, 39, 0.72), transparent 58%);
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
}

.year-badge {
  left: 12px;
  top: 12px;
  padding: 4px 10px;
  background: rgba(17, 24, 39, 0.62);
  backdrop-filter: blur(8px);
}

.rank-badge {
  right: 12px;
  top: 12px;
  padding: 5px 11px;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

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

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 700;
}

.movie-meta-row span {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gray-100);
}

.movie-card h3 {
  margin: 0 0 9px;
  font-size: 19px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--orange-dark);
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--gray-600);
  font-size: 14px;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--orange-dark);
  background: rgba(249, 115, 22, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.horizontal-list {
  display: grid;
  gap: 16px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}

.horizontal-card .poster-link {
  aspect-ratio: auto;
  min-height: 170px;
}

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

.category-card {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, var(--purple), var(--pink));
}

.category-card:nth-child(4n) {
  background: linear-gradient(135deg, var(--green), #22c55e);
}

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

.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

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

.category-card span {
  margin-top: 20px;
  font-weight: 900;
}

.page-hero {
  padding: 58px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--red), var(--pink));
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.24), transparent 26%), radial-gradient(circle at 84% 16%, rgba(253, 224, 71, 0.22), transparent 28%);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

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

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(150px, 1fr));
  gap: 14px;
  margin: 34px 0 30px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 12px 14px;
  outline: 0;
  color: var(--gray-800);
  background: var(--gray-50);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 74px 160px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.ranking-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-size: 18px;
  font-weight: 900;
}

.ranking-cover {
  height: 96px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(236, 72, 153, 0.18));
}

.ranking-info h2,
.ranking-info h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.ranking-info p {
  margin: 0;
  color: var(--gray-600);
}

.ranking-score {
  color: var(--orange-dark);
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  margin: 36px auto 64px;
}

.detail-main,
.detail-side,
.search-empty {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-main {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  background: var(--gray-900);
  aspect-ratio: 16 / 9;
}

.movie-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(to top, rgba(17, 24, 39, 0.82), rgba(17, 24, 39, 0.18));
  cursor: pointer;
  z-index: 2;
}

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

.play-core {
  display: grid;
  place-items: center;
  gap: 16px;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: var(--orange-dark);
  background: var(--white);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  font-size: 34px;
  transition: transform 0.2s ease;
}

.play-overlay:hover .play-icon {
  transform: scale(1.08);
}

.play-title {
  font-size: 22px;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.detail-content {
  padding: 30px;
}

.detail-content h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.16;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-weight: 800;
}

.detail-content h2 {
  margin: 28px 0 12px;
  font-size: 25px;
}

.detail-content p {
  color: var(--gray-700);
  font-size: 17px;
}

.detail-tags {
  margin-top: 14px;
}

.detail-side {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 20px;
}

.side-title {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-poster {
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(236, 72, 153, 0.18));
}

.side-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.side-item span {
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 700;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.26);
  cursor: pointer;
  z-index: 40;
  font-size: 24px;
  font-weight: 900;
}

.back-top.show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-empty {
  display: none;
  padding: 38px;
  text-align: center;
  color: var(--gray-600);
}

.site-footer {
  color: var(--gray-300);
  background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 50px 0;
}

.footer-brand {
  color: var(--white);
  font-size: 22px;
  margin-bottom: 14px;
}

.site-footer p {
  margin: 0;
  color: var(--gray-300);
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.site-footer ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 540px;
  }

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

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

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

  .detail-side {
    position: static;
  }
}

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

  .mobile-search input {
    width: 100%;
  }

  .hero {
    min-height: 690px;
  }

  .hero-content {
    min-height: 690px;
    padding-top: 40px;
  }

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

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

  .horizontal-card,
  .ranking-item {
    grid-template-columns: 1fr;
  }

  .ranking-cover {
    height: 160px;
  }
}

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

  .brand-name {
    font-size: 19px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero-arrow {
    display: none;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero p {
    font-size: 17px;
  }

  .hero-feature-grid,
  .movie-grid,
  .movie-grid.three,
  .category-overview,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .detail-content {
    padding: 22px;
  }

  .side-item {
    grid-template-columns: 86px minmax(0, 1fr);
  }
}
