* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-soft: #243247;
  --line: #334155;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --amber: #f59e0b;
  --amber-soft: #fbbf24;
  --dark: #020617;
  --ring: rgba(245, 158, 11, 0.36);
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.28);
  font-size: 15px;
}

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

.brand-text span,
.footer-brand span:last-child {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.nav-link {
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

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

.search-form,
.mobile-search,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form input,
.mobile-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  border: 1px solid transparent;
  outline: none;
  color: var(--text);
  background: #334155;
  border-radius: 12px;
}

.search-form input {
  width: 210px;
  padding: 11px 12px;
}

.search-form input::placeholder,
.mobile-search input::placeholder,
.search-page-form input::placeholder,
.filter-bar input::placeholder {
  color: var(--subtle);
}

.search-form input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px var(--ring);
}

.search-form button,
.mobile-search button,
.search-page-form button,
.primary-btn,
.ghost-btn {
  border: none;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.search-form button,
.mobile-search button,
.search-page-form button,
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.22);
}

.search-form button {
  padding: 11px 15px;
}

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

.ghost-btn {
  color: var(--muted);
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
}

.ghost-btn:hover,
.primary-btn:hover,
.search-form button:hover,
.mobile-search button:hover,
.search-page-form button:hover {
  transform: translateY(-1px);
}

.ghost-btn:hover {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.6);
}

.slim {
  min-height: 42px;
  padding-inline: 16px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  background: #334155;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-links {
  display: grid;
  gap: 12px;
  padding-bottom: 14px;
}

.mobile-search input {
  flex: 1;
  padding: 12px;
}

.mobile-search button,
.search-page-form button {
  padding: 12px 18px;
}

.page-main {
  min-height: 60vh;
}

.hero-carousel {
  position: relative;
  height: min(720px, 70vh);
  min-height: 520px;
  overflow: hidden;
  background: var(--dark);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 30%, rgba(245, 158, 11, 0.26), transparent 36%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.55) 45%, rgba(15, 23, 42, 0.1) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1240px, calc(100% - 32px));
  transform: translateX(-50%);
  max-width: 1240px;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 12px 0 18px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
}

.hero-tags,
.card-tags,
.tag-cloud,
.hero-meta,
.detail-meta,
.card-meta,
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.card-tags span,
.tag-cloud a {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  padding: 7px 12px;
  color: #fff;
  background: rgba(245, 158, 11, 0.92);
}

.hero-meta,
.detail-meta {
  margin-bottom: 24px;
  color: var(--muted);
}

.hero-meta span,
.detail-meta span {
  padding-right: 14px;
  border-right: 1px solid rgba(203, 213, 225, 0.28);
}

.hero-meta span:last-child,
.detail-meta span:last-child {
  border-right: 0;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(203, 213, 225, 0.25);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-control.prev {
  left: max(20px, calc((100% - 1240px) / 2));
}

.hero-control.next {
  right: max(20px, calc((100% - 1240px) / 2));
}

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

.hero-dot {
  width: 32px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.36);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--amber);
}

.content-section {
  width: min(1240px, calc(100% - 32px));
  margin: 56px auto 0;
}

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

.section-head h2,
.article-section h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.compact-head h2 {
  font-size: 24px;
}

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

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

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

.card-link,
.wide-link,
.overview-card,
.ranking-row a {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-link:hover,
.wide-link:hover,
.overview-card:hover,
.ranking-row a:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.62);
  box-shadow: 0 22px 60px rgba(2, 6, 23, 0.34);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #111827;
}

.poster-wrap img,
.category-tile img,
.overview-cover img,
.ranking-row img,
.detail-poster img,
.video-shell video,
.video-shell img,
.wide-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap img,
.category-tile img,
.wide-link img,
.overview-cover img {
  transition: transform 0.35s ease;
}

.card-link:hover img,
.category-tile:hover img,
.wide-link:hover img,
.overview-card:hover img {
  transform: scale(1.08);
}

.year-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #fff;
  background: var(--amber);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 14px;
}

.card-body h3,
.wide-link h3,
.ranking-row h3 {
  margin: 0;
  color: var(--text);
  line-height: 1.35;
}

.card-body h3 {
  overflow: hidden;
  min-height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 16px;
}

.card-tags {
  margin: 10px 0;
}

.card-tags span {
  padding: 4px 8px;
  color: var(--muted);
  background: #334155;
}

.card-meta {
  justify-content: space-between;
  color: var(--subtle);
  font-size: 12px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.wide-list {
  display: grid;
  gap: 16px;
}

.wide-link {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  padding: 12px;
}

.wide-link img {
  height: 124px;
  border-radius: 14px;
}

.wide-link p,
.ranking-row p,
.overview-card p,
.article-section p,
.detail-one-line,
.search-status {
  color: var(--muted);
  line-height: 1.75;
}

.rank-panel {
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.5);
  box-shadow: var(--shadow);
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(51, 65, 85, 0.58);
}

.rank-list span,
.rank-num {
  color: var(--amber);
  font-weight: 900;
}

.rank-list strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-list small {
  color: var(--subtle);
}

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

.category-tile {
  position: relative;
  display: grid;
  min-height: 210px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: #111827;
  box-shadow: var(--shadow);
}

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

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

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

.category-tile small {
  bottom: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.inner-page {
  padding-top: 28px;
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  background:
    radial-gradient(circle at 82% 22%, rgba(245, 158, 11, 0.28), transparent 35%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  box-shadow: var(--shadow);
}

.small-hero {
  padding: clamp(28px, 5vw, 58px);
}

.eyebrow {
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-hero h1,
.detail-info h1 {
  margin: 12px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--subtle);
  font-size: 14px;
}

.crumbs a:hover {
  color: var(--amber);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.44);
}

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

.filter-bar select {
  min-width: 160px;
  padding: 12px 14px;
}

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

.overview-card {
  padding: 16px;
}

.overview-cover {
  position: relative;
  display: block;
  overflow: hidden;
  height: 220px;
  border-radius: 18px;
  background: #111827;
}

.overview-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 58%);
}

.overview-cover span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 1;
  font-size: 24px;
  font-weight: 900;
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-links a {
  max-width: 100%;
  padding: 7px 10px;
  overflow: hidden;
  border-radius: 999px;
  color: var(--muted);
  background: #334155;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-list {
  display: grid;
  gap: 14px;
}

.ranking-row a {
  display: grid;
  grid-template-columns: 52px 118px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.ranking-row img {
  height: 80px;
  border-radius: 12px;
}

.rank-num {
  font-size: 24px;
  text-align: center;
}

.detail-page {
  padding-top: 28px;
}

.detail-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  background:
    radial-gradient(circle at 78% 10%, rgba(245, 158, 11, 0.2), transparent 36%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.94));
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  background: #111827;
  box-shadow: 0 22px 70px rgba(2, 6, 23, 0.5);
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 22px;
  font-size: 18px;
}

.tag-cloud {
  margin: 22px 0;
}

.tag-cloud a {
  padding: 7px 12px;
  color: var(--muted);
  background: #334155;
}

.tag-cloud a:hover {
  color: var(--amber);
}

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

.player-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.movie-video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.24), rgba(2, 6, 23, 0.62));
  cursor: pointer;
}

.play-cover span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.36);
  font-size: 30px;
  text-indent: 4px;
}

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

.article-section {
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.46);
}

.article-section h2 + p {
  margin-top: 12px;
}

.search-page-form {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.44);
}

.search-page-form input {
  flex: 1;
  padding: 14px 16px;
}

.search-status {
  min-height: 28px;
  margin: 18px 0;
}

.site-footer {
  margin-top: 76px;
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.site-footer p {
  max-width: 520px;
  color: var(--subtle);
  line-height: 1.75;
}

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

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

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

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

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--subtle);
  font-size: 14px;
}

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

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

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

  .search-form {
    margin-left: auto;
  }

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

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

  .split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    height: auto;
    min-height: 68px;
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .search-form {
    display: none;
  }

  .hero-carousel {
    height: 74vh;
    min-height: 540px;
  }

  .hero-content {
    bottom: 78px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    max-width: 280px;
  }

  .hero-control {
    display: none;
  }

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

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

  .wide-link {
    grid-template-columns: 120px 1fr;
  }

  .wide-link img {
    height: 112px;
  }

  .ranking-row a {
    grid-template-columns: 42px 82px 1fr;
    gap: 12px;
  }

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

  .detail-poster {
    width: min(280px, 100%);
    margin: 0 auto;
  }

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

@media (max-width: 520px) {
  .brand-text span,
  .footer-brand span:last-child {
    font-size: 18px;
  }

  .hero-carousel {
    min-height: 560px;
  }

  .content-section {
    margin-top: 42px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 14px;
  }

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

  .wide-link {
    grid-template-columns: 96px 1fr;
    gap: 12px;
  }

  .wide-link p {
    display: none;
  }

  .ranking-row p {
    display: none;
  }

  .rank-num {
    font-size: 18px;
  }

  .play-cover span {
    width: 62px;
    height: 62px;
    font-size: 24px;
  }
}
