* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.22);
  --text: #e5edf7;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --yellow: #facc15;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 28rem),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

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

.site-logo {
  flex: 0 0 auto;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  padding: 10px 13px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: rgba(34, 211, 238, 0.12);
}

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

.site-search input {
  width: 230px;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  padding: 0 15px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.55);
  outline: none;
}

.site-search input:focus {
  border-color: rgba(34, 211, 238, 0.85);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.site-search button,
.primary-btn,
.secondary-btn,
.player-start {
  border: 0;
  border-radius: 999px;
  color: #06111f;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 24px rgba(34, 211, 238, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-search button {
  height: 38px;
  padding: 0 16px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
}

.secondary-btn {
  color: var(--text);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: none;
}

.site-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.player-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(34, 211, 238, 0.28);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  width: 42px;
  height: 38px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74) 45%, rgba(2, 6, 23, 0.4)),
    linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.92));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 70vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 44px;
  padding: 64px 0;
}

.hero-copy h1 {
  margin: 0 0 18px;
  max-width: 760px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 660px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.card-badges,
.detail-meta,
.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-bottom: 18px;
}

.hero-tags span,
.card-badges em,
.detail-meta span,
.tag-line span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.68);
  font-size: 12px;
  font-style: normal;
  padding: 5px 10px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-poster {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 26px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-nav {
  position: absolute;
  z-index: 4;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 32px;
  display: flex;
  gap: 10px;
}

.hero-nav button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.74);
  cursor: pointer;
}

.page-main {
  padding: 42px 0 64px;
}

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

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

.section-head h1,
.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  color: var(--cyan);
  font-weight: 700;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 22px 44px rgba(34, 211, 238, 0.12);
}

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

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

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

.play-mark {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

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

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

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: #aab7ca;
  line-height: 1.6;
  font-size: 14px;
}

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

.category-tile {
  display: block;
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 60%),
    rgba(15, 23, 42, 0.82);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.category-tile span {
  color: var(--muted);
  line-height: 1.7;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 74px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 18px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.76);
}

.rank-no {
  font-size: 22px;
  font-weight: 800;
  color: var(--yellow);
  text-align: center;
}

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

.rank-row h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.rank-score {
  color: var(--cyan);
  font-weight: 800;
  text-align: right;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #cbd5e1;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 52px;
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.detail-cover {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow);
}

.detail-cover img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-info .lead {
  margin: 20px 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.player-panel {
  margin-top: 26px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  overflow: hidden;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 150px;
  min-height: 48px;
  padding: 0 24px;
  z-index: 3;
}

.player-start:hover {
  transform: translate(-50%, calc(-50% - 2px));
}

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

.detail-article {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.article-card,
.side-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  padding: 24px;
}

.article-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.article-card p {
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.9;
}

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

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

.side-item img {
  border-radius: 10px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.side-item strong {
  display: block;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.search-panel {
  width: min(800px, calc(100% - 32px));
  margin: 0 auto 34px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
}

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

.search-panel input {
  flex: 1;
  height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.65);
  outline: none;
}

.search-panel button {
  border: 0;
  border-radius: 16px;
  padding: 0 24px;
  color: #06111f;
  font-weight: 800;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  cursor: pointer;
}

.is-filtered-out {
  display: none;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.88);
}

.footer-inner {
  min-height: 86px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: var(--muted);
}

.footer-inner strong {
  color: var(--text);
}

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

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

  .detail-hero,
  .detail-article {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 420px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav,
  .site-search {
    display: none;
    width: 100%;
  }

  .main-nav.is-open,
  .site-search.is-open {
    display: flex;
  }

  .main-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .site-search input {
    width: 100%;
  }

  .hero,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hero-poster {
    display: none;
  }

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

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

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

  .rank-score {
    grid-column: 3;
    text-align: left;
  }
}

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

  .section-head,
  .footer-inner,
  .search-panel form {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-copy p {
    font-size: 16px;
  }
}
