:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --amber: #f59e0b;
  --cream: #fff7ed;
  --soft: #fffbeb;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #fed7aa;
  --shadow: 0 20px 60px rgba(146, 64, 14, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ed 0%, #fffbeb 36%, #ffffff 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(251, 146, 60, 0.24);
  box-shadow: 0 10px 40px rgba(124, 45, 18, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.32);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong,
.footer-brand strong {
  font-size: 20px;
  color: transparent;
  background: linear-gradient(135deg, var(--orange-dark), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-copy small,
.footer-brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link {
  color: #4b5563;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

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

.header-search input,
.mobile-search input,
.filter-form input,
.filter-form select {
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 10px 14px;
  background: white;
  outline: none;
  color: var(--ink);
}

.header-search input:focus,
.mobile-search input:focus,
.filter-form input:focus,
.filter-form select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.header-search button,
.mobile-search button,
.filter-form button,
.primary-btn,
.ghost-btn,
.text-link {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.filter-form button,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 18px;
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.22);
}

.primary-btn.small {
  padding: 9px 14px;
  font-size: 14px;
}

.header-search button:hover,
.mobile-search button:hover,
.filter-form button:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(249, 115, 22, 0.3);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  padding: 10px 18px;
  color: white;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

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

.text-link {
  color: var(--orange-dark);
}

.text-link:hover {
  color: #c2410c;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--orange-dark);
}

.mobile-nav {
  display: none;
  padding: 0 20px 18px;
  border-top: 1px solid #ffedd5;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, #fb923c, #fbbf24);
}

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

.hero-slide {
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  transition: opacity 0.7s ease, visibility 0.7s ease, transform 1.2s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-copy {
  width: min(760px, calc(100% - 40px));
  margin-left: max(24px, calc((100vw - 1180px) / 2));
  color: white;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.36);
}

.hero-copy h1 {
  margin: 16px 0;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 650px;
  margin: 0 0 24px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.94);
}

.hero-kicker,
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 13px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.hero-kicker {
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: white;
  background: rgba(255, 255, 255, 0.18);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.28);
}

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

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
}

.hero-dot.active {
  width: 34px;
  background: white;
}

.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 20px;
}

.intro-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.intro-strip h2,
.section-heading h2,
.page-hero h1,
.detail-card h1,
.text-panel h2,
.sidebar-links h2,
.side-panel h2 {
  margin: 14px 0 10px;
  color: #111827;
  line-height: 1.15;
}

.intro-strip h2,
.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.intro-strip p,
.category-tile span,
.page-hero p,
.text-panel p,
.detail-one-line {
  color: var(--muted);
  line-height: 1.8;
}

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

.section-heading.compact {
  margin-bottom: 18px;
}

.warm-section {
  max-width: none;
  padding-left: max(20px, calc((100vw - 1280px) / 2 + 20px));
  padding-right: max(20px, calc((100vw - 1280px) / 2 + 20px));
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.72), rgba(254, 243, 199, 0.62));
}

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

.category-tile,
.category-overview-card,
.filter-panel,
.detail-card,
.text-panel,
.poster-card,
.sidebar-links,
.side-panel {
  border: 1px solid rgba(251, 146, 60, 0.2);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.category-tile {
  min-height: 178px;
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: hidden;
  position: relative;
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(245, 158, 11, 0.2));
}

.category-tile:hover,
.movie-card:hover,
.ranking-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 70px rgba(146, 64, 14, 0.2);
}

.category-tile strong {
  font-size: 22px;
  color: #111827;
}

.category-tile em {
  color: var(--orange-dark);
  font-style: normal;
  font-size: 13px;
  line-height: 1.5;
}

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

.featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: white;
  box-shadow: 0 16px 34px rgba(124, 45, 18, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card a {
  display: grid;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #ffedd5, #fef3c7);
}

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

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

.poster-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  border-radius: 999px;
  padding: 5px 10px;
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  font-size: 12px;
  font-weight: 900;
}

.card-content {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.card-content h2,
.card-content h3 {
  margin: 0;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.movie-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.movie-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 11px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 34px;
  align-items: start;
}

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

.ranking-list.large {
  gap: 16px;
}

.ranking-card {
  border-radius: 22px;
  background: white;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(124, 45, 18, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ranking-card a {
  display: grid;
  grid-template-columns: 56px 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.rank-number {
  color: transparent;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 28px;
  font-weight: 950;
  text-align: center;
}

.ranking-card img {
  width: 112px;
  height: 74px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.4s ease;
}

.ranking-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ranking-info strong {
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-info small,
.ranking-info em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

.ranking-info em {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero {
  min-height: 360px;
  padding: 92px 20px;
  display: flex;
  align-items: center;
  color: white;
  background: linear-gradient(135deg, #111827, #ea580c);
  background-size: cover;
  background-position: center;
}

.page-hero.slim-hero {
  min-height: 290px;
  background: radial-gradient(circle at 20% 20%, rgba(251, 146, 60, 0.4), transparent 32%), linear-gradient(135deg, #111827, #ea580c);
}

.page-hero > div {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.page-hero h1 {
  color: white;
  font-size: clamp(40px, 6vw, 68px);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.filter-panel {
  max-width: 1180px;
  margin: -44px auto 0;
  padding: 18px;
  position: relative;
  z-index: 2;
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 170px auto;
  gap: 14px;
  align-items: end;
}

.filter-form label {
  display: grid;
  gap: 7px;
  color: #9a3412;
  font-size: 13px;
  font-weight: 900;
}

.filter-form input,
.filter-form select {
  width: 100%;
  border-radius: 16px;
}

.categories-stack {
  display: grid;
  gap: 26px;
}

.category-overview-card {
  padding: 24px;
}

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

.category-overview-head h2 {
  margin: 12px 0 8px;
}

.category-overview-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-main {
  background: linear-gradient(180deg, #fff7ed, #ffffff 42%);
}

.detail-shell {
  padding-top: 36px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: #9a3412;
  font-weight: 800;
}

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

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

.detail-content {
  display: grid;
  gap: 22px;
}

.player-card {
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #111827;
}

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

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0.62));
}

.play-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.2), 0 22px 44px rgba(0, 0, 0, 0.36);
  font-size: 34px;
  padding-left: 5px;
}

.detail-card,
.text-panel {
  padding: 28px;
}

.detail-card h1 {
  font-size: clamp(32px, 5vw, 54px);
}

.detail-one-line {
  font-size: 18px;
}

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

.detail-meta-grid div {
  border-radius: 18px;
  padding: 14px;
  background: #fff7ed;
}

.detail-meta-grid dt {
  color: #9a3412;
  font-size: 12px;
  font-weight: 900;
}

.detail-meta-grid dd {
  margin: 6px 0 0;
  color: #111827;
  font-weight: 900;
}

.text-panel p {
  margin: 0;
  font-size: 16px;
}

.highlight-panel {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.detail-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 20px;
}

.poster-card,
.sidebar-links,
.side-panel {
  padding: 20px;
}

.poster-card {
  display: grid;
  gap: 14px;
  text-align: center;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  transition: transform 0.4s ease;
}

.poster-card strong {
  font-size: 20px;
  color: #111827;
}

.poster-card span {
  color: var(--muted);
}

.sidebar-links {
  display: grid;
  gap: 12px;
}

.sidebar-links a {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-bottom: 1px solid #ffedd5;
  color: #111827;
  font-weight: 900;
}

.sidebar-links a:hover {
  color: var(--orange-dark);
}

.sidebar-links a span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.ranking-page-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.side-panel {
  position: sticky;
  top: 96px;
}

.empty-state {
  margin-top: 30px;
  padding: 24px;
  border-radius: 20px;
  color: #9a3412;
  background: #ffedd5;
  text-align: center;
  font-weight: 900;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 30px;
}

.footer-brand .brand-icon {
  flex: 0 0 auto;
}

.footer-brand strong {
  display: block;
}

.footer-brand p {
  max-width: 460px;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 22px;
}

.footer-links a:hover {
  color: #fb923c;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 18px 20px;
  color: #9ca3af;
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

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

  .split-section,
  .detail-layout,
  .ranking-page-layout {
    grid-template-columns: 1fr;
  }

  .detail-sidebar,
  .side-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .mobile-nav.is-open {
    display: grid;
    gap: 14px;
  }

  .mobile-nav .nav-link {
    padding: 10px 0;
  }

  .mobile-search {
    align-items: stretch;
  }

  .mobile-search input {
    flex: 1;
  }

  .hero {
    min-height: 560px;
  }

  .hero-copy {
    margin: 0 auto;
    padding: 0 20px;
  }

  .hero-control {
    display: none;
  }

  .intro-strip,
  .section-heading,
  .category-overview-head {
    align-items: start;
    flex-direction: column;
  }

  .filter-panel {
    margin: 20px 20px 0;
  }

  .filter-form {
    grid-template-columns: 1fr;
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 66px;
    gap: 12px;
    padding: 0 14px;
  }

  .brand-copy small {
    display: none;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-copy p,
  .page-hero p {
    font-size: 16px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .section-wrap {
    padding: 52px 14px;
  }

  .warm-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .category-grid,
  .overview-grid,
  .movie-grid,
  .compact-grid,
  .featured-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-content {
    padding: 12px;
  }

  .card-content h2,
  .card-content h3 {
    font-size: 15px;
  }

  .ranking-card a {
    grid-template-columns: 42px 82px minmax(0, 1fr);
    gap: 10px;
  }

  .ranking-card img {
    width: 82px;
    height: 62px;
  }

  .rank-number {
    font-size: 22px;
  }

  .detail-card,
  .text-panel,
  .poster-card,
  .sidebar-links {
    padding: 18px;
  }

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