:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --amber: #f59e0b;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff7ed;
  --panel: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  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%, #ffffff 34%, #fffbeb 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.28);
}

.brand-text {
  font-size: 26px;
  background: linear-gradient(90deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  flex: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 650;
  color: #4b5563;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links .is-active {
  color: var(--orange);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.home-search-band input,
.filter-panel input,
.filter-panel select {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  width: 240px;
  padding: 10px 16px;
}

.nav-search input:focus,
.home-search-band input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.nav-search button,
.home-search-band button,
.primary-btn {
  border: 0;
  color: #ffffff;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 750;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.home-search-band button:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(249, 115, 22, 0.3);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--orange);
  background: #ffffff;
}

.quick-nav {
  border-top: 1px solid rgba(229, 231, 235, 0.7);
}

.quick-nav-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 0;
  color: #6b7280;
  font-size: 14px;
  white-space: nowrap;
}

.quick-nav-inner a:hover {
  color: var(--orange);
}

main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 32px 0 16px;
}

.hero-card {
  position: relative;
  height: 500px;
  border-radius: 28px;
  overflow: hidden;
  background: #111827;
  box-shadow: var(--shadow);
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.42) 52%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-copy {
  position: absolute;
  left: clamp(24px, 5vw, 56px);
  right: clamp(24px, 5vw, 56px);
  bottom: clamp(24px, 6vw, 56px);
  color: #ffffff;
  max-width: 760px;
}

.hero-badge,
.detail-badge,
.section-heading span,
.page-hero span,
.hero-rank-title span,
.category-overview-head span,
.home-search-band span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 13px;
  color: #ffffff;
  background: var(--orange);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-copy h1 {
  margin: 18px 0 6px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(25px, 3vw, 40px);
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-meta span,
.tag-row span {
  border-radius: 999px;
  padding: 5px 10px;
  color: #92400e;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 700;
}

.hero-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

.ghost-btn,
.outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 750;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-rank,
.side-card {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: var(--shadow);
  padding: 22px;
}

.hero-rank-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.hero-rank-title strong {
  font-size: 18px;
}

.rank-line {
  display: grid;
  grid-template-columns: 34px 58px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rank-line:last-child {
  border-bottom: 0;
}

.rank-line img {
  width: 58px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
  background: #f3f4f6;
}

.rank-num {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  font-weight: 800;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  color: var(--ink);
  line-height: 1.35;
}

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

.home-search-band,
.filter-panel,
.content-section,
.category-overview-card,
.movie-detail-card,
.page-hero {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.home-search-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  margin: 24px 0;
}

.home-search-band h2 {
  margin: 12px 0 0;
  font-size: clamp(22px, 3vw, 32px);
}

.home-search-band form {
  display: flex;
  flex: 1;
  max-width: 540px;
  gap: 10px;
}

.home-search-band input {
  flex: 1;
  min-width: 0;
  padding: 13px 18px;
}

.content-section,
.category-overview-card {
  padding: 26px;
  margin: 28px 0;
}

.section-heading,
.category-overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2,
.category-overview-head h2 {
  margin: 10px 0 0;
  color: #111827;
  font-size: clamp(24px, 3vw, 32px);
}

.section-heading a,
.category-overview-head a {
  color: var(--orange);
  font-weight: 760;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

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

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

.poster-year,
.rank-badge {
  position: absolute;
  top: 10px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.poster-year {
  right: 10px;
  padding: 5px 9px;
}

.rank-badge {
  left: 10px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange), var(--amber));
}

.movie-card-body {
  padding: 14px;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  color: #111827;
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-title:hover {
  color: var(--orange);
}

.movie-meta {
  margin-top: 8px;
  color: #6b7280;
  font-size: 12px;
}

.movie-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: #d1d5db;
}

.movie-card p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  margin: 10px 0 12px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.heat {
  display: block;
  margin-top: 10px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile {
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
  border: 1px solid rgba(253, 186, 116, 0.7);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 30px rgba(249, 115, 22, 0.16);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  height: 96px;
  background: #ffedd5;
}

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

.category-tile div:last-child {
  padding: 15px;
}

.category-tile strong {
  display: block;
  color: #111827;
  font-size: 18px;
}

.category-tile p {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
}

.page-hero {
  margin: 32px 0 24px;
  padding: clamp(28px, 5vw, 52px);
  background: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);
  color: #ffffff;
  overflow: hidden;
  position: relative;
}

.page-hero::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  right: -80px;
  top: -120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.page-hero h1 {
  margin: 14px 0;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.page-hero span {
  color: #9a3412;
  background: rgba(255, 255, 255, 0.86);
}

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

.filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) repeat(4, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
}

.filter-grid label {
  display: grid;
  gap: 8px;
  color: #4b5563;
  font-weight: 760;
  font-size: 13px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
}

.empty-state {
  display: none;
  padding: 40px;
  text-align: center;
  color: #6b7280;
}

.empty-state.is-visible {
  display: block;
}

.detail-shell {
  padding: 30px 0 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--orange);
  font-weight: 700;
}

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

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

.player-card video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.42) 100%);
  cursor: pointer;
  z-index: 2;
}

.play-overlay span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding-left: 5px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 18px 34px rgba(249, 115, 22, 0.3);
  font-size: 34px;
}

.player-card.is-playing .play-overlay {
  display: none;
}

.player-state {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.movie-detail-card {
  margin-top: 24px;
  padding: clamp(20px, 3vw, 30px);
}

.detail-top {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
}

.detail-top > img {
  width: 190px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.14);
}

.detail-badge {
  margin-bottom: 14px;
}

.detail-top h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.detail-one-line {
  margin: 0 0 18px;
  color: #4b5563;
  font-size: 17px;
  line-height: 1.8;
}

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

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

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

.detail-meta-list dd {
  margin: 4px 0 0;
  color: #111827;
  font-weight: 760;
}

.detail-content {
  margin-top: 28px;
  color: #374151;
  line-height: 1.9;
}

.detail-content h2 {
  margin: 24px 0 10px;
  color: #111827;
  font-size: 24px;
}

.detail-content p {
  margin: 0;
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.prev-next a {
  color: var(--orange);
  font-weight: 760;
}

.detail-side {
  position: sticky;
  top: 110px;
}

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

.side-list {
  display: grid;
}

.related-section {
  margin-top: 28px;
}

.category-overview-list {
  display: grid;
  gap: 22px;
}

.category-overview-head p {
  max-width: 760px;
  margin: 10px 0 0;
  color: #6b7280;
  line-height: 1.8;
}

.outline-btn {
  color: var(--orange);
  border-color: rgba(249, 115, 22, 0.4);
  background: #fff7ed;
}

.site-footer {
  margin-top: 54px;
  border-top: 1px solid rgba(229, 231, 235, 0.9);
  background: #ffffff;
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 22px;
  color: #6b7280;
}

.footer-inner strong {
  display: block;
  color: #111827;
  font-size: 22px;
  margin-bottom: 8px;
}

.footer-inner p {
  margin: 0;
}

.footer-links,
.footer-category-links {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-category-links {
  grid-column: 1 / -1;
  justify-content: flex-start;
  font-size: 14px;
}

.footer-links a:hover,
.footer-category-links a:hover {
  color: var(--orange);
}

@media (max-width: 1100px) {
  .home-hero,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-rank,
  .detail-side {
    position: static;
  }

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

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

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

@media (max-width: 820px) {
  .nav-shell {
    min-height: 66px;
  }

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

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 18px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-links,
  .nav-search,
  .home-search-band,
  .home-search-band form,
  .section-heading,
  .category-overview-head,
  .prev-next {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-links {
    gap: 14px;
  }

  .nav-search input {
    width: 100%;
  }

  .hero-card {
    height: 440px;
  }

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

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

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

  .detail-top > img {
    width: 160px;
  }

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

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

@media (max-width: 560px) {
  main,
  .nav-shell,
  .quick-nav-inner,
  .footer-inner {
    width: min(100% - 22px, 1280px);
  }

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

  .home-hero {
    padding-top: 18px;
  }

  .hero-card {
    height: 420px;
    border-radius: 22px;
  }

  .hero-copy p {
    font-size: 15px;
  }

  .content-section,
  .filter-panel,
  .category-overview-card,
  .movie-detail-card {
    padding: 18px;
    border-radius: 20px;
  }

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

  .category-grid,
  .filter-grid,
  .detail-meta-list {
    grid-template-columns: 1fr;
  }

  .movie-card-body {
    padding: 12px;
  }

  .movie-title {
    min-height: 40px;
    font-size: 14px;
  }

  .movie-card p {
    font-size: 12px;
  }

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