:root {
  --color-slate-950: #020617;
  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748b;
  --color-slate-200: #e2e8f0;
  --color-slate-100: #f1f5f9;
  --color-gray-50: #f9fafb;
  --color-white: #ffffff;
  --color-rose-600: #e11d48;
  --color-rose-500: #f43f5e;
  --color-rose-100: #ffe4e6;
  --color-orange-400: #fb923c;
  --shadow-soft: 0 14px 35px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 8px 24px rgba(15, 23, 42, 0.10);
  --radius-lg: 18px;
  --radius-md: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #111827;
  background: var(--color-gray-50);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--color-white);
  background: linear-gradient(90deg, var(--color-slate-900), var(--color-slate-800), var(--color-slate-900));
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.28);
}

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

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

.brand-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-rose-500), var(--color-orange-400));
  box-shadow: 0 8px 18px rgba(244, 63, 94, 0.35);
  font-size: 15px;
}

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

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

.brand-subtitle {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #e5e7eb;
  font-size: 15px;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #fb7185;
}

.header-search {
  position: relative;
  width: 260px;
}

.header-search input,
.mobile-search input,
.search-panel input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  padding: 10px 16px 10px 42px;
  color: var(--color-white);
  background: rgba(51, 65, 85, 0.95);
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: rgba(244, 63, 94, 0.65);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.16);
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  color: #94a3b8;
  transform: translateY(-50%);
}

.menu-button {
  display: none;
  border: 0;
  color: var(--color-white);
  background: transparent;
  font-size: 26px;
}

.mobile-nav {
  display: none;
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  background: var(--color-slate-800);
}

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

.mobile-search {
  display: flex;
  gap: 10px;
}

.mobile-search input {
  padding: 10px 14px;
  color: var(--color-white);
  background: var(--color-slate-700);
}

.mobile-search button,
.btn-primary,
.btn-secondary,
.search-submit {
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mobile-search button,
.btn-primary,
.search-submit {
  color: var(--color-white);
  background: var(--color-rose-500);
}

.mobile-search button {
  padding: 0 18px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
}

.btn-primary:hover,
.search-submit:hover,
.mobile-search button:hover {
  background: var(--color-rose-600);
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.26);
  transform: translateY(-1px);
}

.btn-secondary {
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.25);
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.14);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  color: var(--color-white);
  background: linear-gradient(90deg, var(--color-slate-900), var(--color-slate-700));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-slide::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.12));
}

.hero-content-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  z-index: 2;
}

.hero-content {
  max-width: 720px;
}

.eyebrow,
.card-category,
.page-kicker,
.detail-category {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--color-white);
  background: var(--color-rose-500);
  font-size: 13px;
  font-weight: 700;
}

.eyebrow,
.detail-category {
  padding: 6px 12px;
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 650px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.hero-duration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #cbd5e1;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--color-rose-500);
}

.section {
  padding: 54px 0;
}

.section-tinted {
  background: linear-gradient(90deg, #fff1f2, #fff7ed);
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.section-title h2,
.page-title {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.section-icon {
  color: var(--color-rose-500);
  font-size: 28px;
}

.view-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-rose-600);
  font-weight: 700;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
  transform: translateY(-4px);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111827;
}

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

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

.card-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.04));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.card-category {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 9px;
  font-size: 12px;
}

.card-duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--color-white);
  background: rgba(0, 0, 0, 0.76);
  font-size: 12px;
}

.card-body {
  padding: 17px;
}

.card-body h3 {
  margin: 0 0 8px;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-body h3 a:hover {
  color: var(--color-rose-600);
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #4b5563;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 25px;
  margin-bottom: 12px;
}

.card-tags span,
.detail-tags span {
  border-radius: 999px;
  color: #4b5563;
  background: #f3f4f6;
  font-size: 12px;
}

.card-tags span {
  padding: 3px 8px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #6b7280;
  font-size: 12px;
}

.horizontal-scroll {
  overflow-x: auto;
  padding-bottom: 10px;
}

.horizontal-row {
  display: flex;
  gap: 24px;
}

.horizontal-row .movie-card {
  width: 310px;
  flex: 0 0 auto;
}

.home-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 30px;
}

.update-list,
.rank-mini-list,
.rank-page-list {
  display: grid;
  gap: 16px;
}

.update-item {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.update-item:hover {
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
  transform: translateY(-2px);
}

.update-cover {
  position: relative;
  min-height: 132px;
  overflow: hidden;
}

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

.update-body {
  padding: 18px;
}

.update-body h3 {
  margin: 8px 0 8px;
  font-size: 20px;
}

.update-body p {
  margin: 0 0 10px;
  color: #4b5563;
}

.category-stack {
  display: grid;
  gap: 18px;
}

.category-tile,
.category-overview-card {
  display: block;
  border-radius: var(--radius-lg);
  color: var(--color-white);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile {
  padding: 24px;
}

.category-overview-card {
  overflow: hidden;
  background: var(--color-white);
  color: #111827;
}

.category-tile:hover,
.category-overview-card:hover {
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
  transform: translateY(-3px);
}

.tile-rose,
.tile-red,
.tile-pink {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
}

.tile-orange {
  background: linear-gradient(135deg, #fb923c, #f97316);
}

.tile-blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.tile-purple {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.tile-green {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.tile-slate {
  background: linear-gradient(135deg, #475569, #0f172a);
}

.category-tile h3,
.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 23px;
}

.category-tile p,
.category-overview-card p {
  margin: 0 0 16px;
  opacity: 0.92;
}

.category-count {
  font-weight: 800;
}

.page-hero {
  color: var(--color-white);
  background: linear-gradient(90deg, var(--color-slate-900), var(--color-slate-700));
  padding: 58px 0;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #d1d5db;
  font-size: 18px;
}

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

.category-overview-head {
  padding: 24px;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: #e5e7eb;
}

.category-preview img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.filter-panel,
.search-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.filter-panel {
  grid-template-columns: minmax(240px, 1fr) 180px 180px auto;
  align-items: center;
}

.filter-input,
.filter-select {
  padding: 12px 15px;
  color: #111827;
  border-color: #e5e7eb;
  background: #f9fafb;
}

.filter-count {
  color: #475569;
  font-weight: 700;
  white-space: nowrap;
}

.search-panel {
  grid-template-columns: minmax(260px, 1fr) auto;
}

.search-panel input {
  padding: 13px 18px;
  border-color: #e5e7eb;
  background: #f9fafb;
}

.search-submit {
  padding: 0 26px;
}

.search-status {
  margin-bottom: 22px;
  color: #475569;
  font-weight: 700;
}

.rank-mini-item,
.rank-row {
  display: grid;
  align-items: center;
  border-radius: var(--radius-md);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-mini-item {
  grid-template-columns: 42px 82px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px;
}

.rank-mini-item:hover,
.rank-row:hover {
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
  transform: translateY(-2px);
}

.rank-mini-item img {
  width: 82px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-number {
  color: var(--color-rose-600);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.rank-title {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-views {
  color: #64748b;
  font-size: 13px;
}

.rank-row {
  grid-template-columns: 72px 126px minmax(0, 1fr) 130px 130px;
  gap: 16px;
  padding: 13px;
}

.rank-row img {
  width: 126px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-row h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-row p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--color-rose-600);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 30px;
  align-items: start;
}

.panel {
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.player-panel {
  overflow: hidden;
  margin-bottom: 24px;
}

.video-player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-player video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay,
.player-loading,
.player-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--color-white);
  background: rgba(0, 0, 0, 0.62);
  text-align: center;
}

.player-overlay {
  border: 0;
  width: 100%;
}

.video-player.is-playing .player-overlay,
.player-loading,
.player-error {
  display: none;
}

.video-player.is-loading .player-loading,
.video-player.has-error .player-error {
  display: grid;
}

.player-play-icon {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-rose-500), var(--color-orange-400));
  box-shadow: 0 16px 34px rgba(244, 63, 94, 0.36);
  font-size: 28px;
}

.player-caption {
  font-weight: 800;
}

.player-loading span {
  display: block;
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.28);
  border-top-color: var(--color-orange-400);
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.detail-body {
  padding: 26px;
}

.detail-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.detail-heading h1 {
  margin: 12px 0 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.18;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 13px 20px;
  margin: 18px 0 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e5e7eb;
  color: #475569;
}

.detail-section {
  margin: 0 0 26px;
}

.detail-section h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 21px;
}

.detail-section p {
  margin: 0;
  color: #374151;
  white-space: pre-line;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.detail-tags span {
  padding: 7px 11px;
}

.sidebar {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.sidebar h2 {
  margin: 0 0 18px;
  font-size: 23px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: #f9fafb;
}

.related-item img {
  width: 118px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
}

.related-item h3 {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-item p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-brand strong {
  display: block;
  color: var(--color-white);
  font-size: 20px;
}

.footer-brand p,
.footer-main p {
  margin: 0;
}

.footer-main > p {
  margin-top: 16px;
  color: #94a3b8;
}

.footer-note {
  color: #fb7185 !important;
  font-weight: 700;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--color-white);
  font-size: 17px;
}

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

.site-footer a:hover {
  color: #fb7185;
}

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

.footer-bottom p {
  margin: 0;
}

.empty-state {
  padding: 60px 20px;
  border-radius: var(--radius-lg);
  color: #64748b;
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  text-align: center;
}

@media (max-width: 1024px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-button {
    display: block;
  }

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

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

  .sidebar {
    position: static;
  }

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

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

  .hero {
    height: 540px;
  }

  .hero-actions,
  .section-heading,
  .detail-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .horizontal-row .movie-card {
    width: 270px;
  }

  .update-item,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .update-cover,
  .rank-row img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .rank-row {
    gap: 8px;
  }

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

  .search-submit {
    min-height: 46px;
  }

  .related-item {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .related-item img {
    width: 104px;
    height: 66px;
  }
}

@media (max-width: 520px) {
  .brand-name {
    font-size: 18px;
  }

  .brand-subtitle {
    display: none;
  }

  .hero {
    height: 500px;
  }

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

  .rank-mini-item {
    grid-template-columns: 38px 74px minmax(0, 1fr);
  }

  .rank-mini-item .rank-views {
    display: none;
  }
}
