:root {
  --bg-page: #f8fafc;
  --bg-panel: #ffffff;
  --bg-dark: #0f172a;
  --bg-deep: #1c1917;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  --line: #e2e8f0;
  --amber: #f59e0b;
  --orange: #f97316;
  --rose: #f43f5e;
  --blue: #3b82f6;
  --teal: #14b8a6;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: 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 {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--text-light);
  background: linear-gradient(90deg, #1e293b, #292524, #1e293b);
  border-bottom: 1px solid rgba(245, 158, 11, 0.22);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 25px rgba(249, 115, 22, 0.34);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  margin-top: 2px;
  color: #cbd5e1;
  font-size: 12px;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  color: #e2e8f0;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.10);
  color: #fbbf24;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

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

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

.hero {
  position: relative;
  overflow: hidden;
  color: var(--text-light);
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.22), transparent 32%), linear-gradient(135deg, #0f172a, #1c1917 52%, #1e293b);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.23;
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  padding: 72px 0;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 48px;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 0.65s ease both;
}

.hero-eyebrow,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: #fde68a;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 4vw, 38px);
}

.hero p {
  max-width: 680px;
  margin: 0 0 26px;
  color: #cbd5e1;
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.btn-primary,
.btn-secondary,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.25s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.28);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.btn-soft {
  color: #9a3412;
  background: #fff7ed;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-soft:hover {
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
}

.hero-glow {
  position: absolute;
  inset: -8px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.84), rgba(249, 115, 22, 0.78));
  filter: blur(18px);
  opacity: 0.74;
  transition: opacity 0.3s ease;
}

.hero-visual a:hover .hero-glow {
  opacity: 0.98;
}

.hero-visual img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.42);
}

.hero-controls {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: -36px;
  padding-bottom: 44px;
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

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

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

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

.section.wide-band {
  width: 100%;
  max-width: none;
  background: linear-gradient(135deg, #fff7ed, #fff1f2);
}

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

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

.section-title-group h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-title-group p,
.page-hero p,
.detail-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--text-muted);
}

.icon-badge {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), #ec4899);
  box-shadow: 0 14px 28px rgba(244, 63, 94, 0.2);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.movie-poster {
  position: relative;
  display: block;
  background: #111827;
}

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

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

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

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

.movie-meta-line,
.compact-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.movie-meta-line span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #cbd5e1;
}

.movie-card h3,
.compact-card h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card h3 a:hover,
.compact-card h3 a:hover,
.breadcrumb a:hover {
  color: var(--orange);
}

.movie-card p,
.compact-card p {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.movie-card .tag-row span {
  color: #475569;
  background: #f1f5f9;
}

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

.category-card {
  min-height: 184px;
  padding: 24px;
  border-radius: var(--radius-md);
  color: #ffffff;
  background: linear-gradient(135deg, #1e293b, #334155);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  transition: 0.25s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #92400e, #f97316);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #0f766e, #06b6d4);
}

.category-card:nth-child(4n) {
  background: linear-gradient(135deg, #9f1239, #ec4899);
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.category-card p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.category-card span {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
}

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

.compact-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.rank-num {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.compact-thumb img {
  width: 92px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.page-hero {
  color: var(--text-light);
  background: radial-gradient(circle at top right, rgba(249, 115, 22, 0.24), transparent 32%), linear-gradient(135deg, #0f172a, #292524);
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.page-hero h1,
.page-hero p {
  color: #ffffff;
}

.page-hero p {
  color: #cbd5e1;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 16px;
  align-items: end;
  margin-bottom: 30px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.filter-panel label,
.filter-selects label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--text-main);
  background: #f8fafc;
  font: inherit;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 0;
  color: #64748b;
  font-size: 14px;
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
}

.detail-main,
.detail-side,
.text-panel {
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.detail-main {
  overflow: hidden;
}

.detail-title {
  padding: 28px 28px 0;
}

.detail-meta {
  margin-top: 14px;
}

.player-wrap {
  position: relative;
  margin-top: 28px;
  background: #020617;
}

.player-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: #ffffff;
  background-position: center;
  background-size: cover;
  cursor: pointer;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(12, 10, 9, 0.52));
}

.player-cover[hidden] {
  display: none;
}

.player-play {
  position: relative;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36);
  font-size: 30px;
}

.text-panel {
  margin: 28px;
  padding: 28px;
}

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

.text-panel p {
  margin: 0 0 18px;
  color: #475569;
}

.detail-side {
  padding: 22px;
  align-self: start;
  position: sticky;
  top: 110px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
}

.side-title {
  margin: 18px 0 10px;
  font-size: 22px;
}

.side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.side-tags a,
.side-tags span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 800;
}

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

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1c1917);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 28px;
}

.footer-brand {
  display: inline-flex;
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 900;
  color: #fbbf24;
}

.footer-inner p {
  max-width: 620px;
  margin: 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 32px;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: #64748b;
  text-align: center;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .detail-side {
    position: static;
  }
}

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

  .brand-name {
    font-size: 20px;
  }

  .main-nav {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .hero-inner {
    min-height: auto;
    padding: 48px 0 68px;
  }

  .hero-slide,
  .hero-slide.is-active {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero p {
    font-size: 16px;
  }

  .section {
    padding: 44px 0;
  }

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

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 44px 72px minmax(0, 1fr);
    gap: 12px;
  }

  .compact-thumb img {
    width: 72px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .movie-grid.three,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-soft {
    width: 100%;
  }

  .text-panel,
  .detail-title {
    margin: 18px;
    padding: 20px;
  }
}
