:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-dark: #0f172a;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --radius: 22px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
  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;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--slate-700), var(--slate-900));
  box-shadow: var(--shadow-soft);
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--slate-600);
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: var(--slate-900);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--slate-900);
  border-radius: 999px;
}

.hero-section {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-700), var(--slate-900));
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.8s ease, visibility 0.8s ease, transform 1.4s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: white;
  padding: 84px 0 130px;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 14px 0 20px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1;
  letter-spacing: -0.065em;
  font-weight: 900;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.06em;
}

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

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 650;
}

.card-meta span {
  background: var(--slate-100);
  color: var(--slate-600);
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: white;
  color: var(--slate-900);
}

.btn-ghost {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
}

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

.hero-dot {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dot.is-active {
  background: white;
}

.hero-card-section {
  margin-top: -84px;
  position: relative;
  z-index: 4;
}

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

.page-main section,
main > .container {
  margin-top: 64px;
  margin-bottom: 64px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

.section-link {
  flex: 0 0 auto;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--slate-700);
  font-weight: 750;
  background: white;
}

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

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

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

.movie-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5.35;
  overflow: hidden;
  background: var(--slate-200);
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0));
}

.play-badge,
.rank-no {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-weight: 800;
}

.play-badge {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.rank-no {
  left: 12px;
  top: 12px;
  min-width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--slate-700), var(--slate-900));
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.28);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

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

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

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

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 12px;
  font-weight: 700;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
}

.home-search label {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 800;
}

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

.home-search input,
.filter-card input,
.filter-card select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  background: white;
  color: var(--slate-900);
}

.home-search input:focus,
.filter-card input:focus,
.filter-card select:focus {
  border-color: var(--slate-500);
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.14);
}

.home-search button {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  color: white;
  background: var(--slate-900);
  font-weight: 800;
  cursor: pointer;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a {
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 800;
}

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

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

.category-tile,
.category-card a {
  display: block;
  min-height: 190px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, white, var(--slate-100));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover,
.category-card a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-tile span,
.category-card h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

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

.category-tile div,
.category-card ul {
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--slate-700);
  font-weight: 700;
  font-size: 14px;
}

.category-card span {
  display: inline-flex;
  margin-top: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--slate-900);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.page-hero {
  margin-top: 0 !important;
  color: white;
  background: radial-gradient(circle at 20% 20%, rgba(148, 163, 184, 0.35), transparent 30%), linear-gradient(135deg, var(--slate-700), var(--slate-900));
}

.compact-hero .container {
  padding: 78px 0;
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1;
  letter-spacing: -0.06em;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: #e2e8f0;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: white;
}

.filter-card {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(160px, 0.6fr) minmax(160px, 0.6fr);
  gap: 16px;
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow-soft);
}

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

.empty-result {
  display: none;
  padding: 48px 20px;
  text-align: center;
  border-radius: 24px;
  background: white;
  color: var(--muted);
  font-weight: 800;
  border: 1px solid var(--line);
}

.has-empty .empty-result {
  display: block;
}

.has-empty .searchable-grid {
  display: none;
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.06);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 66px 0 74px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
  align-items: end;
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 4 / 5.35;
  object-fit: cover;
}

.detail-info h1 {
  max-width: 820px;
  margin: 16px 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 20px;
  color: #e2e8f0;
  font-size: 20px;
}

.detail-tags {
  margin: 20px 0 28px;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

.watch-section {
  scroll-margin-top: 90px;
}

.watch-heading {
  margin-bottom: 18px;
}

.watch-heading h2,
.detail-content h2 {
  margin: 0 0 10px;
  font-size: 30px;
  letter-spacing: -0.035em;
}

.watch-heading p {
  margin: 0;
  color: var(--muted);
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}

.movie-player video,
.player-poster,
.player-poster img {
  width: 100%;
  height: 100%;
}

.movie-player video {
  display: block;
  object-fit: contain;
  background: #020617;
}

.player-poster {
  position: absolute;
  inset: 0;
  z-index: 5;
  padding: 0;
  border: 0;
  cursor: pointer;
  overflow: hidden;
  background: #020617;
}

.player-poster img {
  object-fit: cover;
  opacity: 0.74;
  filter: blur(1px) saturate(1.1);
}

.start-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--slate-900);
  background: white;
  transform: translate(-50%, -50%);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
  font-size: 34px;
  line-height: 1;
}

.movie-player.is-playing .player-poster {
  display: none;
}

.detail-content article {
  padding: 34px;
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
}

.detail-content p {
  margin: 0 0 24px;
  color: var(--slate-700);
  font-size: 17px;
}

.detail-content p:last-child {
  margin-bottom: 0;
}

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

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  gap: 24px;
}

.footer-inner strong {
  display: block;
  margin-bottom: 8px;
  color: white;
  font-size: 22px;
}

.footer-inner p {
  margin: 0;
  max-width: 720px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
}

.copyright {
  color: #94a3b8;
}

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

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

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

  .detail-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

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

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: white;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    text-align: center;
  }

  .hero-section {
    min-height: 560px;
  }

  .hero-content {
    padding: 64px 0 126px;
  }

  .hero-card-grid,
  .movie-grid,
  .rank-grid,
  .large-rank,
  .related-grid,
  .category-grid,
  .category-grid.large,
  .filter-card,
  .search-panel,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .home-search div {
    flex-direction: column;
  }

  .detail-cover {
    max-width: 220px;
  }

  .compact-hero .container,
  .detail-hero-inner {
    padding: 52px 0;
  }
}
