:root {
  --color-primary: 14 165 233;
  --color-primary-dark: 3 105 161;
  --color-secondary: 34 197 94;
  --color-accent: 251 146 60;
  --color-background: 15 23 42;
  --color-surface: 30 41 59;
  --color-surface-light: 51 65 85;
  --color-text: 248 250 252;
  --color-text-secondary: 203 213 225;
  --color-border: 71 85 105;
  --shadow-card: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: rgb(var(--color-text));
  background:
    radial-gradient(circle at top left, rgba(var(--color-primary), 0.18), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #111827 45%, #0f172a 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(var(--color-border), 0.8);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  border-radius: 999px;
  box-shadow: 0 0 30px rgba(251, 191, 36, 0.34);
}

.brand-text {
  font-size: 20px;
  color: transparent;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
}

.main-nav,
.mobile-nav,
.category-strip,
.footer-links,
.hero-actions {
  display: flex;
  align-items: center;
}

.main-nav {
  gap: 28px;
}

.main-nav a,
.mobile-nav a,
.category-strip a,
.footer-links a {
  color: rgb(var(--color-text-secondary));
  transition: color 0.2s ease, background-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active,
.category-strip a:hover,
.category-strip a.active,
.footer-links a:hover {
  color: #ffffff;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  color: #fff;
  background: rgba(51, 65, 85, 0.76);
  border-radius: 12px;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 16px;
  gap: 14px;
  flex-wrap: wrap;
}

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

.category-strip {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.category-strip a {
  white-space: nowrap;
  padding: 7px 14px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(var(--color-border), 0.8);
  border-radius: 999px;
  font-size: 14px;
}

.category-strip a.active,
.category-strip a:hover {
  background: rgba(var(--color-primary), 0.2);
  border-color: rgba(var(--color-primary), 0.8);
}

.hero {
  position: relative;
  min-height: 500px;
  height: 70vh;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.18)),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.3) 48%, rgba(15, 23, 42, 0.1) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 70px;
}

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

.hero-tags,
.movie-meta-line,
.tag-list,
.movie-facts,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags a,
.hero-tags span,
.movie-meta-line a,
.movie-meta-line span,
.tag-list span,
.source-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(14, 165, 233, 0.86);
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero-tags span:nth-child(2),
.source-label {
  background: rgba(251, 191, 36, 0.9);
  color: #111827;
}

.hero-tags span:nth-child(3) {
  background: rgba(30, 41, 59, 0.9);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 16px;
  color: #fff;
  font-size: clamp(36px, 7vw, 68px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.42);
}

.hero p,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 0;
  color: rgb(var(--color-text-secondary));
  font-size: 18px;
  line-height: 1.8;
}

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

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 18px 40px rgba(14, 165, 233, 0.28);
}

.ghost-button {
  color: #ffffff;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(var(--color-border), 0.86);
}

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

.ghost-button.small {
  min-height: 36px;
  padding: 0 16px;
  font-size: 14px;
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.2s ease, background-color 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: #0ea5e9;
}

.intro-panel,
.page-hero,
.split-panel,
.detail-text-grid,
.prev-next {
  margin-top: 42px;
}

.intro-panel,
.page-hero,
.category-overview-card,
.rank-box,
.detail-article,
.filter-bar,
.video-shell,
.split-panel {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(var(--color-border), 0.72);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
}

.intro-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 34px;
}

.eyebrow,
.section-heading p,
.category-overview-head p {
  margin: 0 0 10px;
  color: #38bdf8;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro-panel h2,
.section-heading h2,
.category-overview-head h2,
.rank-box h2,
.detail-article h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.intro-panel p,
.category-overview-head span,
.detail-article p,
.footer-grid p {
  color: rgb(var(--color-text-secondary));
  line-height: 1.8;
}

.content-section {
  margin-top: 56px;
}

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

.section-heading.compact {
  margin-bottom: 18px;
}

.section-more {
  color: #38bdf8;
  font-weight: 800;
}

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

.full-grid {
  margin-top: 24px;
}

.movie-card {
  overflow: hidden;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(var(--color-border), 0.72);
  border-radius: var(--radius-lg);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--color-primary), 0.72);
  box-shadow: var(--shadow-card);
}

.movie-card[hidden],
.rank-row[hidden],
.category-overview-card[hidden],
.compact-card[hidden] {
  display: none !important;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
}

.poster-link img,
.detail-poster img,
.compact-card img,
.rank-thumb img,
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.category-card:hover img,
.compact-card:hover img {
  transform: scale(1.06);
}

.poster-year,
.poster-quality {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.poster-year {
  left: 12px;
  color: #111827;
  background: rgba(251, 191, 36, 0.94);
}

.poster-quality {
  right: 12px;
  color: #fff;
  background: rgba(14, 165, 233, 0.92);
}

.movie-card-body {
  padding: 16px;
}

.movie-meta-line {
  margin-bottom: 10px;
  gap: 8px;
}

.movie-meta-line a,
.movie-meta-line span,
.tag-list span {
  min-height: 24px;
  padding: 4px 9px;
  color: rgb(var(--color-text-secondary));
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(var(--color-border), 0.62);
  font-size: 12px;
  font-weight: 700;
}

.movie-meta-line a {
  color: #7dd3fc;
}

.movie-card h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card p {
  display: -webkit-box;
  min-height: 50px;
  margin: 0 0 12px;
  overflow: hidden;
  color: rgb(var(--color-text-secondary));
  font-size: 14px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-list {
  gap: 7px;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #0f172a;
  border: 1px solid rgba(var(--color-border), 0.72);
}

.category-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.18));
}

.category-info {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.category-info strong {
  display: block;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.category-info em {
  display: block;
  margin-top: 6px;
  color: rgb(var(--color-text-secondary));
  font-style: normal;
  line-height: 1.6;
}

.page-main {
  padding-bottom: 70px;
}

.page-hero {
  padding: 38px;
}

.small-hero h1,
.category-page-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  padding: 18px;
}

.filter-bar label {
  display: grid;
  flex: 1;
  gap: 8px;
  color: rgb(var(--color-text-secondary));
  font-weight: 800;
}

.filter-bar input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  color: #fff;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(var(--color-border), 0.9);
  border-radius: 14px;
  outline: none;
}

.filter-bar input:focus {
  border-color: rgba(var(--color-primary), 0.9);
  box-shadow: 0 0 0 4px rgba(var(--color-primary), 0.12);
}

.filter-count {
  color: #7dd3fc;
  font-weight: 900;
  white-space: nowrap;
}

.category-overview-list {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.category-overview-card {
  padding: 24px;
}

.category-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

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

.compact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(var(--color-border), 0.62);
  border-radius: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--color-primary), 0.72);
}

.compact-card img {
  width: 58px;
  height: 78px;
  flex: 0 0 auto;
  border-radius: 12px;
}

.compact-card span {
  min-width: 0;
}

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

.compact-card strong {
  color: #fff;
  font-size: 15px;
}

.compact-card em {
  margin-top: 6px;
  color: rgb(var(--color-text-secondary));
  font-size: 13px;
  font-style: normal;
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  padding: 24px;
}

.rank-box {
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
}

.rank-box ol,
.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-box li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(var(--color-border), 0.5);
}

.rank-box li:last-child {
  border-bottom: 0;
}

.rank-box li span {
  color: #fbbf24;
  font-weight: 900;
}

.rank-box li a {
  color: #fff;
  font-weight: 800;
}

.rank-box li em {
  grid-column: 2;
  color: rgb(var(--color-text-secondary));
  font-size: 13px;
  font-style: normal;
}

.rank-list {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.rank-row {
  display: grid;
  grid-template-columns: 74px 76px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: rgba(30, 41, 59, 0.76);
  border: 1px solid rgba(var(--color-border), 0.7);
  border-radius: 18px;
}

.rank-number {
  color: #fbbf24;
  font-size: 20px;
  font-weight: 950;
  text-align: center;
}

.rank-thumb {
  width: 76px;
  height: 100px;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

.rank-info h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 10px;
  color: rgb(var(--color-text-secondary));
  line-height: 1.7;
}

.rank-info div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.rank-info div a,
.rank-info div span,
.rank-info div strong {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  color: rgb(var(--color-text-secondary));
  font-size: 13px;
}

.rank-info div strong {
  color: #111827;
  background: #fbbf24;
}

.detail-main {
  padding-bottom: 80px;
}

.detail-hero {
  position: relative;
  padding: 58px 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.16), transparent 24rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0));
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(var(--color-border), 0.76);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

.breadcrumbs {
  color: rgb(var(--color-text-secondary));
  font-size: 14px;
}

.breadcrumbs a {
  color: #7dd3fc;
}

.detail-copy h1 {
  font-size: clamp(34px, 6vw, 60px);
}

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

.movie-facts div {
  padding: 14px;
  background: rgba(30, 41, 59, 0.76);
  border: 1px solid rgba(var(--color-border), 0.72);
  border-radius: 16px;
}

.movie-facts dt {
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 900;
}

.movie-facts dd {
  margin: 6px 0 0;
  color: #fff;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 4px;
}

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

.video-shell {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: #020617;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(14, 165, 233, 0.22), rgba(15, 23, 42, 0.72)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.36), rgba(2, 6, 23, 0.36));
  text-align: center;
}

.video-shell.is-playing .player-overlay {
  display: none;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 6px;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  border-radius: 999px;
  box-shadow: 0 20px 50px rgba(251, 191, 36, 0.3);
  font-size: 28px;
}

.player-overlay strong {
  font-size: 24px;
}

.player-overlay em,
.player-status {
  color: rgb(var(--color-text-secondary));
  font-style: normal;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 14px;
  margin: 0;
  padding: 7px 12px;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  font-size: 13px;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}

.detail-article {
  padding: 28px;
}

.detail-article h2 {
  margin-bottom: 16px;
  font-size: 28px;
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.site-footer {
  margin-top: 70px;
  padding: 42px 0;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(var(--color-border), 0.8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 34px;
}

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

.footer-links {
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
}

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

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

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

  .split-panel,
  .detail-text-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .mobile-menu-button {
    display: inline-block;
  }

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

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

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

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

  .intro-panel,
  .section-heading,
  .category-overview-head,
  .filter-bar,
  .prev-next {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

  .rank-row {
    grid-template-columns: 48px 70px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-thumb {
    width: 70px;
    height: 92px;
  }
}

@media (max-width: 520px) {
  .container,
  .header-inner,
  .mobile-nav,
  .category-strip {
    width: min(100% - 22px, 1180px);
  }

  .brand-text {
    font-size: 18px;
  }

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

  .hero-dots {
    right: 18px;
  }

  .movie-facts {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .intro-panel,
  .split-panel,
  .detail-article,
  .category-overview-card {
    padding: 22px;
  }
}
