:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(30, 41, 59, 0.86);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(245, 158, 11, 0.34);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --amber: #f59e0b;
  --orange: #ea580c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, 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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  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-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 14px 40px rgba(245, 158, 11, 0.26);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  border-radius: 14px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover {
  color: #fbbf24;
  background: rgba(30, 41, 59, 0.7);
}

.mobile-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.mobile-toggle span {
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 99px;
  background: #e2e8f0;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 42%, rgba(0, 0, 0, 0.16) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 38%, rgba(2, 6, 23, 0.74) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 720px;
  padding-top: 40px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  padding: 6px 12px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 700px;
  margin: 24px 0 0;
  color: #e2e8f0;
  font-size: clamp(1.02rem, 2vw, 1.25rem);
}

.hero-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin-top: 24px;
}

.hero-meta span,
.movie-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.7);
  font-size: 0.88rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  font-size: 0.78rem;
}

.hero-tags {
  margin-top: 14px;
}

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

.primary-button,
.secondary-button,
.search-form button,
.filter-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 16px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-form button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 14px 38px rgba(234, 88, 12, 0.26);
}

.secondary-button {
  color: #f8fafc;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.55);
  font-size: 2rem;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 28px;
  background: #fbbf24;
}

.search-band,
.content-section,
.page-shell,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.search-band {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -42px;
  position: relative;
  z-index: 6;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 26px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-band span {
  color: #fbbf24;
  font-weight: 800;
}

.search-band h2 {
  margin: 4px 0 0;
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  line-height: 1.18;
}

.search-form,
.filter-panel {
  display: flex;
  gap: 10px;
}

.search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  color: #f8fafc;
  outline: none;
  background: rgba(2, 6, 23, 0.72);
}

.search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

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

.section-heading h2,
.page-hero h1,
.article-section h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-card);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

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

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

.poster-link img,
.mini-card img,
.ranking-poster img,
.detail-poster img,
.category-card img,
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.5s ease;
}

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

.score {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 0.82rem;
  font-weight: 800;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.28);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-info h2 a:hover {
  color: #fbbf24;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 10px 0 14px;
  overflow: hidden;
  color: var(--subtle);
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  gap: 6px;
  margin-bottom: 12px;
}

.movie-meta span {
  font-size: 0.76rem;
}

.category-grid,
.category-tile-grid {
  display: grid;
  gap: 20px;
}

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

.category-card,
.category-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-card);
}

.category-card {
  min-height: 210px;
  padding: 22px;
}

.category-card img {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  filter: saturate(1.1);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.24));
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  display: block;
  margin-top: 70px;
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-row:hover,
.mini-card:hover,
.ranking-item:hover,
.category-tile:hover {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(30, 41, 59, 0.86);
}

.rank-number,
.ranking-number {
  color: #fbbf24;
  font-weight: 900;
}

.rank-row em {
  color: #fde68a;
  font-style: normal;
  font-weight: 800;
}

.page-shell,
.detail-shell {
  padding-top: 42px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--subtle);
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: #fbbf24;
}

.page-hero,
.detail-hero,
.article-section,
.player-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: clamp(28px, 5vw, 52px);
}

.compact-hero p {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.filter-panel {
  flex-wrap: wrap;
  margin-top: 26px;
}

.filter-panel input {
  flex: 1 1 320px;
}

.filter-panel select {
  flex: 0 0 170px;
}

.empty-state {
  display: none;
  margin: 22px 0 0;
  color: #fbbf24;
  font-weight: 800;
}

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

.category-page-grid,
.search-grid {
  margin-top: 34px;
}

.category-tile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.category-tile {
  min-height: 300px;
  display: grid;
  align-items: end;
}

.category-tile img {
  position: absolute;
  inset: 0;
  opacity: 0.36;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.36));
}

.category-tile div {
  position: relative;
  z-index: 1;
  padding: 24px;
}

.category-tile h2 {
  margin: 0;
  font-size: 1.7rem;
}

.category-tile p {
  color: var(--muted);
}

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

.category-samples span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  font-size: 0.78rem;
}

.ranking-list {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 92px 64px 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.ranking-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

.ranking-info h2 {
  margin: 0;
  font-size: 1.35rem;
}

.ranking-info p {
  margin: 8px 0 12px;
  color: var(--muted);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 330px) 1fr;
  gap: clamp(24px, 5vw, 52px);
  align-items: center;
  padding: clamp(24px, 5vw, 52px);
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  aspect-ratio: 3 / 4;
  background: #111827;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.38);
}

.detail-info h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 800px;
  margin: 20px 0;
  color: #e2e8f0;
  font-size: clamp(1.02rem, 2vw, 1.22rem);
}

.detail-meta,
.detail-tags {
  margin: 16px 0;
}

.player-section {
  margin-top: 34px;
  padding: clamp(18px, 4vw, 32px);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 24px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.24), transparent 16rem),
    linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.45));
}

.player-cover span {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  font-weight: 900;
}

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

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

.article-section {
  margin-top: 34px;
  padding: clamp(24px, 4vw, 42px);
}

.article-section h2 {
  margin-top: 28px;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.article-section h2:first-child {
  margin-top: 0;
}

.article-section p {
  color: #dbeafe;
  font-size: 1.03rem;
}

.related-section {
  width: 100%;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
}

.mini-card img {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: #111827;
}

.site-footer {
  margin-top: 90px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.74), rgba(2, 6, 23, 0.94));
}

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

.footer-grid p {
  max-width: 580px;
  color: var(--subtle);
}

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

.footer-grid a:not(.footer-brand) {
  display: block;
  margin-top: 8px;
  color: var(--subtle);
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 18px 0 30px;
  color: #64748b;
  text-align: center;
  font-size: 0.92rem;
}

[data-card].is-hidden {
  display: none;
}

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

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

  .search-band {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-toggle {
    display: flex;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-content {
    padding: 92px 0 44px;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .category-grid,
  .rank-grid,
  .category-tile-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

  .detail-hero,
  .footer-grid,
  .ranking-item {
    grid-template-columns: 1fr;
  }

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

  .ranking-number {
    font-size: 2rem;
  }
}

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

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .search-band,
  .compact-hero,
  .detail-hero,
  .article-section,
  .player-section {
    border-radius: 18px;
    padding: 18px;
  }

  .search-form,
  .filter-panel {
    flex-direction: column;
  }

  .filter-panel select {
    flex: 1 1 auto;
  }

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

  .rank-row {
    grid-template-columns: 42px 1fr;
  }

  .rank-row em {
    grid-column: 2;
  }

  .movie-card-small {
    display: grid;
    grid-template-columns: 118px 1fr;
  }

  .movie-card-small .poster-link {
    height: 100%;
  }

  .movie-card-small .movie-card-body {
    padding: 12px;
  }

  .player-shell {
    border-radius: 16px;
  }
}
