:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(34, 211, 238, 0.36);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --amber: #facc15;
  --danger: #fb7185;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --max: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  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(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  height: 72px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark,
.footer-logo span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.34);
}

.brand-text {
  font-size: 24px;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  transform: translateY(-1px);
}

.menu-toggle {
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.mobile-nav {
  display: none;
  padding: 10px 20px 18px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.95);
}

.mobile-nav.open {
  display: grid;
}

.mobile-link {
  padding: 13px 6px;
  color: var(--soft);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  font-weight: 700;
}

.hero {
  position: relative;
  max-width: var(--max);
  min-height: 680px;
  margin: 28px auto 0;
  padding: 0 22px 96px;
  overflow: hidden;
}

.hero-slide {
  position: relative;
  display: none;
  min-height: 590px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.78));
  box-shadow: var(--shadow);
}

.hero-slide.active {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  align-items: center;
  gap: 34px;
  animation: fadeUp 0.5s ease both;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.28;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(1.05);
}

.hero-backdrop:after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.88)),
    radial-gradient(circle at 18% 18%, rgba(34, 211, 238, 0.28), transparent 22rem);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 70px 0 70px 64px;
}

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

.hero-tags span,
.card-tags span,
.card-tags a,
.detail-tags span {
  padding: 6px 10px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 47, 73, 0.46);
  font-size: 12px;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 22px 0 16px;
  max-width: 760px;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.8;
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 18px 34px rgba(34, 211, 238, 0.24);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: rgba(15, 23, 42, 0.58);
}

.hero-poster {
  position: relative;
  z-index: 2;
  width: min(320px, 80%);
  justify-self: center;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.54);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #001018;
  background: rgba(34, 211, 238, 0.94);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.48);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 116px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 3;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--text);
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.55);
}

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

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 4;
  width: min(780px, calc(100% - 44px));
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 24px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(18px);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  outline: none;
}

.hero-search input {
  min-height: 52px;
  padding: 0 18px;
  border-radius: 18px;
}

.hero-search button {
  min-width: 136px;
  border: 0;
  border-radius: 18px;
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
  cursor: pointer;
}

.content-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 52px 22px;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 900;
  font-size: 12px;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.player-section h2,
.detail-panel h2 {
  margin: 0;
  letter-spacing: -0.045em;
}

.section-heading h2,
.page-hero h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.section-more {
  color: var(--cyan);
  font-weight: 900;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: var(--line-strong);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.36);
}

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 40% 20%, rgba(34, 211, 238, 0.24), transparent 42%),
    linear-gradient(145deg, #111827, #0e7490 48%, #0f172a);
}

.poster-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.poster-image.is-hidden,
.hero-backdrop img.is-hidden,
.hero-poster img.is-hidden,
.detail-poster img.is-hidden,
.player-cover img.is-hidden,
.ranking-row img.is-hidden {
  opacity: 0;
}

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.92));
  opacity: 0.9;
}

.play-dot,
.big-play {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) scale(0.88);
  color: #001018;
  background: rgba(34, 211, 238, 0.92);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.score-pill {
  right: 10px;
  top: 10px;
  padding: 5px 8px;
  color: var(--amber);
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #001018;
  background: linear-gradient(135deg, var(--amber), var(--cyan));
}

.card-body {
  padding: 15px 15px 17px;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.28;
}

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

.card-meta,
.card-line {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.card-meta {
  font-size: 13px;
}

.card-line {
  display: -webkit-box;
  min-height: 48px;
  margin-top: 8px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.card-tags {
  margin-top: 12px;
}

.category-grid,
.category-card-grid {
  display: grid;
  gap: 16px;
}

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

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 46%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}

.category-tile span,
.category-card-name {
  font-size: 22px;
  font-weight: 900;
}

.category-tile em,
.category-card-copy {
  color: var(--muted);
  font-style: normal;
  line-height: 1.65;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 50px 64px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.ranking-row:hover {
  transform: translateX(5px);
  border-color: var(--line-strong);
}

.ranking-row img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.ranking-num,
.ranking-score {
  font-weight: 900;
  color: var(--cyan);
}

.ranking-info {
  min-width: 0;
}

.ranking-info strong,
.ranking-info em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-info em {
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-hero,
.detail-hero {
  max-width: var(--max);
  margin: 28px auto 0;
  padding: 54px 22px;
}

.slim-hero,
.category-hero {
  border-radius: 30px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 26rem),
    rgba(15, 23, 42, 0.72);
}

.page-hero p:last-child {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--soft);
  line-height: 1.8;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.search-box,
.select-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
}

.empty-tip {
  display: none;
  margin: 34px 0 0;
  color: var(--muted);
  text-align: center;
}

.empty-tip.show {
  display: block;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #0f172a, #164e63);
}

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

.breadcrumb {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

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

.detail-copy h1 {
  margin-top: 18px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.05;
}

.detail-line {
  max-width: 820px;
  color: var(--soft);
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 14px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  font-weight: 800;
}

.player-section,
.detail-panel {
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px 22px;
}

.player-section h2,
.detail-panel h2 {
  margin-bottom: 18px;
  font-size: clamp(26px, 3vw, 38px);
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  border: 1px solid var(--line-strong);
  background: #000;
  box-shadow: var(--shadow);
}

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

.movie-video {
  object-fit: contain;
  background: #000;
}

.player-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.18), transparent 35%),
    #020617;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: blur(1px);
}

.big-play {
  position: absolute;
  width: 90px;
  height: 90px;
  color: #001018;
  background: rgba(34, 211, 238, 0.96);
  box-shadow: 0 0 50px rgba(34, 211, 238, 0.48);
  font-size: 34px;
}

.player-shell.playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-panel {
  color: var(--soft);
  line-height: 1.95;
  font-size: 18px;
}

.detail-panel p {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
}

.related-section {
  padding-top: 22px;
}

.site-footer {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.84);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-brand p,
.footer-links a {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links div {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: var(--cyan);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .hero-slide.active {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .hero-copy {
    padding-left: 36px;
  }

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

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

  .menu-toggle {
    display: flex;
  }

  .header-inner {
    height: 66px;
  }

  .brand-text {
    font-size: 21px;
  }

  .hero {
    min-height: 0;
    margin-top: 16px;
    padding-bottom: 120px;
  }

  .hero-slide.active {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-copy {
    padding: 38px 24px 24px;
  }

  .hero-poster {
    width: min(250px, 70%);
    margin-bottom: 30px;
  }

  .hero-controls {
    bottom: 78px;
  }

  .hero-search {
    bottom: 0;
    flex-direction: column;
  }

  .hero-search button {
    min-height: 48px;
  }

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

  .ranking-list,
  .footer-inner,
  .detail-hero,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .content-section,
  .page-hero,
  .detail-hero,
  .player-section,
  .detail-panel,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .movie-grid,
  .wide-grid,
  .ranking-grid,
  .category-grid,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .ranking-row {
    grid-template-columns: 42px 56px minmax(0, 1fr);
  }

  .ranking-score {
    display: none;
  }

  .detail-copy h1 {
    font-size: 34px;
  }
}
