:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #9ca3af;
  --muted-strong: #cbd5e1;
  --sunset: #f59e0b;
  --sunset-deep: #b45309;
  --twilight: #fb923c;
  --red: #ef4444;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, rgba(245, 158, 11, 0.18), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(251, 146, 60, 0.12), transparent 26rem),
    linear-gradient(180deg, #030712 0%, #0b1120 48%, #030712 100%);
}

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: 50;
  border-bottom: 1px solid rgba(31, 41, 55, 0.85);
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(14px);
}

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

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

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--sunset), var(--twilight));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--sunset), var(--twilight), #fcd34d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

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

.header-search,
.mobile-search,
.search-page-form,
.search-band form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.search-band input,
.filter-bar input,
.filter-bar select {
  color: #e5e7eb;
  border: 1px solid rgba(75, 85, 99, 0.78);
  border-radius: 999px;
  outline: none;
  background: rgba(17, 24, 39, 0.82);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 245px;
  padding: 10px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.search-band input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--sunset);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.header-search button,
.mobile-search button,
.search-page-form button,
.search-band button {
  border: none;
  color: #111827;
  font-weight: 800;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--sunset), var(--twilight));
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, 0.86);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.95);
}

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

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.mobile-search input {
  min-width: 0;
  flex: 1;
  padding: 10px 14px;
}

main {
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  isolation: isolate;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.08), #030712 92%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 56px;
  align-items: center;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 92px;
  transition: opacity 0.8s ease;
}

.hero-slide::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(24px) saturate(1.25);
  opacity: 0.24;
  transform: scale(1.08);
}

.hero-slide::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 70% 28%, rgba(245, 158, 11, 0.22), transparent 25rem),
    linear-gradient(90deg, rgba(3, 7, 18, 0.95), rgba(3, 7, 18, 0.58) 55%, rgba(3, 7, 18, 0.92));
}

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

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

.eyebrow,
.section-heading span,
.rank-head span,
.inner-hero span {
  color: var(--sunset);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 12px 0 16px;
  font-size: clamp(2.6rem, 7vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero-copy p {
  max-width: 640px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.09);
}

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
  font-weight: 700;
}

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

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

.primary-btn {
  color: #111827;
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--sunset), var(--twilight));
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.25);
}

.ghost-btn {
  color: #f8fafc;
  padding: 12px 22px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  background: rgba(15, 23, 42, 0.72);
}

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

.hero-poster {
  justify-self: end;
  width: min(380px, 100%);
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.48);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

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

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--sunset), var(--twilight));
}

.search-band,
.section-block,
.inner-hero,
.detail-hero,
.player-section,
.detail-content,
.category-overview-grid,
.rank-list {
  width: min(1280px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 28px;
  align-items: center;
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(17, 24, 39, 0.72));
  box-shadow: var(--shadow);
}

.search-band h2,
.section-heading h2,
.rank-head h2,
.inner-hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.1;
}

.search-band p,
.inner-hero p,
.category-overview-body p,
.detail-one-line,
.detail-content p,
.rank-card p {
  color: var(--muted-strong);
  line-height: 1.8;
}

.search-band input,
.search-page-form input {
  min-width: 0;
  flex: 1;
  padding: 14px 18px;
}

.section-block {
  margin-top: 70px;
}

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

.section-heading a,
.text-link {
  color: #fbbf24;
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #111827;
  isolation: isolate;
}

.category-tile::before,
.category-overview-cover,
.inner-hero.category-hero::before,
.inner-hero.rank-hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--tile-image, var(--hero-image));
  background-size: cover;
  background-position: center;
  opacity: 0.36;
  z-index: -2;
  transition: transform 0.35s ease;
}

.category-tile::after,
.inner-hero.category-hero::after,
.inner-hero.rank-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.1), rgba(3, 7, 18, 0.94));
}

.category-tile:hover::before {
  transform: scale(1.08);
}

.category-tile span {
  color: #fbbf24;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 8px;
  color: #f8fafc;
  line-height: 1.45;
}

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

.horizontal-row::-webkit-scrollbar {
  display: none;
}

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.44);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
}

.wide-card {
  flex: 0 0 292px;
}

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

.card-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.card-score {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #111827;
  font-size: 0.78rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--sunset), #fcd34d);
}

.card-body {
  padding: 16px;
}

.card-tags span {
  padding: 4px 8px;
  font-size: 0.74rem;
}

.card-body h3 {
  margin: 12px 0 6px;
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #fbbf24;
}

.card-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.card-desc {
  display: -webkit-box;
  min-height: 3.05em;
  margin: 0;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.rank-panel {
  position: sticky;
  top: 102px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
}

.rank-head {
  margin-bottom: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-areas:
    "number title"
    "number meta";
  gap: 3px 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.rank-number {
  grid-area: number;
  align-self: center;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #111827;
  border-radius: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--sunset), var(--twilight));
}

.rank-title {
  grid-area: title;
  color: #ffffff;
  font-weight: 800;
}

.rank-meta {
  grid-area: meta;
  color: var(--muted);
  font-size: 0.85rem;
}

.inner-hero {
  position: relative;
  margin-top: 34px;
  padding: 58px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(17, 24, 39, 0.74));
  box-shadow: var(--shadow);
  isolation: isolate;
}

.inner-hero p {
  max-width: 780px;
  margin-bottom: 0;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.category-links a {
  padding: 8px 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.08);
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-bar input {
  flex: 1;
  padding: 13px 18px;
}

.filter-bar select {
  padding: 13px 18px;
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 34px;
}

.category-overview {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #111827;
  isolation: isolate;
}

.category-overview-cover {
  z-index: -2;
}

.category-overview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.18), #030712 82%);
}

.category-overview-body {
  position: absolute;
  inset: auto 0 0;
  padding: 24px;
}

.category-overview-body h2 {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.category-overview-body ul {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding-left: 18px;
  color: #d1d5db;
}

.category-overview-body li a:hover {
  color: #fbbf24;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.rank-card {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
}

.rank-card-cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

.rank-card-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.rank-card-cover span {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #111827;
  border-radius: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--sunset), var(--twilight));
}

.rank-card h2 {
  margin: 6px 0 8px;
  font-size: 1.2rem;
}

.rank-card h2 a:hover {
  color: #fbbf24;
}

.score-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.score-line strong {
  color: #fbbf24;
  font-size: 1.2rem;
}

.score-line span {
  color: var(--muted);
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  margin-top: 34px;
  padding: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.8);
  isolation: isolate;
  box-shadow: var(--shadow);
}

.detail-hero::before {
  filter: blur(10px);
  opacity: 0.34;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: #fbbf24;
  font-weight: 700;
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 820px;
  font-size: 1.15rem;
}

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

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

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow);
}

.video-element {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-start {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #111827;
  font-size: 2rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--sunset), var(--twilight));
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.32);
  transform: translate(-50%, -50%);
}

.video-shell.is-playing .video-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.detail-content article {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-content h2 {
  margin-top: 0;
}

.search-page-form {
  max-width: 700px;
  margin-top: 26px;
}

.site-footer {
  margin-top: 90px;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.88);
}

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

.footer-grid p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

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

.footer-grid a:not(.site-logo):hover {
  color: #fbbf24;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  color: #6b7280;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

  .split-layout {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-slide,
  .detail-hero,
  .search-band {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    gap: 28px;
    align-content: center;
  }

  .hero-poster {
    justify-self: start;
    width: 240px;
  }

  .category-grid,
  .category-overview-grid,
  .rank-list,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .header-inner {
    min-height: 68px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-slide {
    padding-top: 42px;
  }

  .hero-copy h1,
  .detail-info h1 {
    letter-spacing: -0.04em;
  }

  .search-band,
  .inner-hero,
  .detail-hero {
    padding: 24px;
    border-radius: 24px;
  }

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

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

  .card-body {
    padding: 13px;
  }

  .filter-bar {
    flex-direction: column;
  }

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

  .video-start {
    width: 68px;
    height: 68px;
  }
}
