* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --orange-500: #f97316;
  --blue-600: #2563eb;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.16);
  --shadow-card: 0 12px 32px rgba(15, 23, 42, 0.12);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--slate-900);
  background: linear-gradient(180deg, var(--slate-50) 0%, var(--slate-100) 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--slate-950), var(--slate-800), var(--slate-950));
  color: #ffffff;
  box-shadow: 0 12px 34px rgba(2, 6, 23, 0.3);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red-600), var(--orange-500));
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.35);
  color: #ffffff;
  font-size: 14px;
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, #f87171, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-current {
  color: #f87171;
  transform: translateY(-1px);
}

.header-search,
.mobile-search,
.page-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.page-search input {
  border: 0;
  outline: 0;
  border-radius: 999px;
}

.header-search input {
  width: 220px;
  padding: 10px 16px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.92);
}

.header-search input:focus,
.mobile-search input:focus,
.page-search input:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.header-search button,
.mobile-search button,
.page-search button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red-600);
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button {
  width: 40px;
  height: 40px;
}

.header-search button:hover,
.mobile-search button:hover,
.page-search button:hover {
  background: var(--red-700);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: var(--slate-800);
}

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

.mobile-search {
  margin-bottom: 14px;
}

.mobile-search input {
  flex: 1;
  padding: 12px 16px;
  color: #ffffff;
  background: var(--slate-700);
}

.mobile-search button,
.page-search button {
  padding: 12px 18px;
}

.mobile-link {
  display: block;
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.86);
}

.mobile-link:hover,
.mobile-link.is-current {
  color: #f87171;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: linear-gradient(90deg, var(--slate-950), #7f1d1d, #9a3412);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-bg,
.detail-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 25%, rgba(239, 68, 68, 0.35), transparent 28%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.2) 42%, rgba(2, 6, 23, 0.88));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 720px;
  color: #ffffff;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 9px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red-600);
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.34);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  color: #ffffff;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-info p {
  max-width: 720px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.wide-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
}

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

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

.primary-button {
  color: #ffffff;
  background: var(--red-600);
  box-shadow: 0 16px 34px rgba(220, 38, 38, 0.35);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(14px);
}

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

.primary-button:hover {
  background: var(--red-700);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
  color: #ffffff;
}

.hero-dots {
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dot.is-active {
  width: 34px;
  border-radius: 999px;
  background: var(--red-500);
}

.hero-controls a {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

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

.section-white {
  background: #ffffff;
}

.ranking-band {
  background: linear-gradient(90deg, #fff7ed, #fef2f2);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-heading a {
  color: var(--red-600);
  font-weight: 700;
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--slate-800);
}

.poster-wrap img,
.wide-poster img,
.category-covers img,
.detail-poster img,
.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card-link:hover .poster-wrap img,
.wide-card a:hover .wide-poster img,
.category-tile:hover .category-covers img {
  transform: scale(1.08);
}

.duration-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.duration-badge {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: var(--red-600);
}

.poster-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 62%);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card-link:hover .poster-hover {
  opacity: 1;
  transform: translateY(0);
}

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

.movie-card-body h3,
.wide-content h3,
.content-card h2 {
  margin: 0;
  color: var(--slate-900);
}

.movie-card-body h3 {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 16px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card-link:hover h3,
.wide-card a:hover h3 {
  color: var(--red-600);
}

.movie-card-body p,
.wide-content p,
.content-card p {
  color: var(--slate-600);
  line-height: 1.7;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 10px 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.movie-meta {
  color: var(--slate-500);
  font-size: 13px;
}

.movie-meta span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 10px;
  border-radius: 50%;
  background: var(--slate-300, #cbd5e1);
  vertical-align: middle;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-row span,
.detail-tags a {
  padding: 5px 9px;
  border-radius: 999px;
  color: #991b1b;
  background: #fee2e2;
  font-size: 12px;
  font-weight: 700;
}

.movie-card-compact .movie-card-body p {
  min-height: 0;
  -webkit-line-clamp: 1;
}

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

.wide-card a {
  display: flex;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--slate-50);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.wide-poster {
  position: relative;
  flex: 0 0 190px;
  min-height: 132px;
  overflow: hidden;
  background: var(--slate-800);
}

.wide-poster span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 34px;
  opacity: 0;
  background: rgba(2, 6, 23, 0.32);
  transition: opacity 0.22s ease;
}

.wide-card a:hover .wide-poster span {
  opacity: 1;
}

.wide-content {
  flex: 1;
  padding: 18px;
}

.wide-content h3 {
  font-size: 18px;
}

.wide-content p {
  display: -webkit-box;
  margin: 10px 0 14px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.wide-meta {
  color: var(--slate-500);
  font-size: 13px;
}

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

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

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

.category-tile {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  overflow: hidden;
  background: var(--slate-800);
}

.category-tile-body {
  padding: 20px;
}

.category-tile-body h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile-body p {
  min-height: 52px;
  margin: 0 0 16px;
  color: var(--slate-600);
  line-height: 1.65;
}

.category-tile-body span {
  color: var(--red-600);
  font-weight: 800;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(90deg, var(--slate-950), #7f1d1d, #9a3412);
}

.small-hero {
  padding: 72px 0 54px;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  max-width: 820px;
}

.page-search {
  width: min(680px, 100%);
  margin-top: 24px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(16px);
}

.page-search input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.page-search input::placeholder,
.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-hero {
  min-height: 560px;
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 62px 0;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
  max-width: 820px;
}

.detail-info p {
  max-width: 820px;
}

.player-section {
  margin-top: -72px;
  position: relative;
  z-index: 5;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.32);
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #000000;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.1));
}

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

.play-orb {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 5px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--red-600);
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.42);
  font-size: 34px;
  transition: transform 0.22s ease, background 0.22s ease;
}

.player-cover:hover .play-orb {
  transform: scale(1.08);
  background: var(--red-700);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 42px 0 10px;
}

.content-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.content-card h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  font-size: 16px;
}

.empty-state {
  display: none;
  padding: 34px;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  color: var(--slate-600);
  text-align: center;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

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

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

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

.footer-logo {
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 20px;
}

.footer-brand p {
  margin: 0;
  line-height: 1.75;
}

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

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 10px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

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

  .menu-button {
    display: block;
  }

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

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

  .wide-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: 62px;
  }

  .brand-text {
    font-size: 19px;
  }

  .hero,
  .hero-content {
    min-height: 640px;
  }

  .hero-content {
    width: min(100% - 32px, 1180px);
  }

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

  .hero-controls {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

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

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

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

  .movie-card-body h3 {
    min-height: 40px;
    font-size: 15px;
  }

  .wide-card a {
    flex-direction: column;
  }

  .wide-poster {
    flex-basis: auto;
    aspect-ratio: 16 / 9;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 42px 0 112px;
  }

  .detail-poster {
    width: min(260px, 76vw);
  }

  .player-section {
    margin-top: -86px;
  }

  .page-search {
    flex-direction: column;
    align-items: stretch;
    border-radius: 24px;
  }

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

@media (max-width: 520px) {
  .container,
  .topbar,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .movie-grid-five,
  .movie-grid-four,
  .category-grid,
  .category-grid-large {
    grid-template-columns: 1fr;
  }

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

  .hero-actions {
    width: 100%;
  }

  .primary-button,
  .ghost-button {
    flex: 1;
  }
}
