:root {
  --page-bg: #f6f8fc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --red: #ef4444;
  --dark: #081327;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34rem), var(--page-bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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: 80;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(8, 19, 39, 0.98), rgba(18, 48, 96, 0.96));
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.38);
}

.desktop-nav,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.desktop-nav a,
.nav-drop-button {
  color: rgba(255, 255, 255, 0.82);
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.nav-drop:hover .nav-drop-button,
.mobile-panel a:hover {
  color: #7dd3fc;
}

.nav-drop {
  position: relative;
}

.nav-drop-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 180px;
  padding: 10px;
  border-radius: 16px;
  color: #1f2937;
  background: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-drop:hover .nav-drop-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-drop-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: #334155;
}

.nav-drop-menu a:hover {
  color: var(--blue);
  background: #eff6ff;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.menu-button {
  display: none;
}

.search-panel,
.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.search-panel.is-open,
.mobile-panel.is-open {
  display: block;
}

.search-panel-inner,
.mobile-panel-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-form input,
.search-inline input,
.filter-input {
  min-width: 0;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 14px;
  outline: none;
  color: #0f172a;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-panel .search-form input {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.search-panel .search-form input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

.search-form input:focus,
.search-inline input:focus,
.filter-input:focus {
  border-color: rgba(37, 99, 235, 0.68);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.primary-button,
.ghost-button,
.search-form button,
.play-main,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-form button,
.play-main {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.26);
}

.primary-button:hover,
.search-form button:hover,
.play-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.34);
}

.ghost-button {
  color: #dbeafe;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

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

.page-main {
  min-height: 72vh;
}

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

.hero {
  position: relative;
  margin: 24px auto 38px;
  min-height: 620px;
  overflow: hidden;
  border-radius: 34px;
  color: #ffffff;
  background: #061124;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.82fr);
  align-items: center;
  gap: 36px;
  padding: 70px clamp(26px, 6vw, 72px) 82px;
  opacity: 0;
  visibility: hidden;
  background-image: linear-gradient(90deg, rgba(3, 7, 18, 0.96) 0%, rgba(15, 23, 42, 0.86) 48%, rgba(15, 23, 42, 0.34) 100%), var(--hero-image);
  background-position: center;
  background-size: cover;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(147, 197, 253, 0.22);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  max-width: 780px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 640px;
  margin: 0;
  color: rgba(226, 232, 240, 0.88);
  font-size: 18px;
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin: 22px 0 28px;
}

.pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.tag-pill.light,
.card-meta .pill,
.detail-tags .tag-pill {
  color: #2563eb;
  background: #eff6ff;
  border-color: #dbeafe;
}

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

.hero-poster {
  position: relative;
  max-width: 390px;
  justify-self: end;
  isolation: isolate;
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -1;
  border-radius: 38px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.52), rgba(6, 182, 212, 0.28));
  filter: blur(16px);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.hero-card-note {
  position: absolute;
  left: -22px;
  bottom: 30px;
  width: min(260px, 74%);
  padding: 16px;
  border-radius: 20px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.24);
}

.hero-card-note strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.hero-card-note span {
  display: block;
  color: #64748b;
  font-size: 13px;
}

.hero-dots {
  position: absolute;
  left: clamp(26px, 6vw, 72px);
  bottom: 32px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: -8px auto 42px;
}

.quick-card,
.category-card,
.feature-panel,
.movie-card,
.detail-card,
.rank-row,
.search-box,
.info-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.quick-card {
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-card:hover,
.category-card:hover,
.movie-card:hover,
.rank-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.quick-card b,
.category-card b {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.quick-card span,
.category-card span {
  color: var(--muted);
  font-size: 14px;
}

.section {
  margin-bottom: 52px;
}

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

.section-title h2,
.page-hero h1,
.category-title h1,
.detail-title h1 {
  margin: 10px 0 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.14;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-title p,
.page-hero p,
.category-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.3);
}

.poster-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-play span {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.32);
}

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

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

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

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

.card-body p {
  margin: 9px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card-meta {
  color: #64748b;
  font-size: 12px;
}

.feature-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  padding: 20px;
  overflow: hidden;
}

.feature-panel img {
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  border-radius: 20px;
}

.feature-copy {
  align-self: center;
  padding: 16px;
}

.feature-copy h2 {
  margin: 10px 0 14px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.feature-copy p {
  color: var(--muted);
}

.page-hero,
.category-title {
  padding: 42px 0 24px;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card .category-link {
  margin-top: auto;
  color: var(--blue);
  font-weight: 900;
}

.filter-bar,
.search-box {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding: 16px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-height: 38px;
  padding: 0 14px;
  color: #334155;
  background: #f1f5f9;
}

.filter-button.is-active,
.filter-button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

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

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

.rank-row {
  display: grid;
  grid-template-columns: 76px 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-number {
  font-size: 30px;
  font-weight: 950;
  color: var(--blue);
  text-align: center;
}

.rank-row img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-copy h2 {
  margin: 0 0 7px;
  font-size: 20px;
  font-weight: 900;
}

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

.detail-hero {
  color: #ffffff;
  background-image: linear-gradient(90deg, rgba(3, 7, 18, 0.98), rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.46)), var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: rgba(226, 232, 240, 0.84);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #7dd3fc;
}

.detail-title h1 {
  color: #ffffff;
  max-width: 860px;
}

.detail-title p {
  max-width: 850px;
  margin: 16px 0 0;
  color: rgba(226, 232, 240, 0.88);
  font-size: 17px;
}

.detail-meta {
  margin-top: 18px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.24);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.15), rgba(0, 0, 0, 0.42));
  transition: opacity 0.2s ease;
  pointer-events: auto;
}

.player-shell.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-main {
  min-height: 64px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  margin-top: 24px;
}

.detail-card,
.info-panel {
  padding: 24px;
}

.detail-card h2,
.info-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 950;
}

.detail-card p,
.info-panel p {
  color: #334155;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.info-panel img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 18px;
}

.info-list {
  display: grid;
  gap: 11px;
  color: #334155;
  font-size: 14px;
}

.info-list span {
  color: var(--muted);
}

.footer {
  margin-top: 62px;
  color: rgba(255, 255, 255, 0.72);
  background: linear-gradient(135deg, #081327, #102449);
}

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

.footer strong {
  color: #ffffff;
}

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

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

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

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

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

  .mobile-panel-inner {
    display: grid;
    gap: 12px;
  }

  .mobile-panel a {
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .hero {
    min-height: 760px;
    border-radius: 24px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 24px;
    padding: 42px 22px 78px;
  }

  .hero-poster {
    justify-self: start;
    width: min(260px, 86%);
  }

  .hero h1 {
    font-size: clamp(38px, 11vw, 62px);
  }

  .feature-panel,
  .filter-bar,
  .search-box {
    grid-template-columns: 1fr;
  }

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

  .rank-row .primary-button {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .nav-wrap {
    min-height: 64px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero-wrap,
  .section,
  .page-shell,
  .detail-main,
  .detail-hero-inner,
  .footer-inner,
  .nav-wrap,
  .search-panel-inner,
  .mobile-panel-inner {
    width: min(100% - 24px, 1200px);
  }

  .hero {
    margin-top: 14px;
    min-height: 720px;
  }

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

  .card-body {
    padding: 12px;
  }

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

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

  .detail-card,
  .info-panel {
    padding: 18px;
  }

  .play-main {
    min-height: 54px;
    font-size: 16px;
  }
}
