:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-100: #fef3c7;
  --text: #0f172a;
  --muted: #64748b;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(15, 23, 42, .12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, 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: 90;
  color: #fff;
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  box-shadow: 0 10px 30px rgba(2, 6, 23, .3);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  width: min(1200px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark,
.footer-brand span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--slate-900);
  background: var(--amber-400);
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(251, 191, 36, .12);
}

.brand-text strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.brand-text small {
  display: block;
  color: #cbd5e1;
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
  white-space: nowrap;
}

.main-nav a {
  color: #e2e8f0;
  font-size: 15px;
  transition: color .2s ease;
}

.main-nav a:hover {
  color: var(--amber-400);
}

.header-search {
  display: flex;
  overflow: hidden;
  width: min(340px, 30vw);
  border-radius: 999px;
  background: rgba(51, 65, 85, .9);
  border: 1px solid rgba(148, 163, 184, .22);
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 10px 14px;
}

.header-search input::placeholder {
  color: #cbd5e1;
}

.header-search button {
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 0 16px;
  background: var(--amber-500);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  border: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, .08);
  border-radius: 10px;
  padding: 8px 10px;
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #fff;
  background: var(--slate-900);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity .65s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 42%, rgba(245, 158, 11, .25), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, .98) 0%, rgba(15, 23, 42, .76) 44%, rgba(15, 23, 42, .35) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, .98), transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(1200px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  max-width: 760px;
  margin-left: max(16px, calc((100vw - 1200px) / 2));
  padding: 86px 0;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  color: #fff;
  background: var(--amber-500);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 6px 14px;
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 21px);
}

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

.hero-meta span,
.detail-meta span {
  border: 1px solid rgba(255, 255, 255, .18);
  color: #e2e8f0;
  background: rgba(15, 23, 42, .45);
  border-radius: 999px;
  padding: 6px 12px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 800;
  padding: 0 24px;
  transition: transform .2s ease, background .2s ease, color .2s ease, border .2s ease;
}

.primary-btn {
  color: #fff;
  background: var(--amber-500);
  box-shadow: 0 14px 30px rgba(245, 158, 11, .28);
}

.primary-btn:hover,
.header-search button:hover {
  background: var(--amber-600);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .08);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover,
.category-card-large:hover,
.top-rank-card:hover {
  transform: translateY(-3px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  background: rgba(2, 6, 23, .56);
  transform: translateY(-50%);
  font-size: 34px;
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 28px;
  background: var(--amber-400);
}

.section-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.intro-grid {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 34px;
}

.intro-copy h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-article h2,
.player-section h2,
.side-panel h2 {
  margin: 10px 0;
  color: var(--slate-900);
  line-height: 1.2;
}

.intro-copy h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.intro-copy p,
.page-hero p,
.category-card-large p,
.category-tile p {
  color: var(--muted);
}

.large-search {
  display: flex;
  overflow: hidden;
  min-height: 58px;
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.large-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 22px;
}

.large-search button {
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 0 28px;
  background: var(--amber-500);
  font-weight: 800;
}

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

.section-head h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-head a {
  color: var(--amber-600);
  font-weight: 800;
}

.section-head.light h2,
.section-head.light a {
  color: #fff;
}

.section-head.compact {
  margin-bottom: 16px;
}

.category-grid,
.movie-grid,
.mini-grid,
.category-large-grid,
.top-rank-grid {
  display: grid;
  gap: 22px;
}

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

.category-tile,
.category-card-large,
.movie-card,
.top-rank-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
  transition: transform .22s ease, box-shadow .22s ease;
}

.category-tile {
  display: block;
  min-height: 150px;
  padding: 24px;
  background:
    radial-gradient(circle at 95% 5%, rgba(245, 158, 11, .18), transparent 35%),
    #fff;
}

.category-tile span,
.category-card-large h2 {
  color: var(--slate-900);
  font-size: 21px;
  font-weight: 900;
}

.category-tile:hover,
.category-card-large:hover,
.movie-card:hover,
.top-rank-card:hover {
  box-shadow: var(--shadow);
}

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

.catalog-grid {
  align-items: stretch;
}

.movie-card {
  overflow: hidden;
}

.movie-card.hidden {
  display: none;
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 70% 20%, rgba(251, 191, 36, .3), transparent 35%),
    linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

.poster-wrap img,
.rail-card img,
.top-rank-card img,
.detail-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap img {
  transition: transform .32s ease;
}

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

.duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, .72);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.duration {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  background: var(--amber-500);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag-row span,
.detail-tags a,
.chip-filter {
  color: #92400e;
  background: var(--amber-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
}

.meta-row {
  justify-content: space-between;
  color: #94a3b8;
  font-size: 13px;
  margin-top: 12px;
}

.dark-panel {
  color: #fff;
  width: min(1200px, calc(100% - 32px));
  padding: 34px;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 2px 14px;
}

.rail::-webkit-scrollbar {
  height: 8px;
}

.rail::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .2);
  border-radius: 999px;
}

.rail-card {
  flex: 0 0 290px;
}

.rail-card a {
  display: block;
  color: #fff;
}

.rail-card img {
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: var(--slate-700);
  margin-bottom: 12px;
}

.rail-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.rail-card span {
  color: #cbd5e1;
  font-size: 14px;
}

.rail-controls {
  display: flex;
  gap: 8px;
}

.rail-controls button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, .14);
}

.split-sections {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 28px;
}

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

.movie-card.ranking .card-link {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
}

.movie-card.ranking .poster-wrap {
  aspect-ratio: auto;
  min-height: 132px;
}

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

.page-hero,
.detail-hero {
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
  overflow: hidden;
}

.page-hero {
  padding: 84px max(16px, calc((100vw - 1200px) / 2));
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -60% 45%;
  height: 340px;
  background: radial-gradient(circle, rgba(245, 158, 11, .25), transparent 62%);
}

.page-hero > div {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 56px);
}

.page-hero p {
  color: #cbd5e1;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: #cbd5e1;
  font-size: 14px;
  margin-top: 20px;
}

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

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

.category-card-large {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, .2), transparent 30%),
    #fff;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-samples span {
  color: var(--slate-700);
  background: var(--slate-100);
  border-radius: 999px;
  font-size: 12px;
  padding: 5px 9px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px 150px 160px;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  outline: 0;
  padding: 0 14px;
  background: #fff;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .16);
}

.chip-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.chip-filter {
  border: 0;
  cursor: pointer;
}

.chip-filter.active {
  color: #fff;
  background: var(--amber-500);
}

.empty-state {
  display: none;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-radius: 18px;
}

.empty-state.show {
  display: block;
}

.top-rank-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 26px;
}

.top-rank-card {
  overflow: hidden;
  color: #fff;
  background: var(--slate-900);
}

.top-rank-card a {
  position: relative;
  display: grid;
  min-height: 360px;
  align-content: end;
  padding: 24px;
}

.top-rank-card img {
  position: absolute;
  inset: 0;
  opacity: .45;
}

.top-rank-card a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, .96), transparent 55%);
}

.top-rank-card span,
.top-rank-card h2,
.top-rank-card p {
  position: relative;
  z-index: 1;
}

.top-rank-card span {
  width: fit-content;
  color: #fff;
  background: var(--amber-500);
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 900;
}

.top-rank-card h2 {
  margin: 12px 0 8px;
  font-size: 26px;
}

.top-rank-card p {
  margin: 0;
  color: #cbd5e1;
}

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

.detail-hero {
  min-height: 560px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.detail-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.detail-layout {
  display: grid;
  align-items: center;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  margin-top: 34px;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, .5);
  background: var(--slate-800);
}

.detail-info h1 {
  color: #fff;
  font-size: clamp(36px, 6vw, 64px);
}

.one-line {
  max-width: 780px;
  color: #e2e8f0;
  font-size: 20px;
}

.player-section {
  padding-bottom: 26px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(2, 6, 23, .28);
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #fff;
  border: 0;
  cursor: pointer;
  background-size: cover;
  background-position: center;
}

.video-frame.is-playing .player-cover {
  display: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  color: var(--slate-900);
  background: var(--amber-400);
  border-radius: 999px;
  font-size: 32px;
  box-shadow: 0 0 0 12px rgba(251, 191, 36, .16);
}

.player-cover strong {
  font-size: 22px;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.detail-article,
.side-panel {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
  padding: 28px;
}

.detail-article p {
  color: #334155;
  font-size: 17px;
}

.side-panel dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

.side-panel dt {
  color: #94a3b8;
}

.side-panel dd {
  margin: 0;
  color: var(--slate-900);
  font-weight: 700;
}

.detail-tags {
  margin-bottom: 0;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), #000);
  margin-top: 64px;
  padding: 50px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 20px;
  margin-bottom: 12px;
}

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

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

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

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

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, .18);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 1080px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .header-search {
    width: 320px;
    margin-left: auto;
  }

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

  .category-large-grid,
  .top-rank-grid,
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ranking-list.wide {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    order: 4;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 8px 0;
    border-top: 1px solid rgba(148, 163, 184, .18);
  }

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

  .main-nav a {
    padding: 10px 4px;
  }

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

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

  .hero-content {
    width: calc(100% - 32px);
    margin: 0 auto;
    padding-top: 120px;
  }

  .hero-arrow {
    display: none;
  }

  .intro-grid,
  .detail-layout,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .large-search {
    flex-direction: column;
    border-radius: 22px;
  }

  .large-search input,
  .large-search button {
    min-height: 52px;
  }

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

  .category-grid,
  .movie-grid,
  .mini-grid,
  .category-large-grid,
  .top-rank-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .movie-card.ranking .card-link {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .detail-poster {
    width: min(320px, 100%);
  }

  .detail-content {
    padding-top: 30px;
  }

  .video-frame {
    border-radius: 16px;
  }
}
