:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --accent: #f59e0b;
  --rose: #e11d48;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

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(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.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-brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #334155, #020617);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
}

.brand-text strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.brand-text small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

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

.nav-link {
  font-size: 15px;
  color: #475569;
  font-weight: 700;
  padding: 22px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #0f172a;
  border-color: #0f172a;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  border: 0;
  background: #f1f5f9;
  border-radius: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #0f172a;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
  background: #ffffff;
}

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

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: #475569;
  font-weight: 700;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 530px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.52) 48%, rgba(2, 6, 23, 0.12));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 54px;
  transform: translateX(-50%);
  color: #ffffff;
}

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

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 820px;
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2.2vw, 23px);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.07);
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #e11d48);
  box-shadow: 0 14px 28px rgba(225, 29, 72, 0.32);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.btn.text {
  color: #ffffff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.25);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

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

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

.section {
  padding: 70px 0;
}

.section-white {
  background: #ffffff;
}

.soft-bg {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.intro-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 32px;
  align-items: center;
}

.intro-strip h2,
.section-heading h2,
.panel-head h2,
.ranking-copy h2,
.content-card h2,
.side-panel h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
}

.intro-strip p,
.ranking-copy p,
.page-hero p,
.category-overview-card p,
.content-card p {
  color: var(--muted);
  font-size: 16px;
}

.search-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.search-panel label {
  display: block;
  margin: 0 0 8px;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-box input {
  width: 100%;
  height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
  color: var(--text);
  background: #ffffff;
}

.search-box input:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.08);
}

.search-box button {
  height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  color: #ffffff;
  background: #0f172a;
  font-weight: 800;
  cursor: pointer;
}

.section-heading,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.section-heading span {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
}

.section-heading h2 {
  margin-right: auto;
}

.section-heading a,
.panel-head a,
.inline-link {
  color: #2563eb;
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

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

.movie-thumb {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e2e8f0;
}

.movie-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  color: #ffffff;
  font-weight: 900;
  border-radius: 999px;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 12px;
  background: rgba(225, 29, 72, 0.92);
  font-size: 13px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #e11d48);
}

.movie-info {
  padding: 16px;
}

.movie-meta {
  margin-bottom: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.movie-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: #cbd5e1;
}

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

.movie-card h3 a:hover {
  color: #e11d48;
}

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

.movie-card.horizontal {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: stretch;
}

.movie-card.horizontal .movie-thumb {
  aspect-ratio: auto;
  min-height: 158px;
}

.movie-card.horizontal .movie-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.movie-card.horizontal p {
  min-height: 0;
}

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

.panel-card,
.content-card,
.side-panel {
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.panel-card {
  padding: 24px;
}

.stack-list {
  display: grid;
  gap: 16px;
}

.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);
  padding: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #334155, #020617);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
}

.category-card strong,
.category-card em,
.category-icon {
  position: relative;
  z-index: 1;
  display: block;
}

.category-card strong {
  font-size: 21px;
  margin: 12px 0 8px;
}

.category-card em {
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
  font-size: 14px;
}

.category-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
}

.category-cover {
  position: absolute;
  inset: auto -8px -22px auto;
  width: 96px;
  height: 140px;
  opacity: 0.42;
  transform: rotate(8deg);
}

.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-block {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 42px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #b45309;
  background: #fef3c7;
  font-size: 13px;
  font-weight: 900;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.rank-list a {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.rank-list b {
  color: #e11d48;
}

.rank-list span {
  font-weight: 900;
}

.rank-list em {
  color: #64748b;
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  padding: 76px 0 54px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.36), transparent 32%), linear-gradient(135deg, #0f172a, #020617);
}

.page-hero h1 {
  margin: 0 0 14px;
  max-width: 900px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 26px;
}

.page-hero .search-panel {
  max-width: 720px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 18px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.category-preview {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 2 / 3;
}

.category-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 6px 0 8px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}

.filter-bar button {
  height: 38px;
  padding: 0 15px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #334155;
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.filter-bar button.active,
.filter-bar button:hover {
  color: #ffffff;
  background: #0f172a;
  border-color: #0f172a;
}

.filter-bar span {
  margin-left: auto;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  filter: blur(2px);
  transform: scale(1.03);
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.4));
}

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 38px;
  align-items: center;
  padding: 62px 0;
  color: #ffffff;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5.5vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-copy p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  align-items: start;
}

.player-panel {
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.22);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

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

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

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #e11d48);
  box-shadow: 0 16px 40px rgba(225, 29, 72, 0.34);
  font-size: 26px;
}

.content-card {
  padding: 28px;
}

.content-card h2 + p {
  margin-top: 12px;
}

.side-panel {
  padding: 24px;
}

.side-panel dl {
  margin: 18px 0 0;
  display: grid;
  gap: 14px;
}

.side-panel dt {
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.side-panel dd {
  margin: -10px 0 0;
  font-weight: 800;
}

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

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
}

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

.footer-logo {
  color: #ffffff;
  font-size: 22px;
}

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

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 10px 24px;
  align-content: start;
}

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

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

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

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

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

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

  .menu-toggle {
    display: flex;
  }

  .hero-slider {
    height: 74vh;
    min-height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .intro-strip,
  .two-columns,
  .ranking-block,
  .detail-layout,
  .detail-main,
  .footer-inner,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    padding: 42px 0;
  }

  .detail-poster {
    width: min(220px, 70vw);
  }

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

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

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

  .brand-text small {
    display: none;
  }

  .hero-content {
    bottom: 48px;
  }

  .hero-meta span,
  .detail-meta span {
    font-size: 12px;
  }

  .hero-actions {
    gap: 8px;
  }

  .btn {
    min-height: 40px;
    padding: 0 15px;
    font-size: 14px;
  }

  .section {
    padding: 46px 0;
  }

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

  .poster-grid,
  .large-grid,
  .wide-grid,
  .ranking-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.horizontal {
    grid-template-columns: 96px 1fr;
  }

  .movie-card.horizontal .movie-thumb {
    min-height: 140px;
  }

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

  .rank-list a {
    grid-template-columns: 36px 1fr;
  }

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