
:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--slate-800);
  background: var(--slate-50);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  border-bottom: 1px solid rgba(148, 163, 184, 0.20);
  box-shadow: 0 20px 38px rgba(2, 6, 23, 0.30);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-icon,
.footer-brand span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-400), var(--cyan-600));
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.38);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-text strong {
  color: var(--white);
  font-size: 24px;
  letter-spacing: 0.02em;
}

.brand-text em {
  margin-top: 4px;
  color: var(--slate-400);
  font-style: normal;
  font-size: 12px;
}

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

.desktop-nav a,
.mobile-nav a {
  color: var(--slate-300);
  padding: 10px 14px;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--white);
  background: rgba(51, 65, 85, 0.72);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.72);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.20);
}

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

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

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
}

.hero-text {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 92px;
  max-width: 1180px;
}

.hero-text > * {
  max-width: 760px;
}

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

.hero-meta span,
.card-meta span:first-child,
.cover-label {
  display: inline-flex;
  align-items: center;
  color: var(--white);
  background: var(--cyan-500);
  border-radius: 999px;
  font-weight: 700;
}

.hero-meta span {
  padding: 7px 16px;
  font-size: 14px;
}

.hero-meta em {
  color: var(--slate-300);
  font-style: normal;
  font-size: 14px;
}

.hero-text h1,
.hero-text h2 {
  margin: 18px 0 18px;
  color: var(--white);
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-text p {
  margin: 0 0 28px;
  color: var(--slate-200);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.72;
}

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

.primary-button,
.ghost-button,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.quick-search button {
  color: var(--white);
  background: var(--cyan-500);
  box-shadow: 0 15px 32px rgba(6, 182, 212, 0.35);
}

.primary-button:hover,
.quick-search button:hover {
  transform: translateY(-2px);
  background: var(--cyan-600);
  box-shadow: 0 18px 38px rgba(6, 182, 212, 0.44);
}

.ghost-button {
  color: var(--white);
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(226, 232, 240, 0.25);
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.72);
}

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

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

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

.search-panel {
  background: var(--white);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.search-panel-inner {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  padding: 30px 0;
}

.search-panel h2 {
  margin: 0 0 8px;
  font-size: 28px;
  color: var(--slate-900);
}

.search-panel p,
.section-lead {
  margin: 0;
  color: var(--slate-600);
  line-height: 1.7;
}

.quick-search,
.filter-bar {
  display: flex;
  gap: 12px;
}

.quick-search input,
.filter-bar input,
.filter-bar select,
[data-category-search] {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--slate-800);
  background: var(--white);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.quick-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
[data-category-search]:focus {
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.section-block {
  padding: 66px 0;
}

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

.section-title-row h2,
.section-block > h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.dark-section .section-title-row h2,
.dark-section .section-more {
  color: var(--white);
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--cyan-600);
  font-weight: 800;
}

.section-more:hover {
  color: var(--cyan-500);
}

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

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  color: inherit;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-cover-wrap,
.movie-thumb,
.category-card {
  position: relative;
  overflow: hidden;
}

.movie-cover-wrap {
  aspect-ratio: 16 / 9;
  background: var(--slate-200);
}

.movie-cover,
.category-bg,
.player-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .movie-cover,
.category-card:hover .category-bg {
  transform: scale(1.10);
}

.movie-cover-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.40);
  transition: background 0.2s ease;
}

.movie-card:hover .movie-cover-mask {
  background: rgba(0, 0, 0, 0.25);
}

.play-circle,
.play-small,
.big-play {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: rgba(6, 182, 212, 0.92);
  border-radius: 999px;
  box-shadow: 0 18px 36px rgba(6, 182, 212, 0.34);
}

.play-circle {
  top: 50%;
  left: 50%;
  width: 58px;
  height: 58px;
  font-size: 22px;
  transform: translate(-50%, -50%);
  transition: transform 0.24s ease, background 0.24s ease;
}

.movie-card:hover .play-circle {
  transform: translate(-50%, -50%) scale(1.10);
  background: var(--cyan-400);
}

.cover-label {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 12px;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(10px);
}

.cover-year {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 5px 9px;
  color: var(--white);
  font-size: 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(10px);
}

.rank-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.32);
}

.movie-info {
  padding: 18px;
}

.movie-info h3,
.movie-large-text h3 {
  margin: 0 0 10px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--cyan-600);
}

.movie-info p,
.movie-large-text p {
  margin: 0;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  color: var(--slate-500);
  font-size: 13px;
}

.card-meta {
  margin-bottom: 9px;
  color: var(--slate-500);
  font-size: 12px;
}

.card-meta span:first-child {
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 12px;
}

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

.tag-row span,
.detail-tags a {
  display: inline-flex;
  padding: 4px 9px;
  color: var(--slate-600);
  background: var(--slate-100);
  border-radius: 999px;
  font-size: 12px;
}

.movie-card-horizontal {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.movie-thumb {
  width: 220px;
  flex: 0 0 220px;
  min-height: 142px;
  background: var(--slate-200);
}

.play-small {
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
}

.movie-card-large {
  min-height: 320px;
  background: var(--slate-900);
}

.movie-card-large .movie-cover-wrap {
  height: 100%;
  aspect-ratio: 16 / 10;
}

.movie-card-large .movie-large-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 28px;
}

.movie-card-large h3,
.movie-card-large p {
  color: var(--white);
}

.movie-card-large p {
  color: var(--slate-300);
}

.dark-section,
.ranking-band {
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.dark-section .movie-card,
.ranking-band .movie-card {
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  scroll-snap-type: x proximity;
}

.movie-rail::-webkit-scrollbar {
  height: 8px;
}

.movie-rail::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
}

.rail-item {
  flex: 0 0 330px;
  scroll-snap-align: start;
}

.white-section {
  background: var(--white);
}

.soft-section {
  background: linear-gradient(135deg, #ecfeff, var(--slate-100));
}

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

.horizontal-list,
.ranking-list,
.full-ranking {
  display: grid;
  gap: 16px;
}

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

.category-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: var(--radius);
  padding: 22px;
  color: var(--white);
  background: var(--slate-900);
  box-shadow: var(--soft-shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.16));
}

.category-bg {
  position: absolute;
  inset: 0;
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 10px 0 0;
  color: var(--slate-200);
  font-size: 14px;
  line-height: 1.6;
}

.category-card-large {
  min-height: 280px;
}

.page-hero,
.detail-top {
  position: relative;
  color: var(--white);
  background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.32), transparent 30%), linear-gradient(135deg, var(--slate-900), var(--slate-950));
}

.page-hero .container {
  padding: 72px 0;
}

.page-hero p,
.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan-400);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.page-hero span {
  display: block;
  max-width: 760px;
  color: var(--slate-300);
  font-size: 17px;
  line-height: 1.8;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  color: var(--slate-300);
  font-size: 14px;
}

.crumbs a:hover {
  color: var(--cyan-400);
}

.filter-bar {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.filter-bar select {
  max-width: 180px;
}

.detail-top .container {
  padding: 32px 0 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
  padding: 24px 0 58px;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card,
.detail-card,
.side-card {
  border-radius: 22px;
  background: var(--white);
  color: var(--slate-800);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.video-player,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-player {
  z-index: 1;
  background: #000000;
}

.player-cover {
  z-index: 2;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.10), transparent 22%), linear-gradient(to top, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.18));
}

.big-play {
  top: 50%;
  left: 50%;
  width: 84px;
  height: 84px;
  font-size: 34px;
  transform: translate(-50%, -50%);
}

.player-cover:hover .big-play {
  background: var(--cyan-400);
}

.detail-card {
  padding: 28px;
}

.detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.detail-heading h1 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.detail-meta {
  margin: 20px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--slate-600);
  background: var(--slate-100);
  font-size: 14px;
}

.one-line {
  margin: 0 0 18px;
  color: var(--slate-700);
  font-size: 18px;
  line-height: 1.75;
}

.article-content h2,
.side-card h2 {
  margin: 0 0 16px;
  color: var(--slate-900);
  font-size: 24px;
}

.article-content h2:not(:first-child) {
  margin-top: 28px;
}

.article-content p {
  margin: 0;
  color: var(--slate-700);
  line-height: 1.9;
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 104px;
}

.side-card {
  padding: 20px;
}

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

.side-list .movie-card-horizontal {
  box-shadow: none;
  border: 1px solid var(--slate-200);
}

.side-list .movie-thumb {
  width: 126px;
  flex-basis: 126px;
  min-height: 94px;
}

.side-list .movie-info {
  padding: 12px;
}

.side-list .movie-info p,
.side-list .tag-row,
.side-list .card-meta span:nth-child(3) {
  display: none;
}

.is-hidden-by-filter {
  display: none !important;
}

.site-footer {
  color: var(--slate-300);
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--white);
  font-size: 21px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: var(--slate-400);
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: var(--white);
}

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

.site-footer a:hover {
  color: var(--cyan-400);
}

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
  color: var(--slate-500);
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

  .mobile-menu-button {
    display: block;
  }

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 68px;
  }

  .brand-text strong {
    font-size: 20px;
  }

  .brand-text em {
    display: none;
  }

  .hero-carousel {
    height: 76vh;
    min-height: 520px;
  }

  .hero-text {
    padding-bottom: 80px;
  }

  .hero-actions,
  .quick-search,
  .filter-bar {
    flex-direction: column;
  }

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

  .movie-grid,
  .library-grid,
  .compact-grid,
  .featured-grid,
  .large-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    display: block;
  }

  .movie-thumb {
    width: 100%;
    min-height: auto;
    aspect-ratio: 16 / 9;
  }

  .rail-item {
    flex-basis: 280px;
  }

  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-card,
  .side-card {
    padding: 20px;
  }

  .detail-heading {
    flex-direction: column;
  }

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