:root {
  --orange: #ea580c;
  --amber: #f59e0b;
  --yellow: #facc15;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff7ed;
  --card: #ffffff;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fffaf4 0%, #ffffff 22%, #f8fafc 100%);
  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,
video {
  display: block;
  max-width: 100%;
}

.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.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

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

.brand-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 12px 26px rgba(234, 88, 12, 0.24);
  transform: translateZ(0);
  transition: transform 0.2s ease;
}

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

.brand-text strong {
  display: block;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  margin-top: 2px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
  color: #374151;
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--orange);
}

.mobile-toggle {
  display: none;
  border: 0;
  background: #f3f4f6;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  color: #111827;
  font-size: 20px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
  border-top: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316 0%, #f59e0b 54%, #facc15 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='.12'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.24), transparent 30%), rgba(0, 0, 0, 0.08);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 40px;
  align-items: center;
  padding: 82px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(44px, 8vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2.4vw, 23px);
}

.hero-search,
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hero-search {
  width: min(620px, 100%);
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(16px);
}

.hero-search input,
.filter-bar input,
.filter-select {
  width: 100%;
  min-height: 52px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.hero-search input,
.filter-bar input {
  padding: 0 22px;
  font-size: 16px;
}

.hero-search button,
.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.hero-search button,
.primary-link {
  color: #ffffff;
  background: linear-gradient(135deg, #ea580c, #f59e0b);
  box-shadow: 0 14px 30px rgba(154, 52, 18, 0.26);
}

.secondary-link {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-chips a,
.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
}

.hero-slider {
  position: relative;
  min-height: 480px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
  opacity: 0;
  transform: translateX(28px) scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 310px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.18);
}

.hero-slide__body {
  padding: 26px;
  background: rgba(17, 24, 39, 0.68);
  backdrop-filter: blur(18px);
}

.hero-slide__body h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.hero-slide__body p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
}

.hero-dots {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 28px;
  background: #ffffff;
}

.section {
  padding: 70px 0;
}

.section.alt {
  background: #fff7ed;
}

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

.section-heading h2,
.sub-hero h1,
.detail-title h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading p,
.sub-hero p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.78);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.movie-card__cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #fed7aa, #fef3c7);
}

.movie-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.movie-card__badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.74);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  right: 12px;
  left: auto;
  background: linear-gradient(135deg, var(--orange), var(--amber));
}

.movie-card__play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.28);
}

.movie-card__body {
  padding: 18px;
}

.movie-card__title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 50px;
  color: #111827;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.32;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card__title:hover {
  color: var(--orange);
}

.movie-card__meta,
.movie-card__desc {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
}

.movie-card__meta {
  -webkit-line-clamp: 1;
}

.movie-card__desc {
  min-height: 44px;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  padding: 24px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.category-card::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.24), rgba(245, 158, 11, 0.1));
}

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 24px;
}

.category-card p {
  position: relative;
  margin: 0 0 18px;
  color: var(--muted);
}

.category-card span {
  position: relative;
  color: var(--orange);
  font-weight: 900;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(249, 115, 22, 0.36);
  transform: translateX(4px);
}

.rank-item img {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: #ffedd5;
}

.rank-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  font-weight: 900;
}

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

.rank-item em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.sub-hero {
  padding: 78px 0;
  background: linear-gradient(135deg, #fff7ed, #ffffff 60%, #fef3c7);
}

.sub-hero .eyebrow {
  color: #9a3412;
  background: #ffedd5;
}

.filter-bar {
  margin: 0 0 26px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.filter-select {
  max-width: 240px;
  padding: 0 18px;
  font-size: 15px;
}

.empty-state {
  display: none;
  margin: 20px 0;
  padding: 24px;
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
}

.empty-state.is-visible {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--orange);
  font-weight: 800;
}

.detail-hero {
  padding: 44px 0 28px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: #ffedd5;
  box-shadow: var(--shadow);
}

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

.detail-title h1 {
  margin-top: 10px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 20px;
}

.detail-summary {
  margin: 0;
  color: #374151;
  font-size: 18px;
}

.player-section {
  padding: 24px 0 64px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #111827;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-card video {
  width: 100%;
  height: 100%;
  background: #111827;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: #ffffff;
  background: #111827;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.player-cover span {
  position: relative;
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 20px 50px rgba(234, 88, 12, 0.42);
  font-size: 36px;
  transform: translateZ(0);
  transition: transform 0.2s ease;
}

.player-cover:hover span {
  transform: scale(1.08);
}

.content-panel {
  margin-top: 28px;
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.content-panel h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.content-panel p {
  margin: 0 0 16px;
  color: #374151;
}

.content-panel p:last-child {
  margin-bottom: 0;
}

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

.related-grid .movie-card__title {
  min-height: 42px;
  font-size: 16px;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.pagination-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 900;
}

.site-footer {
  color: #e5e7eb;
  background: linear-gradient(135deg, #111827, #1f2937);
}

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

.footer-brand {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  color: #9ca3af;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: #fdba74;
  font-size: 18px;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #9ca3af;
}

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

.footer-bottom {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

.js-card.is-hidden {
  display: none;
}

@media (max-width: 1024px) {
  .hero-grid,
  .rank-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

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

  .mobile-nav.is-open {
    display: block;
  }

  .brand-text strong {
    font-size: 20px;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    padding: 54px 0;
  }

  .hero-search,
  .filter-bar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-search button,
  .filter-select {
    width: 100%;
    max-width: none;
  }

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

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

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

  .rank-item {
    grid-template-columns: 36px 64px minmax(0, 1fr);
  }

  .rank-item img {
    width: 64px;
    height: 86px;
  }
}

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

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

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

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

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

  .content-panel {
    padding: 22px;
  }
}
