
:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-soft: #e0f2fe;
  --secondary: #b45309;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #eef2f7;
  --text: #111827;
  --text-muted: #64748b;
  --border: #e5e7eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.site-logo__mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.28);
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  transition: all 0.24s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--primary-soft);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--primary-dark);
  border-radius: 2px;
}

.mobile-nav {
  position: sticky;
  top: 72px;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  text-align: center;
  padding: 10px 6px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

.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.02);
  transition: opacity 0.65s ease, transform 1.1s ease;
}

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

.hero-slide__content {
  width: min(720px, calc(100% - 44px));
  margin-left: max(22px, calc((100vw - 1240px) / 2 + 22px));
  color: #ffffff;
  position: relative;
  z-index: 2;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker {
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(125, 211, 252, 0.24);
  padding: 8px 14px;
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.hero-slide h1 {
  margin: 24px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-slide p {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.72;
}

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

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

.hero-tags span,
.movie-card__tags span,
.detail-meta span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

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

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

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

.button--primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #0ea5e9);
  box-shadow: 0 15px 35px rgba(2, 132, 199, 0.28);
}

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

.button--small {
  min-height: 38px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--primary);
  border-radius: 12px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 42px;
  line-height: 1;
}

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

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.is-active {
  width: 32px;
  background: #ffffff;
}

.quick-search {
  max-width: 1080px;
  margin: -32px auto 0;
  padding: 0 22px;
  position: relative;
  z-index: 4;
}

.quick-search__form,
.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search input,
.filter-input,
.filter-select {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  padding: 0 16px;
}

.filter-panel {
  max-width: 1240px;
  margin: 24px auto 0;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  padding: 16px;
}

.filter-panel--wide {
  grid-template-columns: minmax(260px, 1fr) 180px 180px 180px;
}

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 60px 22px 0;
}

.content-section--split {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 32px;
}

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

.section-heading--compact {
  align-items: start;
}

.section-heading h2,
.page-hero h1,
.detail-hero h1 {
  margin: 8px 0 8px;
  color: var(--text);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.section-heading p,
.page-hero p,
.detail-hero p,
.story-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.76;
}

.section-more {
  color: var(--primary-dark);
  font-weight: 900;
  white-space: nowrap;
}

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

.category-tile {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #0f172a);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -36px;
  top: -36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
  position: relative;
}

.category-tile small {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  position: relative;
}

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

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

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

.movie-card {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.movie-card__media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

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

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

.movie-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 36%, rgba(2, 6, 23, 0.72) 100%);
  opacity: 0.7;
}

.movie-card__badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.movie-card__badge--type {
  top: 12px;
  right: 12px;
}

.movie-card__badge--year {
  left: 12px;
  bottom: 12px;
}

.movie-card__play {
  position: absolute;
  z-index: 3;
  inset: 0;
  margin: auto;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.88);
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card__body {
  padding: 16px;
}

.movie-card__title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 48px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.32;
}

.movie-card__title:hover {
  color: var(--primary-dark);
}

.movie-card__meta,
.movie-card__desc {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.58;
}

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

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

.movie-card__tags span {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.movie-card__tags--detail span {
  color: #0369a1;
  background: #e0f2fe;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 78px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  position: relative;
}

.mini-card img {
  height: 74px;
  object-fit: cover;
  border-radius: 14px;
}

.mini-card__rank {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--secondary);
  border-radius: 999px;
  font-weight: 900;
}

.mini-card__content {
  display: grid;
  gap: 6px;
}

.mini-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.mini-card small {
  color: var(--text-muted);
}

.page-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 66px 22px 28px;
}

.page-hero--light {
  background: radial-gradient(circle at 12% 0%, #e0f2fe, transparent 38%);
}

.page-hero--ranking {
  background: radial-gradient(circle at 88% 0%, #fef3c7, transparent 34%);
}

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

.category-card {
  display: grid;
  grid-template-rows: 150px 1fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.category-card__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: #0f172a;
}

.category-card__thumbs img {
  height: 150px;
  object-fit: cover;
}

.category-card__body {
  padding: 20px;
}

.category-card__body h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-card__body p {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.category-card__body span {
  color: var(--primary-dark);
  font-weight: 900;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-row__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
}

.rank-row__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-row__cover span {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-radius: 999px;
  font-weight: 900;
}

.rank-row__body a {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.rank-row__body p {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.rank-row__meta {
  color: var(--primary-dark) !important;
  font-weight: 800;
}

.breadcrumb {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 22px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 800;
}

.detail-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 22px 20px;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-hero__poster {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.detail-hero__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
}

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

.detail-meta span {
  color: #0369a1;
  background: #e0f2fe;
}

.player-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 22px 0;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-trigger {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.20), rgba(2, 6, 23, 0.38));
  z-index: 3;
}

.play-trigger span {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.92);
  border-radius: 999px;
  font-size: 42px;
  box-shadow: 0 20px 50px rgba(2, 132, 199, 0.32);
}

.play-trigger.is-hidden {
  display: none;
}

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

.story-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.site-footer {
  margin-top: 72px;
  background: #0f172a;
  color: #cbd5e1;
}

.site-footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 22px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 30px;
}

.footer-logo {
  color: #ffffff;
  margin-bottom: 12px;
}

.site-footer p {
  margin: 0;
  line-height: 1.7;
}

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

.footer-links a {
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: #e2e8f0;
}

.site-footer__bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 18px 22px;
  text-align: center;
  color: #94a3b8;
}

[data-filter-card].is-hidden {
  display: none;
}

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

  .content-section--split,
  .detail-hero,
  .detail-content,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

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

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

  .nav-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: 620px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-slide__content {
    margin-left: 22px;
  }

  .quick-search__form,
  .filter-panel,
  .filter-panel--wide {
    grid-template-columns: 1fr;
  }

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

  .movie-grid,
  .movie-grid--six,
  .movie-grid--two,
  .category-grid,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row .button {
    grid-column: 1 / -1;
  }

  .mini-card {
    grid-template-columns: 104px 1fr;
  }

  .site-header__inner {
    min-height: 64px;
  }

  .mobile-nav {
    top: 64px;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 460px) {
  .hero-slide h1 {
    font-size: 40px;
  }

  .hero-tags span,
  .movie-card__tags span,
  .detail-meta span {
    font-size: 12px;
  }

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

  .rank-row__cover {
    width: 100%;
  }
}
