:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange-50: #fff7ed;
  --orange-600: #ea580c;
  --slate-50: #f8fafc;
  --slate-900: #0f172a;
  --slate-950: #020617;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 20px 40px rgba(15, 23, 42, 0.18);
  --shadow-2xl: 0 28px 70px rgba(15, 23, 42, 0.28);
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--gray-900);
  background: linear-gradient(135deg, var(--slate-50) 0%, var(--amber-50) 52%, var(--orange-50) 100%);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

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

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

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
}

.logo-text,
.footer-logo {
  font-size: 25px;
  background: linear-gradient(90deg, var(--amber-600), var(--orange-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--gray-700);
  font-weight: 600;
}

.desktop-nav a,
.nav-dropdown button {
  border: 0;
  color: var(--gray-700);
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown button:hover {
  color: var(--amber-600);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  display: grid;
  min-width: 190px;
  margin-top: 14px;
  padding: 8px;
  visibility: hidden;
  opacity: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-panel a {
  padding: 10px 14px;
  border-radius: 10px;
}

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

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 290px;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  background: var(--white);
  overflow: hidden;
}

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

.header-search button,
.search-panel button {
  padding: 10px 18px;
  border: 0;
  color: var(--white);
  background: var(--amber-600);
  cursor: pointer;
  transition: background 0.2s ease;
}

.header-search button:hover,
.search-panel button:hover {
  background: var(--amber-700);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 22px;
  border-top: 1px solid var(--gray-200);
}

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

.mobile-nav a {
  padding: 8px 0;
  color: var(--gray-700);
  font-weight: 600;
}

.mobile-nav form {
  display: flex;
  margin-top: 8px;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  background: var(--white);
  overflow: hidden;
}

.mobile-nav input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 0;
  outline: 0;
}

.mobile-nav button {
  padding: 10px 18px;
  border: 0;
  color: var(--white);
  background: var(--amber-600);
}

main {
  min-height: 60vh;
}

.container,
.hero-section,
.content-section,
.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.hero-section {
  padding-top: 32px;
  padding-bottom: 42px;
}

.hero-slider {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  background: var(--slate-950);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.42) 48%, rgba(2, 6, 23, 0.08));
}

.hero-content {
  position: absolute;
  left: clamp(24px, 5vw, 54px);
  right: clamp(24px, 5vw, 54px);
  bottom: clamp(26px, 5vw, 58px);
  max-width: 760px;
  color: var(--white);
}

.hero-kicker,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  margin: 14px 0;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-meta,
.hero-desc {
  margin: 0 0 10px;
  color: #e5e7eb;
  font-size: 18px;
}

.hero-desc {
  max-width: 720px;
  line-height: 1.75;
}

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

.btn-primary,
.btn-ghost,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  background: var(--amber-700);
  transform: translateY(-1px) scale(1.02);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.26);
}

.btn-soft {
  color: var(--amber-700);
  background: var(--amber-50);
}

.hero-controls {
  position: absolute;
  right: 30px;
  bottom: 30px;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 46px;
  height: 46px;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease;
}

.hero-controls button:hover {
  background: rgba(255, 255, 255, 0.32);
}

.content-section {
  padding-top: 46px;
  padding-bottom: 46px;
}

.section-alt {
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(5px);
}

.section-warm {
  background: linear-gradient(90deg, var(--amber-50), var(--orange-50));
}

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

.heading-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.heading-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.25);
}

.section-heading h2,
.page-heading h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.15;
}

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

.section-more:hover {
  color: var(--amber-700);
}

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

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

.movie-card,
.category-card,
.rank-card,
.info-panel,
.search-panel,
.player-info,
.related-panel {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-link,
.card-body {
  display: block;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--gray-100);
}

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

.movie-card:hover img,
.category-card:hover img,
.mini-card:hover img {
  transform: scale(1.08);
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.08));
  transition: opacity 0.25s ease;
}

.card-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding-left: 4px;
  background: var(--amber-600);
  border-radius: 999px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.movie-card:hover .card-overlay {
  opacity: 1;
}

.card-body {
  padding: 16px;
}

.card-body strong {
  display: block;
  overflow: hidden;
  margin-bottom: 6px;
  font-size: 17px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
  color: var(--amber-600);
}

.card-body em {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-500);
  font-size: 13px;
  font-style: normal;
}

.card-desc {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span,
.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  color: var(--amber-700);
  background: var(--amber-50);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 220px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.18));
}

.category-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: var(--white);
}

.category-copy strong {
  display: block;
  margin-bottom: 8px;
  font-size: 23px;
}

.category-copy em {
  display: -webkit-box;
  overflow: hidden;
  color: #e5e7eb;
  font-style: normal;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-shell {
  padding-top: 34px;
  padding-bottom: 58px;
}

.page-lead {
  max-width: 760px;
  margin: -12px 0 28px;
  color: var(--gray-600);
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--gray-600);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--amber-600);
  font-weight: 700;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.filter-bar input,
.filter-bar select,
.search-panel input {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  outline: 0;
  background: var(--white);
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-panel input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28);
}

.filter-count {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  color: var(--gray-500);
  font-weight: 700;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 70px 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

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

.rank-poster {
  width: 88px;
  height: 118px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--gray-100);
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info strong {
  display: block;
  margin-bottom: 7px;
  font-size: 20px;
}

.rank-info em {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-500);
  font-style: normal;
}

.rank-info p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--gray-600);
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-action {
  justify-self: end;
}

.search-panel {
  margin-bottom: 28px;
  padding: 20px;
}

.search-panel form {
  display: flex;
  gap: 12px;
}

.search-panel input {
  flex: 1;
}

.no-results {
  display: none;
  padding: 50px 20px;
  text-align: center;
  color: var(--gray-500);
  background: rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-xl);
}

.no-results.is-visible {
  display: block;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-box {
  overflow: hidden;
  background: #000000;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
}

.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-stage video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-poster {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background-position: center;
  background-size: cover;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-poster::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
}

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

.player-button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  padding-left: 6px;
  border: 0;
  color: var(--white);
  background: var(--amber-600);
  border-radius: 999px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
  cursor: pointer;
  font-size: 32px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-button:hover {
  background: var(--amber-700);
  transform: scale(1.06);
}

.player-info,
.related-panel {
  padding: 24px;
}

.player-info h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.2;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.meta-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  color: var(--gray-700);
  background: var(--gray-100);
  border-radius: 999px;
  font-weight: 700;
}

.info-block {
  margin-top: 20px;
}

.info-block h2,
.info-block h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.info-block p {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.85;
}

.related-panel {
  position: sticky;
  top: 88px;
}

.related-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.mini-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.mini-card:hover {
  background: var(--gray-50);
}

.mini-cover {
  width: 82px;
  height: 110px;
  flex: 0 0 82px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--gray-100);
}

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

.mini-info {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 6px;
}

.mini-info strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-card:hover strong {
  color: var(--amber-600);
}

.mini-info em,
.mini-info span {
  color: var(--gray-500);
  font-style: normal;
  font-size: 12px;
  line-height: 1.5;
}

.site-footer {
  margin-top: 36px;
  color: #d1d5db;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px 26px;
}

.footer-inner p {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--gray-400);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-content: start;
}

.footer-links a:hover {
  color: #fbbf24;
}

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 30px;
  color: var(--gray-400);
  font-size: 14px;
}

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

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

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

  .related-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

  .header-inner {
    padding: 0 18px;
  }

  .hero-slider {
    min-height: 500px;
  }

  .hero-slide img {
    min-height: 500px;
  }

  .hero-controls {
    right: 18px;
    bottom: 18px;
  }

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

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

  .rank-card {
    grid-template-columns: 54px 78px minmax(0, 1fr);
  }

  .rank-action {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .search-panel form {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .container,
  .hero-section,
  .content-section,
  .page-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .logo-text {
    font-size: 20px;
  }

  .hero-section {
    padding-top: 20px;
  }

  .hero-slider,
  .hero-slide img {
    min-height: 460px;
  }

  .hero-content {
    bottom: 82px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn-primary,
  .btn-ghost,
  .btn-soft {
    width: 100%;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body strong {
    font-size: 15px;
  }

  .rank-card {
    grid-template-columns: 42px 70px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-index {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 15px;
  }

  .rank-poster {
    width: 70px;
    height: 94px;
  }

  .footer-inner {
    flex-direction: column;
  }
}
