:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-soft: #1f2937;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --line: rgba(255, 255, 255, 0.12);
  --orange: #f97316;
  --red: #ef4444;
  --pink: #ec4899;
  --gold: #fbbf24;
  --green: #22c55e;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 20% 0%, rgba(249, 115, 22, 0.22), transparent 32%),
    radial-gradient(circle at 82% 8%, rgba(236, 72, 153, 0.16), transparent 32%),
    linear-gradient(180deg, #0f172a 0%, #111827 38%, #0b1120 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--orange), var(--red), var(--pink));
  color: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.34);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand {
  font-size: 21px;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 700;
  margin-left: auto;
}

.main-nav a,
.header-search button,
.menu-button {
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.main-nav a:hover {
  color: #ffedd5;
  transform: translateY(-1px);
}

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

.header-search input,
.home-search-panel input,
.filter-input,
.search-page-form input {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
  border-radius: 999px;
}

.header-search input {
  width: 245px;
  padding: 11px 16px;
}

.header-search input::placeholder,
.home-search-panel input::placeholder,
.filter-input::placeholder,
.search-page-form input::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.header-search button,
.home-search-panel button,
.search-page-form button {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 800;
}

.header-search button:hover,
.home-search-panel button:hover,
.search-page-form button:hover,
.menu-button:hover {
  background: rgba(255, 255, 255, 0.32);
}

.menu-button {
  display: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 0;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  filter: saturate(1.12) contrast(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.35) 100%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0) 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 132px 24px 96px;
  width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(251, 146, 60, 0.36);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 22px 0 18px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  max-width: 860px;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-info p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.card-tags span {
  border-radius: 999px;
  color: #ffedd5;
  background: rgba(249, 115, 22, 0.13);
  border: 1px solid rgba(251, 146, 60, 0.24);
}

.hero-tags span {
  padding: 8px 13px;
  font-size: 14px;
}

.card-tags span {
  padding: 6px 10px;
  font-size: 12px;
}

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

.primary-button,
.ghost-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 26px;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 18px 36px rgba(239, 68, 68, 0.28);
}

.ghost-button,
.section-link {
  min-height: 48px;
  padding: 0 22px;
  color: #ffedd5;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

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

.hero-dot.active {
  width: 36px;
  background: linear-gradient(90deg, var(--orange), var(--pink));
}

.home-search-panel {
  max-width: 1100px;
  margin: -42px auto 0;
  position: relative;
  z-index: 6;
  padding: 24px;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.home-search-panel form,
.search-page-form {
  display: flex;
  gap: 12px;
}

.home-search-panel input,
.search-page-form input {
  flex: 1;
  min-height: 52px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.09);
}

.home-search-panel button,
.search-page-form button {
  min-width: 150px;
  background: linear-gradient(90deg, var(--orange), var(--red));
}

.quick-links,
.sub-nav,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.quick-links {
  margin-top: 18px;
}

.quick-links a,
.sub-nav a,
.footer-links a {
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  padding: 9px 13px;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.quick-links a:hover,
.sub-nav a:hover,
.footer-links a:hover {
  color: #fff;
  border-color: rgba(249, 115, 22, 0.54);
  transform: translateY(-1px);
}

.section-block {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

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

.section-head h2,
.rank-panel h2,
.story-card h2,
.info-card h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-head p,
.story-card p,
.info-card,
.category-card p,
.movie-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.78;
}

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

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

.category-card,
.movie-card,
.rank-panel,
.story-card,
.info-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.86));
  border-radius: 24px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.category-card {
  padding: 18px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover,
.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, 0.52);
}

.category-covers {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.category-covers img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

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

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

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

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

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

.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #111827;
  background: linear-gradient(90deg, var(--gold), #fde68a);
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 900;
  font-size: 13px;
}

.card-body {
  padding: 16px;
}

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

.card-body h3 a:hover {
  color: #fdba74;
}

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

.card-desc {
  min-height: 74px;
  margin: 0 0 12px;
  font-size: 14px;
}

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

.rank-panel {
  padding: 22px;
}

.rank-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.rank-panel-head a {
  color: #fdba74;
  font-weight: 900;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 36px 54px minmax(0, 1fr) auto;
  grid-template-areas:
    "no img title score"
    "no img meta score";
  gap: 5px 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rank-list.compact .rank-row:nth-child(n + 11) {
  display: none;
}

.rank-row:hover {
  background: rgba(249, 115, 22, 0.12);
}

.rank-no {
  grid-area: no;
  color: #fbbf24;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  grid-area: img;
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-title {
  grid-area: title;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-meta {
  grid-area: meta;
  color: var(--dim);
  font-size: 13px;
}

.rank-score {
  grid-area: score;
  color: #ffedd5;
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 98px 24px 88px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.24), rgba(236, 72, 153, 0.18)),
    radial-gradient(circle at 72% 22%, rgba(251, 191, 36, 0.22), transparent 28%),
    #0f172a;
}

.page-hero > div {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.small-hero,
.category-hero,
.rank-hero,
.search-hero {
  min-height: 360px;
  display: grid;
  align-items: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #fed7aa;
  margin-bottom: 18px;
  font-size: 14px;
}

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

.sub-nav {
  margin-top: 24px;
  max-width: 980px;
}

.filter-section {
  padding-top: 46px;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
}

.filter-input {
  min-height: 50px;
  width: min(560px, 100%);
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.08);
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

.detail-bg,
.detail-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-bg {
  object-fit: cover;
  filter: blur(12px) saturate(1.12);
  transform: scale(1.08);
}

.detail-overlay {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.88) 45%, rgba(15, 23, 42, 0.52) 100%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.1) 45%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 68px 24px 72px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

.player-section {
  max-width: 1180px;
  margin: -60px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 4;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.16);
  aspect-ratio: 16 / 9;
}

.movie-video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  background: #020617;
}

.player-cover {
  z-index: 3;
  cursor: pointer;
}

.player-cover img {
  object-fit: cover;
  filter: brightness(0.55) saturate(1.1);
}

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

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 94px;
  height: 94px;
  border-radius: 999px;
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 20px 55px rgba(239, 68, 68, 0.42);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.big-play:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.story-card,
.info-card {
  padding: 28px;
}

.story-card p {
  font-size: 17px;
  margin: 0 0 28px;
}

.info-card dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 0;
}

.info-card dt {
  color: #fdba74;
  font-weight: 900;
}

.info-card dd {
  margin: 0;
  color: var(--muted);
}

.page-switch {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.page-switch a {
  color: #ffedd5;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.sticky-panel {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.site-footer {
  margin-top: 48px;
  color: var(--muted);
  background: linear-gradient(135deg, #020617, #111827 55%, #0f172a);
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 32px;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 34px;
  color: var(--dim);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.is-hidden {
  display: none !important;
}

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

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

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

  .sticky-panel {
    position: static;
    max-height: none;
  }
}

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

  .menu-button {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

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

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

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

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

  .header-search input {
    width: 100%;
    flex: 1;
  }

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

  .hero-content {
    padding-top: 90px;
  }

  .home-search-panel form,
  .search-page-form,
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

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

  .detail-poster {
    max-width: 270px;
  }

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

@media (max-width: 640px) {
  .section-block {
    padding: 48px 16px;
  }

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

  .card-body {
    padding: 13px;
  }

  .card-desc {
    min-height: auto;
  }

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

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

  .rank-row img {
    width: 48px;
    height: 64px;
  }

  .hero-actions,
  .quick-links,
  .sub-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .ghost-button,
  .section-link {
    width: 100%;
  }

  .player-section {
    margin-top: -32px;
    padding: 0 14px;
  }

  .story-card,
  .info-card,
  .rank-panel {
    padding: 20px;
  }
}
