:root {
  --color-bg: #f7f7f8;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-orange: #f97316;
  --color-amber: #f59e0b;
  --color-dark: #111827;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-dark);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.34);
  font-size: 16px;
}

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

.main-nav a {
  padding: 10px 14px;
  color: #374151;
  border-radius: 999px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.main-nav a:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #ffffff;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background-size: cover;
  background-position: center;
  filter: blur(8px) scale(1.08);
  opacity: 0.62;
}

.hero-overlay {
  background:
    radial-gradient(circle at 18% 24%, rgba(249, 115, 22, 0.55), transparent 34%),
    linear-gradient(100deg, rgba(17, 24, 39, 0.94) 0%, rgba(17, 24, 39, 0.82) 46%, rgba(17, 24, 39, 0.38) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 340px;
  align-items: center;
  gap: 54px;
  padding: 88px 0 120px;
  color: #ffffff;
}

.hero-copy {
  max-width: 780px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fb923c;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero-copy h1 {
  margin: 14px 0 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-copy h2 {
  margin: 18px 0 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.08;
}

.hero-copy p {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: all 0.2s ease;
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.34);
}

.btn.ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 4;
  width: min(1200px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: center;
}

.hero-search {
  display: flex;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 0 12px;
}

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

.hero-search button {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
}

.hero-mini-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.hero-mini-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border-radius: 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px);
}

.hero-mini-card img {
  width: 48px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-mini-card span {
  min-width: 0;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
}

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

.stats-strip {
  width: min(1200px, calc(100% - 32px));
  margin: -34px auto 0;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stats-strip div {
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.stats-strip strong {
  display: block;
  color: var(--color-orange);
  font-size: 34px;
  line-height: 1;
}

.stats-strip span {
  display: block;
  margin-top: 8px;
  color: var(--color-muted);
  font-weight: 700;
}

.content-section {
  width: min(1200px, calc(100% - 32px));
  margin: 64px auto;
}

.surface-section {
  width: 100%;
  max-width: none;
  padding: 64px max(16px, calc((100% - 1200px) / 2));
  background: #ffffff;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

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

.section-link {
  flex: 0 0 auto;
  padding: 10px 16px;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
}

.movie-grid,
.category-grid,
.category-list-grid,
.rank-grid {
  display: grid;
  gap: 20px;
}

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

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

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

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

.movie-card,
.category-card-large,
.category-tile {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.play-chip {
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  font-size: 12px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.86);
}

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

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

.movie-card h3 a:hover {
  color: var(--color-orange);
}

.meta-line,
.movie-desc {
  color: var(--color-muted);
  font-size: 13px;
}

.meta-line {
  margin: 8px 0 0;
}

.movie-desc {
  margin: 8px 0 12px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tag-row span {
  color: #9a3412;
  background: #ffedd5;
}

.category-tile {
  position: relative;
  min-height: 180px;
  color: #ffffff;
}

.category-tile img {
  height: 180px;
  object-fit: cover;
  filter: brightness(0.62);
}

.category-name,
.category-count {
  position: absolute;
  left: 16px;
  z-index: 2;
}

.category-name {
  bottom: 42px;
  font-size: 20px;
  font-weight: 900;
}

.category-count {
  bottom: 16px;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 700;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 82px max(16px, calc((100% - 1200px) / 2));
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 20%, rgba(249, 115, 22, 0.72), transparent 30%),
    linear-gradient(135deg, #111827, #1f2937 54%, #92400e);
}

.small-hero {
  min-height: 280px;
  display: flex;
  align-items: center;
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.category-card-large a {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.category-card-large img {
  height: 120px;
  border-radius: 14px;
  object-fit: cover;
}

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

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

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

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  outline: 0;
  background: #ffffff;
  padding: 0 14px;
}

.filter-panel input {
  flex: 1 1 300px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--color-orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-buttons button {
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  color: #374151;
  background: #f3f4f6;
  font-weight: 800;
}

.filter-buttons button.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
}

.result-count {
  margin: 0 0 0 auto;
  color: var(--color-muted);
  font-weight: 800;
}

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

.detail-layout {
  width: min(1200px, calc(100% - 32px));
  margin: 30px auto 70px;
}

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

.breadcrumb a:hover {
  color: var(--color-orange);
}

.breadcrumb em {
  color: var(--color-text);
  font-style: normal;
  font-weight: 800;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  border: 0;
  padding: 0;
  overflow: hidden;
  color: #ffffff;
  background: #000000;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.58);
}

.big-play {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.35);
  font-size: 28px;
  padding-left: 5px;
}

.detail-main {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 28px;
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  object-fit: cover;
}

.detail-info h1 {
  margin-bottom: 14px;
}

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

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

.info-grid span {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: #f9fafb;
  color: #374151;
}

.info-grid strong {
  color: var(--color-muted);
  font-size: 12px;
}

.detail-tags span {
  color: #9a3412;
  background: #ffedd5;
}

.detail-text {
  margin-top: 26px;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-text h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-text h2:not(:first-child) {
  margin-top: 28px;
}

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

.related-section {
  width: 100%;
  margin: 36px 0 0;
}

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

.site-footer {
  padding: 48px 0;
  background: #111827;
  color: #ffffff;
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-logo {
  color: #ffffff;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
}

.footer-links {
  display: flex;
  gap: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

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

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 46px;
  height: 46px;
  display: none;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.32);
  font-size: 22px;
  font-weight: 900;
}

.back-top.is-visible {
  display: block;
}

@media (max-width: 1100px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-content {
    grid-template-columns: 1fr 260px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
  }

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

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

  .hero-content {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 52px;
    padding-bottom: 220px;
  }

  .hero-poster {
    width: 210px;
    max-width: 64vw;
    transform: rotate(0deg);
  }

  .hero-panel {
    bottom: 46px;
  }

  .hero-mini-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

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

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

@media (max-width: 540px) {
  .nav-shell,
  .content-section,
  .detail-layout,
  .stats-strip,
  .footer-inner {
    width: min(100% - 24px, 1200px);
  }

  .logo {
    font-size: 20px;
  }

  .hero-copy p {
    font-size: 15px;
  }

  .hero-tags span {
    font-size: 12px;
  }

  .hero-mini-list {
    display: none;
  }

  .stats-strip,
  .movie-grid,
  .rank-list,
  .rank-grid,
  .category-grid,
  .category-list-grid,
  .related-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

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

  .surface-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .result-count {
    margin-left: 0;
  }
}
