:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --amber: #d97706;
  --amber-dark: #b45309;
  --amber-soft: #fef3c7;
  --shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.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.9);
  backdrop-filter: blur(16px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  font-weight: 800;
  font-size: 20px;
  white-space: nowrap;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 9px 14px;
  color: #4b5563;
  border-radius: 999px;
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
}

.header-search input,
.filter-bar input,
.search-panel input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.filter-bar input:focus,
.search-panel input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.header-search button,
.search-panel button,
.primary-button {
  border: 0;
  padding: 11px 18px;
  color: #ffffff;
  background: var(--amber);
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.menu-toggle {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
  font-size: 22px;
}

.hero {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: #111827;
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: clamp(24px, 7vw, 96px);
  right: clamp(24px, 7vw, 96px);
  bottom: 64px;
  z-index: 2;
  max-width: 820px;
  color: #ffffff;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  color: #fde68a;
}

.hero-kicker span:first-child {
  color: #ffffff;
  background: var(--amber);
  border-radius: 999px;
  padding: 5px 13px;
}

.hero h1,
.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  font-weight: 900;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  color: #ffffff;
  background: var(--amber);
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.38);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-button:hover {
  background: var(--amber-dark);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: #f59e0b;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.stack {
  display: grid;
  gap: 64px;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  font-weight: 900;
}

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

.section-more {
  color: var(--amber-dark);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  background: var(--panel);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-wrap {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: #111827;
}

.large-card .poster-wrap {
  height: 310px;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
  transition: opacity 0.25s ease;
}

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

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--amber);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.year-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 9px;
  font-size: 12px;
}

.card-info {
  padding: 18px;
}

.card-info h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 800;
}

.card-info p {
  height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  overflow: hidden;
  font-size: 14px;
}

.card-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
}

.tag-row {
  margin-top: 10px;
}

.tag-row span {
  padding: 4px 8px;
  color: #92400e;
  background: #fffbeb;
  border-radius: 8px;
}

.soft-panel {
  padding: 32px;
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  border-radius: 26px;
}

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

.category-tile {
  display: block;
  padding: 24px;
  min-height: 140px;
  background: #ffffff;
  border: 1px solid #fde68a;
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
}

.page-hero {
  padding: 58px 0 18px;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.22), transparent 42%), #ffffff;
  border-bottom: 1px solid var(--line);
}

.page-hero .container {
  padding-top: 0;
  padding-bottom: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--amber-dark);
  font-weight: 700;
}

.filter-bar,
.search-panel {
  margin-bottom: 26px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 76px 120px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.rank-num {
  display: flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), #fb923c);
  border-radius: 16px;
  font-size: 22px;
  font-weight: 900;
}

.rank-poster {
  width: 120px;
  height: 78px;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

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

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 900;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--muted);
}

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

.player-card,
.detail-card,
.sidebar-card {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  z-index: 3;
}

.player-cover span {
  display: flex;
  width: 86px;
  height: 86px;
  align-items: center;
  justify-content: center;
  background: rgba(217, 119, 6, 0.95);
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.player-title {
  padding: 22px 24px;
}

.player-title h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  font-weight: 900;
}

.player-title p {
  margin: 0;
  color: var(--muted);
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-card h2,
.sidebar-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 900;
}

.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.info-pills a,
.info-pills span {
  padding: 7px 12px;
  color: #92400e;
  background: #fffbeb;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.detail-card p {
  color: #374151;
  margin: 0 0 16px;
  font-size: 16px;
}

.sidebar-card {
  padding: 20px;
}

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

.related-link {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
}

.related-link img {
  width: 82px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.related-link strong {
  display: block;
  margin-bottom: 3px;
  color: #111827;
  font-size: 15px;
}

.related-link span {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 40px;
  background: #111827;
  color: #d1d5db;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px;
  display: grid;
  gap: 18px;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.footer-brand strong {
  color: #ffffff;
  font-size: 20px;
}

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

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

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

.empty-results {
  padding: 42px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
  border-radius: 20px;
}

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

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

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
  }

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

  .main-nav {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 10px;
  }

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

  .header-search {
    order: 4;
    width: 100%;
    min-width: 0;
  }

  .hero {
    height: 520px;
  }

  .hero-arrow {
    display: none;
  }

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

  .rank-item {
    grid-template-columns: 54px 96px 1fr;
  }

  .rank-poster {
    width: 96px;
    height: 68px;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 40px 16px;
  }

  .header-inner {
    padding: 12px 16px;
  }

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 54px;
  }

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

  .poster-wrap {
    height: 300px;
  }

  .section-heading,
  .search-panel form {
    align-items: stretch;
    flex-direction: column;
  }

  .rank-item {
    grid-template-columns: 46px 1fr;
  }

  .rank-poster {
    display: none;
  }
}
