:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.16), transparent 32rem),
    linear-gradient(180deg, #0f172a 0%, #111827 45%, #0f172a 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.is-menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

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

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

.site-logo {
  font-size: 20px;
}

.logo-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: #111827;
  box-shadow: 0 12px 34px rgba(245, 158, 11, 0.32);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  border-radius: 12px;
  padding: 9px 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--accent-soft);
  color: #fbbf24;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
}

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

.hero-section {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.82) 38%, rgba(15, 23, 42, 0.34) 100%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.2) 45%, rgba(15, 23, 42, 0.72) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: end;
  gap: 42px;
  padding: 108px 0 74px;
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 0;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 16px 0 0;
  color: #fbbf24;
  font-size: clamp(25px, 3vw, 40px);
  line-height: 1.18;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-tags,
.tag-row,
.detail-meta,
.hero-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags,
.detail-meta {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.58);
  color: var(--muted);
  font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  border: 0;
  padding: 12px 22px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #111827;
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.ghost-btn {
  border: 1px solid rgba(248, 250, 252, 0.16);
  padding: 11px 19px;
  background: rgba(15, 23, 42, 0.46);
  color: var(--text);
}

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

.ghost-btn:hover {
  border-color: rgba(245, 158, 11, 0.46);
  color: #fbbf24;
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  max-width: 590px;
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid rgba(248, 250, 252, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
}

.hero-search input {
  width: 100%;
  border: 0;
  padding: 15px 18px;
  background: transparent;
  color: var(--text);
  outline: none;
}

.hero-search button {
  border: 0;
  padding: 0 22px;
  background: var(--accent);
  color: #111827;
  font-weight: 900;
}

.hero-category-links {
  margin-top: 16px;
}

.hero-category-links a {
  color: #fbbf24;
  font-size: 13px;
}

.hero-panel,
.ranking-panel,
.text-panel {
  border: 1px solid rgba(248, 250, 252, 0.13);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  padding: 18px;
}

.panel-title {
  display: block;
  margin: 0 0 12px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
}

.hero-mini-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 18px;
  padding: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-mini-card:hover {
  background: rgba(148, 163, 184, 0.12);
  transform: translateX(4px);
}

.hero-mini-card img {
  width: 64px;
  height: 86px;
  border-radius: 14px;
  object-fit: cover;
}

.hero-mini-card strong,
.rank-info strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.hero-mini-card small,
.rank-info small {
  display: block;
  margin-top: 5px;
  color: var(--subtle);
  font-size: 12px;
}

.content-section,
.page-main {
  padding: 54px 0;
}

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

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-heading.slim {
  align-items: center;
}

.section-link {
  border: 1px solid rgba(245, 158, 11, 0.24);
  padding: 9px 13px;
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  font-size: 13px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.8);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.34s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.94);
  color: #111827;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 700;
}

.card-body h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

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

.card-body p {
  min-height: 48px;
  margin: 0;
  color: var(--subtle);
  font-size: 14px;
}

.tag-row {
  margin-top: 14px;
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 112px 1fr;
}

.movie-card.compact .card-cover {
  aspect-ratio: auto;
  min-height: 168px;
}

.movie-card.compact .card-body {
  padding: 14px;
}

.movie-card.compact .card-body h3 {
  font-size: 16px;
}

.movie-card.compact .card-body p {
  min-height: 0;
  font-size: 13px;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 20px;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 54px 1fr;
  gap: 10px;
  align-items: center;
  border-radius: 16px;
  padding: 9px;
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: rgba(148, 163, 184, 0.1);
}

.rank-num {
  color: #fbbf24;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

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

.category-tile,
.category-overview-card {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(30, 41, 59, 0.62)),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile {
  min-height: 152px;
  padding: 20px;
}

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

.category-tile span {
  display: block;
  color: var(--text);
  font-size: 19px;
  font-weight: 900;
}

.category-tile small,
.category-overview-card p {
  display: block;
  margin-top: 10px;
  color: var(--subtle);
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 34px;
  padding: 54px;
  background:
    radial-gradient(circle at 78% 12%, rgba(245, 158, 11, 0.22), transparent 24rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
  box-shadow: var(--shadow);
}

.small-hero,
.category-hero,
.ranking-hero {
  margin-bottom: 32px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 22px;
  color: var(--subtle);
  font-size: 14px;
}

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

.category-overview-card {
  display: grid;
  gap: 18px;
  padding: 18px;
}

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

.category-posters img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.library-section {
  display: grid;
  gap: 24px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-search {
  display: grid;
  gap: 7px;
}

.filter-search span {
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
}

.filter-search input,
.filter-selects select {
  height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  outline: none;
}

.filter-search input {
  width: 100%;
  padding: 0 14px;
}

.filter-selects {
  display: flex;
  gap: 10px;
}

.filter-selects select {
  min-width: 138px;
  padding: 0 12px;
}

.empty-state {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 20px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
  text-align: center;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  filter: blur(2px);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #0f172a 0%, rgba(15, 23, 42, 0.84) 52%, rgba(15, 23, 42, 0.66) 100%),
    linear-gradient(0deg, #0f172a 0%, transparent 70%);
}

.detail-shell {
  position: relative;
  z-index: 1;
  padding: 42px 0 64px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(248, 250, 252, 0.14);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #020617;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: #020617;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.08));
}

.play-ring {
  position: relative;
  z-index: 3;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.95);
  box-shadow: 0 0 0 16px rgba(245, 158, 11, 0.16);
}

.play-ring span {
  display: block;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #111827;
}

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

.detail-info {
  padding: 4px 0;
}

.detail-info h1 {
  font-size: clamp(34px, 4vw, 56px);
}

.detail-one-line {
  font-size: 17px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: -24px;
  padding-bottom: 24px;
}

.text-panel {
  padding: 28px;
}

.text-panel h2 {
  margin: 12px 0 12px;
  font-size: 25px;
}

.text-panel p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.13);
  background: rgba(2, 6, 23, 0.38);
}

.site-footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 18px;
  padding: 34px 0;
  color: var(--subtle);
}

.footer-logo {
  color: var(--text);
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

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

.footer-copy {
  margin: 0;
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

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

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

  .hero-content,
  .two-column-section,
  .detail-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .ranking-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .site-header-inner {
    height: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 64px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  body.is-menu-open .site-nav {
    display: flex;
  }

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

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

  .hero-content {
    padding: 86px 0 34px;
    gap: 24px;
  }

  .hero-panel {
    padding: 14px;
  }

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

  .hero-search button {
    padding: 12px;
  }

  .content-section,
  .page-main {
    padding: 36px 0;
  }

  .section-heading,
  .filter-bar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-heading {
    flex-direction: column;
  }

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

  .movie-card.compact {
    grid-template-columns: 104px 1fr;
  }

  .movie-card.compact .card-cover {
    min-height: 156px;
  }

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

  .filter-selects select {
    width: 100%;
  }

  .page-hero {
    border-radius: 24px;
    padding: 30px 22px;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-shell {
    padding: 28px 0 40px;
  }

  .detail-layout {
    gap: 24px;
  }

  .play-ring {
    width: 70px;
    height: 70px;
  }

  .text-panel {
    padding: 22px;
  }
}
