:root {
  --bluestone-950: #020617;
  --bluestone-900: #0f172a;
  --bluestone-800: #1e293b;
  --bluestone-700: #334155;
  --bluestone-600: #475569;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --accent-50: #fffbeb;
  --accent-100: #fef3c7;
  --accent-300: #fcd34d;
  --accent-400: #fbbf24;
  --accent-500: #d97706;
  --accent-600: #b45309;
  --accent-700: #92400e;
  --white: #ffffff;
  --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.10), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--bluestone-900);
  background: var(--stone-50);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(214, 211, 209, 0.75);
  backdrop-filter: blur(12px);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--bluestone-900);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--accent-500), var(--accent-700));
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.26);
}

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

.nav-link,
.mobile-link {
  color: var(--bluestone-700);
  font-weight: 650;
  transition: color 180ms ease, background 180ms ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--accent-600);
}

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

.nav-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  background: var(--stone-100);
  color: var(--bluestone-900);
  outline: none;
  transition: border 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.nav-search input {
  width: 240px;
  padding: 10px 16px;
}

.nav-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.hero-arrow,
.player-start {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
}

.nav-search button,
.mobile-search button,
.primary-btn {
  color: var(--white);
  background: var(--accent-500);
  padding: 10px 18px;
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.24);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.primary-btn:hover {
  background: var(--accent-600);
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(180, 83, 9, 0.28);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.15);
  padding: 10px 18px;
  backdrop-filter: blur(8px);
  transition: background 180ms ease, transform 180ms ease;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--stone-100);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--bluestone-800);
}

.mobile-panel {
  display: none;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--stone-200);
  background: var(--white);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
}

.hero-slider {
  position: relative;
  min-height: 540px;
  height: 72vh;
  overflow: hidden;
  color: var(--white);
  background: var(--bluestone-900);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.62) 48%, rgba(15, 23, 42, 0.12) 100%);
}

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

.hero-inner {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.hero-copy {
  max-width: 680px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--accent-400);
  font-weight: 800;
}

.hero-kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-400);
  box-shadow: 0 0 0 8px rgba(251, 191, 36, 0.18);
}

.hero-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 3.4vw, 44px);
  line-height: 1.12;
}

.hero-copy p {
  margin: 0 0 24px;
  color: var(--stone-200);
  font-size: 18px;
  max-width: 620px;
}

.hero-meta,
.detail-meta,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-meta span,
.detail-meta span,
.movie-tags span,
.tag-cloud a {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}

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

.hero-controls {
  position: absolute;
  right: clamp(20px, 6vw, 80px);
  bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  transition: background 180ms ease, transform 180ms ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.hero-dots {
  position: absolute;
  left: clamp(20px, 6vw, 80px);
  bottom: 54px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 28px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

.hero-dot.is-active {
  width: 52px;
  background: var(--accent-400);
}

.main-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.section-block {
  margin-top: 56px;
}

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

.section-header h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: var(--bluestone-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-header p,
.page-title p,
.detail-title p {
  margin: 8px 0 0;
  color: var(--stone-600);
}

.more-link {
  color: var(--accent-600);
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.card-link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.poster-wrap {
  position: relative;
  display: block;
  height: 320px;
  overflow: hidden;
  background: var(--stone-200);
}

.movie-card.large .poster-wrap {
  height: 380px;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 480ms ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.05));
  transition: opacity 220ms ease;
}

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

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  border-radius: 50%;
  background: rgba(217, 119, 6, 0.92);
  transform: translate(-50%, -50%) scale(0.76);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
}

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

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.68);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(6px);
}

.movie-info {
  display: block;
  padding: 18px;
}

.movie-title {
  display: block;
  color: var(--bluestone-900);
  font-size: 18px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 180ms ease;
}

.card-link:hover .movie-title {
  color: var(--accent-600);
}

.movie-meta,
.movie-desc {
  display: block;
  color: var(--stone-600);
  font-size: 14px;
}

.movie-meta {
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-desc {
  min-height: 44px;
  margin-top: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-tags {
  margin-top: 12px;
}

.movie-tags span,
.tag-cloud a {
  background: var(--accent-50);
  color: var(--accent-700);
}

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

.category-card {
  display: block;
  min-height: 180px;
  padding: 24px;
  border-radius: var(--radius);
  color: var(--white);
  background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.42), transparent 42%), linear-gradient(135deg, var(--bluestone-900), var(--bluestone-700));
  box-shadow: var(--shadow-card);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.category-card strong {
  display: block;
  font-size: 22px;
  margin-bottom: 10px;
}

.category-card span {
  color: var(--stone-200);
}

.feature-panel {
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--accent-50), #fff7ed 52%, var(--stone-50));
}

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

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

.compact-item,
.ranking-row {
  display: flex;
  gap: 14px;
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.compact-item:hover,
.ranking-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.compact-item img,
.ranking-row img {
  width: 96px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
  background: var(--stone-200);
}

.compact-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.compact-body strong {
  overflow: hidden;
  color: var(--bluestone-900);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-body em {
  color: var(--accent-600);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.compact-body span {
  color: var(--stone-600);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-number {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: var(--accent-500);
  font-weight: 900;
}

.page-title {
  padding: 52px 0 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--stone-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent-600);
  font-weight: 700;
}

.filter-panel {
  margin-bottom: 30px;
  padding: 22px;
  border: 1px solid var(--stone-200);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.filter-title {
  margin-bottom: 14px;
  color: var(--bluestone-900);
  font-size: 20px;
  font-weight: 850;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 7px;
  color: var(--stone-600);
  font-size: 14px;
  font-weight: 750;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: transparent;
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.22);
}

.empty-state {
  margin: 16px 0 0;
  color: var(--stone-600);
  font-weight: 700;
}

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

.player-card,
.detail-card,
.related-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bluestone-950);
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bluestone-950);
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.26), rgba(2, 6, 23, 0.72));
  transition: opacity 180ms ease, visibility 180ms ease;
}

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

.player-start {
  width: 90px;
  height: 90px;
  color: var(--white);
  font-size: 34px;
  background: rgba(217, 119, 6, 0.94);
  box-shadow: 0 22px 55px rgba(217, 119, 6, 0.32);
  transition: transform 180ms ease, background 180ms ease;
}

.player-start:hover {
  background: var(--accent-600);
  transform: scale(1.05);
}

.player-caption {
  padding: 20px 24px;
}

.player-caption h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.player-caption p {
  margin: 8px 0 0;
  color: var(--stone-600);
}

.detail-card,
.related-card {
  padding: 24px;
}

.detail-title h1 {
  font-size: clamp(30px, 4vw, 48px);
}

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

.detail-meta span {
  color: var(--accent-700);
  background: var(--accent-50);
}

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 20px;
  background: var(--stone-200);
}

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

.article-content {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.article-content section {
  padding: 26px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.article-content h2,
.related-card h2 {
  margin: 0 0 12px;
  color: var(--bluestone-900);
  font-size: 24px;
}

.article-content p {
  margin: 0;
  color: var(--stone-700);
  font-size: 17px;
  line-height: 1.85;
}

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

.related-card {
  position: sticky;
  top: 96px;
}

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

.ranking-page-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.site-footer {
  color: var(--stone-300);
  background: var(--bluestone-900);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 28px;
}

.footer-logo {
  color: var(--white);
  margin-bottom: 12px;
}

.site-footer p {
  max-width: 560px;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

.footer-links a {
  color: var(--stone-200);
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--accent-400);
}

[hidden] {
  display: none !important;
}

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

  .menu-toggle {
    display: inline-block;
  }

  .nav-search {
    margin-left: auto;
  }

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

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

  .related-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    padding: 0 16px;
  }

  .nav-search {
    display: none;
  }

  .hero-slider {
    height: 680px;
  }

  .hero-inner {
    width: min(100% - 32px, 720px);
  }

  .hero-controls {
    right: 20px;
    bottom: 26px;
  }

  .hero-dots {
    left: 20px;
    bottom: 40px;
  }

  .main-shell {
    padding: 38px 16px 56px;
  }

  .section-header {
    display: grid;
  }

  .movie-grid,
  .category-grid,
  .compact-grid,
  .ranking-page-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .site-logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .hero-slider {
    min-height: 600px;
    height: 78vh;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-meta span {
    font-size: 12px;
  }

  .movie-grid,
  .category-grid,
  .compact-grid,
  .ranking-page-list {
    grid-template-columns: 1fr;
  }

  .poster-wrap,
  .movie-card.large .poster-wrap {
    height: 360px;
  }

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

  .compact-item,
  .ranking-row {
    align-items: center;
  }

  .compact-item img,
  .ranking-row img {
    width: 84px;
    height: 64px;
  }

  .player-start {
    width: 76px;
    height: 76px;
    font-size: 28px;
  }

  .detail-card,
  .related-card,
  .article-content section {
    padding: 20px;
  }
}
