:root {
  color-scheme: light;
  --teal: #0f766e;
  --cyan: #0891b2;
  --emerald: #059669;
  --amber: #f59e0b;
  --rose: #e11d48;
  --ink: #1f2937;
  --muted: #64748b;
  --soft: #f8fafc;
  --card: #ffffff;
  --line: rgba(15, 23, 42, 0.08);
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #eef7f6 45%, #f8fafc 100%);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
}

.site-header__inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.site-logo__mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #78350f;
  background: #fcd34d;
  transition: transform 0.25s ease;
}

.site-logo:hover .site-logo__mark {
  transform: rotate(12deg) scale(1.05);
}

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

.nav-link {
  font-weight: 650;
  opacity: 0.95;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fcd34d;
  opacity: 1;
}

.nav-link--button {
  color: inherit;
  border: 0;
  padding: 0;
  background: transparent;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown__menu {
  position: absolute;
  left: 0;
  top: calc(100% + 14px);
  min-width: 180px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  border-radius: 14px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown__menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
}

.nav-dropdown__menu a:hover {
  color: var(--teal);
  background: #f0fdfa;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.search-panel input,
.search-panel select {
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: #ffffff;
  color: var(--ink);
}

.header-search input {
  width: 230px;
  padding: 9px 14px;
}

.header-search button,
.mobile-search button,
.search-panel button {
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  color: #78350f;
  font-weight: 800;
  background: #fcd34d;
}

.mobile-menu-button,
.mobile-menu {
  display: none;
}

.hero-carousel {
  position: relative;
  height: min(72vh, 620px);
  min-height: 520px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 420px);
  align-items: center;
  gap: 48px;
  padding: 80px max(32px, calc((100vw - 1280px) / 2 + 32px));
  opacity: 0;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 118, 110, 0.7), rgba(8, 145, 178, 0.35)), var(--hero-image);
  background-size: cover;
  background-position: center;
  animation: heroFade 30s infinite;
}

.hero-slide--1 { animation-delay: 0s; }
.hero-slide--2 { animation-delay: 6s; }
.hero-slide--3 { animation-delay: 12s; }
.hero-slide--4 { animation-delay: 18s; }
.hero-slide--5 { animation-delay: 24s; }

@keyframes heroFade {
  0%, 16% { opacity: 1; z-index: 2; }
  20%, 96% { opacity: 0; z-index: 1; }
  100% { opacity: 1; z-index: 2; }
}

.hero-slide__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.28), transparent 32%), linear-gradient(0deg, rgba(0, 0, 0, 0.34), transparent 35%);
  pointer-events: none;
}

.hero-slide__content,
.hero-poster {
  position: relative;
  z-index: 3;
}

.hero-kicker,
.section-kicker {
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero-slide h1 {
  margin: 14px 0 18px;
  color: #ffffff;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  text-shadow: 0 12px 32px rgba(0, 0, 0, 0.36);
}

.hero-slide p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.movie-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin: 22px 0;
}

.hero-tags span,
.detail-tags a,
.movie-card__tags span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
}

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

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

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

.button--primary {
  color: #78350f;
  background: #fcd34d;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.button--ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.hero-poster {
  justify-self: end;
  width: min(100%, 390px);
  border: 10px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(1deg);
}

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

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

.hero-dots span {
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

.section--lifted {
  margin-top: -54px;
  position: relative;
  z-index: 8;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  color: var(--ink);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.1;
}

.section-heading a {
  color: var(--teal);
  font-weight: 800;
}

.compact-grid,
.movie-grid,
.category-grid,
.category-overview-grid,
.rank-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card__poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #ccfbf1, #fef3c7);
}

.movie-card__poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.movie-card__play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  border-radius: 999px;
  color: var(--amber);
  background: rgba(255, 255, 255, 0.9);
  transform: translate(-50%, -50%) scale(0.8);
  transition: all 0.25s ease;
}

.movie-card:hover .movie-card__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-card__type {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  background: rgba(15, 118, 110, 0.86);
}

.movie-card__body {
  padding: 16px;
}

.movie-card__body h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-card__body h2 a:hover {
  color: var(--teal);
}

.movie-card__body p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.movie-card__meta {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card__tags span {
  color: var(--teal);
  font-size: 12px;
  background: #f0fdfa;
}

.movie-card--compact .movie-card__body p,
.movie-card--compact .movie-card__tags {
  display: none;
}

.movie-card--compact .movie-card__body h2 {
  font-size: 15px;
}

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

.category-tile,
.category-overview-card a {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(135deg, #ffffff, #ecfeff);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-tile span,
.category-overview-card h2 {
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong,
.category-overview-card__count {
  color: var(--amber);
  font-size: 28px;
  font-weight: 900;
}

.category-tile em,
.category-overview-card p {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

.section-split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 36px;
}

.ranking-list,
.sidebar-related {
  display: grid;
  gap: 12px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 44px 70px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.ranking-item:hover {
  color: var(--teal);
}

.ranking-item__num {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--rose));
}

.ranking-item img {
  width: 70px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-item__main strong,
.ranking-item__main em {
  display: block;
}

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

.page-hero {
  padding: 84px 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.page-hero > div {
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero h1,
.page-hero p {
  color: #ffffff;
}

.page-hero p {
  max-width: 800px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

.page-hero--gold {
  background: linear-gradient(135deg, #92400e, #d97706, #0f766e);
}

.page-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.page-hero__meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.18);
}

.filter-panel,
.search-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.search-panel input,
.search-panel select {
  min-height: 46px;
  padding: 0 16px;
}

.filter-panel input,
.search-panel input {
  flex: 1;
}

.filter-panel span,
.search-summary {
  color: var(--muted);
}

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

.rank-card a {
  display: grid;
  grid-template-columns: 56px 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-card__number {
  color: var(--amber);
  font-size: 30px;
  font-weight: 900;
}

.rank-card img {
  width: 96px;
  height: 128px;
  border-radius: 14px;
  object-fit: cover;
}

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

.rank-card strong {
  font-size: 18px;
}

.rank-card em,
.rank-card small {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.detail-hero__backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  filter: blur(10px) saturate(1.2);
  transform: scale(1.04);
  background-size: cover;
  background-position: center;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 118, 110, 0.76), rgba(15, 23, 42, 0.82));
}

.detail-hero__content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 74px 24px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
}

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

.detail-info h1,
.detail-info p {
  color: #ffffff;
}

.detail-one-line {
  margin: 14px 0 20px;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9) !important;
}

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

.detail-meta div {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}

.detail-meta dt {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.detail-meta dd {
  margin: 4px 0 0;
  color: #ffffff;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 20px;
}

.detail-tags a {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

.detail-main,
.detail-sidebar,
.prose-section {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.detail-main h2,
.detail-sidebar h2,
.prose-section h2 {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 900;
}

.detail-main p,
.prose-section p {
  margin: 0 0 24px;
  color: #475569;
  font-size: 16px;
  line-height: 1.9;
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.24);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #78350f;
  font-size: 30px;
  background: #fcd34d;
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.34);
}

.player-overlay strong {
  font-size: 18px;
}

.site-footer {
  margin-top: 44px;
  color: #d1d5db;
  background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.site-footer p {
  line-height: 1.8;
}

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

.footer-links a:hover {
  color: #fcd34d;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 24px;
  text-align: center;
  color: #9ca3af;
}

@media (max-width: 1080px) {
  .header-search,
  .site-nav {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
    margin-left: auto;
    border: 0;
    border-radius: 10px;
    padding: 8px 10px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
  }

  .mobile-menu.is-open {
    display: grid;
    gap: 12px;
    padding: 12px 24px 18px;
  }

  .mobile-menu .nav-link {
    display: block;
  }

  .mobile-search {
    display: flex;
    gap: 8px;
  }

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

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

  .hero-poster {
    display: none;
  }

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

  .section-split,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 640px) {
  .site-header__inner {
    padding: 0 16px;
  }

  .site-logo__text {
    font-size: 20px;
  }

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

  .hero-slide {
    padding: 70px 20px;
  }

  .hero-slide h1 {
    font-size: 38px;
  }

  .section {
    padding: 42px 16px;
  }

  .section-heading,
  .filter-panel,
  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-grid,
  .movie-grid,
  .movie-grid--small,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .rank-card a {
    grid-template-columns: 44px 78px minmax(0, 1fr);
  }

  .rank-card img {
    width: 78px;
    height: 104px;
  }
}
