:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --blue-900: #1e3a8a;
  --blue-800: #1e40af;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --text: #111827;
  --muted: #64748b;
  --border: #e2e8f0;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 10px 24px rgba(37, 99, 235, 0.34);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-size: 15px;
}

.main-nav a,
.mobile-panel a {
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
  color: #bfdbfe;
}

.search-box,
.mobile-search,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box input,
.mobile-search input,
.filter-bar input {
  width: 250px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 10px 15px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  backdrop-filter: blur(10px);
}

.search-box input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.search-box button,
.mobile-search button,
.filter-bar button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--blue-700);
  background: var(--white);
  cursor: pointer;
  font-weight: 700;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-panel.open {
  display: grid;
  gap: 13px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-900);
}

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

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(30, 64, 175, 0.68), rgba(2, 6, 23, 0.25)), linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 56px;
  align-items: center;
  min-height: 680px;
  padding: 72px 0;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-copy .lead {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(18px, 2vw, 24px);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: #93c5fd;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 23px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px) scale(1.02);
}

.button.primary {
  color: var(--white);
  background: var(--blue-600);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.button.primary:hover {
  background: var(--blue-700);
}

.button.ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.button.small {
  padding: 10px 17px;
  color: var(--white);
  background: var(--blue-600);
}

.hero-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.card-tags span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  color: #1d4ed8;
  background: var(--blue-100);
  font-size: 13px;
  font-weight: 700;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(1deg);
}

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

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--white);
  background: rgba(37, 99, 235, 0.92);
  font-weight: 800;
}

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

.hero-dot {
  width: 38px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--white);
}

.section {
  padding: 74px 0;
}

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

.section.soft {
  background: #f1f5f9;
}

.category-section {
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

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

.section-head h2,
.page-hero h1,
.content-panel h2,
.side-panel h2,
.rank-panel h2,
.search-results h2 {
  margin: 0;
  color: #0f172a;
  line-height: 1.15;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.text-link {
  color: var(--blue-600);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--slate-900);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card.compact .poster-link img {
  aspect-ratio: 2 / 3;
}

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

.play-badge,
.year-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.play-badge {
  left: 12px;
  bottom: 12px;
  background: var(--blue-600);
}

.year-badge {
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.72);
}

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

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

.movie-card h3 a:hover,
.ranking-card h2 a:hover,
.category-card-large h2 a:hover {
  color: var(--blue-600);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span {
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--slate-100);
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 22px;
  padding: 22px;
  color: var(--white);
  background: var(--slate-900);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  transition: transform 0.35s ease;
}

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

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile p {
  max-width: 240px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 380px;
  gap: 36px;
}

.rank-panel,
.content-panel,
.side-panel,
.search-results {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.rank-panel h2 {
  margin-bottom: 16px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--slate-50);
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: var(--blue-100);
}

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

.rank-item img {
  width: 64px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.page-hero {
  color: var(--white);
  background: linear-gradient(120deg, var(--blue-800), var(--slate-900));
  padding: 74px 0;
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(38px, 5vw, 62px);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.82);
}

.category-hero,
.rank-hero {
  background: linear-gradient(120deg, var(--blue-700), var(--slate-900));
}

.filter-bar {
  max-width: 720px;
}

.filter-bar input {
  flex: 1;
  width: auto;
  min-width: 0;
}

.category-large-grid {
  display: grid;
  gap: 24px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.category-card-media {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.category-card-media img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

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

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

.ranking-list {
  display: grid;
  gap: 18px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.ranking-poster {
  position: relative;
}

.ranking-poster span {
  position: absolute;
  top: -10px;
  left: -10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--white);
  background: var(--blue-600);
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.34);
}

.ranking-poster img {
  width: 150px;
  height: 200px;
  border-radius: 18px;
  object-fit: cover;
}

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

.ranking-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px) saturate(1.12);
  transform: scale(1.08);
  opacity: 0.46;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(30, 64, 175, 0.74), rgba(2, 6, 23, 0.84));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 76px 0;
}

.detail-poster img {
  width: 300px;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.44);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.74);
}

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

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.05;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.12);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
}

.watch-player {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.28);
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  padding: 24px;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.58), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  text-align: center;
}

.player-cover.is-hidden {
  display: none;
}

.player-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  padding-left: 5px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  font-size: 30px;
}

.player-cover strong {
  max-width: 720px;
  font-size: 22px;
}

.content-panel {
  margin-top: 26px;
}

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

.content-panel p {
  margin: 0 0 22px;
  color: #334155;
  font-size: 17px;
}

.side-panel dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
  margin: 18px 0 0;
}

.side-panel dt {
  color: var(--muted);
}

.side-panel dd {
  margin: 0;
  font-weight: 700;
}

.side-panel a {
  color: var(--blue-600);
}

.search-results h2 {
  margin-bottom: 14px;
}

.search-result-grid {
  display: grid;
  gap: 16px;
}

.search-result {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  background: var(--slate-50);
}

.search-result img {
  width: 96px;
  height: 126px;
  border-radius: 14px;
  object-fit: cover;
}

.search-result h3 {
  margin: 0 0 8px;
}

.search-result p {
  margin: 0 0 10px;
  color: var(--muted);
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 52px 0;
}

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

.site-footer p {
  margin: 0;
}

.site-footer a {
  display: block;
  margin: 6px 0;
  color: #cbd5e1;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px;
  color: #94a3b8;
  text-align: center;
}

.hidden-card {
  display: none;
}

@media (max-width: 1040px) {
  .main-nav,
  .search-box {
    display: none;
  }

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

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

  .hero-poster,
  .detail-poster {
    max-width: 360px;
  }

  .category-grid,
  .four-grid,
  .featured-grid,
  .three-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-card-large {
    grid-template-columns: 1fr;
  }
}

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

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

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

  .hero-content {
    padding: 40px 0 86px;
  }

  .hero-poster {
    display: none;
  }

  .hero-copy h1,
  .detail-copy h1 {
    font-size: 40px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-copy .lead {
    font-size: 17px;
  }

  .section {
    padding: 52px 0;
  }

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

  .category-grid,
  .four-grid,
  .featured-grid,
  .three-grid,
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 30px 56px minmax(0, 1fr);
  }

  .ranking-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .ranking-poster img {
    width: 96px;
    height: 128px;
  }

  .detail-hero-inner {
    padding: 48px 0;
  }

  .detail-poster img {
    width: min(260px, 100%);
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar button,
  .filter-bar input,
  .mobile-search button,
  .mobile-search input {
    width: 100%;
  }

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