:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-2: #1e293b;
  --border: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --accent-dark: #78350f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

.page-stack {
  padding: 48px 0 72px;
  display: grid;
  gap: 56px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

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

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

.brand-mark,
.footer-logo span {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 12px;
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.35);
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.brand-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  margin-top: 3px;
}

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

.nav-link {
  color: var(--muted-2);
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease;
  white-space: nowrap;
}

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

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-nav input,
.filter-panel input,
.search-page-panel input {
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search input {
  width: 240px;
  padding: 10px 14px;
}

.top-search input:focus,
.mobile-nav input:focus,
.filter-panel input:focus,
.search-page-panel input:focus {
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
  background: rgba(2, 6, 23, 0.95);
}

.top-search button,
.mobile-nav button,
.search-page-panel button {
  border: 0;
  color: #111827;
  background: var(--accent);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(15, 23, 42, 0.85);
  border-radius: 12px;
  padding: 9px 12px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-nav a {
  padding: 10px 12px;
  color: var(--muted-2);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.mobile-nav form {
  display: flex;
  gap: 8px;
}

.mobile-nav input {
  width: 100%;
  padding: 10px 12px;
}

.hero {
  position: relative;
  height: clamp(430px, 58vw, 640px);
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-media {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e293b, #020617);
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 36%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.58) 48%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0 0 72px;
  max-width: 1180px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  margin-bottom: 16px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}

.hero h1,
.hero h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
}

.hero p {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted-2);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #111827;
  background: var(--accent);
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.3);
}

.ghost-button {
  color: var(--text);
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid var(--border);
}

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

.primary-button:hover {
  background: var(--accent-2);
  box-shadow: 0 22px 48px rgba(245, 158, 11, 0.42);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 30px;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

.content-section {
  display: grid;
  gap: 22px;
}

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

.section-head h2,
.article-card h2,
.site-footer h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.04em;
}

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

.section-head a,
.text-link {
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}

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

.all-grid {
  align-items: start;
}

.movie-card {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(30, 41, 59, 0.92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), 0 0 42px rgba(245, 158, 11, 0.12);
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 24rem);
}

.poster-frame img,
.list-poster img,
.category-cover img,
.tile-bg img,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-frame img,
.feature-main:hover .poster-frame img,
.category-tile:hover .tile-bg img,
.category-overview-card:hover .category-cover img {
  transform: scale(1.08);
}

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  color: #111827;
  background: var(--accent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #111827;
  background: var(--accent);
  border-radius: 10px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-body h2,
.list-body h2,
.feature-main h2,
.category-overview-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
}

.card-body p,
.list-body p,
.feature-main p,
.category-overview-card p,
.article-card p,
.detail-info p {
  color: var(--muted-2);
  line-height: 1.75;
}

.card-body p {
  min-height: 50px;
  margin: 8px 0 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.meta-tags span {
  color: var(--muted-2);
  background: rgba(30, 41, 59, 0.88);
  border: 1px solid var(--border);
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.meta-tags span:first-child {
  color: var(--accent);
}

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

.feature-main {
  overflow: hidden;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-main a {
  display: grid;
  grid-template-columns: 46% 1fr;
  gap: 24px;
  height: 100%;
  padding: 18px;
}

.large-poster {
  min-height: 360px;
  border-radius: 16px;
}

.feature-main p {
  margin: 14px 0 18px;
}

.side-list,
.ranking-list,
.wide-list {
  display: grid;
  gap: 14px;
}

.list-card {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.list-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(30, 41, 59, 0.9);
}

.list-card a {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 16px;
  align-items: stretch;
}

.list-poster {
  min-height: 112px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(15, 23, 42, 0.94));
}

.list-body {
  padding: 14px 14px 14px 0;
}

.list-body h2 {
  display: flex;
  gap: 10px;
  align-items: center;
}

.list-body p {
  margin: 6px 0 10px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.list-rank {
  flex: 0 0 auto;
  min-width: 30px;
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  color: #111827;
  background: var(--accent);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 900;
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0f172a;
  border: 1px solid var(--border);
}

.category-tile a {
  display: flex;
  height: 100%;
  align-items: flex-end;
  padding: 18px;
}

.tile-bg {
  position: absolute;
  inset: 0;
  opacity: 0.48;
  background: linear-gradient(135deg, #1e293b, #020617);
}

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

.category-tile div:last-child {
  position: relative;
}

.category-tile h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-tile p {
  margin: 0;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.55;
}

.sub-hero {
  position: relative;
  padding: 74px 0 68px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 10%, rgba(245, 158, 11, 0.18), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
  border-bottom: 1px solid var(--border);
}

.sub-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 6vw, 58px);
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.sub-hero p {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted-2);
  font-size: 18px;
  line-height: 1.75;
}

.filter-panel,
.search-page-panel {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-panel input,
.search-page-panel input {
  width: 100%;
  padding: 13px 16px;
}

.filter-panel a {
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}

.search-page-panel form {
  display: flex;
  width: 100%;
  gap: 10px;
}

.search-results {
  display: grid;
  gap: 20px;
}

.search-empty {
  padding: 28px;
  color: var(--muted-2);
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.category-overview-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  grid-column: span 1;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-cover {
  height: 210px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(15, 23, 42, 0.92));
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.sample-links a {
  color: var(--muted-2);
  background: rgba(30, 41, 59, 0.88);
  border: 1px solid var(--border);
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 44px 0 58px;
  background: #020617;
  border-bottom: 1px solid var(--border);
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  filter: blur(8px);
  transform: scale(1.06);
  background: #0f172a;
}

.detail-bg:after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #020617, rgba(2, 6, 23, 0.72), #020617),
    linear-gradient(0deg, #020617, transparent 70%);
}

.detail-head {
  position: relative;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent);
}

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

.detail-poster {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-info p {
  max-width: 820px;
  margin: 18px 0 0;
  font-size: 18px;
}

.detail-tags {
  margin-top: 20px;
}

.player-card,
.article-card {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.16), transparent 18rem),
    #020617;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--text);
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.54), rgba(2, 6, 23, 0.12));
  border: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  color: #111827;
  background: var(--accent);
  border-radius: 999px;
  font-size: 30px;
  box-shadow: 0 0 45px rgba(245, 158, 11, 0.45);
}

.player-overlay strong {
  font-size: 18px;
  letter-spacing: 0.08em;
}

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

.article-card {
  padding: 28px;
}

.article-card h2 {
  margin-bottom: 12px;
}

.article-card p {
  margin: 0;
  font-size: 17px;
}

.site-footer {
  margin-top: auto;
  background: #020617;
  border-top: 1px solid var(--border);
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
}

.footer-brand p,
.site-footer li,
.footer-bottom {
  color: var(--muted);
}

.footer-brand p {
  max-width: 480px;
  line-height: 1.75;
}

.site-footer h2 {
  margin-bottom: 14px;
  font-size: 16px;
}

.site-footer ul {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 18px 0;
  text-align: center;
  font-size: 14px;
}

.is-hidden-by-filter {
  display: none;
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .top-search {
    margin-left: auto;
  }

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

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

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

  .brand-copy em,
  .top-search {
    display: none;
  }

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

  .hero-arrow {
    display: none;
  }

  .featured-grid,
  .feature-main a,
  .detail-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .large-poster {
    min-height: auto;
  }

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

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

  .section-head,
  .filter-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .list-card a {
    grid-template-columns: 98px 1fr;
  }

  .list-poster {
    min-height: 108px;
  }
}

@media (max-width: 560px) {
  .container,
  .header-inner,
  .mobile-nav,
  .footer-inner,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

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

  .hero {
    height: 520px;
  }

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

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

  .hero-actions,
  .detail-actions,
  .search-page-panel form,
  .mobile-nav form {
    flex-direction: column;
    align-items: stretch;
  }

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .category-cover {
    height: 240px;
  }

  .article-card {
    padding: 22px;
  }
}
