* {
  box-sizing: border-box;
}

:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --green-50: #f0fdf4;
  --green-500: #22c55e;
  --green-700: #15803d;
  --rose-500: #f43f5e;
  --blue-50: #eff6ff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-md: 0 10px 24px rgba(17, 24, 39, 0.08);
  --shadow-xl: 0 25px 60px rgba(17, 24, 39, 0.18);
  --radius-xl: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--gray-800);
  background: linear-gradient(180deg, var(--amber-50) 0%, var(--green-50) 48%, var(--blue-50) 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(240, 253, 244, 0.96));
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.site-nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--green-500));
  border-radius: 999px;
  box-shadow: 0 12px 22px rgba(245, 158, 11, 0.28);
  transition: transform 0.28s ease;
}

.brand:hover .brand-mark {
  transform: rotate(12deg) scale(1.04);
}

.brand-name {
  font-size: 20px;
  color: var(--gray-800);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav-link {
  font-size: 15px;
  color: var(--gray-700);
  font-weight: 700;
  padding: 22px 2px 18px;
  border-bottom: 3px solid transparent;
  transition: color 0.24s ease, border-color 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-600);
  border-bottom-color: var(--amber-600);
}

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

.nav-search input,
.filter-input,
.filter-select {
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 11px 16px;
  background: var(--white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  width: 210px;
}

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

.nav-search button,
.primary-button,
.secondary-button,
.play-button,
.clear-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.nav-search button,
.primary-button,
.play-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.28);
}

.nav-search button {
  padding: 11px 16px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 24px;
}

.secondary-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.nav-search button:hover,
.primary-button:hover,
.play-button:hover,
.secondary-button:hover,
.clear-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--gray-700);
  font-size: 30px;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: var(--gray-900);
}

.hero-cover-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.93), rgba(20, 83, 45, 0.9));
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 2;
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--amber-50));
}

.hero-inner {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
  padding: 72px 0 110px;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  font-weight: 800;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

.hero-lead {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.7;
  color: #ffedd5;
}

.hero-feature-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 42px);
  color: var(--white);
}

.hero-feature-text {
  margin: 0 0 26px;
  line-height: 1.8;
  color: #fff7ed;
}

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

.hero-panel {
  display: grid;
  gap: 14px;
}

.hero-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
  transition: transform 0.24s ease, background 0.24s ease;
}

.hero-card:hover {
  transform: translateX(-4px) scale(1.01);
  background: rgba(255, 255, 255, 0.24);
}

.hero-card img {
  width: 112px;
  height: 74px;
  object-fit: cover;
  border-radius: 16px;
}

.hero-card strong,
.hero-card span {
  display: block;
}

.hero-card strong {
  margin-bottom: 8px;
  color: var(--white);
  font-size: 17px;
}

.hero-card span {
  color: #ffedd5;
  font-size: 13px;
  line-height: 1.45;
}

.page-hero {
  color: var(--white);
  background: linear-gradient(135deg, rgba(146, 64, 14, 0.94), rgba(21, 128, 61, 0.9));
  overflow: hidden;
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0;
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #fff7ed;
  font-size: 18px;
  line-height: 1.75;
}

.content-section,
.filter-shell,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
}

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-link {
  position: relative;
  aspect-ratio: 16 / 10;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), var(--green-50));
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.68));
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.card-type,
.rank-badge,
.play-dot {
  position: absolute;
  color: var(--white);
  border-radius: 999px;
  font-weight: 800;
}

.card-type {
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  background: rgba(245, 158, 11, 0.95);
  font-size: 12px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  background: rgba(244, 63, 94, 0.94);
  font-size: 12px;
}

.play-dot {
  left: 50%;
  top: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.86);
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.5);
  opacity: 0;
  backdrop-filter: blur(10px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  min-height: 1.4em;
  font-size: 18px;
  line-height: 1.4;
}

.card-body h3 a:hover {
  color: var(--amber-600);
}

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

.card-meta,
.card-tags,
.detail-meta,
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.card-meta {
  margin-top: 16px;
  color: var(--gray-500);
  font-size: 13px;
}

.card-meta span:first-child {
  color: var(--amber-600);
  font-weight: 800;
}

.card-tags {
  margin-top: 12px;
}

.card-tags span,
.tag-pill,
.genre-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  color: var(--amber-700);
  background: var(--amber-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.92), rgba(34, 197, 94, 0.86));
  box-shadow: var(--shadow-md);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-tile h3 {
  position: relative;
  z-index: 2;
  margin: 0 0 8px;
  font-size: 24px;
}

.category-tile p,
.category-tile span {
  position: relative;
  z-index: 2;
  margin: 0;
  color: #fff7ed;
}

.category-photos {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  opacity: 0.28;
}

.category-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filter-shell {
  padding: 34px 0 0;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.filter-input,
.filter-select {
  width: 100%;
  border-radius: 16px;
}

.clear-button {
  padding: 12px 18px;
  color: var(--green-700);
  background: #dcfce7;
}

.result-line {
  margin: 18px 0 0;
  color: var(--gray-600);
}

.result-line strong {
  color: var(--amber-600);
}

.rank-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 28px;
}

.rank-board,
.side-board,
.info-card,
.detail-card,
.player-card {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.rank-board {
  padding: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 88px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: var(--amber-50);
  transform: translateX(4px);
}

.rank-number {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--rose-500), var(--amber-500));
  border-radius: 999px;
  font-weight: 900;
}

.rank-row img {
  width: 88px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  margin-bottom: 6px;
}

.rank-info em {
  color: var(--gray-500);
  font-size: 13px;
  font-style: normal;
}

.rank-score {
  color: var(--amber-600);
  font-weight: 900;
}

.breadcrumbs {
  margin: 28px 0 18px;
  color: var(--gray-600);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 1.7fr 0.8fr;
  gap: 28px;
  padding-bottom: 56px;
}

.player-card {
  overflow: hidden;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #050505;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.56));
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-button {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  pointer-events: auto;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
}

.player-caption {
  padding: 18px 22px;
  color: var(--gray-600);
  background: var(--white);
}

.detail-card {
  padding: 28px;
}

.detail-card h1,
.detail-card h2 {
  margin-top: 0;
}

.detail-card h1 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
}

.detail-meta {
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--gray-200);
}

.detail-meta span {
  color: var(--gray-600);
}

.detail-meta strong {
  color: var(--amber-600);
}

.detail-card p {
  color: var(--gray-700);
  line-height: 1.9;
}

.detail-card .one-line {
  color: var(--gray-800);
  font-size: 18px;
  font-weight: 700;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 22px;
}

.info-card {
  overflow: hidden;
}

.info-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.info-body {
  padding: 20px;
}

.info-body h3 {
  margin: 0 0 12px;
}

.info-list {
  display: grid;
  gap: 10px;
  color: var(--gray-600);
}

.info-list span {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px dashed var(--gray-200);
  padding-bottom: 8px;
}

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

.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

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

.movie-card.compact .card-desc {
  display: none;
}

.movie-card.compact .poster-link {
  aspect-ratio: 16 / 9;
}

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

.empty-state {
  display: none;
  padding: 54px 24px;
  text-align: center;
  color: var(--gray-600);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.site-footer {
  color: #fffbeb;
  background: linear-gradient(135deg, #78350f, #14532d);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 36px;
  padding: 46px 0 26px;
}

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

.footer-inner p {
  max-width: 520px;
  color: #ffedd5;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  padding: 9px 12px;
  color: #ffedd5;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 28px;
  color: #fde68a;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

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

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

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

@media (max-width: 820px) {
  .site-nav {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    width: 100%;
    order: 4;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-left: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    padding: 12px 14px;
    border-bottom: 0;
    border-radius: 14px;
  }

  .nav-link.active,
  .nav-link:hover {
    background: var(--amber-100);
  }

  .nav-search {
    width: 100%;
    order: 5;
  }

  .nav-search input {
    width: 100%;
    flex: 1;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 52px 0 74px;
  }

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

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

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .movie-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-card {
    grid-template-columns: 96px 1fr;
  }

  .hero-card img {
    width: 96px;
    height: 68px;
  }

  .rank-row {
    grid-template-columns: 36px 72px 1fr;
  }

  .rank-score {
    display: none;
  }
}
