:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-panel: #111827;
  --bg-card: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #60a5fa;
  --gold: #facc15;
  --danger: #fb7185;
  --shadow: 0 24px 70px rgba(8, 47, 73, 0.38);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.nav-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #03131a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.38);
  font-size: 15px;
}

.brand-name {
  font-size: 22px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: var(--muted-strong);
  font-weight: 700;
  transition: color 0.24s ease, transform 0.24s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  display: block;
  margin: 5px auto;
  background: var(--muted-strong);
  border-radius: 999px;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-panel.open {
  display: block;
}

.mobile-panel nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  padding: 14px 0 18px;
  gap: 8px;
}

.mobile-panel .nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.52);
}

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

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

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

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.16) 100%),
    radial-gradient(circle at 22% 36%, rgba(34, 211, 238, 0.22), transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 68vh;
  display: flex;
  align-items: flex-end;
  padding: 72px 0 82px;
}

.hero-copy {
  max-width: 720px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.24);
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
  text-shadow: 0 14px 40px rgba(0, 0, 0, 0.48);
}

.hero p {
  max-width: 700px;
  margin: 0 0 24px;
  color: var(--muted-strong);
  font-size: clamp(16px, 1.8vw, 20px);
}

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

.hero-meta span,
.detail-meta span,
.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  font-size: 14px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  color: #041015;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
  box-shadow: 0 14px 32px rgba(34, 211, 238, 0.26);
  cursor: pointer;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.34);
}

.btn.secondary {
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.46);
  cursor: pointer;
  transition: background 0.24s ease, transform 0.24s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-2px);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

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

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

.section {
  padding: 72px 0;
}

.section.dark {
  background: linear-gradient(180deg, var(--bg), var(--bg-soft));
}

.section.panel {
  background: var(--bg-soft);
}

.section.gradient {
  background: linear-gradient(180deg, var(--bg-soft), #1e293b);
}

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

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

.section-title h2,
.section-title h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
}

.title-icon {
  color: var(--cyan);
  font-size: 28px;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

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

.scroll-row {
  overflow-x: auto;
  padding: 4px 0 18px;
  scrollbar-color: var(--cyan) var(--bg-card);
}

.scroll-track {
  min-width: max-content;
  display: flex;
  gap: 24px;
}

.scroll-track .movie-card {
  width: 190px;
}

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  background: var(--bg-card);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32);
  transform-origin: center;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.06));
  transition: opacity 0.28s ease;
}

.movie-card:hover .poster-link {
  transform: translateY(-4px) scale(1.025);
  box-shadow: 0 24px 48px rgba(8, 145, 178, 0.25);
}

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

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.year-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.poster-glow {
  position: absolute;
  inset: auto 14px 14px;
  z-index: 2;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.movie-card:hover .poster-glow {
  opacity: 1;
}

.movie-info {
  padding-top: 12px;
}

.movie-info h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-info h3 a {
  transition: color 0.24s ease;
}

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

.movie-meta {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.movie-line {
  margin: 0 0 9px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.18);
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(8, 47, 73, 0.72));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -64px;
  bottom: -72px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
}

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

.category-tile strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
}

.category-tile span {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--muted-strong);
  font-size: 14px;
}

.category-preview {
  margin-top: 46px;
  display: grid;
  gap: 42px;
}

.category-preview-block {
  padding: 28px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line);
}

.category-preview-block h2 {
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
}

.category-preview-block h2::before {
  content: "";
  width: 4px;
  height: 24px;
  border-radius: 999px;
  background: var(--cyan);
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.38);
}

.rank-num {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #041015;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 1000;
}

.rank-title {
  min-width: 0;
}

.rank-title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

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

.rank-score {
  color: var(--gold);
  font-weight: 900;
}

.page-hero {
  padding: 76px 0 42px;
  background: radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.18), transparent 32%), linear-gradient(180deg, #0f172a, var(--bg));
}

.page-hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.page-hero p {
  max-width: 780px;
  color: var(--muted-strong);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

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

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 160px;
  gap: 12px;
  margin-bottom: 30px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.64);
  color: var(--text);
  outline: none;
}

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

.search-state {
  min-height: 24px;
  margin: -10px 0 24px;
  color: var(--muted);
}

.empty-state {
  display: none;
  padding: 32px;
  border-radius: 20px;
  text-align: center;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

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

.detail-hero {
  padding: 36px 0 28px;
  background: linear-gradient(180deg, #0f172a, var(--bg));
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(280px, 0.78fr);
  gap: 34px;
  align-items: start;
}

.player-card {
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-start {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #041015;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 0 12px rgba(34, 211, 238, 0.12), 0 18px 46px rgba(34, 211, 238, 0.38);
  cursor: pointer;
  font-size: 36px;
  transition: transform 0.24s ease;
}

.player-start:hover {
  transform: scale(1.08);
}

.detail-content {
  margin-top: 28px;
}

.detail-content h1 {
  margin: 18px 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.13;
}

.detail-content h2,
.sidebar-card h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 24px;
}

.detail-text {
  color: var(--muted-strong);
  font-size: 17px;
}

.detail-text p {
  margin: 0 0 18px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.detail-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  font-size: 13px;
}

.sidebar-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.cover-panel {
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  background: var(--bg-card);
}

.cover-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.36);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: border-color 0.24s ease, transform 0.24s ease;
}

.compact-card:hover {
  transform: translateX(3px);
  border-color: rgba(34, 211, 238, 0.4);
}

.compact-card img {
  width: 74px;
  height: 104px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card strong {
  display: block;
  color: var(--text);
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-card em {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0;
}

.footer-brand {
  margin-bottom: 14px;
}

.footer-about p,
.site-footer li,
.site-footer a {
  color: var(--muted);
}

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

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

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

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

  .detail-layout,
  .rank-layout {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-control {
    display: none;
  }

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

  .search-panel {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

  .brand-name {
    font-size: 19px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero h1 {
    font-size: 36px;
  }

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

  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-score {
    grid-column: 2;
  }

  .player-start {
    width: 74px;
    height: 74px;
    font-size: 30px;
  }
}
