* {
  box-sizing: border-box;
}

:root {
  --primary-50: #e0f2fe;
  --primary-100: #bae6fd;
  --primary-500: #0284c7;
  --primary-600: #0369a1;
  --primary-700: #075985;
  --secondary-50: #f0fdfa;
  --secondary-500: #14b8a6;
  --secondary-600: #0d9488;
  --accent-50: #fff7ed;
  --accent-500: #f97316;
  --accent-600: #ea580c;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.11);
  --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.09);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--gray-50), var(--white));
}

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

img {
  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: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
  box-shadow: 0 10px 22px rgba(2, 132, 199, 0.25);
}

.brand-name {
  font-size: 22px;
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--gray-600);
  font-size: 15px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link--active {
  color: var(--primary-700);
  background: var(--primary-50);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--gray-700);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 8px 16px 18px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--gray-700);
}

.mobile-link--active,
.mobile-link:hover {
  color: var(--primary-700);
  background: var(--primary-50);
}

.hero {
  position: relative;
  height: 80vh;
  min-height: 560px;
  overflow: hidden;
  background: #000000;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.46) 54%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: auto 0 0;
  padding-bottom: clamp(58px, 8vw, 118px);
}

.hero-copy {
  max-width: 760px;
  color: var(--white);
}

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

.hero-pills span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 14px;
}

.hero-pills span:first-child {
  background: var(--primary-600);
}

.hero h1,
.hero h2 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.hero-copy p {
  max-width: 700px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta {
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.78);
}

.hero-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after,
.movie-meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  opacity: 0.5;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button--primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  box-shadow: 0 16px 28px rgba(3, 105, 161, 0.28);
}

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

.button--light {
  color: var(--primary-700);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-arrow--prev {
  left: 22px;
}

.hero-arrow--next {
  right: 22px;
}

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

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

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

.search-panel {
  margin: 34px auto;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 18px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.search-panel--home {
  margin-top: -48px;
  position: relative;
  z-index: 2;
}

.search-panel h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.search-panel p {
  margin: 0;
  color: var(--gray-500);
  line-height: 1.7;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: var(--gray-50);
}

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

.search-box input {
  width: 100%;
  min-height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gray-800);
}

.page-stack {
  display: grid;
  gap: 62px;
  padding: 32px 0 68px;
}

.content-section {
  position: relative;
}

.section-soft,
.section-blend {
  padding: clamp(26px, 4vw, 44px);
  border-radius: 34px;
}

.section-soft {
  background: linear-gradient(135deg, var(--primary-50), var(--secondary-50));
}

.section-blend {
  background: linear-gradient(135deg, var(--secondary-50), var(--primary-50), var(--accent-50));
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.section-heading--compact {
  margin-bottom: 18px;
}

.heading-line {
  width: 5px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary-600), var(--secondary-600));
}

.section-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 0;
  color: var(--gray-500);
}

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

.movie-grid--compact {
  gap: 18px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(14, 165, 233, 0.36);
  box-shadow: var(--shadow-soft);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--gray-100);
}

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

.movie-card:hover .movie-poster img,
.category-tile:hover img,
.category-card:hover img,
.rank-row:hover img {
  transform: scale(1.05);
}

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(3, 105, 161, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  padding: 16px;
}

.movie-meta-line {
  margin-bottom: 8px;
  color: var(--gray-500);
  font-size: 13px;
}

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

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.category-card h2 a:hover,
.text-link:hover {
  color: var(--primary-600);
}

.movie-card p {
  display: -webkit-box;
  min-height: 50px;
  margin: 0 0 13px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 12px;
  font-weight: 700;
}

.movie-card--compact .movie-info {
  padding: 14px;
}

.movie-card--horizontal {
  display: grid;
  grid-template-columns: 128px 1fr;
}

.movie-card--horizontal .movie-poster {
  height: 100%;
  min-height: 188px;
  aspect-ratio: auto;
}

.movie-card--horizontal .movie-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.movie-card--large .movie-poster {
  aspect-ratio: 16 / 10;
}

.category-strip {
  padding: 20px 0 22px;
}

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

.category-tile {
  position: relative;
  min-height: 156px;
  overflow: hidden;
  border-radius: 24px;
  color: var(--white);
  background: var(--gray-800);
  box-shadow: var(--shadow-card);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 156px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
}

.category-tile strong,
.category-tile em {
  position: absolute;
  left: 16px;
  right: 16px;
}

.category-tile strong {
  bottom: 38px;
  font-size: 19px;
}

.category-tile em {
  bottom: 16px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inner-page {
  padding: 34px 0 72px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--primary-600);
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 34px;
  padding: clamp(34px, 6vw, 68px);
  border-radius: 34px;
  background: linear-gradient(135deg, var(--primary-50), var(--secondary-50));
  box-shadow: var(--shadow-card);
}

.page-hero--category {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
}

.page-hero--rank {
  color: var(--white);
  background-size: cover;
  background-position: center;
}

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

.page-hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--gray-600);
  font-size: 17px;
  line-height: 1.85;
}

.page-hero--category p,
.page-hero--rank p {
  color: rgba(255, 255, 255, 0.84);
}

.eyebrow {
  margin: 0;
  color: var(--primary-700);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.page-hero--category .eyebrow,
.page-hero--rank .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

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

.category-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  padding: 18px;
  border: 1px solid var(--gray-200);
  border-radius: 28px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  transition: 0.22s ease;
}

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

.category-card-cover {
  overflow: hidden;
  border-radius: 20px;
  background: var(--gray-100);
}

.category-card-cover img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.category-card h2 {
  margin: 6px 0 10px;
}

.category-card p {
  margin: 0 0 14px;
  color: var(--gray-600);
  line-height: 1.75;
}

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.category-preview a,
.text-link {
  color: var(--primary-700);
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 82px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transition: 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-card);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--accent-600), var(--primary-600));
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  border-radius: 16px;
  background: var(--gray-100);
}

.rank-poster img {
  width: 82px;
  height: 112px;
  object-fit: cover;
  transition: transform 0.22s ease;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-info p {
  display: -webkit-box;
  margin: 0 0 9px;
  overflow: hidden;
  color: var(--gray-600);
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-score {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--accent-600);
  background: var(--accent-50);
  font-weight: 900;
  white-space: nowrap;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 330px) 1fr;
  gap: clamp(24px, 4vw, 46px);
  align-items: center;
  margin-bottom: 38px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 34px;
  background: linear-gradient(135deg, var(--white), var(--primary-50));
  box-shadow: var(--shadow-card);
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: var(--gray-100);
  box-shadow: var(--shadow-soft);
}

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

.detail-copy h1 {
  margin: 8px 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 18px;
  color: var(--gray-600);
  font-size: 18px;
  line-height: 1.85;
}

.detail-meta {
  margin-bottom: 18px;
  color: var(--gray-500);
}

.tag-row--detail {
  margin-bottom: 24px;
}

.player-section {
  margin-bottom: 38px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow-soft);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(3, 105, 161, 0.15), rgba(0, 0, 0, 0.48));
  cursor: pointer;
}

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

.player-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  padding-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  font-size: 34px;
}

.article-section {
  margin-bottom: 44px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--gray-200);
  border-radius: 30px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.article-section h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

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

.article-section p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 2;
}

.related-section {
  margin-top: 36px;
}

.empty-state {
  display: none;
  padding: 30px;
  border-radius: 20px;
  color: var(--gray-500);
  text-align: center;
  background: var(--gray-50);
}

.empty-state.is-visible {
  display: block;
}

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

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

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

.brand--footer {
  margin-bottom: 14px;
}

.footer-brand p {
  max-width: 460px;
  margin: 0 0 18px;
  color: var(--gray-600);
  line-height: 1.8;
}

.footer-badges span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 13px;
  font-weight: 800;
}

.footer-col {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-col h3 {
  margin: 0 0 6px;
}

.footer-col a {
  color: var(--gray-600);
}

.footer-col a:hover {
  color: var(--primary-600);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--gray-500);
  border-top: 1px solid var(--gray-200);
  font-size: 14px;
}

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

  .movie-grid--horizontal,
  .category-list {
    grid-template-columns: 1fr;
  }

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

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

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

  .nav-toggle {
    display: block;
  }

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

  .hero-arrow {
    display: none;
  }

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

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

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

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

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

  .rank-row {
    grid-template-columns: 44px 72px 1fr;
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }

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

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

  .hero {
    min-height: 540px;
  }

  .hero-content {
    padding-bottom: 76px;
  }

  .hero-actions,
  .footer-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .movie-grid,
  .movie-grid--horizontal,
  .movie-grid--large {
    grid-template-columns: 1fr;
  }

  .movie-card--horizontal {
    grid-template-columns: 112px 1fr;
  }

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

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

  .rank-row {
    grid-template-columns: 40px 1fr;
  }

  .rank-poster {
    display: none;
  }

  .rank-score {
    grid-column: 2;
  }
}
