:root {
  --site-blue: #2563eb;
  --site-cyan: #0891b2;
  --site-slate: #0f172a;
  --site-muted: #64748b;
  --site-soft: #f8fafc;
  --site-card: #ffffff;
  --site-border: #e2e8f0;
  --site-warm: #fff7ed;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

img {
  max-width: 100%;
  display: block;
}

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

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(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  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-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--site-blue);
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--site-blue), var(--site-cyan));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
  font-size: 14px;
}

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

.nav-link,
.mobile-nav-link {
  border-radius: 14px;
  padding: 10px 16px;
  color: #334155;
  font-weight: 650;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover {
  color: var(--site-blue);
  background: #eff6ff;
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--site-border);
  background: #ffffff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  background: #0f172a;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--site-border);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

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

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

.narrow-container {
  width: min(980px, calc(100% - 32px));
}

.hero-carousel {
  min-height: 660px;
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, var(--site-blue), var(--site-cyan));
}

.hero-title-layer {
  position: relative;
  z-index: 4;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 68px;
  pointer-events: none;
}

.hero-title-layer h1 {
  width: min(780px, 100%);
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-title-layer p {
  width: min(680px, 100%);
  margin: 0;
  font-size: 20px;
  opacity: 0.92;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s ease, transform 1.1s ease;
}

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

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 128px auto 0;
  max-width: 680px;
  position: relative;
  z-index: 3;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 13px;
  color: #075985;
  background: #e0f2fe;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-kicker {
  color: #cffafe;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-content h2 {
  margin: 20px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-content p {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.94);
}

.hero-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags span,
.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 13px;
  font-weight: 650;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border-radius: 999px;
  padding: 0 26px;
  color: var(--site-blue);
  background: #ffffff;
  font-weight: 800;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.hero-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.26);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  right: calc((100% - min(1180px, calc(100% - 32px))) / 2);
  bottom: 84px;
  display: flex;
  gap: 12px;
}

.hero-controls button {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.22);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.section {
  padding: 70px 0;
}

.section-overlap {
  position: relative;
  z-index: 8;
  margin-top: -104px;
  padding-top: 0;
}

.soft-section {
  background: linear-gradient(90deg, #f8fafc, #eff6ff);
}

.warm-section {
  background: linear-gradient(90deg, #fffbeb, #fff7ed);
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 12px 0 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.text-link {
  color: var(--site-blue);
  font-weight: 800;
}

.featured-grid,
.movie-grid,
.category-grid,
.category-page-grid,
.rank-grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

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

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

.movie-card,
.category-card,
.category-tile,
.detail-card,
.aside-card {
  background: var(--site-card);
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover,
.category-card:hover,
.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.movie-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #e2e8f0;
  overflow: hidden;
}

.movie-cover img,
.detail-poster img,
.category-posters img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.movie-cover img {
  transition: transform 0.45s ease;
}

.large-cover {
  aspect-ratio: 16 / 10;
}

.horizontal-cover {
  width: 180px;
  min-height: 132px;
  aspect-ratio: 16 / 10;
  flex: 0 0 auto;
}

.movie-card-horizontal {
  display: flex;
}

.movie-badge,
.year-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.9);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.movie-badge.hot {
  background: rgba(234, 88, 12, 0.92);
}

.year-badge {
  left: auto;
  right: 12px;
  background: rgba(15, 23, 42, 0.74);
}

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

.movie-card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p {
  margin: 0 0 14px;
  color: var(--site-muted);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.movie-meta span,
.tag-row span {
  max-width: 100%;
  border-radius: 999px;
  padding: 5px 9px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.tag-row {
  margin-top: 12px;
}

.category-tile {
  padding: 26px 18px;
  text-align: center;
}

.category-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--site-blue), var(--site-cyan));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.2);
}

.category-tile strong,
.category-card h2 {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 850;
}

.category-tile small,
.category-card p {
  color: var(--site-muted);
  line-height: 1.65;
}

.page-hero {
  padding: 84px 0;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.45), transparent 34%), linear-gradient(135deg, #1d4ed8, #0891b2 58%, #0f172a);
}

.compact-hero {
  padding: 62px 0;
}

.page-hero p {
  width: min(760px, 100%);
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

.category-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 210px;
}

.category-posters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  background: #e2e8f0;
}

.category-card-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-card-body span {
  margin-top: 18px;
  color: var(--site-blue);
  font-weight: 850;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--site-border);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.filter-field {
  display: grid;
  gap: 8px;
}

.filter-field label {
  font-size: 13px;
  font-weight: 800;
  color: #334155;
}

.filter-field input,
.filter-field select {
  height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 0 14px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: var(--site-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.empty-state {
  display: none;
  padding: 48px 0;
  color: var(--site-muted);
  text-align: center;
  font-weight: 700;
}

.empty-state.show {
  display: block;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 60px 82px 1fr auto 72px;
  align-items: center;
  gap: 16px;
  min-height: 104px;
  padding: 12px 18px;
  border: 1px solid var(--site-border);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  transition: 0.22s ease;
}

.ranking-row:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
}

.ranking-row img {
  width: 82px;
  height: 82px;
  border-radius: 16px;
  object-fit: cover;
}

.ranking-number {
  color: var(--site-blue);
  font-size: 22px;
  font-weight: 900;
}

.ranking-title {
  font-size: 18px;
  font-weight: 850;
}

.ranking-meta {
  color: var(--site-muted);
  font-size: 14px;
}

.ranking-score {
  justify-self: end;
  border-radius: 999px;
  padding: 8px 12px;
  color: #92400e;
  background: #fef3c7;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--site-blue);
  font-weight: 750;
}

.breadcrumb.dark,
.breadcrumb.dark a {
  color: rgba(255, 255, 255, 0.86);
}

.detail-hero {
  color: #ffffff;
  background-size: cover;
  background-position: center;
  padding: 64px 0;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.34);
}

.detail-info p {
  max-width: 780px;
  margin: 18px 0 22px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1.8;
}

.detail-section {
  background: #f8fafc;
}

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

.detail-main,
.detail-aside {
  display: grid;
  gap: 24px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 24px 68px rgba(15, 23, 42, 0.22);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.10), rgba(15, 23, 42, 0.58));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-play-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  color: var(--site-blue);
  background: #ffffff;
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.24);
}

.detail-card,
.aside-card {
  padding: 26px;
}

.detail-card h2,
.aside-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 900;
}

.detail-card p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
}

.detail-tags span {
  color: #075985;
  background: #e0f2fe;
}

.aside-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 14px;
  margin: 0;
}

.aside-card dt {
  color: var(--site-muted);
  font-weight: 750;
}

.aside-card dd {
  margin: 0;
  color: #0f172a;
  font-weight: 800;
}

.side-related {
  display: grid;
  gap: 14px;
}

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

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.site-footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-logo {
  color: #ffffff;
}

.footer-brand p {
  max-width: 460px;
  margin: 16px 0 0;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 12px;
  align-content: start;
}

.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #64748b;
  text-align: center;
}

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

  .category-page-grid,
  .rank-grid,
  .detail-layout,
  .site-footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .site-header-inner {
    height: 64px;
  }

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

  .hero-title-layer {
    padding-top: 44px;
  }

  .hero-content {
    margin-top: 164px;
  }

  .hero-controls {
    right: 16px;
    bottom: 28px;
  }

  .section {
    padding: 48px 0;
  }

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

  .featured-grid,
  .movie-grid,
  .movie-grid-three,
  .category-grid,
  .category-page-grid,
  .rank-grid,
  .related-grid,
  .detail-aside {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    display: grid;
  }

  .horizontal-cover {
    width: 100%;
  }

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

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

  .category-posters {
    height: 180px;
  }

  .ranking-row {
    grid-template-columns: 48px 68px 1fr;
  }

  .ranking-row img {
    width: 68px;
    height: 68px;
  }

  .ranking-meta,
  .ranking-score {
    display: none;
  }

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

  .detail-poster {
    width: min(260px, 78vw);
  }
}
