:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --blue-600: #2563eb;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --white: #ffffff;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --shadow-md: 0 12px 32px rgba(15, 23, 42, .10);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--slate-900);
  background: linear-gradient(180deg, var(--sky-50), #ffffff 28%, var(--slate-50));
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(240, 249, 255, .92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(186, 230, 253, .85);
  box-shadow: 0 6px 20px rgba(14, 165, 233, .08);
}

.header-inner {
  max-width: 1180px;
  height: 72px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
  box-shadow: 0 14px 30px rgba(14, 165, 233, .28);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text strong,
.footer-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  background: linear-gradient(90deg, var(--sky-600), var(--blue-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--slate-700);
  font-weight: 650;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a,
.section-link {
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover,
.section-link:hover {
  color: var(--sky-600);
}

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

.mobile-nav {
  display: none;
  padding: 12px 20px 18px;
  border-top: 1px solid var(--sky-100);
  background: var(--white);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--slate-700);
  font-weight: 650;
}

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

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  background-position: center;
  background-size: cover;
  transition: opacity .7s ease, transform 1.2s ease;
}

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

.hero-content {
  width: min(1180px, calc(100% - 40px));
  min-height: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 0 100px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, .18);
  border: 1px solid rgba(186, 230, 253, .28);
  font-size: 13px;
  font-weight: 750;
}

.hero-content h2 {
  width: min(720px, 100%);
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: .95;
  letter-spacing: -.05em;
}

.hero-content p {
  width: min(700px, 100%);
  margin: 0 0 22px;
  color: rgba(255, 255, 255, .88);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--sky-700);
  background: var(--sky-50);
  border: 1px solid var(--sky-100);
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .24);
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: var(--shadow-md);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
}

.secondary-button {
  color: var(--white);
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(8px);
}

.primary-button:hover,
.secondary-button:hover,
.movie-card:hover,
.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .45);
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--white);
}

.intro-panel,
.page-hero {
  margin-top: 56px;
  padding: 38px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(224, 242, 254, .9);
  box-shadow: var(--shadow-md);
}

.intro-panel h1,
.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.intro-panel p,
.page-hero p,
.section-heading p,
.site-footer p {
  margin: 0;
  color: var(--slate-500);
  line-height: 1.8;
}

.compact-hero {
  margin-bottom: 34px;
  background: linear-gradient(135deg, rgba(240, 249, 255, .94), rgba(255, 255, 255, .94));
}

.toolbar {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.search-box {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--sky-100);
  box-shadow: 0 6px 18px rgba(14, 165, 233, .08);
}

.search-box span {
  color: var(--sky-700);
  font-weight: 800;
}

.search-box input {
  flex: 1;
  min-width: 120px;
  border: 0;
  outline: 0;
  color: var(--slate-900);
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-filters button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--sky-100);
  border-radius: 999px;
  color: var(--sky-700);
  background: var(--white);
  font-weight: 750;
}

.quick-filters button.is-active,
.quick-filters button:hover {
  color: var(--white);
  background: var(--sky-500);
}

section.container {
  margin-bottom: 58px;
}

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

.section-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -.04em;
}

.section-link {
  flex: 0 0 auto;
  color: var(--sky-600);
  font-weight: 800;
}

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

.category-card,
.category-overview-card {
  display: flex;
  min-height: 162px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--white), var(--sky-50));
  border: 1px solid var(--sky-100);
  box-shadow: var(--shadow-md);
  transition: transform .2s ease, box-shadow .2s ease;
}

.category-card span,
.category-overview-card h2 {
  color: var(--sky-700);
  font-size: 15px;
  font-weight: 850;
}

.category-card strong {
  margin: 12px 0;
  font-size: 20px;
  line-height: 1.3;
}

.category-card em,
.category-overview-card p {
  color: var(--slate-500);
  font-style: normal;
  line-height: 1.65;
}

.category-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-mini-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--slate-700);
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--sky-100);
  font-size: 12px;
}

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

.movie-grid-small {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-md);
  transition: transform .2s ease, box-shadow .2s ease;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sky-100), var(--slate-200));
}

.poster img {
  transition: transform .45s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3,
.rank-info h2 {
  margin: 9px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p,
.rank-info p,
.detail-content p {
  margin: 0 0 14px;
  color: var(--slate-500);
  line-height: 1.75;
}

.compact .movie-card-body {
  padding: 13px;
}

.compact h3 {
  font-size: 16px;
}

.page-main {
  padding-bottom: 40px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 54px 88px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--sky-100);
  box-shadow: var(--shadow-md);
}

.rank-number,
.rank-score {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.rank-number {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
}

.rank-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
}

.rank-score {
  color: var(--sky-600);
  font-size: 22px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
  margin-bottom: 24px;
  color: var(--slate-500);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 30px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--white), var(--sky-50));
  border: 1px solid var(--sky-100);
  box-shadow: var(--shadow-md);
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 2 / 3;
  box-shadow: var(--shadow-lg);
}

.detail-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -.05em;
}

.lead {
  color: var(--slate-500);
  font-size: 18px;
  line-height: 1.85;
}

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

.detail-meta-grid div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--sky-100);
}

.detail-meta-grid span {
  display: block;
  color: var(--slate-500);
  font-size: 12px;
  margin-bottom: 5px;
}

.detail-meta-grid strong {
  font-size: 15px;
}

.tag-row.large span {
  padding: 8px 12px;
}

.detail-info .primary-button {
  margin-top: 26px;
}

.player-section h2,
.detail-content h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
}

.main-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(15, 23, 42, .28), rgba(15, 23, 42, .62));
  cursor: pointer;
}

.player-overlay span {
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
  box-shadow: 0 18px 42px rgba(14, 165, 233, .28);
  font-size: 34px;
  padding-left: 6px;
}

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

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

.detail-content article {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-md);
}

.site-footer {
  margin-top: 70px;
  background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
  border-top: 1px solid var(--slate-200);
}

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

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 9px;
  color: var(--slate-500);
}

.footer-bottom {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid var(--slate-200);
  color: var(--slate-500);
  font-size: 14px;
}

.is-filtered-out {
  display: none !important;
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .intro-panel,
  .page-hero,
  .detail-hero {
    padding: 24px;
  }

  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .movie-grid-small,
  .detail-content,
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-poster {
    max-width: 320px;
  }

  .ranking-row {
    grid-template-columns: 44px 72px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }
}

@media (max-width: 560px) {
  .container,
  .hero-content,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 28px, 1180px);
  }

  .hero-content h2 {
    font-size: 42px;
  }

  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .movie-grid-small,
  .detail-content,
  .footer-inner,
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .ranking-row {
    grid-template-columns: 38px 64px minmax(0, 1fr);
    gap: 12px;
  }
}
