* {
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --secondary: #7c3aed;
  --secondary-soft: #ede9fe;
  --accent: #f97316;
  --accent-soft: #ffedd5;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --bg: #f8fafc;
  --footer: #111827;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

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

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong,
.footer-logo strong {
  font-size: 20px;
  color: var(--primary);
}

.brand-text small,
.footer-logo small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

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

.nav-link {
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

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

.header-search input,
.mobile-panel input,
.page-tools input {
  width: 230px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-panel input:focus,
.page-tools input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.header-search button,
.mobile-panel button,
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.primary-button {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.header-search button:hover,
.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.14);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #334155;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
}

.mobile-panel.open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 12px;
  padding: 16px 0;
}

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

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

.mobile-panel input {
  width: 100%;
}

.hero-section {
  position: relative;
  overflow: hidden;
  padding: 64px 0 72px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 10%, rgba(249, 115, 22, 0.35), transparent 28%), linear-gradient(135deg, #2563eb 0%, #1d4ed8 45%, #7c3aed 100%);
}

.hero-intro {
  text-align: center;
  margin-bottom: 36px;
}

.hero-intro h1,
.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.hero-intro p,
.page-hero p {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.hero-carousel {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.35);
  background: #0f172a;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.38), rgba(2, 6, 23, 0.08));
}

.hero-copy {
  position: absolute;
  left: 42px;
  bottom: 42px;
  max-width: 620px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  color: #ffffff;
  background: var(--accent);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-copy h2 {
  margin: 14px 0 12px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
}

.hero-copy p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
}

.hero-tags,
.detail-tags,
.tag-row,
.side-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.side-meta span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  color: #1e293b;
  background: #e0f2fe;
}

.hero-tags {
  margin-bottom: 18px;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.52);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.74);
}

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

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

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

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

.soft-section {
  padding: 62px 0;
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
}

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

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

.poster-card,
.large-card,
.compact-card,
.category-tile,
.rank-panel,
.detail-article,
.detail-aside,
.rank-item {
  background: var(--paper);
  border: 1px solid rgba(226, 232, 240, 0.88);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.poster-card,
.large-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-card:hover,
.large-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.poster-image {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e2e8f0;
}

.poster-image img,
.large-image img,
.compact-image img,
.rank-cover img,
.movie-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.poster-card:hover .poster-image img,
.large-card:hover .large-image img,
.compact-card:hover .compact-image img,
.rank-item:hover .rank-cover img {
  transform: scale(1.06);
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: var(--primary);
}

.poster-body {
  padding: 14px;
}

.poster-title,
.compact-title,
.rank-title {
  display: block;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.poster-title:hover,
.compact-title:hover,
.rank-title:hover {
  color: var(--primary);
}

.poster-body p,
.compact-body p,
.rank-info p {
  display: -webkit-box;
  margin: 8px 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.poster-meta,
.compact-meta {
  color: #94a3b8;
  font-size: 12px;
}

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

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

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

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 24px;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.category-tile:hover {
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.category-tile strong {
  font-size: 22px;
  color: var(--ink);
}

.category-tile span {
  color: var(--muted);
}

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

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

.compact-card {
  display: flex;
  gap: 14px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  background: #f8fafc;
  transform: translateY(-2px);
}

.compact-image {
  flex: 0 0 118px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.compact-body {
  padding: 14px 14px 14px 0;
}

.rank-panel {
  position: sticky;
  top: 88px;
  border-radius: var(--radius-md);
  padding: 24px;
}

.rank-panel h2 {
  margin: 0 0 16px;
}

.rank-panel ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.rank-panel li a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-weight: 700;
}

.rank-panel li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #ffffff;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-size: 13px;
}

.page-hero {
  padding: 72px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
}

.category-hero {
  background: radial-gradient(circle at 78% 20%, rgba(249, 115, 22, 0.34), transparent 22%), linear-gradient(135deg, #1d4ed8, #312e81);
}

.rank-hero {
  background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.34), transparent 24%), linear-gradient(135deg, #0f172a, #1d4ed8);
}

.page-hero .eyebrow {
  margin-bottom: 14px;
}

.page-tools {
  margin-top: 28px;
}

.page-tools label {
  display: grid;
  gap: 8px;
  max-width: 520px;
}

.page-tools span {
  font-weight: 800;
}

.page-tools input {
  width: 100%;
  padding: 13px 15px;
}

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

.large-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.image-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent 70%);
}

.large-badge,
.large-copy {
  position: absolute;
  color: #ffffff;
}

.large-badge {
  top: 14px;
  right: 14px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(37, 99, 235, 0.92);
}

.large-copy {
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.large-copy strong,
.large-copy em {
  display: block;
}

.large-copy strong {
  font-size: 20px;
}

.large-copy em {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-style: normal;
}

.empty-state {
  display: none;
  margin: 26px 0 0;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  border-radius: var(--radius-md);
  background: #ffffff;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-md);
}

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

.rank-cover {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
}

.rank-info div {
  color: #94a3b8;
  font-size: 13px;
}

.watch-hero {
  padding: 34px 0 46px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1e293b 50%, #312e81);
}

.watch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 28px;
  align-items: end;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.watch-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #020617;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  color: var(--primary);
  background: #ffffff;
  font-size: 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.26);
}

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

.movie-side img {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.side-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

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

.detail-article,
.detail-aside {
  border-radius: var(--radius-lg);
  padding: 30px;
}

.detail-article .eyebrow {
  margin-bottom: 12px;
}

.detail-article h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.16;
}

.lead-text {
  margin: 0 0 18px;
  color: #334155;
  font-size: 18px;
}

.detail-tags {
  margin: 16px 0 26px;
}

.detail-article h2,
.detail-aside h2 {
  margin: 28px 0 12px;
}

.detail-article p {
  color: #334155;
}

.detail-aside dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 0;
}

.detail-aside dt {
  color: #94a3b8;
}

.detail-aside dd {
  margin: 0;
  color: #334155;
  font-weight: 700;
}

.detail-aside a {
  color: var(--primary);
}

.site-footer {
  color: #cbd5e1;
  background: var(--footer);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-logo .brand-mark {
  box-shadow: none;
}

.footer-logo strong {
  color: #ffffff;
}

.footer-brand p {
  max-width: 520px;
  color: #94a3b8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer ul {
  display: grid;
  gap: 9px;
  list-style: none;
  padding: 0;
  margin: 0;
}

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

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

@media (max-width: 1100px) {
  .poster-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .rank-panel {
    position: static;
  }

  .movie-side {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-section,
  .page-hero {
    padding: 46px 0 56px;
  }

  .hero-carousel,
  .hero-slide img {
    min-height: 380px;
  }

  .hero-copy {
    left: 22px;
    right: 22px;
    bottom: 34px;
  }

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

  .compact-list,
  .category-grid,
  .category-grid.full,
  .large-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-item {
    grid-template-columns: 46px 72px minmax(0, 1fr);
    gap: 12px;
  }

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

@media (max-width: 520px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero-intro p,
  .page-hero p {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .poster-body {
    padding: 12px;
  }

  .detail-article,
  .detail-aside {
    padding: 22px;
  }

  .play-icon {
    width: 62px;
    height: 62px;
    font-size: 24px;
  }
}
