:root {
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.76);
  --line: #334155;
  --text: #ffffff;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --rose: #f43f5e;
  --orange: #f97316;
  --yellow: #facc15;
  --green: #22c55e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 38%), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(51, 65, 85, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  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 {
  font-size: 24px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  color: white;
  box-shadow: 0 12px 30px rgba(244, 63, 94, 0.35);
}

.brand-mark svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

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

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.92);
  color: white;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: white;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-top: 1px solid rgba(51, 65, 85, 0.75);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  margin: 4px 0;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: linear-gradient(135deg, #ea580c, #dc2626 48%, #be185d);
}

.hero-slider,
.hero-slide {
  min-height: 640px;
}

.hero-slide {
  display: none;
  position: relative;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 54px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 112px;
}

.hero-slide.active {
  display: grid;
  animation: fadeIn 0.75s ease both;
}

.hero-bg-img {
  position: absolute;
  inset: -8% -10%;
  width: 120%;
  height: 120%;
  object-fit: cover;
  filter: blur(28px) saturate(1.18);
  opacity: 0.28;
  transform: scale(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.78), rgba(15, 23, 42, 0.24) 52%, rgba(2, 6, 23, 0.82));
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-copy h1 {
  max-width: 860px;
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
}

.hero-summary {
  max-width: 760px;
  margin: 0 0 24px;
  color: #fff7ed;
  font-size: clamp(17px, 2vw, 22px);
}

.eyebrow {
  margin: 0 0 12px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-tags,
.card-tags,
.tag-link-row,
.detail-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.card-tags span,
.tag-link-row a,
.detail-meta-list span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  backdrop-filter: blur(8px);
}

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

.left-actions {
  justify-content: flex-start;
}

.primary-button,
.ghost-button,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.quick-search button {
  border: 0;
  color: #9a3412;
  background: white;
  box-shadow: 0 18px 40px rgba(255, 255, 255, 0.18);
}

.ghost-button {
  border: 2px solid rgba(255, 255, 255, 0.75);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-poster span {
  display: block;
  padding: 14px 18px;
  color: #ffedd5;
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-category-row {
  position: absolute;
  left: 50%;
  bottom: 92px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: min(900px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-chip {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  color: white;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

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

.section-heading h2,
.intro-panel h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading a {
  color: #93c5fd;
  font-weight: 800;
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  align-items: center;
  gap: 28px;
}

.intro-panel p,
.page-hero p,
.detail-one-line,
.text-panel p,
.site-footer p {
  color: var(--muted);
}

.quick-search {
  padding: 24px;
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.8);
  box-shadow: var(--shadow);
}

.quick-search label,
.filter-grid label {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.quick-search div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.quick-search input,
.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(71, 85, 105, 0.88);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  color: white;
  background: #334155;
}

.quick-search input:focus,
.filter-grid input:focus,
.filter-grid select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

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

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

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

.movie-card {
  min-width: 0;
  border: 1px solid rgba(51, 65, 85, 0.75);
  border-radius: 22px;
  background: var(--panel-soft);
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.012);
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 24px 60px rgba(59, 130, 246, 0.18);
}

.movie-card-link {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.poster-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #020617;
}

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

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

.type-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.type-pill {
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  color: white;
  background: rgba(2, 6, 23, 0.68);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  color: #7f1d1d;
  background: linear-gradient(135deg, #fef3c7, #f97316);
}

.movie-card-body {
  display: grid;
  gap: 8px;
  padding: 16px 16px 8px;
}

.card-meta-row {
  display: flex;
  gap: 8px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0;
  color: white;
  font-size: 19px;
  line-height: 1.3;
}

.movie-card p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-tags {
  padding: 0 16px 16px;
  margin-top: auto;
}

.card-tags span {
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.65);
}

.category-section {
  padding-top: 30px;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--green), #047857);
  box-shadow: var(--shadow);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.42s ease;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.category-card strong,
.category-card em {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-card strong {
  bottom: 76px;
  font-size: 26px;
  line-height: 1.15;
}

.category-card em {
  bottom: 18px;
  color: #d1fae5;
  font-size: 13px;
  font-style: normal;
}

.ranking-band {
  background: linear-gradient(135deg, rgba(136, 19, 55, 0.92), rgba(88, 28, 135, 0.72));
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 350px;
  display: grid;
  align-items: center;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.9), rgba(190, 24, 93, 0.82));
}

.page-hero > div {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.page-hero p {
  max-width: 820px;
  font-size: 18px;
}

.slim-hero {
  min-height: 300px;
}

.category-hero {
  background: radial-gradient(circle at 20% 0%, rgba(34, 197, 94, 0.28), transparent 36%), linear-gradient(135deg, #0f172a, #14532d);
}

.ranking-hero {
  background: linear-gradient(135deg, #7f1d1d, #581c87);
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
  filter: blur(10px) saturate(1.25);
}

.filter-panel {
  padding-bottom: 20px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(51, 65, 85, 0.78);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.88);
  box-shadow: var(--shadow);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.78);
}

.category-cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

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

.category-cover span {
  position: absolute;
  inset: auto 10px 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  font-weight: 900;
}

.category-overview-card h2 {
  margin: 4px 0 8px;
  font-size: 26px;
}

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

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

.category-sample-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
}

.breadcrumb {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--soft);
  font-size: 14px;
}

.breadcrumb a {
  color: #bfdbfe;
}

.detail-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 42px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 28px;
  border: 1px solid rgba(51, 65, 85, 0.78);
  border-radius: 30px;
  background: radial-gradient(circle at 80% 0%, rgba(244, 63, 94, 0.2), transparent 38%), rgba(30, 41, 59, 0.78);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
  margin: 18px 0;
  font-size: 20px;
}

.detail-meta-list {
  margin-bottom: 18px;
}

.tag-link-row a {
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.18);
}

.player-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 30px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 26px;
  background: black;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.64));
}

.play-overlay[hidden] {
  display: none;
}

.play-overlay span {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 18px 44px rgba(244, 63, 94, 0.4);
  font-size: 32px;
}

.play-overlay strong {
  font-size: 22px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding-top: 24px;
  padding-bottom: 20px;
}

.text-panel {
  padding: 24px;
  border: 1px solid rgba(51, 65, 85, 0.74);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.76);
}

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

.text-panel p {
  margin: 0;
  font-size: 17px;
}

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

.info-table div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
}

.info-table dt {
  color: var(--soft);
  font-weight: 800;
}

.info-table dd {
  margin: 0;
  color: white;
}

.site-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.8);
  background: var(--bg-deep);
}

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

.footer-brand {
  margin-bottom: 14px;
  font-size: 20px;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

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

.site-footer a:hover {
  color: white;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(51, 65, 85, 0.75);
  color: var(--soft);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .filter-grid,
  .intro-panel,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .nav-toggle {
    display: inline-block;
  }

  .mobile-nav.open {
    display: block;
  }

  .hero,
  .hero-slider,
  .hero-slide {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 48px;
  }

  .hero-poster {
    width: min(260px, 78vw);
    margin: 0 auto;
    transform: none;
  }

  .hero-category-row {
    display: none;
  }

  .intro-panel,
  .filter-grid,
  .category-overview-grid,
  .detail-hero,
  .footer-grid,
  .info-table dl {
    grid-template-columns: 1fr;
  }

  .category-overview-card {
    grid-template-columns: 130px minmax(0, 1fr);
  }

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

  .detail-hero {
    padding: 18px;
  }

  .detail-poster {
    width: min(260px, 82vw);
  }

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

@media (max-width: 520px) {
  .nav-shell,
  .section-shell,
  .player-section,
  .detail-hero,
  .breadcrumb,
  .page-hero > div,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1280px);
  }

  .brand {
    font-size: 20px;
  }

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

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

  .quick-search div,
  .category-overview-card {
    grid-template-columns: 1fr;
  }
}
