:root {
  color-scheme: light;
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --line: #e5e7eb;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --accent: #f59e0b;
  --accent-2: #2563eb;
  --radius: 18px;
  --shadow: 0 14px 35px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

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);
  backdrop-filter: blur(14px);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.site-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #334155, #020617);
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.22);
}

.site-logo strong,
.footer-brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.site-logo em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
  color: #475569;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.desktop-nav a.active,
.desktop-nav a:hover,
.mobile-nav a.active,
.mobile-nav a:hover {
  color: #0f172a;
}

.desktop-nav a.active {
  border-bottom: 2px solid #0f172a;
  padding-bottom: 4px;
}

.header-search {
  width: 300px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  color: var(--ink);
}

.header-search button {
  border: 0;
  padding: 10px 16px;
  color: #fff;
  background: var(--dark);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  padding: 10px 12px;
  color: var(--ink);
}

.mobile-nav {
  display: none;
  padding: 12px 24px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

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

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

.mobile-nav input {
  flex: 1;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
}

.mobile-nav button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  background: var(--dark);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.52) 48%, rgba(2, 6, 23, 0.12));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 72px;
  max-width: 860px;
  color: #fff;
}

.hero-kicker,
.detail-meta,
.card-tags,
.detail-tags,
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-kicker span,
.tag-pill,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
}

.hero-kicker span {
  padding: 9px 14px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero h2 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.95;
  font-weight: 850;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 780px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2.2vw, 23px);
  line-height: 1.6;
}

.tag-pill {
  padding: 7px 10px;
  color: #475569;
  background: #f1f5f9;
}

.hero-tags .tag-pill {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.hero-actions,
.home-search-band form,
.search-panel,
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 750;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-light {
  color: #0f172a;
  background: #fff;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.25);
}

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

.btn-dark {
  color: #fff;
  background: var(--dark);
  border: 0;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-size: 42px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: #fff;
}

.home-search-band {
  max-width: 1180px;
  margin: -54px auto 0;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.home-search-band h1,
.page-hero h1,
.detail-info-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.home-search-band p,
.page-hero p,
.section-title p,
.detail-one-line,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.75;
}

.home-search-band p {
  margin: 10px 0 0;
}

.home-search-band input,
.search-panel input,
.search-panel select,
.category-filter input,
.category-filter button,
.search-panel button {
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0 16px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.home-search-band input,
.search-panel input,
.category-filter input {
  flex: 1 1 260px;
}

.home-search-band button,
.search-panel button,
.category-filter button {
  border: 0;
  color: #fff;
  background: var(--dark);
  font-weight: 750;
}

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

.white-section {
  max-width: none;
  background: #fff;
}

.white-section > * {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-title p {
  margin: 9px 0 0;
}

.section-title a {
  flex: 0 0 auto;
  color: var(--dark);
  font-weight: 800;
}

.movie-grid,
.category-grid,
.feature-grid,
.wide-grid,
.rank-grid {
  display: grid;
  gap: 24px;
}

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

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

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

.feature-grid .movie-card-large {
  grid-column: span 2;
  grid-row: span 2;
}

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

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

.movie-card,
.rank-card,
.category-card,
.category-overview-card,
.detail-info-card,
.detail-article,
.detail-side,
.detail-player-card {
  background: var(--card);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.movie-card,
.category-card,
.rank-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.14);
}

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

.movie-poster-wrap img,
.category-card img,
.category-cover img,
.rank-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover img,
.category-card:hover img,
.category-overview-card:hover img,
.rank-card:hover img {
  transform: scale(1.08);
}

.movie-play-icon,
.player-play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
}

.movie-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  font-size: 21px;
  transform: translate(-50%, -50%);
  opacity: 0.96;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.movie-card-body {
  display: grid;
  gap: 9px;
  padding: 18px;
}

.movie-card-body strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.movie-card-body em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.movie-card-body > span:not(.card-tags) {
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 220px 1fr;
}

.movie-card-wide .movie-poster-wrap {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card-large {
  position: relative;
  min-height: 100%;
}

.movie-card-large .movie-poster-wrap {
  height: 100%;
  min-height: 380px;
}

.movie-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.2));
}

.overlay-body {
  position: absolute;
  inset: auto 0 0;
  color: #fff;
}

.overlay-body strong,
.overlay-body em,
.overlay-body > span:not(.card-tags) {
  color: #fff;
}

.category-card {
  position: relative;
  min-height: 210px;
  color: #fff;
  background: #020617;
}

.category-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
}

.category-card span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.25));
}

.category-card strong,
.category-card em {
  position: absolute;
  left: 20px;
  right: 20px;
  z-index: 2;
}

.category-card strong {
  bottom: 58px;
  font-size: 22px;
}

.category-card em {
  bottom: 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.rank-card {
  display: grid;
  grid-template-columns: 54px 90px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #475569);
  font-weight: 850;
}

.rank-card img {
  width: 90px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info {
  display: grid;
  gap: 5px;
}

.rank-info strong {
  font-size: 16px;
}

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

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

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 74px 24px 40px;
}

.compact-hero,
.category-hero,
.search-hero {
  display: grid;
  gap: 22px;
}

.compact-hero,
.search-hero,
.category-hero {
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 35%), linear-gradient(135deg, #ffffff, #f8fafc);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-weight: 800;
  letter-spacing: 0.08em;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  border-radius: 22px;
  overflow: hidden;
  padding: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  min-height: 180px;
  background: #0f172a;
}

.category-cover span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.45), transparent);
}

.category-overview-card h2 {
  margin: 8px 0 8px;
  font-size: 26px;
}

.category-preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.category-preview-links a {
  border-radius: 999px;
  padding: 7px 10px;
  color: #475569;
  background: #f1f5f9;
  font-size: 13px;
}

.search-panel {
  margin-top: 14px;
}

.search-panel select {
  min-width: 150px;
}

.search-status {
  min-height: 24px;
}

.movie-filter-card.is-hidden {
  display: none;
}

.detail-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.8fr);
  gap: 26px;
  align-items: stretch;
}

.detail-player-card,
.detail-info-card,
.detail-article,
.detail-side {
  border-radius: 24px;
  overflow: hidden;
}

.movie-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.movie-player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.player-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.38));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

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

.player-play-icon {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  font-size: 30px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.player-layer strong {
  max-width: 80%;
  font-size: clamp(24px, 4vw, 42px);
  text-align: center;
  line-height: 1.2;
}

.player-message {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 4;
  display: none;
  border-radius: 14px;
  padding: 12px 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.82);
  text-align: center;
}

.player-message.is-visible {
  display: block;
}

.detail-info-card {
  padding: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #334155;
  font-weight: 700;
}

.detail-one-line {
  margin: 16px 0 20px;
  font-size: 17px;
}

.detail-meta span {
  padding: 8px 12px;
  color: #334155;
  background: #f1f5f9;
}

.detail-tags {
  margin: 20px 0 24px;
}

.detail-content-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 26px;
}

.detail-article,
.detail-side {
  padding: 28px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

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

.detail-article p {
  margin: 0 0 16px;
  color: #334155;
  line-height: 1.95;
  text-align: justify;
}

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

.side-recommend-list .movie-card-body > span:not(.card-tags),
.side-recommend-list .card-tags {
  display: none;
}

.side-recommend-list .movie-card-body {
  padding: 14px;
}

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

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 42px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  margin-bottom: 16px;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: #94a3b8;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px;
  border-top: 1px solid #1e293b;
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 14px;
  }

  .header-search {
    width: 240px;
  }

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

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

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

  .detail-side {
    position: static;
  }
}

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

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

  .home-search-band {
    grid-template-columns: 1fr;
    margin: -36px 16px 0;
  }

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

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

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

@media (max-width: 640px) {
  .site-header-inner {
    height: 66px;
    padding: 0 16px;
  }

  .site-logo strong {
    font-size: 18px;
  }

  .hero {
    height: 78vh;
    min-height: 560px;
  }

  .hero-content {
    left: 20px;
    bottom: 62px;
  }

  .hero-arrow {
    display: none;
  }

  .home-search-band,
  .content-section,
  .page-hero,
  .detail-hero,
  .detail-content-grid,
  .footer-grid {
    padding-left: 16px;
    padding-right: 16px;
  }

  .home-search-band {
    padding-top: 24px;
    padding-bottom: 24px;
  }

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

  .movie-grid,
  .feature-grid,
  .wide-grid,
  .rank-grid,
  .rank-list,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid .movie-card-large {
    grid-column: auto;
    grid-row: auto;
  }

  .movie-card-large .movie-poster-wrap {
    min-height: 260px;
  }

  .rank-card {
    grid-template-columns: 48px 84px 1fr;
  }

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