:root {
  --orange: #f97316;
  --amber: #f59e0b;
  --yellow: #eab308;
  --red: #ef4444;
  --dark: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff7ed;
  --panel: #ffffff;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --radius: 24px;
}

* {
  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(--dark);
  background: #f9fafb;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--amber), var(--yellow));
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.32);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
}

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

.logo-text {
  font-size: clamp(18px, 2vw, 26px);
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--orange);
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
}

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

.nav-link {
  position: relative;
  font-weight: 700;
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
  transform: translateY(-1px);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 999px;
  background: #ffffff;
}

.header-search {
  display: flex;
  align-items: center;
  width: min(310px, 28vw);
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.header-search input {
  width: 100%;
  min-width: 0;
  color: #ffffff;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 12px;
}

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

.header-search button {
  border: 0;
  color: var(--orange);
  background: #ffffff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-weight: 700;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

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

.hero {
  position: relative;
  height: clamp(500px, 72vh, 720px);
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(249, 115, 22, 0.34), transparent 32%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.72));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  justify-items: center;
  height: 100%;
  color: #ffffff;
  text-align: center;
}

.hero-kicker,
.detail-kicker,
.page-hero p,
.section-heading p,
.player-title-row p,
.ranking-head p {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 900px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1.08;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.hero-content p {
  max-width: 820px;
  margin: 0 auto 24px;
  font-size: clamp(18px, 2.2vw, 26px);
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}

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

.hero-tags {
  justify-content: center;
  margin-bottom: 30px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

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

.hero-actions,
.center-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

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

.btn.secondary {
  color: #9a3412;
  background: #ffedd5;
}

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.stats-strip {
  color: #ffffff;
  background: #111827;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 24px 0;
}

.stats-grid div {
  text-align: center;
}

.stats-grid strong {
  display: block;
  color: #fbbf24;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.stats-grid span {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

.section {
  padding: 72px 0;
}

.soft-bg {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.accent-bg {
  background: linear-gradient(135deg, #fff7ed, #ffffff 42%, #fffbeb);
}

.section-heading {
  margin-bottom: 30px;
  text-align: center;
}

.section-heading h2,
.page-hero h1,
.ranking-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 24px;
  color: #ffffff;
  border-radius: var(--radius);
  background: #111827;
  box-shadow: var(--shadow);
}

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

.category-tile:hover img,
.category-overview-card:hover .category-preview img {
  transform: scale(1.08);
}

.category-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.category-tile strong,
.category-tile small {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile strong {
  margin-top: 98px;
  font-size: 24px;
}

.category-tile small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.88);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.movie-card.compact .poster-link {
  aspect-ratio: 16 / 10;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 900;
}

.play-chip {
  right: 14px;
  bottom: 14px;
  padding: 7px 12px;
  background: linear-gradient(90deg, var(--orange), var(--amber));
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.rank-badge {
  left: 14px;
  top: 14px;
  padding: 7px 11px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
}

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  display: -webkit-box;
  min-height: 2.8em;
  margin: 0 0 8px;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.meta-line,
.movie-desc {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 4.8em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.center-actions {
  margin-top: 34px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 30px;
  align-items: start;
}

.ranking-card {
  position: sticky;
  top: 92px;
  border-radius: var(--radius);
  padding: 24px;
  background: #111827;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.ranking-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 18px;
}

.ranking-head p {
  grid-column: 1 / -1;
  color: #fbbf24;
}

.ranking-head a {
  color: #fbbf24;
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 38px 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.rank-row:hover {
  background: rgba(255, 255, 255, 0.14);
}

.rank-row span {
  color: #fbbf24;
  font-weight: 900;
}

.rank-row img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  padding: 72px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.22), transparent 25%),
    linear-gradient(90deg, var(--orange), var(--amber), var(--yellow));
  text-align: center;
}

.page-hero p {
  color: #ffffff;
}

.page-hero span {
  display: block;
  max-width: 760px;
  margin: 16px auto 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.84);
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

.category-preview {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  border-radius: 20px;
  background: #111827;
}

.category-preview img:nth-child(n + 2) {
  display: none;
}

.category-overview-card h2 {
  margin: 6px 0 8px;
  font-size: 26px;
}

.category-overview-card p {
  color: var(--muted);
}

.category-overview-card span {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 6px 12px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 900;
}

.text-link {
  display: block;
  color: var(--orange);
  font-weight: 900;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  color: var(--dark);
  background: #ffffff;
  outline: 0;
}

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

.filter-count {
  margin: 0;
  color: var(--orange);
  font-weight: 900;
  white-space: nowrap;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px);
  transform: scale(1.04);
  opacity: 0.74;
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 54px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
  margin-top: 38px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 8px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
}

.large-tags {
  margin-bottom: 28px;
}

.player-card,
.text-panel,
.info-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.player-title-row h2 {
  margin: 0;
  font-size: 28px;
}

.player-title-row span {
  border-radius: 999px;
  padding: 8px 14px;
  color: #ffffff;
  background: #111827;
  font-weight: 900;
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #000000;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(249, 115, 22, 0.38), transparent 34%),
    rgba(0, 0, 0, 0.38);
  cursor: pointer;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  color: var(--orange);
  background: #ffffff;
  font-size: 30px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

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

.player-overlay small {
  color: rgba(255, 255, 255, 0.8);
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 320px;
  gap: 24px;
  align-items: start;
}

.text-panel,
.info-panel {
  padding: 24px;
}

.text-panel h2,
.info-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.text-panel p {
  margin: 0;
  color: #374151;
  text-align: justify;
}

.info-panel dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.info-panel dt {
  color: var(--muted);
  font-weight: 800;
}

.info-panel dd {
  margin: 0;
  color: #111827;
}

.info-panel a {
  color: var(--orange);
  font-weight: 900;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 32px;
  padding: 46px 0;
}

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

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

.site-footer p {
  margin: 0;
}

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

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

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

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

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

  .mobile-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .two-column,
  .detail-text-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    position: static;
  }

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

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

  .hero {
    height: 620px;
  }

  .hero-content {
    justify-items: start;
    text-align: left;
  }

  .hero-tags,
  .hero-actions {
    justify-content: flex-start;
  }

  .stats-grid,
  .category-grid,
  .movie-grid,
  .small-grid,
  .category-overview-grid,
  .filter-panel,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

  .section {
    padding: 48px 0;
  }

  .footer-grid {
    padding: 34px 0;
  }
}

@media (max-width: 480px) {
  .logo-text {
    font-size: 18px;
  }

  .movie-card.compact .poster-link,
  .poster-link {
    aspect-ratio: 16 / 11;
  }

  .page-hero,
  .detail-hero-content {
    padding: 42px 0;
  }

  .detail-hero {
    min-height: auto;
  }
}
