:root {
  --bg-950: #020617;
  --bg-900: #0f172a;
  --bg-850: #111827;
  --bg-800: #1e293b;
  --bg-700: #334155;
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --cyan: #06b6d4;
  --cyan-soft: #22d3ee;
  --blue: #60a5fa;
  --yellow: #facc15;
  --border: rgba(148, 163, 184, 0.24);
  --shadow-cyan: 0 20px 50px rgba(6, 182, 212, 0.18);
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background: linear-gradient(180deg, var(--bg-950), var(--bg-900) 42%, var(--bg-950));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

.brand-wrap,
.header-actions,
.desktop-nav {
  display: flex;
  align-items: center;
}

.brand-wrap {
  gap: 32px;
}

.site-logo {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--cyan-soft), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  gap: 22px;
}

.nav-link,
.mobile-link {
  color: var(--text-soft);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--cyan-soft);
}

.header-actions {
  gap: 14px;
}

.header-search,
.mobile-search,
.filter-bar,
.search-panel form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select,
.search-panel input {
  border: 1px solid rgba(100, 116, 139, 0.65);
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.55);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  width: 260px;
  padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus,
.search-panel input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.35);
  background: rgba(15, 23, 42, 0.78);
}

.header-search button,
.mobile-search button,
.primary-button,
.search-panel button {
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--cyan);
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.search-panel button:hover {
  background: #22d3ee;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  border: 0;
  border-radius: 10px;
  background: rgba(51, 65, 85, 0.8);
  color: white;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.mobile-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 64px;
  padding: 18px 0 20px;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--bg-950);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg-950) 0%, rgba(15, 23, 42, 0.78) 45%, rgba(15, 23, 42, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 64px 0 78px;
}

.hero-panel {
  max-width: 780px;
}

.hero-kicker,
.section-kicker,
.info-pill,
.tag-list span,
.type-pill,
.duration-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.88);
  color: white;
  font-weight: 700;
}

.hero-kicker {
  padding: 7px 14px;
  margin-bottom: 18px;
  font-size: 0.92rem;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  max-width: 900px;
  font-size: clamp(2.2rem, 5vw, 4.9rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.07em;
  text-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}

.hero p {
  max-width: 720px;
  margin: 0 0 26px;
  color: var(--text-soft);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.75;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 800;
}

.secondary-button {
  border: 1px solid rgba(203, 213, 225, 0.34);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-main);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.secondary-button:hover {
  border-color: var(--cyan);
  background: rgba(8, 145, 178, 0.2);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: white;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 24px;
  transform: translateY(-50%);
}

.hero-next {
  right: 24px;
  transform: translateY(-50%);
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.main-content {
  padding: 56px 0 10px;
}

.section-block {
  margin-bottom: 68px;
}

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

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-mark {
  width: 5px;
  height: 32px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.55);
}

.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

.section-link {
  color: var(--cyan-soft);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(30, 41, 59, 0.52);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.82);
  box-shadow: var(--shadow-cyan);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0b1120;
}

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

.movie-card:hover .movie-cover img,
.category-mini:hover img,
.horizontal-card:hover img {
  transform: scale(1.06);
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.05) 64%);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.movie-card:hover .cover-shade {
  opacity: 1;
}

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: auto;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  color: white;
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: scale(1);
}

.type-pill,
.duration-pill,
.rank-badge {
  position: absolute;
  z-index: 3;
  padding: 5px 9px;
  font-size: 0.75rem;
  line-height: 1;
}

.type-pill {
  top: 10px;
  left: 10px;
}

.duration-pill {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #facc15);
  color: #111827;
  font-weight: 900;
}

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

.movie-card h3,
.horizontal-card h3,
.category-card h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
  font-weight: 800;
}

.movie-card h3 a,
.horizontal-card h3 a {
  transition: color 0.2s ease;
}

.movie-card h3 a:hover,
.horizontal-card h3 a:hover {
  color: var(--cyan-soft);
}

.movie-card p,
.horizontal-card p,
.category-card p,
.detail-copy p {
  color: var(--text-muted);
  line-height: 1.7;
}

.movie-card p {
  margin: 8px 0 12px;
  font-size: 0.92rem;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

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

.category-box,
.category-card,
.page-title,
.filter-panel,
.detail-shell,
.detail-player-card,
.detail-copy,
.search-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.66), rgba(15, 23, 42, 0.7));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.category-box {
  padding: 24px;
}

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

.category-box h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
}

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

.category-mini {
  display: block;
}

.category-mini figure {
  margin: 0 0 8px;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #0b1120;
}

.category-mini img,
.horizontal-image img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.category-mini h4 {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.45;
  transition: color 0.2s ease;
}

.category-mini:hover h4 {
  color: var(--cyan-soft);
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.64), rgba(15, 23, 42, 0.72));
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.horizontal-card:hover {
  transform: translateY(-3px);
  border-color: rgba(250, 204, 21, 0.72);
}

.horizontal-image {
  display: block;
  min-height: 150px;
  overflow: hidden;
  background: #0b1120;
}

.horizontal-info {
  position: relative;
  padding: 18px;
}

.horizontal-info p {
  margin: 8px 0 12px;
  font-size: 0.94rem;
}

.list-rank {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  margin-bottom: 10px;
  border-radius: 9px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  font-weight: 900;
}

.page-hero {
  padding: 54px 0 22px;
}

.page-title {
  padding: 28px;
}

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

.category-card {
  padding: 24px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.66);
}

.category-card p {
  margin: 10px 0 18px;
}

.category-card-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-card-samples span {
  border: 1px solid rgba(100, 116, 139, 0.56);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.filter-panel {
  padding: 20px;
  margin-bottom: 28px;
}

.filter-bar {
  flex-wrap: wrap;
}

.filter-input {
  flex: 1 1 280px;
  padding: 12px 14px;
}

.filter-select {
  padding: 12px 14px;
}

.detail-hero {
  padding: 44px 0 26px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

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

.detail-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 30px;
  padding: 28px;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 3 / 4;
  background: #0b1120;
}

.detail-title h1 {
  margin-bottom: 14px;
}

.detail-lead {
  margin: 0 0 20px;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.8;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.info-pill {
  padding: 7px 12px;
  background: rgba(51, 65, 85, 0.7);
  color: var(--text-soft);
  font-size: 0.9rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-list span {
  padding: 6px 11px;
  background: rgba(8, 145, 178, 0.22);
  color: var(--cyan-soft);
  font-size: 0.86rem;
}

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

.detail-player-card {
  padding: 18px;
  margin-bottom: 28px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.42);
  transition: opacity 0.25s ease;
}

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

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.16), rgba(2, 6, 23, 0.72));
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.player-play-button {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.95);
  color: white;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.32);
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-play-button:hover {
  transform: scale(1.06);
  background: #22d3ee;
}

.detail-copy {
  padding: 26px;
  margin-bottom: 28px;
}

.detail-copy h2 {
  margin: 0 0 16px;
  font-size: 1.45rem;
  font-weight: 900;
}

.detail-copy p {
  margin: 0 0 16px;
  font-size: 1.02rem;
}

.side-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.58);
  padding: 18px;
  margin-bottom: 22px;
}

.side-section h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

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

.side-link {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-link img {
  width: 82px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
}

.side-link span {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.side-link:hover span {
  color: var(--cyan-soft);
}

.search-panel {
  padding: 26px;
  margin-bottom: 28px;
}

.search-panel input {
  flex: 1;
  min-width: 0;
  padding: 13px 15px;
}

.search-status {
  color: var(--text-muted);
  margin: 18px 0 0;
}

.no-result {
  padding: 36px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.pagination-like {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.pagination-like a {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.68);
}

.pagination-like a:hover {
  border-color: var(--cyan);
  color: var(--cyan-soft);
}

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 14px;
  }

  .header-search input {
    width: 210px;
  }

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

@media (max-width: 900px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

  .hero {
    height: 64vh;
    min-height: 480px;
  }

  .hero-content {
    padding: 48px 0 70px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .movie-grid.dense-grid,
  .category-showcase,
  .ranking-list,
  .category-card-grid,
  .detail-layout,
  .detail-shell {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .site-logo {
    font-size: 1.25rem;
  }

  .hero {
    min-height: 560px;
  }

  .hero h1,
  .hero h2 {
    font-size: 2.25rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

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

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

  .horizontal-card {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .horizontal-image {
    min-height: 128px;
  }

  .detail-shell,
  .page-title,
  .detail-copy,
  .search-panel {
    padding: 20px;
  }

  .player-play-button {
    width: 68px;
    height: 68px;
  }
}
