:root {
  --bg: #020617;
  --surface: rgba(15, 23, 42, 0.78);
  --surface-strong: #0f172a;
  --surface-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --yellow: #facc15;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 10%, rgba(34, 211, 238, 0.13), transparent 28rem),
    radial-gradient(circle at 82% 0%, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

.header-inner,
.footer-inner,
.page-shell,
.content-section,
.search-panel {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 14px;
  color: #001018;
  background: linear-gradient(135deg, #67e8f9, #06b6d4);
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: 0.22s ease;
}

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

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
}

.hero-shell {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 92px max(32px, calc((100vw - 1220px) / 2)) 112px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.5;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.54)),
    radial-gradient(circle at 78% 34%, rgba(34, 211, 238, 0.22), transparent 22rem);
}

.hero-content {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-summary {
  max-width: 680px;
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
  color: #cffafe;
  background: rgba(15, 23, 42, 0.7);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.25s ease;
}

.primary-button {
  color: #001018;
  background: linear-gradient(135deg, #67e8f9, #22d3ee, #06b6d4);
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.28);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 58px rgba(34, 211, 238, 0.38);
}

.ghost-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.7);
}

.ghost-button:hover {
  border-color: rgba(34, 211, 238, 0.45);
  color: var(--cyan);
  transform: translateY(-2px);
}

.ghost-button.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 9px 14px;
  border-radius: 999px;
  color: #001018;
  background: var(--cyan);
  font-weight: 800;
}

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

.hero-control,
.hero-dot {
  border: 0;
  color: var(--text);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-control {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  transition: 0.2s ease;
}

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

.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-panel h2 {
  margin: 0;
}

.inline-search,
.search-page-panel {
  display: flex;
  gap: 10px;
  width: min(100%, 540px);
}

.inline-search input,
.search-page-panel input,
.page-filter {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  outline: none;
  background: rgba(15, 23, 42, 0.86);
}

.inline-search input:focus,
.search-page-panel input:focus,
.page-filter:focus {
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.inline-search button,
.search-page-panel button {
  min-width: 88px;
  border: 0;
  border-radius: 999px;
  color: #001018;
  background: var(--cyan);
  font-weight: 800;
  cursor: pointer;
}

.content-section {
  padding: 54px 0 0;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.45), transparent);
}

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

.movie-grid {
  display: grid;
  gap: 20px;
}

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

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

.horizontal-scroller,
.ranking-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 290px);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.86));
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  scroll-snap-align: start;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  transform: translateY(-4px);
}

.poster-media {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(34, 211, 238, 0.18), transparent 12rem),
    #111827;
}

.poster-media img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.76));
}

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

.rating-badge {
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  color: #422006;
  background: var(--yellow);
}

.rank-badge {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  color: white;
  background: rgba(244, 63, 94, 0.88);
}

.play-chip {
  left: 12px;
  bottom: 12px;
  padding: 7px 12px;
  color: #001018;
  background: var(--cyan);
  opacity: 0;
  transform: translateY(10px);
  transition: 0.24s ease;
}

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

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

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

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

.movie-meta,
.movie-desc {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.movie-desc {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 13px;
}

.tag-row span {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 12px;
}

.movie-card.mini .movie-desc,
.movie-card.rank-strip .movie-desc {
  display: none;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.category-tile:hover img {
  opacity: 0.95;
  transform: scale(1.06);
}

.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
}

.category-tile strong,
.category-tile small {
  position: absolute;
  left: 18px;
  z-index: 2;
}

.category-tile strong {
  bottom: 42px;
  font-size: 22px;
}

.category-tile small {
  bottom: 18px;
  color: #cbd5e1;
}

.page-shell {
  padding: 28px 0 72px;
}

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

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(circle at 78% 10%, rgba(34, 211, 238, 0.2), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.94));
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 54px;
}

.page-hero.slim h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p:last-child {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar,
.search-page-panel {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.year-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.year-pills button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.year-pills button.active,
.year-pills button:hover {
  border-color: rgba(34, 211, 238, 0.55);
  color: var(--cyan);
}

.category-overview-list {
  display: grid;
  gap: 24px;
  margin-top: 28px;
}

.category-overview-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.overview-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.overview-head h2 {
  margin: 0;
  font-size: 28px;
}

.overview-head p:last-child {
  color: var(--muted);
}

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

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 28px;
  background: #111827;
}

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

.detail-info h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.detail-one-line {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.8;
}

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

.detail-meta-grid span {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.68);
}

.detail-meta-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--cyan);
  font-size: 13px;
}

.detail-tags {
  margin-bottom: 24px;
}

.player-section,
.detail-text {
  margin-top: 34px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay-button span {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  color: #001018;
  background: var(--cyan);
  box-shadow: 0 18px 54px rgba(34, 211, 238, 0.34);
}

.video-frame.playing .player-overlay-button {
  opacity: 0;
  visibility: hidden;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  margin: 0;
  color: #fecaca;
  text-align: center;
}

.detail-text {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.detail-text p {
  margin: 0;
  color: #dbeafe;
  font-size: 17px;
  line-height: 2;
}

.result-meta {
  margin-bottom: 16px;
  color: var(--muted);
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  padding: 42px 0;
}

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

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

.link-grid {
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

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

@media (max-width: 980px) {
  .site-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.96);
  }

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

  .mobile-toggle {
    display: block;
  }

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

  .hero-poster {
    display: none;
  }

  .four-columns,
  .compact-grid,
  .category-grid,
  .footer-inner,
  .detail-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-panel,
  .overview-head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .footer-inner,
  .page-shell,
  .content-section,
  .search-panel {
    width: min(100% - 20px, 1220px);
  }

  .brand-text small {
    display: none;
  }

  .hero-shell {
    min-height: 720px;
  }

  .hero-slide {
    padding: 64px 18px 96px;
  }

  .page-hero,
  .detail-hero,
  .detail-text,
  .category-overview-card {
    padding: 22px;
  }

  .four-columns,
  .compact-grid,
  .category-grid,
  .footer-inner,
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .inline-search,
  .search-page-panel {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
  }
}
