* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: #1e293b;
  --line-strong: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-soft: #fbbf24;
  --accent-dark: #92400e;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.12), transparent 32rem),
    radial-gradient(circle at 90% 12%, rgba(59, 130, 246, 0.08), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
}

.header-inner,
.strip-inner,
.footer-inner,
.page-shell,
.hero-content,
.quick-search-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.brand-icon,
.footer-logo span {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #0f172a;
  font-weight: 900;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.28);
}

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

.brand-text strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

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

.desktop-nav,
.header-search,
.category-strip .strip-inner {
  display: flex;
  align-items: center;
}

.desktop-nav {
  gap: 6px;
}

.nav-link,
.category-strip a {
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  padding: 9px 12px;
  transition: color 0.22s ease, background-color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active,
.category-strip a:hover {
  color: var(--accent-soft);
  background: rgba(245, 158, 11, 0.1);
}

.header-search {
  gap: 8px;
}

.header-search input,
.quick-search-form input,
.search-page-form input {
  color: var(--text);
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(51, 65, 85, 0.92);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.header-search input {
  width: 210px;
  padding: 10px 12px;
  font-size: 14px;
}

.header-search input:focus,
.quick-search-form input:focus,
.search-page-form input:focus {
  border-color: rgba(245, 158, 11, 0.9);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.header-search button,
.quick-search-form button,
.search-page-form button,
.btn,
.filter-button {
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.header-search button,
.quick-search-form button,
.search-page-form button,
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #111827;
}

.header-search button {
  padding: 10px 14px;
}

.menu-toggle {
  display: none;
  color: var(--text);
  background: rgba(51, 65, 85, 0.7);
  border: 1px solid rgba(71, 85, 105, 0.9);
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
}

.category-strip {
  border-top: 1px solid rgba(51, 65, 85, 0.45);
  background: rgba(15, 23, 42, 0.72);
}

.category-strip .strip-inner {
  gap: 6px;
  min-height: 42px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-strip .strip-inner::-webkit-scrollbar {
  display: none;
}

.mobile-nav {
  display: none;
}

.hero-carousel {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.66) 46%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 45%, rgba(2, 6, 23, 0.45) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-bottom: 84px;
}

.hero-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  background: var(--accent);
  color: #111827;
  font-weight: 900;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 14px;
  letter-spacing: 0.03em;
}

.hero-content h1 {
  margin: 22px 0 16px;
  max-width: 760px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 650px;
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
  margin: 0 0 20px;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.7);
  color: var(--muted-strong);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
}

.btn:hover,
.header-search button:hover,
.quick-search-form button:hover,
.search-page-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(245, 158, 11, 0.22);
}

.btn-secondary {
  color: var(--text);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.btn-secondary:hover {
  background: rgba(30, 41, 59, 0.86);
}

.btn-full {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.45);
  color: white;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.25s ease, background-color 0.25s ease;
}

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

.quick-search-block {
  border-bottom: 1px solid rgba(30, 41, 59, 0.8);
  background: rgba(15, 23, 42, 0.74);
}

.quick-search-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 26px;
  padding: 34px 0;
}

.quick-search-inner h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 36px);
}

.quick-search-inner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.quick-search-form {
  display: flex;
  gap: 10px;
  align-self: start;
}

.quick-search-form input,
.search-page-form input {
  flex: 1;
  min-width: 0;
  padding: 14px 15px;
}

.quick-search-form button,
.search-page-form button {
  padding: 0 20px;
}

.category-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chips a {
  color: var(--muted-strong);
  background: rgba(30, 41, 59, 0.74);
  border: 1px solid rgba(51, 65, 85, 0.92);
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 14px;
  transition: color 0.22s ease, background-color 0.22s ease;
}

.category-chips a:hover {
  color: #111827;
  background: var(--accent);
}

.page-shell {
  padding: 54px 0;
}

.page-top {
  padding-top: 36px;
}

.content-section + .content-section {
  margin-top: 70px;
}

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

.section-heading h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.04em;
}

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

.section-action {
  color: var(--accent-soft);
  font-weight: 800;
  min-width: max-content;
}

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

.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 24px;
}

.featured-list,
.ranking-grid,
.side-related {
  display: grid;
  gap: 16px;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(51, 65, 85, 0.72);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 24px 46px rgba(245, 158, 11, 0.12), var(--shadow);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.card-cover img,
.card-list-cover img,
.poster-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .card-cover img,
.movie-card:hover .card-list-cover img {
  transform: scale(1.08);
}

.card-cover::after,
.large-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.72));
}

.card-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
}

.card-year {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  color: white;
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.24);
}

.card-body {
  padding: 16px;
}

.card-body h3,
.card-list-body h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body a:hover h3,
.card-list-link:hover h3 {
  color: var(--accent-soft);
}

.card-body p,
.card-list-body p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
  margin: 10px 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  color: var(--muted-strong);
  background: rgba(51, 65, 85, 0.72);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
}

.movie-card-list {
  min-height: 142px;
}

.card-list-link {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  height: 100%;
}

.card-list-cover {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.card-list-body {
  padding: 15px 15px 15px 0;
}

.movie-card-large .large-cover {
  aspect-ratio: 16 / 10;
}

.large-body h3 {
  font-size: 24px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-button {
  padding: 9px 14px;
  color: var(--muted-strong);
  background: rgba(30, 41, 59, 0.84);
  border: 1px solid rgba(51, 65, 85, 0.9);
}

.filter-button:hover,
.filter-button.is-active {
  color: #111827;
  background: var(--accent);
  border-color: var(--accent);
}

.movie-card.is-hidden {
  display: none;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 34px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent 36%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(51, 65, 85, 0.86);
  box-shadow: var(--shadow);
}

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

.page-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

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

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

.category-card a {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(51, 65, 85, 0.78);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card a:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.52);
  box-shadow: 0 24px 46px rgba(245, 158, 11, 0.12);
}

.category-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.category-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 18px;
}

.category-samples {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.category-samples span {
  color: var(--muted-strong);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.detail-main,
.detail-aside,
.detail-article,
.player-card,
.poster-panel,
.side-box,
.search-panel {
  border-radius: 24px;
  border: 1px solid rgba(51, 65, 85, 0.78);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.detail-main {
  border: 0;
  background: transparent;
  box-shadow: none;
  display: grid;
  gap: 22px;
}

.player-card {
  overflow: hidden;
}

.video-frame {
  position: relative;
  background: black;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.66));
  cursor: pointer;
  z-index: 3;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 7px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.3);
  font-size: 34px;
}

.play-overlay.is-hidden {
  display: none;
}

.detail-article {
  padding: clamp(22px, 4vw, 34px);
}

.detail-article h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.06em;
}

.detail-article h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.detail-article p {
  color: var(--muted-strong);
  line-height: 1.9;
  margin: 0;
}

.lead-text {
  margin-top: 18px !important;
  font-size: 18px;
  color: #e2e8f0 !important;
}

.detail-tags {
  margin: 18px 0 0;
}

.detail-aside {
  display: grid;
  gap: 20px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.poster-panel,
.side-box,
.search-panel {
  padding: 18px;
}

.poster-panel img {
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  margin-bottom: 16px;
}

.side-box h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.search-panel {
  margin-bottom: 32px;
}

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

.search-hint {
  color: var(--muted);
  margin-top: 14px;
  min-height: 22px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  background: rgba(2, 6, 23, 0.86);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-logo strong {
  font-size: 20px;
}

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

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

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.copyright {
  border-top: 1px solid rgba(30, 41, 59, 0.75);
  padding: 18px;
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

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

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-nav {
    position: fixed;
    inset: 72px 16px auto 16px;
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  body.menu-open .mobile-nav {
    display: flex;
  }
}

@media (max-width: 920px) {
  .header-search {
    display: none;
  }

  .quick-search-inner,
  .featured-grid,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 640px) {
  .header-inner,
  .strip-inner,
  .footer-inner,
  .page-shell,
  .hero-content,
  .quick-search-inner {
    width: min(100% - 24px, 1180px);
  }

  .brand-text em,
  .category-strip {
    display: none;
  }

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

  .hero-content {
    padding-bottom: 70px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-form,
  .search-page-form {
    flex-direction: column;
  }

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

  .card-list-link {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .card-list-cover {
    min-height: 140px;
  }

  .card-list-body {
    padding: 13px 12px 13px 0;
  }

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

  .play-overlay span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
