:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fff7f8;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #f43f5e;
  --primary-dark: #e11d48;
  --primary-soft: #ffe4e6;
  --accent: #ec4899;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --container: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

[hidden] {
  display: none !important;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(229, 231, 235, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 24px;
}

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

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 15px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 650;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

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

.mobile-toggle span {
  width: 20px;
  height: 2px;
  background: #111827;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav {
  display: none;
  padding: 8px 16px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.mobile-link {
  display: block;
  padding: 12px 8px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
}

.mobile-link.active,
.mobile-link:hover {
  color: var(--primary-dark);
  background: #fff1f2;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  background: radial-gradient(circle at 12% 18%, rgba(244, 63, 94, 0.24), transparent 32%),
    linear-gradient(135deg, #111827 0%, #351524 50%, #831843 100%);
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, #ffffff);
  pointer-events: none;
}

.hero-slider {
  position: relative;
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 56px;
  opacity: 0;
  transform: translateX(24px);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 120px 0 130px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #fff1f2;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.gradient-text {
  background: linear-gradient(120deg, #fb7185, #f0abfc 60%, #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 700px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

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

.btn-primary,
.btn-secondary,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 15px 28px rgba(244, 63, 94, 0.34);
}

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

.btn-secondary {
  color: #111827;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.btn-light {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255, 255, 255, 0.82);
}

.hero-tags a,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags a {
  background: rgba(255, 255, 255, 0.12);
}

.hero-poster {
  position: relative;
  z-index: 3;
  min-height: 520px;
  border-radius: 34px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.35);
  transform: rotate(1deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent 52%);
}

.hero-card-note {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  padding: 18px;
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.62);
  backdrop-filter: blur(14px);
}

.hero-card-note strong {
  display: block;
  font-size: 22px;
}

.hero-card-note span {
  color: rgba(255, 255, 255, 0.78);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 54px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

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

.hero-dot.active {
  width: 64px;
  background: #fff;
}

.section {
  padding: 82px 0;
}

.section-soft {
  background: linear-gradient(180deg, #fff, #fff7f8);
}

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

.section-heading h1,
.section-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(31px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.section-heading p {
  max-width: 760px;
  color: var(--muted);
  margin: 12px 0 0;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 22px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(229, 231, 235, 0.88);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: #fecdd3;
}

.category-eyebrow {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #fff1f2;
  font-size: 12px;
  font-weight: 800;
}

.category-card strong {
  display: block;
  margin: 14px 0 8px;
  font-size: 24px;
  line-height: 1.1;
}

.category-card em {
  display: block;
  color: #6b7280;
  font-style: normal;
  font-size: 14px;
}

.category-thumbs {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 6px;
}

.category-thumbs img {
  width: 54px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin: 0 0 30px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.search-box,
.select-row label {
  display: grid;
  gap: 8px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.search-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9fafb;
  color: #111827;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-input:focus,
.filter-select:focus {
  border-color: #fb7185;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.select-row {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.reset-filters {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  color: var(--primary-dark);
  background: #fff1f2;
  font-weight: 800;
  cursor: pointer;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border 0.22s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, #111827, #831843);
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 52%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.poster-year {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, 0.62);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(244, 63, 94, 0.86);
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

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

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card h3 a:hover {
  color: var(--primary-dark);
}

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

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

.tag-row span,
.detail-tags span {
  color: #be123c;
  background: #fff1f2;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.38fr);
  gap: 28px;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: #fecdd3;
  box-shadow: var(--soft-shadow);
}

.rank-no {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

.rank-info {
  display: grid;
  gap: 3px;
}

.rank-info strong {
  font-size: 17px;
}

.rank-info em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  padding: 80px 0 48px;
  background: radial-gradient(circle at 12% 12%, rgba(244, 63, 94, 0.12), transparent 30%), linear-gradient(180deg, #fff, #fff7f8);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
  margin: 0 0 18px;
}

.breadcrumb a:hover {
  color: var(--primary-dark);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

.detail-panel,
.side-panel {
  border-radius: 26px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.detail-panel {
  overflow: hidden;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #050816;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(136, 19, 55, 0.72));
  color: #fff;
  z-index: 2;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.player-cover span {
  position: relative;
  z-index: 2;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 24px 48px rgba(244, 63, 94, 0.38);
  font-size: 34px;
  padding-left: 5px;
}

.player-caption {
  position: absolute;
  left: 24px;
  bottom: 22px;
  right: 24px;
  z-index: 3;
  color: #fff;
  font-weight: 800;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.detail-content {
  padding: 30px;
}

.detail-title {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.detail-meta span {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f9fafb;
  color: #374151;
  font-weight: 750;
  font-size: 14px;
}

.detail-content h2 {
  margin: 30px 0 12px;
  font-size: 25px;
  line-height: 1.2;
}

.detail-content p {
  margin: 0;
  color: #4b5563;
  font-size: 17px;
}

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

.side-panel {
  position: sticky;
  top: 94px;
  padding: 20px;
}

.side-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.side-links {
  display: grid;
  gap: 10px;
}

.side-links a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #f9fafb;
  color: #374151;
  font-weight: 750;
}

.side-links a:hover {
  color: var(--primary-dark);
  background: #fff1f2;
}

.related-section {
  padding-top: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #111827;
  color: #e5e7eb;
  padding: 54px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p {
  max-width: 520px;
  color: #9ca3af;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
  margin-top: 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
}

@media (max-width: 1120px) {
  .movies-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-slide,
  .detail-layout,
  .rank-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .side-panel {
    position: static;
  }
}

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

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

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

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

  .hero-content {
    padding: 92px 0 118px;
  }

  .hero h1 {
    letter-spacing: -0.045em;
  }

  .section {
    padding: 58px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

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

  .select-row {
    display: grid;
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, var(--container));
  }

  .header-inner {
    min-height: 66px;
  }

  .brand {
    font-size: 19px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

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

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

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

  .movies-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-content {
    padding: 22px;
  }

  .player-cover span {
    width: 72px;
    height: 72px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
