:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111c31;
  --panel: rgba(30, 41, 59, 0.74);
  --panel-strong: #1e293b;
  --line: rgba(148, 163, 184, 0.22);
  --text: #ffffff;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --amber: #f59e0b;
  --orange: #ea580c;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.36);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.11), transparent 32rem), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

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: 40;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.28);
}

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

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.25);
  transition: transform 0.3s ease;
}

.brand:hover .brand-mark,
.footer-brand:hover .brand-mark {
  transform: scale(1.08) rotate(-2deg);
}

.brand-text,
.footer-brand span:last-child {
  font-size: clamp(20px, 2.2vw, 28px);
  background: linear-gradient(90deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted-strong);
  font-weight: 650;
}

.main-nav a,
.mobile-panel a {
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
  color: #fbbf24;
}

.header-search,
.mobile-search,
.wide-search,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search {
  width: min(330px, 28vw);
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.header-search input,
.mobile-search input,
.wide-search input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  border: 0;
  outline: none;
  color: #ffffff;
  background: transparent;
}

.header-search input,
.mobile-search input,
.wide-search input,
.filter-panel input {
  flex: 1;
}

.header-search button,
.mobile-search button,
.wide-search button,
.filter-panel button {
  border: 0;
  color: #ffffff;
  border-radius: 999px;
  padding: 9px 16px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.25);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.65);
}

.mobile-panel {
  padding: 0 16px 18px;
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid var(--line);
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted-strong);
  background: rgba(30, 41, 59, 0.55);
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

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

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

.hero-overlay {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.15)), linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent 48%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding-top: 28px;
}

.hero-copy {
  max-width: 710px;
  display: grid;
  gap: 20px;
}

.hero-kicker,
.detail-meta,
.card-meta,
.hero-meta,
.tag-list,
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-kicker span,
.detail-meta span,
.tag-list span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.82);
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.hero-kicker span:first-child,
.tag-list span:first-child {
  background: linear-gradient(90deg, var(--amber), var(--orange));
  color: #ffffff;
}

.hero h1,
.hero h2 {
  margin: 0;
  font-size: clamp(44px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  max-width: 900px;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.42);
}

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

.hero-meta {
  color: var(--muted-strong);
  font-weight: 800;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

.primary-btn,
.ghost-btn,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 18px 45px rgba(234, 88, 12, 0.32);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.primary-btn:hover,
.ghost-btn:hover,
.more-link:hover {
  transform: translateY(-2px) scale(1.02);
}

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

.hero-dot {
  width: 28px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 0.3s ease, background 0.3s ease;
}

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

.quick-search-section,
.content-section {
  padding: 56px 0;
}

.quick-search-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.82));
  box-shadow: var(--shadow);
}

.quick-search-card h2,
.section-heading h2,
.page-hero h1,
.story-card h2,
.side-panel h2,
.site-footer h2 {
  margin: 0;
}

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

.wide-search,
.filter-panel {
  padding: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.03em;
}

.tinted {
  background: rgba(30, 41, 59, 0.24);
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: grid;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 14px 45px rgba(2, 6, 23, 0.24);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.card-link:hover {
  transform: translateY(-8px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 24px 65px rgba(2, 6, 23, 0.36);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #1e293b;
}

.compact .poster-frame {
  aspect-ratio: 16 / 10;
}

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

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 52%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-link:hover .poster-frame::after {
  opacity: 1;
}

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  font-weight: 800;
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.card-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: auto;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.card-link:hover .card-play {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-title {
  min-height: 54px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-link:hover .card-title {
  color: #fbbf24;
}

.card-desc {
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta span {
  border-radius: 8px;
  background: rgba(51, 65, 85, 0.86);
  font-size: 12px;
}

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

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

.movie-rail .movie-card {
  flex: 0 0 250px;
}

.row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.rail-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.88);
  font-size: 25px;
}

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

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

.category-tile,
.category-card {
  display: grid;
  gap: 10px;
  padding: 24px;
  min-height: 150px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.86));
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.48);
}

.category-tile span,
.category-card strong {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small,
.category-card span {
  color: var(--muted);
}

.category-card em,
.more-link {
  width: fit-content;
  color: #fbbf24;
  font-style: normal;
  font-weight: 850;
}

.split-grid,
.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.42fr);
  gap: 28px;
}

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

.rank-row,
.rank-card {
  display: grid;
  grid-template-columns: 42px 70px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-card {
  grid-template-columns: 54px 92px minmax(0, 1fr);
}

.rank-row:hover,
.rank-card:hover {
  transform: translateX(5px);
  border-color: rgba(245, 158, 11, 0.44);
}

.rank-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 900;
}

.rank-row img,
.rank-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-info strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.mini-grid .card-title,
.compact .card-title {
  min-height: auto;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 16% 20%, rgba(245, 158, 11, 0.16), transparent 26rem), #0b1220;
}

.page-hero {
  padding: 82px 0 62px;
}

.compact-hero {
  padding: 68px 0 52px;
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 64px);
  letter-spacing: -0.04em;
}

.eyebrow {
  color: #fbbf24 !important;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.breadcrumb {
  margin-top: 18px;
  color: var(--muted);
}

.breadcrumb a {
  color: #fbbf24;
}

.filter-panel {
  margin-bottom: 26px;
  border-radius: 20px;
}

.filter-panel select {
  min-width: 160px;
  padding: 0 10px;
  color: var(--muted-strong);
}

.empty-state {
  padding: 28px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(30, 41, 59, 0.72);
  text-align: center;
}

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

.detail-bg,
.detail-bg img,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px);
  opacity: 0.36;
  transform: scale(1.04);
}

.detail-shade {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.7));
}

.detail-head {
  position: relative;
  padding: 46px 0 58px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.detail-copy {
  display: grid;
  gap: 18px;
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 5.6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.detail-line {
  max-width: 800px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 20px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-video {
  background: #020617;
  object-fit: contain;
}

.player-cover {
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.38));
  text-align: center;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.big-play {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-size: 30px;
  box-shadow: 0 20px 55px rgba(234, 88, 12, 0.34);
}

.player-cover strong {
  max-width: min(720px, 86%);
  font-size: clamp(20px, 3vw, 34px);
}

.story-card,
.side-panel {
  margin-top: 24px;
  padding: 28px;
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.story-card h2 + p {
  margin-top: 12px;
}

.story-card p {
  color: var(--muted-strong);
  font-size: 17px;
}

.side-panel {
  margin-top: 0;
  align-self: start;
  position: sticky;
  top: 96px;
}

.side-panel h2 {
  margin-bottom: 18px;
}

.side-recommend {
  grid-template-columns: 1fr;
}

.side-recommend .movie-card {
  width: 100%;
}

.side-recommend .card-link {
  grid-template-columns: 120px minmax(0, 1fr);
}

.side-recommend .poster-frame {
  aspect-ratio: 4 / 5;
}

.side-recommend .card-desc {
  display: none;
}

.site-footer {
  margin-top: 64px;
  padding: 48px 0 24px;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 30px;
}

.footer-grid h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

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

.footer-grid a:hover {
  color: #fbbf24;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--muted);
  font-size: 14px;
}

.slim {
  padding-top: 18px;
  padding-bottom: 30px;
}

[hidden] {
  display: none !important;
}

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

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

  .header-search {
    display: none;
  }
}

@media (max-width: 860px) {
  .main-nav {
    display: none;
  }

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

  .hero {
    min-height: 640px;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 90px;
  }

  .quick-search-card,
  .split-grid,
  .detail-content-grid,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .side-panel {
    position: static;
  }

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

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

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

  .site-header .brand-text {
    font-size: 20px;
  }

  .hero {
    min-height: 610px;
  }

  .hero h1,
  .hero h2 {
    font-size: 42px;
  }

  .hero p,
  .detail-line {
    font-size: 16px;
  }

  .hero-actions,
  .filter-panel,
  .wide-search,
  .mobile-search {
    align-items: stretch;
    flex-direction: column;
    border-radius: 24px;
  }

  .primary-btn,
  .ghost-btn,
  .more-link {
    width: 100%;
  }

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

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

  .card-body {
    padding: 13px;
  }

  .card-title {
    font-size: 15px;
  }

  .rank-card,
  .rank-row {
    grid-template-columns: 40px 76px minmax(0, 1fr);
  }

  .side-recommend .card-link {
    grid-template-columns: 104px minmax(0, 1fr);
  }
}
