:root {
  --page: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --dark: #0f172a;
  --dark-2: #1f2937;
  --accent: #dc2626;
  --accent-2: #f97316;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  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(135deg, #f8fafc 0%, #f3f4f6 45%, #fafaf9 100%);
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.nav-shell {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--dark), var(--accent));
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.28);
  transform: translateZ(0);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.06) rotate(-4deg);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.04em;
}

.brand-text em {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  color: #374151;
  font-weight: 650;
}

.desktop-nav a {
  position: relative;
  padding: 10px 0;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: auto;
  bottom: 3px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--dark);
  transition: width 0.25s ease;
}

.desktop-nav a:hover::after {
  width: 100%;
}

.menu-button {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  background: #f1f5f9;
  font-size: 22px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 10px 22px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

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

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 650;
}

.mobile-nav a:hover {
  background: #f1f5f9;
}

.main-shell,
.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 0;
}

.hero {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: stretch;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 18% 20%, rgba(249, 115, 22, 0.55), transparent 28%),
              radial-gradient(circle at 80% 15%, rgba(220, 38, 38, 0.48), transparent 32%),
              linear-gradient(135deg, #0f172a 0%, #1f2937 46%, #111827 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.78) 0%, rgba(15, 23, 42, 0.58) 45%, rgba(15, 23, 42, 0.18) 100%);
  z-index: 1;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.7fr);
  gap: 42px;
  align-items: center;
  padding: 74px max(24px, calc((100vw - 1280px) / 2 + 24px)) 62px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  z-index: 2;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  color: #fee2e2;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.07em;
  text-wrap: balance;
}

.hero p {
  max-width: 740px;
  margin: 0 0 22px;
  color: #d1d5db;
  font-size: clamp(16px, 1.9vw, 22px);
}

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

.button,
.hero-actions a,
.filter-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #ffffff;
  color: #111827;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.button:hover,
.hero-actions a:hover,
.filter-bar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.22);
}

.button-outline {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.26) !important;
  backdrop-filter: blur(12px);
}

.hero-card {
  position: relative;
  justify-self: end;
  width: min(380px, 100%);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
  background: #111827;
  transform: rotate(1.2deg);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  opacity: 0.92;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88));
}

.hero-card-text {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
}

.hero-card-text strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
}

.hero-card-text span {
  display: block;
  margin-top: 6px;
  color: #d1d5db;
}

.hero-dots {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 28px;
  display: flex;
  gap: 10px;
  z-index: 5;
}

.hero-dots button {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #ffffff;
}

.hero-search {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 28px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px);
}

.hero-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 0 16px;
  font-size: 16px;
}

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

.hero-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
}

.section {
  margin-top: 58px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 36px);
  letter-spacing: -0.05em;
}

.section-head a {
  color: #475569;
  font-weight: 800;
}

.movie-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 3px 0 18px;
  scroll-snap-type: x proximity;
}

.movie-row .movie-card {
  flex: 0 0 205px;
  scroll-snap-align: start;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e5e7eb;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 42% 0 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.70));
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 4;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 14px;
}

.card-body {
  padding: 14px 15px 16px;
}

.card-body h3 {
  margin: 0 0 5px;
  font-size: 17px;
  line-height: 1.3;
}

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

.card-meta {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  margin: 0 0 12px;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

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

.tag-list span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.panel {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

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

.category-card {
  min-height: 166px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  margin: 28px auto 40px;
  padding: 50px;
  border-radius: 30px;
  color: #ffffff;
  background: radial-gradient(circle at 15% 0%, rgba(249, 115, 22, 0.48), transparent 25%),
              linear-gradient(135deg, #111827, #1f2937 58%, #0f172a);
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.22);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #d1d5db;
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 180px) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filter-bar label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  color: #334155;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 0 13px;
  outline: 0;
  background: #f8fafc;
  color: var(--text);
  font: inherit;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #94a3b8;
  background: #ffffff;
}

.filter-empty {
  display: none;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

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

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

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

.rank-row {
  display: grid;
  grid-template-columns: 44px 60px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

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

.rank-row img {
  width: 60px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
  background: #e5e7eb;
}

.rank-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.rank-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.breadcrumb {
  margin: 24px auto 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.player-card {
  padding: 16px;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.52);
  z-index: 3;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.player-cover button {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 22px 45px rgba(220, 38, 38, 0.34);
}

.player-cover.is-hidden {
  display: none;
}

.detail-title {
  margin: 26px 0 18px;
}

.detail-title h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.detail-title p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: #334155;
  font-weight: 800;
  font-size: 13px;
}

.content-card {
  padding: 28px;
  margin-top: 22px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.content-card p {
  margin: 0 0 16px;
  color: #334155;
}

.side-stack {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 96px;
}

.side-panel {
  padding: 18px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.side-panel h2,
.side-panel h3 {
  margin: 0 0 14px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

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

.mini-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.mini-item img {
  width: 56px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
  background: #e5e7eb;
}

.mini-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 70px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937 54%, #0f172a);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.9fr;
  gap: 36px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

.site-footer p {
  max-width: 520px;
  margin: 14px 0 0;
  color: #9ca3af;
}

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

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

.footer-links a {
  color: #d1d5db;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  border-top: 1px solid rgba(229, 231, 235, 0.16);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #9ca3af;
  font-size: 14px;
}

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

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

  .desktop-nav {
    gap: 12px;
    font-size: 14px;
  }
}

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

  .menu-button {
    display: inline-flex;
  }

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding-top: 58px;
  }

  .hero-card {
    justify-self: start;
    width: min(280px, 82vw);
  }

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

  .side-stack {
    position: static;
  }

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

@media (max-width: 760px) {
  .nav-shell,
  .main-shell,
  .page-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .hero {
    min-height: 720px;
  }

  .hero-slide {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero-search {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .hero-search input {
    min-height: 42px;
  }

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

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

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

  .page-hero {
    padding: 34px 24px;
    border-radius: 24px;
  }

  .content-card {
    padding: 22px;
  }

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

@media (max-width: 430px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 36px 54px minmax(0, 1fr);
  }

  .rank-row img {
    width: 54px;
    height: 76px;
  }
}
