:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --brand: #f59e0b;
  --brand-dark: #d97706;
  --brand-soft: #fff7ed;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #111827;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}

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

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

.nav-link,
.dropdown-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-button:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 190px;
  padding: 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 12px;
  color: #475569;
  font-size: 14px;
}

.dropdown-menu a:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  border: 1px solid #dbe3ed;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.header-search input,
.mobile-search input {
  width: 220px;
  border: 0;
  outline: 0;
  padding: 10px 13px;
  background: transparent;
}

.header-search button,
.mobile-search button {
  border: 0;
  padding: 10px 15px;
  color: #fff;
  background: var(--brand);
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: #fff7ed;
  color: var(--brand-dark);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 20px;
}

.mobile-panel {
  display: none;
  padding: 0 20px 16px;
  border-top: 1px solid #eef2f7;
}

.mobile-panel.open {
  display: grid;
  gap: 8px;
}

.mobile-search {
  display: flex;
  border: 1px solid #dbe3ed;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.hero-carousel {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.65s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 35%, rgba(245, 158, 11, 0.28), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(15, 23, 42, 0.66) 48%, rgba(15, 23, 42, 0.12) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
}

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

.hero-content p {
  max-width: 640px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2.4vw, 22px);
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 23px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.3);
}

.primary-btn:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
}

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

.hero-dots button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--brand);
}

.search-hero,
.content-section,
.split-section,
.rank-preview,
.filter-bar,
.rank-page,
.search-page,
.detail-main,
.related-section,
.category-blocks {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 20px 0;
}

.search-hero {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 28px;
  align-items: center;
}

.search-hero h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  color: #111827;
  letter-spacing: -0.03em;
}

.search-hero p,
.section-head p,
.page-hero p,
.category-block p {
  margin: 8px 0 0;
  color: var(--muted);
}

.search-hero form,
.search-panel {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-hero input,
.search-panel input,
.search-panel select,
.filter-bar input {
  min-height: 46px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 0 14px;
  outline: none;
  background: #fff;
  color: var(--text);
}

.search-hero input {
  flex: 1;
}

.search-hero button,
.search-panel button,
.filter-chips button {
  min-height: 46px;
  border: 0;
  border-radius: 16px;
  padding: 0 18px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  cursor: pointer;
}

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

.section-head h2 {
  font-size: clamp(26px, 4vw, 36px);
}

.section-head a,
.category-block-head a,
.wide-foot a {
  color: var(--brand-dark);
  font-weight: 800;
}

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

.category-tile {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff, #fffbeb);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.category-tile:hover,
.movie-card:hover,
.wide-card:hover,
.category-block:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile span {
  font-size: 42px;
}

.category-tile strong {
  font-size: 20px;
}

.category-tile small {
  color: var(--muted);
}

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

.compact-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.large-list {
  grid-template-columns: repeat(5, 1fr);
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

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

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-body h3,
.wide-content h3 {
  margin: 8px 0 6px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.wide-content h3 a:hover {
  color: var(--brand-dark);
}

.card-body p,
.wide-content p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.movie-card.compact .card-body p {
  display: none;
}

.movie-card.compact .card-body h3 {
  font-size: 15px;
}

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

.wide-card {
  display: grid;
  grid-template-columns: auto 120px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
  transition: 0.25s ease;
}

.rank-num {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
  font-size: 20px;
}

.wide-poster {
  display: block;
  width: 120px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

.wide-poster img {
  height: 100%;
  object-fit: cover;
}

.wide-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  position: relative;
  max-width: 1180px;
  margin: 34px auto 0;
  padding: 54px 20px;
  border-radius: 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 20%, rgba(245, 158, 11, 0.2), transparent 30%),
    linear-gradient(135deg, #ffffff, #fff7ed 50%, #f8fafc);
}

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

.breadcrumb {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.page-hero .breadcrumb {
  color: var(--muted);
}

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

.filter-bar {
  display: grid;
  gap: 14px;
}

.filter-bar input {
  width: 100%;
}

.filter-chips button {
  min-height: 38px;
  color: #92400e;
  background: #fffbeb;
}

.filter-chips button.active,
.filter-chips button:hover {
  color: #fff;
  background: var(--brand);
}

.category-blocks {
  display: grid;
  gap: 18px;
}

.category-block {
  padding: 22px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
  transition: 0.25s ease;
}

.mini-poster-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.mini-poster-row a {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 9;
  background: #111827;
}

.mini-poster-row img {
  height: 100%;
  object-fit: cover;
}

.mini-poster-row span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 12px 10px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  font-weight: 800;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #111827;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 28%, rgba(245, 158, 11, 0.25), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.2));
}

.detail-inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 58px 20px;
  color: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

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

.detail-info h1 {
  color: #fff;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.08;
}

.detail-line {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
}

.detail-meta {
  margin: 18px 0;
  color: rgba(255, 255, 255, 0.75);
}

.detail-info .primary-btn {
  margin-top: 26px;
}

.player-section {
  max-width: 1180px;
  margin: 42px auto 0;
  padding: 0 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.2), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.player-cover.is-hidden {
  display: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.35);
  font-size: 28px;
}

.detail-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.detail-article,
.detail-side {
  padding: 26px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.detail-article p {
  color: #475569;
  font-size: 17px;
}

.detail-side dl {
  margin: 0;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px 14px;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: 0;
  color: #111827;
  font-weight: 700;
}

.search-panel {
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.search-panel input {
  flex: 1 1 280px;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.empty-result {
  grid-column: 1 / -1;
  padding: 32px;
  border-radius: 22px;
  text-align: center;
  color: var(--muted);
  background: #fff;
}

.site-footer {
  margin-top: 70px;
  padding: 46px 20px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.footer-inner strong {
  color: #fff;
  font-size: 22px;
}

.footer-inner p {
  margin: 8px 0 0;
}

.footer-links,
.footer-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a,
.footer-cats a {
  color: #fff7ed;
}

.copyright {
  color: #94a3b8;
}

@media (max-width: 1024px) {
  .header-search,
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-panel .nav-link {
    justify-content: flex-start;
  }

  .hero-carousel {
    height: 520px;
  }

  .search-hero,
  .detail-main,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .category-grid,
  .large-list,
  .movie-grid,
  .search-results {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 720px) {
  .brand-text {
    font-size: 17px;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 76px;
  }

  .search-hero form,
  .search-panel {
    flex-direction: column;
  }

  .section-head,
  .category-block-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-grid,
  .movie-grid,
  .compact-grid,
  .large-list,
  .search-results,
  .mini-poster-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .wide-card {
    grid-template-columns: auto 92px 1fr;
    gap: 10px;
  }

  .rank-num {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    font-size: 16px;
  }

  .wide-poster {
    width: 92px;
  }

  .wide-content p,
  .wide-foot span {
    display: none;
  }

  .detail-inner {
    padding: 38px 20px;
  }

  .detail-poster {
    display: none;
  }
}

@media (max-width: 460px) {
  .category-grid,
  .movie-grid,
  .compact-grid,
  .large-list,
  .search-results,
  .mini-poster-row {
    grid-template-columns: 1fr;
  }

  .wide-card {
    grid-template-columns: 1fr;
  }

  .rank-num {
    position: absolute;
    margin: 10px;
  }

  .wide-poster {
    width: 100%;
    aspect-ratio: 16 / 10;
  }
}
