:root {
  color-scheme: light;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #60a5fa;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f3f7ff;
  --line: #e5e7eb;
  --card: #ffffff;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 42%, #ffffff 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.26);
}

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.main-nav a,
.nav-more button {
  color: rgba(255, 255, 255, 0.92);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px 0;
}

.main-nav a:hover,
.nav-more button:hover {
  color: #dbeafe;
}

.nav-more {
  position: relative;
}

.nav-menu {
  position: absolute;
  top: 100%;
  left: -18px;
  min-width: 160px;
  padding: 10px;
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.22s ease;
}

.nav-more:hover .nav-menu,
.nav-more:focus-within .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

.nav-menu a:hover {
  color: var(--primary);
  background: var(--soft);
}

.top-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(360px, 34vw);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.top-search input {
  flex: 1;
  min-width: 0;
  color: #ffffff;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 11px 14px;
}

.top-search input::placeholder {
  color: rgba(255, 255, 255, 0.76);
}

.top-search button {
  border: 0;
  color: var(--primary-dark);
  background: #ffffff;
  padding: 11px 17px;
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  padding: 9px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #ffffff;
  border-radius: 3px;
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-panel.is-open {
  display: grid;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.hero-track {
  position: absolute;
  inset: 0;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 38%, rgba(96, 165, 250, 0.28), transparent 34%), linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.24) 100%), linear-gradient(0deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.1) 46%, rgba(15, 23, 42, 0.28) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 48px;
  padding: 58px 0 42px;
}

.hero-copy {
  max-width: 760px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.25);
  backdrop-filter: blur(10px);
  font-weight: 800;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4.2vw, 54px);
  line-height: 1.08;
}

.hero-summary {
  margin: 0 0 22px;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #dbeafe;
  font-size: 13px;
  font-weight: 800;
}

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

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

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

.btn-primary {
  color: var(--primary-dark);
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(255, 255, 255, 0.16);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
}

.hero-poster {
  align-self: center;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  width: min(1200px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-dots {
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

.hero-arrow-row {
  display: flex;
  gap: 10px;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.main-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 56px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p,
.detail-title p,
.footer-inner p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  color: var(--primary);
  font-weight: 900;
}

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

.movie-grid.compact-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.card-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #dbeafe;
}

.card-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.88);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card-body h3 {
  margin: 8px 0;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--primary);
}

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

.compact-card .card-poster img {
  aspect-ratio: 16 / 11;
}

.compact-card .card-body {
  padding: 12px;
}

.compact-card h3 {
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #60a5fa);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.18);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.category-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -28px;
  top: -28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.17);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 23px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.category-card span {
  margin-top: 18px;
  font-weight: 900;
}

.page-hero {
  margin: 30px 0 0;
  padding: 36px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #eef5ff 100%);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.category-pills,
.filter-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.category-pills a,
.filter-panel button,
.filter-panel input,
.filter-panel select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: #ffffff;
  color: var(--text);
}

.category-pills a:hover,
.filter-panel button:hover,
.filter-panel button.is-active {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

.filter-panel input {
  min-width: min(420px, 100%);
  outline: 0;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 140px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

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

.rank-item img {
  width: 140px;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  object-fit: cover;
}

.rank-copy h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.detail-title {
  margin-bottom: 22px;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.26));
}

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

.player-button {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 50%;
  color: var(--primary);
  background: #ffffff;
  font-size: 34px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.movie-side {
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.movie-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 18px;
}

.movie-side h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.movie-side dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}

.movie-side dt {
  color: var(--muted);
  font-weight: 800;
}

.movie-side dd {
  margin: 0;
  color: var(--text);
}

.article-box {
  margin-top: 28px;
  padding: 30px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.article-box h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.article-box p {
  color: #374151;
  line-height: 1.9;
  margin: 0 0 16px;
}

.empty-state {
  display: none;
  padding: 32px;
  border-radius: 20px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
}

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

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

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 32px;
}

.footer-logo {
  color: #ffffff;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.footer-copy {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

@media (max-width: 1024px) {
  .main-nav,
  .top-search {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .hero-poster {
    display: none;
  }

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

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

  .watch-layout {
    grid-template-columns: 1fr;
  }

  .movie-side {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
  }

  .movie-side img {
    margin-bottom: 0;
  }
}

@media (max-width: 720px) {
  .nav-shell {
    width: min(100% - 24px, 1200px);
  }

  .brand {
    font-size: 19px;
  }

  .hero,
  .hero-content {
    min-height: 560px;
  }

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

  .hero h2 {
    font-size: 30px;
  }

  .hero-summary {
    font-size: 16px;
  }

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

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

  .card-body {
    padding: 13px;
  }

  .card-body h3 {
    font-size: 16px;
  }

  .rank-item {
    grid-template-columns: 44px 92px minmax(0, 1fr);
  }

  .rank-item img {
    width: 92px;
  }

  .rank-item .btn {
    display: none;
  }

  .page-hero,
  .article-box {
    padding: 22px;
  }

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

  .movie-side img {
    max-width: 220px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid.compact-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .page-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
