:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #f97316;
  --primary-dark: #c2410c;
  --primary-soft: #ffedd5;
  --shadow: 0 16px 38px rgba(17, 24, 39, 0.10);
  --shadow-card: 0 8px 24px rgba(17, 24, 39, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.16), transparent 36rem),
    linear-gradient(180deg, #fff7ed 0, #f9fafb 32rem);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.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.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.35);
}

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

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

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  color: var(--text);
  background: var(--primary-soft);
  border-radius: 14px;
  cursor: pointer;
}

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 20px 64px;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-radius: 32px;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: 36px;
  padding: 64px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(2px) saturate(1.12);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.42)),
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.34), transparent 34rem);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 12px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(251, 146, 60, 0.42);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero h1 {
  max-width: 760px;
  color: #ffffff;
}

.hero h2 {
  margin: 18px 0 10px;
  color: #ffedd5;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.15;
}

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

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

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: 0 12px 22px rgba(249, 115, 22, 0.32);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.page-hero .btn-ghost,
.detail-info .btn-ghost {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: rgba(249, 115, 22, 0.20);
}

.hero-poster {
  justify-self: end;
  width: min(330px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.36);
}

.hero-poster img {
  width: 100%;
  height: 470px;
  object-fit: cover;
  background: linear-gradient(135deg, #1f2937, #9a3412);
}

.hero-controls {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 28px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  color: rgba(255, 255, 255, 0.80);
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.hero-thumb.active {
  color: #ffffff;
  background: rgba(249, 115, 22, 0.36);
  border-color: rgba(251, 146, 60, 0.76);
}

.hero-thumb img {
  width: 44px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 12px;
  background: #1f2937;
}

.hero-thumb span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.panel,
.content-section,
.page-hero,
.detail-hero,
.player-section,
.breadcrumb {
  margin-top: 28px;
}

.panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(229, 231, 235, 0.84);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.panel h2,
.section-heading h2,
.rank-head h2,
.side-card h2,
.detail-article h2 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.panel p,
.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.search-tools {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.search-tools input,
.search-tools select {
  height: 46px;
  padding: 0 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
}

.search-tools input {
  width: min(340px, 70vw);
}

.search-tools input:focus,
.search-tools select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.13);
}

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

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

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

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.92));
}

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

.category-card span,
.category-card em {
  position: relative;
  z-index: 2;
}

.category-card span {
  font-size: 21px;
  font-weight: 800;
}

.category-card em {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.76);
  font-style: normal;
  font-size: 14px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(229, 231, 235, 0.90);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 34px rgba(17, 24, 39, 0.13);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #c2410c);
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.play-mark {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(249, 115, 22, 0.92);
  border-radius: 50%;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.22s ease;
}

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

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 4px 9px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.72);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  padding: 15px;
}

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

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

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

.movie-intro {
  min-height: 44px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.rank-panel,
.side-card,
.detail-article {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.rank-panel,
.side-card {
  padding: 18px;
}

.rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.rank-head a,
.text-link {
  color: var(--primary-dark);
  font-weight: 800;
}

.rank-list,
.side-list,
.rank-page-list {
  display: grid;
  gap: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: auto 52px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: 16px;
  transition: 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(249, 115, 22, 0.46);
  transform: translateX(3px);
}

.rank-item img {
  width: 52px;
  height: 66px;
  object-fit: cover;
  background: #111827;
  border-radius: 10px;
}

.rank-num,
.rank-dot {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.rank-dot {
  width: 12px;
  height: 12px;
  background: var(--primary-soft);
}

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

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

.rank-text em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-hot {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 56px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(124, 45, 18, 0.88)),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.36), transparent 28rem);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.80);
  font-size: 17px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.category-cover-stack {
  position: relative;
  min-height: 154px;
}

.category-cover-stack img {
  position: absolute;
  width: 96px;
  height: 136px;
  object-fit: cover;
  border: 5px solid #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 22px rgba(17, 24, 39, 0.18);
}

.category-cover-stack img:nth-child(1) {
  left: 0;
  top: 0;
  z-index: 3;
}

.category-cover-stack img:nth-child(2) {
  left: 44px;
  top: 10px;
  z-index: 2;
}

.category-cover-stack img:nth-child(3) {
  left: 88px;
  top: 20px;
  z-index: 1;
}

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

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  padding: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: 30px;
  box-shadow: var(--shadow-card);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #111827, #9a3412);
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.18);
}

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

.detail-info .eyebrow {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.lead-text {
  margin: 18px 0;
  color: #374151;
  font-size: 19px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  color: var(--muted);
}

.detail-meta span {
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.large-tags span {
  min-height: 30px;
  padding: 0 12px;
  font-size: 13px;
}

.player-section {
  padding: 18px;
  background: #111827;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 22px;
}

.player-shell video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-shell video {
  z-index: 1;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  border: 0;
  background: #000000;
}

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

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.64;
  filter: saturate(1.08);
}

.big-play {
  position: absolute;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  border-radius: 50%;
  font-size: 30px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.36);
}

.detail-text-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.detail-article {
  padding: 26px;
}

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

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

.rank-page-list .rank-item {
  grid-template-columns: auto 68px minmax(0, 1fr) auto;
}

.rank-page-list .rank-item img {
  width: 68px;
  height: 88px;
}

.sticky-panel {
  position: sticky;
  top: 88px;
}

.site-footer {
  margin-top: 36px;
  padding: 34px 20px;
  color: rgba(255, 255, 255, 0.74);
  background: #111827;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner strong {
  display: block;
  color: #ffffff;
  font-size: 20px;
  margin-bottom: 8px;
}

.footer-inner p {
  max-width: 560px;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 12px;
  align-items: start;
}

.footer-links a {
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.copyright {
  max-width: 1240px;
  margin: 22px auto 0;
  color: rgba(255, 255, 255, 0.50);
  font-size: 14px;
}

[data-movie-card].is-hidden {
  display: none;
}

@media (max-width: 1080px) {
  .hero-slide,
  .split-layout,
  .detail-text-section {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    padding: 44px 32px 150px;
  }

  .hero-poster {
    display: none;
  }

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

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

  .detail-hero {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .header-inner {
    padding: 12px 16px;
  }

  .site-logo {
    font-size: 18px;
  }

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

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

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

  main {
    padding: 16px 14px 46px;
  }

  .hero {
    min-height: 680px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 32px 22px 190px;
  }

  .hero-controls {
    left: 16px;
    right: 16px;
    bottom: 18px;
    grid-template-columns: 1fr;
  }

  .hero-thumb:nth-child(n+4) {
    display: none;
  }

  .panel,
  .footer-inner,
  .section-heading {
    display: block;
  }

  .search-tools {
    margin-top: 14px;
  }

  .search-tools input,
  .search-tools select {
    width: 100%;
  }

  .category-grid,
  .movie-grid,
  .compact-grid,
  .mini-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

  .category-cover-stack {
    min-height: 178px;
  }

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

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

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

  .rank-page-list .rank-item,
  .rank-item {
    grid-template-columns: auto 52px minmax(0, 1fr);
  }

  .rank-hot {
    display: none;
  }

  .footer-links {
    margin-top: 18px;
    flex-wrap: wrap;
  }
}
