* {
  box-sizing: border-box;
}

:root {
  --bg: #111827;
  --bg-soft: #1f2937;
  --bg-panel: rgba(31, 41, 55, 0.58);
  --line: rgba(99, 102, 241, 0.18);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --muted-2: #6b7280;
  --sunset: #fb923c;
  --sunset-strong: #f97316;
  --twilight: #8b5cf6;
  --twilight-strong: #7c3aed;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.15), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(124, 58, 237, 0.18), transparent 30rem),
    var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(17, 24, 39, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 26px;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--sunset), var(--twilight));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title,
.footer-brand span:last-child {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fb923c, #a78bfa, #fdba74);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

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

.nav-link {
  color: #d1d5db;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--sunset);
}

.header-search {
  position: relative;
  width: 280px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(107, 114, 128, 0.55);
  outline: none;
  color: #e5e7eb;
  background: rgba(31, 41, 55, 0.9);
  border-radius: 999px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  padding: 10px 44px 10px 18px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--sunset);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.10);
}

.header-search button {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #e5e7eb;
  background: transparent;
  font-size: 25px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(75, 85, 99, 0.5);
  padding: 14px 16px 18px;
}

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

.mobile-search {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.mobile-search input {
  padding: 10px 16px;
}

.mobile-search button,
.primary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.mobile-search button,
.primary-button {
  background: linear-gradient(90deg, var(--sunset-strong), var(--twilight-strong));
  box-shadow: 0 18px 34px rgba(124, 58, 237, 0.18);
}

.mobile-search button {
  padding: 0 18px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 28px;
}

.primary-button:hover,
.ghost-button:hover,
.mobile-search button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.28);
}

.mobile-nav {
  display: grid;
  gap: 10px;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #030712;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #111827 0%, rgba(17, 24, 39, 0.76) 35%, rgba(17, 24, 39, 0.24) 72%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.82), transparent 66%);
}

.hero-content {
  position: absolute;
  inset: auto 0 0;
  left: 50%;
  transform: translateX(-50%);
  padding-bottom: 72px;
}

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

.hero-kicker,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.hero-kicker span:first-child {
  color: var(--sunset);
  font-weight: 800;
}

.hero-copy h1 {
  margin: 12px 0 18px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #d1d5db;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

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

.pill,
.genre-cloud a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 13px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  font-size: 38px;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--sunset);
}

.intro-panel,
.page-hero,
.detail-hero,
.story-card,
.filter-panel,
.category-tile,
.rank-item,
.player-box {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(31, 41, 55, 0.50);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.intro-panel {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-top: 38px;
  padding: 28px;
  border-radius: 26px;
}

.intro-panel h2,
.section-title h2,
.page-hero h1,
.detail-copy h1,
.story-card h2 {
  margin: 0;
  color: #fff;
  line-height: 1.16;
}

.intro-panel h2 {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.intro-panel p,
.page-hero p,
.story-card p,
.detail-one-line {
  color: #d1d5db;
}

.intro-links,
.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.intro-links a {
  padding: 10px 16px;
  color: var(--sunset);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.08);
}

.catalog-section {
  margin-top: 66px;
}

.catalog-section.compact {
  margin-top: 34px;
}

.section-title,
.category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.section-title {
  justify-content: flex-start;
}

.section-title h2 {
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.section-title p {
  margin: 5px 0 0;
  color: var(--muted);
}

.section-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--sunset);
  background: rgba(249, 115, 22, 0.12);
}

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

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

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

.movie-card {
  min-width: 0;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(31, 41, 55, 0.50);
  transition: transform 0.3s ease, background 0.2s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-4px) scale(1.01);
  background: rgba(31, 41, 55, 0.80);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.25);
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0b1120;
}

.card-cover.medium {
  height: 260px;
}

.card-cover.large {
  height: 330px;
}

.card-cover.small {
  width: 160px;
  min-height: 150px;
  flex-shrink: 0;
}

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

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

.cover-gradient,
.cover-shade {
  position: absolute;
  inset: 0;
}

.cover-gradient {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.83), rgba(0, 0, 0, 0.22), transparent);
}

.cover-shade {
  background: rgba(0, 0, 0, 0.18);
}

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 52px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.34);
  transition: opacity 0.2s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.card-badge {
  position: absolute;
  left: 15px;
  top: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.46);
  font-size: 12px;
}

.card-cover strong {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: #fff;
  font-size: 18px;
  line-height: 1.3;
}

.card-body {
  padding: 16px;
}

.card-body p,
.rank-item p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.card-title,
.rank-title {
  display: inline-block;
  margin-bottom: 6px;
  color: #fff;
  font-weight: 750;
  transition: color 0.2s ease;
}

.card-title:hover,
.rank-title:hover,
.category-heading a:hover,
.category-mini-links a:hover {
  color: var(--sunset);
}

.card-meta span + span::before,
.detail-meta span + span::before {
  content: "•";
  margin-right: 10px;
  color: var(--muted-2);
}

.movie-card-horizontal {
  display: flex;
  gap: 0;
}

.rail-wrap {
  overflow: hidden;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 14px;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.rail-item {
  flex: 0 0 300px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 86px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
}

.rank-num {
  color: var(--muted-2);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.top-rank .rank-num {
  color: var(--sunset);
}

.rank-cover {
  display: block;
  height: 116px;
  overflow: hidden;
  border-radius: 12px;
  background: #0b1120;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-more {
  margin-top: 22px;
  text-align: center;
}

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

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

.category-tile {
  overflow: hidden;
  border-radius: 22px;
}

.category-tile-main {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.28), rgba(124, 58, 237, 0.24)),
    rgba(31, 41, 55, 0.65);
}

.category-tile-main span {
  color: #fff;
  font-size: 22px;
  font-weight: 850;
}

.category-tile-main strong {
  margin-top: 8px;
  color: #fdba74;
  font-size: 14px;
}

.category-mini-links {
  display: grid;
  gap: 6px;
  padding: 14px 18px 18px;
}

.category-mini-links a {
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-heading h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d1d5db;
  font-size: 22px;
}

.category-heading h3 span {
  width: 5px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(to bottom, var(--sunset), var(--twilight));
}

.category-heading a {
  color: var(--muted);
}

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

.page-shell {
  padding-top: 34px;
}

.page-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding: 34px;
  border-radius: 28px;
}

.small-hero h1 {
  font-size: clamp(36px, 4vw, 56px);
  letter-spacing: -0.055em;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--sunset);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 22px;
}

.filter-panel input,
.filter-panel select {
  height: 46px;
  padding: 0 16px;
}

.empty-state {
  display: none;
  margin-top: 28px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
  border-radius: 18px;
  background: rgba(31, 41, 55, 0.42);
}

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

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  padding: 28px;
  border-radius: 28px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  background: #0b1120;
}

.detail-cover img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}

.detail-copy h1 {
  margin-bottom: 16px;
  font-size: clamp(34px, 4vw, 58px);
  letter-spacing: -0.055em;
}

.detail-one-line {
  max-width: 780px;
  font-size: 18px;
}

.detail-meta {
  margin: 18px 0;
}

.detail-tags {
  margin: 20px 0 28px;
}

.jump-play {
  width: fit-content;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 8px;
  color: #fff;
  border: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.62));
}

.player-start span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 44px;
  background: linear-gradient(135deg, var(--sunset), var(--twilight));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
}

.player-start strong {
  font-size: 18px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 34px;
}

.story-card {
  padding: 28px;
  border-radius: 24px;
}

.story-card h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.story-card p {
  margin: 0;
  white-space: pre-line;
}

.genre-cloud a:hover {
  color: var(--sunset);
  border-color: rgba(249, 115, 22, 0.35);
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(75, 85, 99, 0.55);
  background: rgba(17, 24, 39, 0.92);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-main p {
  max-width: 520px;
  color: var(--muted);
}

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

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--sunset);
}

.footer-bottom {
  padding: 22px 16px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid rgba(75, 85, 99, 0.45);
}

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

  .menu-toggle {
    display: block;
  }

  .movie-grid.three-cols,
  .movie-grid.four-cols,
  .category-grid,
  .category-grid.expanded,
  .ranking-panel,
  .detail-content,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .brand-title {
    font-size: 20px;
  }

  .brand-subtitle {
    display: none;
  }

  .hero-carousel {
    height: 70vh;
    min-height: 520px;
  }

  .hero-content {
    padding-bottom: 70px;
  }

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

  .hero-arrow {
    display: none;
  }

  .intro-panel,
  .page-hero {
    display: grid;
    padding: 22px;
  }

  .movie-grid.three-cols,
  .movie-grid.four-cols,
  .category-grid,
  .category-grid.expanded,
  .ranking-panel,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .detail-cover img {
    height: auto;
    max-height: 520px;
  }

  .rank-item {
    grid-template-columns: 44px 76px 1fr;
    gap: 10px;
  }

  .rank-cover {
    height: 104px;
  }

  .card-cover.large,
  .card-cover.medium {
    height: 280px;
  }

  .movie-card-horizontal {
    display: grid;
    grid-template-columns: 120px 1fr;
  }

  .card-cover.small {
    width: 120px;
    min-height: 148px;
  }
}
