:root {
  --page-bg: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --red: #dc2626;
  --amber: #f59e0b;
  --white: #ffffff;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img,
video {
  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: 50;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 12px 32px rgba(194, 65, 12, 0.25);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text em {
  font-size: 12px;
  font-style: normal;
  opacity: 0.88;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--white);
  font-weight: 700;
}

.main-nav a,
.mobile-panel a {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
  opacity: 0.78;
  transform: translateY(-1px);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(360px, 34vw);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 10px 14px 10px 18px;
  color: var(--white);
  background: transparent;
}

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

.header-search button {
  border: 0;
  padding: 10px 16px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--white);
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
}

.mobile-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-panel-inner {
  display: grid;
  gap: 10px;
  padding: 16px 0 18px;
  color: var(--white);
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 18% 15%, rgba(251, 146, 60, 0.55), transparent 28%), linear-gradient(120deg, #7c2d12, #991b1b 55%, #111827);
}

.hero-stage {
  position: relative;
  width: min(1280px, 100%);
  min-height: 640px;
  margin: 0 auto;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: center;
  gap: 42px;
  padding: 72px max(24px, calc((100vw - 1180px) / 2)) 92px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(127, 29, 29, 0.56), rgba(15, 23, 42, 0.88)), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(10px) saturate(1.15);
  transform: scale(1.07);
}

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

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fed7aa;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-summary {
  max-width: 780px;
  margin: 24px 0 0;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.88);
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.tag-row span {
  color: var(--orange-dark);
  background: #ffedd5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.28);
}

.btn.ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
}

.btn.ghost.dark {
  color: var(--orange-dark);
  border-color: #fed7aa;
  background: #fff7ed;
}

.btn.light {
  color: #7c2d12;
  background: var(--white);
}

.btn.full {
  width: 100%;
}

.hero-poster {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-control,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-control {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.active {
  width: 26px;
  background: var(--white);
}

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

.section-heading {
  margin-bottom: 24px;
}

.section-heading p {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 900;
  color: var(--orange);
  letter-spacing: 0.12em;
}

.section-heading h2,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(26px, 3vw, 40px);
}

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

.section-heading.with-link a,
.text-link {
  color: var(--orange-dark);
  font-weight: 900;
}

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

.category-tile {
  position: relative;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--white);
  background: #111827;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.32s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.86));
}

.category-tile span,
.category-tile em {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 21px;
  font-weight: 900;
}

.category-tile em {
  font-style: normal;
  opacity: 0.82;
}

.category-tile:hover img {
  transform: scale(1.08);
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.34s ease, opacity 0.34s ease;
}

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

.score {
  position: absolute;
  right: 12px;
  top: 12px;
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(234, 88, 12, 0.3);
}

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

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h2 a:hover,
.detail-content a:hover {
  color: var(--orange-dark);
}

.meta-line,
.movie-desc,
.rank-info p,
.rank-info span,
.detail-subtitle,
.detail-side p,
.site-footer p,
.page-hero p,
.category-card-large p {
  color: var(--muted);
}

.meta-line {
  margin: 6px 0 8px;
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 112px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.rank-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--soft);
  font-size: 20px;
  font-weight: 900;
}

.top-rank .rank-number {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.rank-cover img {
  width: 112px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info {
  min-width: 0;
}

.rank-info h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.rank-info p,
.rank-info span {
  display: block;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}

.page-main {
  padding: 34px 0 60px;
}

.page-hero {
  border-radius: 30px;
  padding: 46px;
  color: var(--white);
  background: radial-gradient(circle at 8% 12%, rgba(251, 146, 60, 0.52), transparent 28%), linear-gradient(120deg, #9a3412, #991b1b 58%, #111827);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(32px, 4vw, 52px);
}

.page-hero p {
  max-width: 780px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.86);
}

.compact-actions {
  margin-top: 22px;
}

.category-large-grid {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.category-cover img {
  width: 220px;
  height: 150px;
  border-radius: 18px;
  object-fit: cover;
}

.category-card-large h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-card-large p {
  margin: 0 0 12px;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.mini-links a {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--orange-dark);
  background: #fff7ed;
  font-size: 13px;
  font-weight: 800;
}

.full-rank-list {
  margin-top: 28px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
}

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

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

.detail-card,
.detail-side {
  border-radius: 26px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #030712;
  overflow: hidden;
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #030712;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.52));
  cursor: pointer;
}

.play-overlay[hidden] {
  display: none;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  font-size: 38px;
}

.player-message {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  color: var(--white);
  font-size: 14px;
}

.detail-content {
  padding: 26px;
}

.detail-content h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.detail-subtitle {
  margin: 12px 0 18px;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #374151;
  background: var(--soft);
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-content h2 {
  margin: 26px 0 10px;
  font-size: 24px;
}

.detail-content p {
  margin: 0;
  color: #374151;
}

.detail-side {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 18px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  object-fit: cover;
}

.detail-side h2 {
  margin: 16px 0 6px;
  font-size: 22px;
}

.detail-side p {
  margin: 0 0 14px;
}

.detail-side .btn + .btn {
  margin-top: 10px;
}

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

.page-search {
  display: flex;
  width: min(640px, 100%);
  margin-top: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--white);
}

.page-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 14px 20px;
}

.page-search button {
  border: 0;
  padding: 0 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-weight: 900;
  cursor: pointer;
}

.site-footer {
  margin-top: 20px;
  padding: 42px 0;
  color: #d1d5db;
  background: #111827;
}

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

.footer-logo {
  margin-bottom: 10px;
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 18px;
}

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

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

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

  .header-search {
    width: min(360px, 44vw);
  }

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

  .hero-slide {
    grid-template-columns: 1fr 300px;
  }

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

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

  .detail-side {
    position: static;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }

  .detail-side .btn {
    grid-column: 2;
  }
}

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

  .header-inner {
    height: auto;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .header-search {
    order: 3;
    width: 100%;
  }

  .menu-toggle {
    margin-left: auto;
  }

  .hero-carousel,
  .hero-stage {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 42px 18px 96px;
  }

  .hero-poster {
    width: min(260px, 75vw);
    margin: 0 auto;
  }

  .hero-summary {
    font-size: 16px;
  }

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

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

  .rank-number {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .rank-cover img {
    width: 92px;
    height: 62px;
  }

  .page-hero {
    padding: 30px 22px;
    border-radius: 24px;
  }

  .category-card-large {
    grid-template-columns: 1fr;
  }

  .category-cover img {
    width: 100%;
    height: 190px;
  }

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

  .detail-side .btn {
    grid-column: auto;
  }

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

@media (max-width: 520px) {
  .brand-text strong {
    font-size: 18px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .movie-grid,
  .category-movie-grid {
    gap: 14px;
  }

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

  .play-overlay span {
    width: 70px;
    height: 70px;
    font-size: 30px;
  }
}
