:root {
  --site-blue: #0096dc;
  --site-blue-dark: #0077b6;
  --site-blue-light: #4db8e8;
  --site-yellow: #ffd700;
  --site-yellow-dark: #ffc700;
  --site-red: #e63946;
  --site-cream: #fff9e6;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --dark: #111827;
  --shadow: 0 18px 45px rgba(0, 69, 120, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--site-cream);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(0, 150, 220, 0.10), transparent 38rem),
    linear-gradient(180deg, var(--site-cream), #ffffff 34rem);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 150, 220, 0.94);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 70, 120, 0.24);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--site-blue);
  background: linear-gradient(135deg, var(--site-yellow), #fff1a0);
  font-weight: 900;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.08);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.brand-text small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
}

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

.site-nav a {
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--site-yellow);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
  padding: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.66);
}

.header-search button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  padding: 7px 14px;
  color: var(--site-blue-dark);
  background: var(--site-yellow);
}

.header-search button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 1.65rem;
  cursor: pointer;
}

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

.hero-carousel {
  position: relative;
  margin: 28px auto 42px;
  overflow: hidden;
  border-radius: 28px;
  min-height: 520px;
  color: #ffffff;
  background: var(--dark);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 32px;
  padding: 58px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 45, 82, 0.92), rgba(0, 118, 182, 0.72) 46%, rgba(0, 0, 0, 0.44)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.36), transparent 36%);
}

.hero-content,
.hero-cover {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: var(--site-yellow);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  margin: 22px 0 14px;
  font-size: clamp(2.3rem, 5vw, 4.9rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
}

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

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  color: var(--site-blue-dark);
  background: linear-gradient(135deg, var(--site-yellow), #ffe878);
  box-shadow: 0 14px 28px rgba(255, 215, 0, 0.25);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.hero-cover {
  justify-self: end;
  width: min(380px, 100%);
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  transform: rotate(2deg);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.35);
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 54px;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.hero-dot.active {
  width: 52px;
  background: var(--site-yellow);
}

.section {
  margin: 42px 0;
}

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

.section-heading h2,
.page-title h1,
.detail-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.55rem, 2.5vw, 2.25rem);
  line-height: 1.15;
}

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

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

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

.category-tile {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(135deg, #ffffff, #e8f7ff);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 150, 220, 0.12);
}

.category-tile::before {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.38);
}

.category-tile h3 {
  position: relative;
  margin: 0 0 10px;
  color: var(--site-blue-dark);
  font-size: 1.25rem;
}

.category-tile p {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 150, 220, 0.09);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 50px rgba(0, 69, 120, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #dceefa;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.82rem;
  font-weight: 900;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(6px);
}

.year-badge {
  left: 12px;
}

.rank-badge {
  right: 12px;
  color: var(--site-blue-dark);
  background: var(--site-yellow);
}

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

.movie-meta {
  margin: 0 0 8px;
  color: var(--site-blue-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--site-blue-dark);
}

.movie-line {
  min-height: 3.2em;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--site-blue-dark);
  background: rgba(0, 150, 220, 0.10);
  font-size: 0.78rem;
  font-weight: 800;
}

.page-title {
  padding: 40px 0 24px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin: 0 0 24px;
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 150, 220, 0.12);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  outline: 0;
  color: var(--ink);
  background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--site-blue);
  box-shadow: 0 0 0 4px rgba(0, 150, 220, 0.11);
}

.empty-state {
  display: none;
  margin: 18px 0 0;
  padding: 22px;
  border-radius: 18px;
  color: var(--muted);
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 72px 120px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 150, 220, 0.10);
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: var(--site-blue-dark);
  background: var(--site-yellow);
  font-weight: 950;
  font-size: 1.15rem;
}

.ranking-item img {
  width: 120px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-item h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.ranking-item p {
  margin: 0;
  color: var(--muted);
}

.ranking-item .primary-button {
  white-space: nowrap;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 36px;
  background: var(--dark);
  color: #ffffff;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.32;
}

.detail-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.08);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 50, 90, 0.94), rgba(0, 0, 0, 0.64)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.52), transparent);
}

.detail-inner {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.34);
  border: 8px solid rgba(255, 255, 255, 0.14);
}

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

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

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

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
}

.detail-line {
  max-width: 780px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.detail-main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
}

.player-section,
.detail-copy,
.related-section,
.sidebar-panel {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 150, 220, 0.10);
}

.player-section {
  padding: 18px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 150, 220, 0.34), rgba(0, 0, 0, 0.68));
  cursor: pointer;
  transition: opacity 0.22s ease;
}

.play-layer span {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  color: var(--site-blue-dark);
  background: var(--site-yellow);
  font-size: 2.2rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

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

.detail-copy {
  margin-top: 22px;
  padding: 26px;
}

.detail-copy h2 {
  margin-top: 0;
}

.detail-copy p {
  color: #374151;
  font-size: 1.02rem;
  line-height: 1.85;
}

.detail-copy blockquote {
  margin: 24px 0 0;
  padding: 20px 22px;
  border-left: 5px solid var(--site-yellow);
  border-radius: 14px;
  color: #374151;
  background: rgba(255, 215, 0, 0.14);
  line-height: 1.8;
}

.related-section {
  margin-top: 22px;
  padding: 24px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: #f8fbff;
  transition: transform 0.18s ease, background 0.18s ease;
}

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

.compact-card img {
  width: 78px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card strong {
  display: block;
  line-height: 1.35;
}

.compact-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.sidebar-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.sidebar-panel h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

.side-links {
  display: grid;
  gap: 12px;
}

.site-footer {
  margin-top: 64px;
  color: #ffffff;
  background: #111827;
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.footer-inner strong {
  font-size: 1.25rem;
  color: var(--site-yellow);
}

.footer-inner p {
  max-width: 620px;
  color: #cbd5e1;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: start;
}

.footer-inner nav a:hover {
  color: var(--site-yellow);
}

.copyright {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.92rem;
}

.hidden-card {
  display: none;
}

@media (max-width: 1040px) {
  .header-search {
    width: 230px;
  }

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

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

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

  .sidebar-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-left: 0;
    padding: 12px 0 4px;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
  }

  .header-search {
    width: 100%;
    order: 4;
  }

  .hero-carousel {
    min-height: 660px;
    border-radius: 22px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 34px 26px 84px;
  }

  .hero-cover {
    justify-self: start;
    width: min(250px, 70vw);
  }

  .hero-controls {
    left: 26px;
    bottom: 28px;
  }

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

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

  .ranking-item {
    grid-template-columns: 54px 92px 1fr;
  }

  .ranking-item .primary-button {
    grid-column: 2 / -1;
    width: fit-content;
  }

  .detail-inner {
    grid-template-columns: 1fr;
    padding: 34px 0;
  }

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

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .main-wrap,
  .detail-main,
  .detail-inner,
  .header-inner,
  .footer-inner,
  .copyright {
    width: min(100% - 22px, 1200px);
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel {
    margin-top: 16px;
    min-height: 620px;
  }

  .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .ranking-item img {
    grid-column: 1 / -1;
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .ranking-item .primary-button {
    grid-column: 1 / -1;
  }

  .detail-copy,
  .related-section,
  .sidebar-panel {
    padding: 20px;
  }

  .play-layer span {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
  }
}
