:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --panel-soft: #1e293b;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #cbd5e1;
  --gold: #fbbf24;
  --gold-deep: #f59e0b;
  --red: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.1), transparent 34rem), linear-gradient(135deg, #020617, #0f172a 48%, #020617);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

.is-hidden {
  opacity: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0));
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #111827;
  background: var(--gold);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(251, 191, 36, 0.35);
}

.brand-text {
  font-size: clamp(18px, 2vw, 24px);
}

.brand-text span {
  color: var(--gold);
}

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

.nav-links a,
.mobile-panel a {
  color: #d1d5db;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover {
  color: var(--gold);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

.nav-search input,
.mobile-panel input,
.big-search input,
.filter-bar input,
.search-controls input,
.search-controls select {
  border: 1px solid rgba(148, 163, 184, 0.18);
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.75);
  border-radius: 999px;
}

.nav-search input {
  width: 245px;
  padding: 10px 16px;
}

.nav-search button,
.mobile-panel button,
.big-search button,
.search-controls button {
  border: 0;
  color: #111827;
  background: var(--gold);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 11px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.mobile-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.mobile-panel input {
  width: 100%;
  padding: 11px 14px;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-bg,
.detail-backdrop {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay,
.detail-backdrop div {
  position: absolute;
  inset: 0;
}

.hero-overlay.one {
  background: linear-gradient(to top, #020617 3%, rgba(15, 23, 42, 0.86) 42%, rgba(2, 6, 23, 0.18));
}

.hero-overlay.two {
  background: linear-gradient(to right, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.82));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  text-align: center;
  padding-top: 88px;
}

.hero-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 15px;
  border: 1px solid rgba(251, 191, 36, 0.36);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(251, 191, 36, 0.12);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 24px auto 18px;
  max-width: 980px;
  font-size: clamp(40px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.07em;
  font-weight: 950;
}

.hero-content p,
.page-hero p,
.detail-info .lead {
  width: min(820px, 100%);
  margin: 0 auto 26px;
  color: #d1d5db;
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.75;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags {
  justify-content: center;
  margin-bottom: 30px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  color: #d1d5db;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 13px;
}

.hero-actions,
.quick-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.btn,
.quick-links a,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.quick-links a:hover,
.section-more:hover,
.movie-card:hover {
  transform: translateY(-3px);
}

.btn.primary {
  color: #111827;
  background: var(--gold);
  box-shadow: 0 16px 38px rgba(251, 191, 36, 0.3);
}

.btn.ghost,
.quick-links a,
.section-more {
  border: 1px solid rgba(251, 191, 36, 0.28);
  color: var(--gold);
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(12px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.42);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--gold);
}

.quick-panel,
.section-block,
.category-overview-grid,
.info-grid,
.detail-content,
.player-section,
.search-app {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-panel {
  position: relative;
  z-index: 6;
  margin-top: -74px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.big-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.big-search input {
  min-height: 56px;
  padding: 0 20px;
  font-size: 17px;
}

.big-search button {
  padding: 0 24px;
}

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

.section-block {
  padding: 72px 0 0;
}

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

.section-head h2,
.info-grid h2,
.detail-content h2 {
  margin: 0 0 8px;
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.section-head p,
.info-grid p,
.detail-content p,
.category-overview p,
.category-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 21px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(30, 41, 59, 0.88);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: radial-gradient(circle at 50% 30%, rgba(251, 191, 36, 0.18), rgba(15, 23, 42, 0.8));
}

.poster-frame.large {
  border-radius: 24px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  box-shadow: var(--shadow);
}

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

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 8px 12px;
  color: #111827;
  background: var(--gold);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--gold-deep));
}

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

.card-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 11px;
}

.movie-card h3 {
  min-height: 48px;
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--gold);
}

.movie-card p {
  min-height: 66px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  gap: 8px;
}

.tag-row span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.category-tile,
.category-overview,
.info-grid article,
.detail-content article,
.ranking-panel,
.search-app {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.category-tile {
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 191, 36, 0.4);
}

.category-tile span,
.category-overview-head span {
  display: inline-grid;
  min-width: 52px;
  height: 36px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 999px;
  color: #111827;
  background: var(--gold);
  font-weight: 950;
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-panel {
  padding: 22px;
  position: sticky;
  top: 88px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.45);
}

.mini-card:hover {
  border-color: rgba(251, 191, 36, 0.38);
}

.mini-poster {
  overflow: hidden;
  width: 58px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
}

.mini-title {
  color: #fff;
  font-weight: 850;
  line-height: 1.35;
}

.mini-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.mini-card b {
  color: var(--gold);
}

.page-main {
  padding-top: 68px;
}

.page-hero {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 84px 16px 54px;
  background: radial-gradient(circle at top, rgba(251, 191, 36, 0.16), transparent 34rem), linear-gradient(135deg, #020617, #172033 50%, #020617);
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(34px, 6vw, 64px);
}

.filter-bar,
.search-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}

.filter-bar {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-bar input,
.search-controls input,
.search-controls select {
  min-height: 48px;
  padding: 0 16px;
}

.filter-bar span,
.search-count {
  color: var(--gold);
  font-weight: 900;
}

.category-overview-grid,
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-top: 42px;
}

.category-overview {
  padding: 22px;
}

.category-overview-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.category-overview-head h2 {
  margin: 0 0 6px;
}

.search-app {
  padding: 22px;
  margin-top: 42px;
}

.search-controls {
  grid-template-columns: 1fr 160px 160px;
}

.search-count {
  margin: 18px 0;
}

.detail-main {
  padding-top: 0;
}

.detail-hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  padding-top: 88px;
}

.detail-backdrop div {
  background: linear-gradient(to top, #020617 7%, rgba(2, 6, 23, 0.86) 52%, rgba(2, 6, 23, 0.56));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin: 0 0 26px;
  color: var(--muted);
}

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

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

.detail-info h1 {
  margin-left: 0;
  margin-right: 0;
  font-size: clamp(38px, 6vw, 76px);
}

.detail-info .lead {
  margin-left: 0;
}

.detail-info .hero-tags {
  justify-content: flex-start;
}

.detail-meta {
  margin: 22px 0;
}

.player-section {
  padding-top: 42px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.18), rgba(2, 6, 23, 0.74));
  cursor: pointer;
}

.player-cover span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  color: #111827;
  background: var(--gold);
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 18px 42px rgba(251, 191, 36, 0.35);
}

.player-cover strong {
  font-size: 22px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding-top: 42px;
}

.detail-content article,
.info-grid article {
  padding: 24px;
}

.detail-content p,
.info-grid p {
  color: #cbd5e1;
  font-size: 16px;
}

.info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-bottom: 60px;
}

.site-footer {
  margin-top: 86px;
  padding: 56px 0 26px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 32px;
}

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

.site-footer p,
.site-footer a {
  display: block;
  margin: 0 0 9px;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer a:hover {
  color: var(--gold);
}

.footer-brand {
  color: #fff !important;
  font-size: 24px;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1080px) {
  .nav-links,
  .nav-search {
    display: none;
  }

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

  .site-header.is-open .mobile-panel {
    display: grid;
    gap: 14px;
  }

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

  .two-col,
  .detail-grid,
  .detail-content,
  .footer-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .hero-content {
    text-align: left;
  }

  .hero-tags,
  .hero-actions {
    justify-content: flex-start;
  }

  .big-search,
  .filter-bar,
  .search-controls {
    grid-template-columns: 1fr;
  }

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

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

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

  .movie-card h3 {
    min-height: auto;
    font-size: 16px;
  }

  .movie-card p {
    display: none;
  }

  .detail-hero {
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .quick-panel,
  .section-block,
  .category-overview-grid,
  .info-grid,
  .detail-content,
  .player-section,
  .search-app,
  .filter-bar,
  .detail-wrap,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.045em;
  }
}
