* {
  box-sizing: border-box;
}

:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --orange-500: #f97316;
  --orange-400: #fb923c;
  --red-500: #ef4444;
  --amber-100: #fef3c7;
  --paper: #fff7ed;
  --text: #172033;
  --muted: #64748b;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow-soft: 0 24px 70px rgba(15, 23, 42, 0.16);
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12);
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #fff7ed 48%, #fef3c7 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  color: #fff;
  background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.25);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

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

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange-500), var(--red-500));
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.4);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.desktop-nav a,
.mobile-nav a {
  padding: 10px 13px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.hero {
  position: relative;
  min-height: 75vh;
  overflow: hidden;
  background: var(--slate-950);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: flex;
  align-items: center;
  padding: 88px max(32px, calc((100vw - 1180px) / 2)) 110px;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(680px, calc(100% - 32px));
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--orange-400);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 74px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.hero p,
.page-hero p,
.lead-text {
  max-width: 720px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  color: #fed7aa;
  font-size: 13px;
  font-weight: 700;
}

.movie-tags span {
  color: #c2410c;
  background: #ffedd5;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--orange-500), var(--red-500));
  box-shadow: 0 16px 30px rgba(239, 68, 68, 0.28);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-side-panel {
  position: absolute;
  right: max(32px, calc((100vw - 1180px) / 2));
  bottom: 92px;
  z-index: 4;
  width: min(330px, calc(100% - 64px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
}

.hero-side-title {
  margin-bottom: 10px;
  color: #fff;
  font-weight: 900;
}

.hero-mini {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 12px;
  padding: 9px;
  border-radius: 18px;
  color: #e2e8f0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-mini:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(3px);
}

.hero-mini img {
  height: 76px;
  border-radius: 14px;
  background: var(--slate-800);
}

.hero-dots {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 52px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  background: var(--orange-400);
}

.search-strip {
  position: relative;
  z-index: 10;
  margin-top: -34px;
}

.search-strip.in-page {
  margin-top: -28px;
}

.search-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.search-wrap h2,
.section-head h2,
.player-section h2,
.story-card h2,
.info-card h2,
.footer-grid h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.search-wrap p,
.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: min(430px, 100%);
  padding: 8px 14px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
}

.search-box span {
  color: #c2410c;
  font-weight: 900;
}

.search-box input {
  width: 100%;
  min-height: 38px;
  border: 0;
  outline: 0;
  color: var(--slate-900);
  background: transparent;
}

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

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

.section-more {
  color: #c2410c;
  background: #ffedd5;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(251, 146, 60, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.42);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

.movie-poster img {
  transition: transform 0.5s ease, filter 0.5s ease;
}

.movie-card:hover .movie-poster img {
  transform: scale(1.06);
  filter: brightness(1.05);
}

.movie-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 56px;
  overflow: hidden;
  color: var(--slate-900);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover,
.rank-title:hover {
  color: #ea580c;
}

.movie-meta,
.rank-meta {
  margin-top: 7px;
  color: #ea580c;
  font-size: 13px;
  font-weight: 800;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 70px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 178px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(145deg, var(--slate-900), var(--slate-700));
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(145deg, #7c2d12, #ea580c);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.18);
}

.category-card span {
  color: #fed7aa;
  font-size: 13px;
  font-weight: 900;
}

.category-card strong {
  font-size: 24px;
  line-height: 1.2;
}

.category-card em {
  color: #e2e8f0;
  font-style: normal;
  font-size: 14px;
}

.page-hero {
  padding: 110px 0 94px;
  color: #fff;
  background: radial-gradient(circle at 12% 20%, rgba(249, 115, 22, 0.36), transparent 32%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero.small-hero {
  background: radial-gradient(circle at 85% 12%, rgba(251, 146, 60, 0.34), transparent 34%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.rank-hero {
  background: radial-gradient(circle at 12% 18%, rgba(239, 68, 68, 0.38), transparent 32%), linear-gradient(135deg, var(--slate-950), #1f2937);
}

.rank-list {
  display: grid;
  gap: 14px;
  padding-left: 0;
  list-style: none;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 82px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(251, 146, 60, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange-500), var(--red-500));
  font-size: 18px;
  font-weight: 900;
}

.rank-poster {
  display: block;
  height: 108px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--slate-800);
}

.rank-title {
  color: var(--slate-900);
  font-size: 18px;
  font-weight: 900;
}

.rank-item p {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--slate-950);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.05);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.12));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  align-items: end;
  gap: 38px;
  min-height: 650px;
  padding: 96px 0 64px;
}

.detail-poster {
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  background: var(--slate-800);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  margin-top: 22px;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.32);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.62));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange-500), var(--red-500));
  box-shadow: 0 20px 40px rgba(249, 115, 22, 0.36);
  font-size: 32px;
}

.player-overlay strong {
  font-size: 20px;
}

.detail-content {
  padding: 44px 0 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 24px;
}

.story-card,
.info-card {
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
}

.story-card h2:not(:first-child) {
  margin-top: 30px;
}

.story-card p {
  margin: 14px 0 0;
  color: #334155;
  font-size: 17px;
}

.info-card dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 22px;
}

.info-card dt {
  color: #ea580c;
  font-weight: 900;
}

.info-card dd {
  margin: -8px 0 2px;
  color: #334155;
}

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

.site-footer {
  margin-top: 56px;
  padding: 54px 0 0;
  color: #cbd5e1;
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

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

.footer-brand {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.footer-grid p {
  margin: 12px 0 0;
}

.footer-grid h2 {
  color: #fb923c;
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.footer-links a {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(249, 115, 22, 0.3);
}

.copyright {
  margin-top: 44px;
  padding: 18px;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.is-filtered-out {
  display: none !important;
}

@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-side-panel {
    display: none;
  }

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

  .detail-poster {
    width: min(300px, 100%);
  }
}

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

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

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    padding: 84px 24px 100px;
  }

  .search-wrap,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    min-width: 0;
  }

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

  .rank-item {
    grid-template-columns: 44px 68px 1fr;
    gap: 10px;
  }

  .rank-poster {
    height: 92px;
  }
}

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

  .brand {
    font-size: 18px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

  .movie-grid,
  .category-grid,
  .rank-list.compact {
    grid-template-columns: 1fr;
  }

  .detail-hero-inner {
    min-height: auto;
    padding-top: 70px;
  }

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

  .rank-poster {
    display: none;
  }

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