:root {
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-soft: #fff1e6;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #fed7aa;
  --orange: #f97316;
  --rose: #f43f5e;
  --amber: #f59e0b;
  --shadow: 0 18px 45px rgba(124, 45, 18, 0.14);
  --radius: 24px;
}

* {
  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 44%, #fff7ed 100%);
}

body.nav-open {
  overflow: hidden;
}

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.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(251, 146, 60, 0.28);
  box-shadow: 0 8px 24px rgba(124, 45, 18, 0.05);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  padding: 10px 14px;
  color: #4b5563;
  border-radius: 999px;
  font-weight: 700;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--orange);
  background: rgba(255, 237, 213, 0.8);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fff7ed;
  color: var(--ink);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: #374151;
  border-radius: 999px;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.hero-track {
  position: relative;
  min-height: 720px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(249, 115, 22, 0.34), transparent 30%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.95) 0%, rgba(17, 24, 39, 0.74) 42%, rgba(17, 24, 39, 0.18) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.06));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 110px 0 120px;
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-desc {
  max-width: 720px;
  margin: 24px 0 0;
  color: #f3f4f6;
  font-size: clamp(17px, 2.2vw, 23px);
  line-height: 1.75;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
}

.hero-tags span,
.detail-tags span,
.footer-tags span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff7ed;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--rose));
  box-shadow: 0 18px 36px rgba(244, 63, 94, 0.32);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.btn-soft {
  color: #7c2d12;
  background: rgba(255, 237, 213, 0.95);
}

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

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

.hero-dot.active {
  width: 34px;
  background: linear-gradient(90deg, var(--orange), var(--rose));
}

.section {
  padding: 72px 0;
}

.section-alt {
  background: rgba(255, 237, 213, 0.45);
}

.section-search {
  margin-top: -54px;
  position: relative;
  z-index: 6;
  padding: 0 0 42px;
}

.home-search-card,
.filter-panel,
.detail-article,
.side-panel,
.category-overview,
.movie-card,
.rank-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(251, 146, 60, 0.22);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 30px;
  border-radius: 28px;
}

.home-search-card h2,
.section-head h2,
.sub-hero h1,
.detail-side h1,
.detail-article h2,
.side-panel h2 {
  margin: 0;
  color: #111827;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.home-search-card h2,
.section-head h2 {
  font-size: clamp(28px, 4vw, 46px);
}

.home-search-card p,
.section-head p,
.sub-hero p,
.category-overview p,
.detail-side p,
.detail-article p,
.side-panel p,
.movie-card p,
.rank-card p {
  color: var(--muted);
  line-height: 1.72;
}

.quick-search {
  display: flex;
  gap: 12px;
  padding: 8px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid var(--line);
}

.quick-search input,
.filter-search input,
.filter-selects select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.quick-search input {
  padding: 0 14px;
}

.quick-search button {
  border: 0;
  color: #ffffff;
  font-weight: 900;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--rose));
}

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

.section-head p {
  max-width: 680px;
  margin: 12px 0 0;
}

.section-link {
  flex-shrink: 0;
  color: var(--orange);
  font-weight: 900;
  padding: 11px 16px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid var(--line);
}

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

.category-tile {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.category-tile img,
.category-overview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-tile:hover img,
.category-overview:hover img,
.movie-card:hover img {
  transform: scale(1.07);
}

.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(17, 24, 39, 0.86) 100%);
}

.tile-content {
  position: absolute;
  inset: auto 18px 18px;
  color: #ffffff;
}

.tile-content strong {
  display: block;
  font-size: 22px;
  font-weight: 950;
  margin-bottom: 8px;
}

.tile-content small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fed7aa;
  line-height: 1.55;
}

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

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

.movie-card {
  border-radius: 22px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 58px rgba(124, 45, 18, 0.2);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.05), rgba(17, 24, 39, 0.72));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--rose));
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.3);
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.card-meta span,
.detail-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2,
.rank-card h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.28;
}

.movie-card h2 a:hover,
.rank-card h2 a:hover {
  color: var(--orange);
}

.movie-card p,
.rank-card p {
  display: -webkit-box;
  margin: 0;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag {
  padding: 5px 8px;
  color: #be123c;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: #ffe4e6;
}

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

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
}

.rank-number {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--rose));
}

.rank-poster {
  display: block;
  height: 84px;
  overflow: hidden;
  border-radius: 15px;
  background: #111827;
}

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

.sub-hero,
.detail-hero {
  position: relative;
  padding: 84px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 237, 213, 0.24), transparent 25%),
    linear-gradient(135deg, #7c2d12 0%, #9f1239 56%, #78350f 100%);
  overflow: hidden;
}

.sub-hero:after,
.detail-hero:after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: rgba(251, 146, 60, 0.2);
  filter: blur(4px);
}

.sub-hero .container,
.detail-hero .container {
  position: relative;
  z-index: 2;
}

.sub-hero h1 {
  max-width: 820px;
  color: #ffffff;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
}

.sub-hero p {
  max-width: 760px;
  color: #ffedd5;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-bottom: 26px;
  padding: 14px;
  border-radius: 22px;
}

.filter-search,
.filter-selects select {
  border-radius: 16px;
  background: #fff7ed;
  border: 1px solid var(--line);
}

.filter-search input {
  min-height: 48px;
  padding: 0 16px;
}

.filter-selects {
  display: flex;
  gap: 10px;
}

.filter-selects select {
  min-height: 48px;
  padding: 0 36px 0 14px;
  cursor: pointer;
}

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

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

.category-overview {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px;
  border-radius: 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-overview:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 58px rgba(124, 45, 18, 0.2);
}

.overview-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  height: 142px;
  overflow: hidden;
  border-radius: 20px;
}

.overview-covers img {
  border-radius: 12px;
}

.category-overview h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 950;
}

.category-overview span {
  display: inline-flex;
  margin-top: 12px;
  color: var(--orange);
  font-weight: 900;
}

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

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 380px;
  gap: 28px;
  align-items: stretch;
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.player-wrap video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--rose));
  box-shadow: 0 20px 45px rgba(244, 63, 94, 0.35);
  font-size: 30px;
}

.detail-side {
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
}

.detail-side img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.detail-side-body {
  padding: 22px;
}

.detail-side h1 {
  color: #ffffff;
  font-size: 34px;
  line-height: 1.12;
}

.detail-side p {
  color: #ffedd5;
}

.detail-meta {
  margin-top: 18px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.detail-article,
.side-panel {
  padding: 28px;
  border-radius: 26px;
}

.detail-article h2,
.side-panel h2 {
  font-size: 28px;
  margin: 0 0 14px;
}

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

.detail-article p {
  margin: 0;
  font-size: 17px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.detail-tags span {
  color: #9a3412;
  background: #ffedd5;
  border: 1px solid #fed7aa;
}

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

.side-panel .rank-card {
  grid-template-columns: 94px 1fr;
  box-shadow: none;
}

.side-panel .rank-poster {
  height: 72px;
}

.site-footer {
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 10%, rgba(251, 146, 60, 0.24), transparent 26%),
    linear-gradient(135deg, #111827 0%, #7c2d12 52%, #881337 100%);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 34px;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.9fr 1fr;
  gap: 34px;
}

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

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

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

.site-footer p,
.footer-links a {
  color: #d1d5db;
  line-height: 1.72;
}

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

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

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom p {
  margin: 0;
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 45;
  width: 46px;
  height: 46px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--rose));
  box-shadow: 0 18px 34px rgba(244, 63, 94, 0.28);
}

.back-top.show {
  display: inline-flex;
}

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

  .detail-layout,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    display: grid;
    grid-template-columns: 280px 1fr;
  }

  .detail-side img {
    height: 100%;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  body.nav-open .nav-links {
    display: flex;
  }

  .nav-link {
    padding: 13px 16px;
  }

  .hero,
  .hero-track {
    min-height: 650px;
  }

  .hero-content {
    padding-top: 86px;
  }

  .home-search-card,
  .section-head,
  .filter-panel,
  .category-overview,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: start;
  }

  .quick-search,
  .filter-selects {
    flex-direction: column;
  }

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

  .rank-card {
    grid-template-columns: 110px 1fr;
  }

  .footer-grid {
    gap: 24px;
  }
}

@media (max-width: 520px) {
  .navbar,
  .container,
  .hero-content,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

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

  .hero,
  .hero-track {
    min-height: 590px;
  }

  .hero-actions,
  .sub-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .section {
    padding: 52px 0;
  }

  .home-search-card,
  .filter-panel,
  .detail-article,
  .side-panel {
    padding: 20px;
  }

  .rank-card,
  .side-panel .rank-card {
    grid-template-columns: 92px 1fr;
    gap: 12px;
  }

  .rank-poster,
  .side-panel .rank-poster {
    height: 68px;
  }
}
