:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-900: #78350f;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
  --container: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: linear-gradient(180deg, var(--amber-50), #ffffff 34%, #ffffff);
  min-width: 320px;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(245, 158, 11, 0.22);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(var(--container), calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-900));
  box-shadow: 0 12px 28px rgba(180, 83, 9, 0.32);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--amber-700), var(--amber-900));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: var(--slate-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-700);
}

.mobile-toggle {
  width: 42px;
  height: 42px;
  display: none;
  border: 0;
  border-radius: 999px;
  background: var(--amber-100);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--amber-900);
  border-radius: 999px;
}

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

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

.mobile-link {
  padding: 12px 10px;
  border-radius: 12px;
  color: var(--slate-700);
  font-weight: 650;
}

.mobile-link:hover {
  color: var(--amber-700);
  background: var(--amber-50);
}

.hero {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  background: var(--slate-900);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.66) 45%, rgba(15, 23, 42, 0.2)), var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.65s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-content {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 56px;
  position: relative;
  z-index: 2;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--amber-300);
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(252, 211, 77, 0.28);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  margin: 22px 0 8px;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-title.as-text {
  font-weight: 800;
}

.hero-movie {
  display: block;
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.1;
}

.hero-copy p {
  margin: 0;
  max-width: 650px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 32px;
}

.hero-meta span {
  padding: 7px 13px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button-primary,
.button-glass,
.button-ghost,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button-primary {
  color: #ffffff;
  background: var(--amber-600);
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.36);
}

.button-primary:hover {
  transform: translateY(-2px);
  background: var(--amber-700);
}

.button-glass {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.button-glass:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
}

.button-ghost,
.more-link {
  color: var(--amber-800);
  background: var(--amber-100);
  border: 0;
  cursor: pointer;
}

.button-ghost:hover,
.more-link:hover {
  color: #ffffff;
  background: var(--amber-700);
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, var(--amber-100), var(--slate-200));
}

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

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

.hero-dot.is-active {
  width: 32px;
  background: var(--amber-400);
}

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

.section {
  padding: 72px 0;
}

.section-narrow {
  padding: 32px 0 0;
}

.section-soft {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100vw - var(--container)) / 2));
  padding-right: max(16px, calc((100vw - var(--container)) / 2));
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.5), rgba(255, 255, 255, 0.85));
}

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

.section-heading h2,
.page-hero h1,
.prose-section h2 {
  margin: 10px 0 8px;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.filter-head p {
  margin: 0;
  color: var(--slate-500);
  line-height: 1.8;
}

.home-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.home-search label {
  display: grid;
  gap: 8px;
  color: var(--slate-700);
  font-weight: 800;
}

.home-search input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  padding: 0 16px;
  outline: none;
  background: #ffffff;
  color: var(--slate-800);
}

.home-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

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

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

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
}

.movie-card.is-hidden {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), var(--slate-100));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

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

.quality-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
}

.quality-badge {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: var(--amber-600);
}

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.88);
  color: #ffffff;
  background: rgba(217, 119, 6, 0.92);
  border-radius: 999px;
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.movie-card:hover .play-float {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-500);
  font-size: 13px;
}

.card-body h2 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.28;
  color: var(--slate-900);
}

.card-body h2 a:hover {
  color: var(--amber-700);
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--amber-800);
  background: var(--amber-100);
  font-size: 12px;
  font-weight: 700;
}

.compact-card .card-body p {
  min-height: 0;
}

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

.category-card a {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: end;
  overflow: hidden;
  border-radius: 26px;
  color: #ffffff;
  background: var(--slate-900);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.9));
}

.category-card a:hover img {
  transform: scale(1.05);
  opacity: 0.75;
}

.category-card div {
  position: relative;
  z-index: 2;
  padding: 22px;
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

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

.mini-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--amber-100);
  background: rgba(255, 255, 255, 0.14);
}

.page-hero {
  background: radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.24), transparent 30%), linear-gradient(135deg, var(--slate-900), #1f2937);
  color: #ffffff;
}

.small-hero {
  padding: 76px max(16px, calc((100vw - var(--container)) / 2));
}

.small-hero h1 {
  color: #ffffff;
}

.small-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--amber-300);
}

.filter-panel {
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
}

.filter-head {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

.filter-head h2 {
  margin: 0;
  color: var(--slate-900);
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr)) auto;
  gap: 14px;
  align-items: end;
}

.filter-controls label {
  display: grid;
  gap: 8px;
  color: var(--slate-700);
  font-size: 14px;
  font-weight: 800;
}

.no-result {
  margin: 18px 0 0;
  padding: 16px;
  border-radius: 16px;
  color: var(--amber-900);
  background: var(--amber-100);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: var(--slate-900);
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.48)), var(--detail-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.detail-shell {
  position: relative;
  z-index: 2;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 72px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, var(--amber-100), var(--slate-200));
}

.detail-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.detail-meta div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.detail-meta dt {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.detail-meta dd {
  margin: 4px 0 0;
  font-weight: 800;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.68));
  cursor: pointer;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--amber-600);
  box-shadow: 0 20px 50px rgba(217, 119, 6, 0.42);
  font-size: 32px;
}

.player-title {
  font-size: 18px;
  font-weight: 900;
}

.prose-section {
  max-width: 900px;
}

.prose-section p {
  color: var(--slate-700);
  font-size: 17px;
  line-height: 2;
}

.site-footer {
  color: #cbd5e1;
  background: var(--slate-900);
}

.footer-shell {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-logo .brand-text {
  color: #ffffff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.footer-brand p {
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-links h2 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 18px;
}

.footer-links a:hover {
  color: var(--amber-300);
}

.footer-bottom {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  text-align: center;
}

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

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

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

  .hero-poster {
    display: none;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .nav-shell {
    height: 64px;
  }

  .brand-text {
    font-size: 19px;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-content {
    gap: 0;
  }

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

  .hero-actions,
  .section-heading,
  .home-search {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

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

  .card-body {
    padding: 13px;
  }

  .card-body h2 {
    font-size: 16px;
  }

  .card-body p {
    font-size: 13px;
  }

  .filter-controls,
  .detail-layout,
  .detail-meta,
  .footer-shell {
    grid-template-columns: 1fr;
  }

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

  .section {
    padding: 48px 0;
  }

  .small-hero {
    padding-top: 52px;
    padding-bottom: 52px;
  }
}

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

  .hero-meta span {
    font-size: 13px;
  }

  .player-icon {
    width: 68px;
    height: 68px;
  }
}
