:root {
  --bg: #fff8ed;
  --bg-soft: #fff1d8;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(146, 64, 14, 0.14);
  --brand: #b45309;
  --brand-2: #ea580c;
  --brand-3: #f59e0b;
  --dark: #111827;
  --shadow: 0 18px 45px rgba(120, 53, 15, 0.16);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.96), rgba(255, 251, 235, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 28px rgba(146, 64, 14, 0.08);
}

.top-nav {
  max-width: 1220px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 22px rgba(180, 83, 9, 0.24);
}

.brand strong {
  display: block;
  font-size: 22px;
  line-height: 1;
  background: linear-gradient(90deg, #92400e, #ea580c);
  -webkit-background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #9a3412;
  background: rgba(251, 191, 36, 0.18);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--brand);
  font-size: 24px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) saturate(1.1);
  transform: scale(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 36%, rgba(245, 158, 11, 0.38), transparent 28%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.72) 45%, rgba(120, 53, 15, 0.46) 100%);
}

.hero-content {
  position: relative;
  max-width: 1220px;
  min-height: 680px;
  margin: 0 auto;
  padding: 70px 20px 90px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: 48px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(251, 146, 60, 0.18);
  border: 1px solid rgba(253, 186, 116, 0.22);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 820px;
}

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

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-3), var(--brand-2));
  box-shadow: 0 15px 32px rgba(234, 88, 12, 0.28);
}

.btn-ghost {
  color: #fff7ed;
  border: 1px solid rgba(255, 237, 213, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-poster {
  justify-self: end;
  width: min(390px, 100%);
  aspect-ratio: 3 / 4.25;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #fbbf24, #92400e);
}

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

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

.hero-dot.active {
  background: #fbbf24;
}

.search-panel,
.filter-panel,
.page-section {
  max-width: 1220px;
  margin: 0 auto;
  padding: 34px 20px;
}

.search-panel {
  margin-top: -38px;
  position: relative;
  z-index: 8;
}

.search-shell {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  border: 1px solid rgba(251, 191, 36, 0.24);
}

.search-shell input,
.filter-panel input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(146, 64, 14, 0.14);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background: #fffaf3;
  font-size: 16px;
}

.search-shell input:focus,
.filter-panel input:focus {
  border-color: rgba(234, 88, 12, 0.5);
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.12);
}

.search-shell button {
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  cursor: pointer;
}

.search-results {
  display: none;
  margin-top: 12px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.search-results.active {
  display: grid;
  gap: 8px;
}

.search-result-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.search-result-item:hover {
  background: #fff7ed;
}

.search-result-item img {
  width: 56px;
  height: 74px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #fbbf24, #92400e);
}

.search-result-item strong {
  display: block;
  color: #7c2d12;
}

.search-result-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.section-heading > div {
  display: grid;
  gap: 8px;
}

.section-line {
  width: 7px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand-3), var(--brand-2));
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
}

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

.section-heading a {
  color: #9a3412;
  font-weight: 800;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(146, 64, 14, 0.08);
  box-shadow: 0 12px 28px rgba(120, 53, 15, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 46px rgba(120, 53, 15, 0.16);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  background: linear-gradient(135deg, #fbbf24, #9a3412);
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
}

.poster-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.card-title {
  display: block;
  color: #7c2d12;
  font-weight: 900;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta span {
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
}

.tag-row {
  margin-top: 10px;
}

.tag-row span {
  background: #ffedd5;
  color: #9a3412;
  font-size: 12px;
}

.soft-section {
  max-width: none;
  background: linear-gradient(135deg, #fff7ed, #fffaf3);
}

.soft-section > * {
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
}

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

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.24), transparent 26%),
    linear-gradient(135deg, #92400e, #ea580c 58%, #f59e0b);
  box-shadow: 0 18px 36px rgba(180, 83, 9, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 46px rgba(180, 83, 9, 0.26);
}

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

.category-tile span {
  color: rgba(255, 247, 237, 0.85);
  line-height: 1.7;
}

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

.rank-card {
  display: grid;
  grid-template-columns: auto 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(146, 64, 14, 0.08);
  box-shadow: 0 10px 26px rgba(120, 53, 15, 0.08);
}

.rank-num {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-3), var(--brand-2));
  font-weight: 900;
}

.rank-cover {
  display: block;
  width: 92px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(135deg, #fbbf24, #92400e);
}

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

.rank-title {
  color: #7c2d12;
  font-size: 20px;
  font-weight: 900;
}

.rank-card p {
  margin: 6px 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.inner-page {
  padding-bottom: 30px;
}

.page-hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(circle at 78% 20%, rgba(251, 191, 36, 0.32), transparent 30%),
    linear-gradient(135deg, #111827, #7c2d12 58%, #b45309);
  overflow: hidden;
}

.compact-hero {
  max-width: 1220px;
  margin: 28px auto 0;
  padding: 52px 28px;
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
}

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

.filter-panel {
  padding-top: 0;
  padding-bottom: 12px;
}

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

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.05);
  transform: scale(1.08);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.76), rgba(120, 53, 15, 0.58)),
    radial-gradient(circle at 75% 35%, rgba(245, 158, 11, 0.24), transparent 30%);
}

.detail-wrap {
  position: relative;
  max-width: 1220px;
  min-height: 620px;
  margin: 0 auto;
  padding: 56px 20px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
}

.detail-cover {
  border-radius: 30px;
  overflow: hidden;
  aspect-ratio: 3 / 4.1;
  background: linear-gradient(135deg, #fbbf24, #92400e);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #fed7aa;
  font-weight: 700;
}

.detail-info h1 {
  margin: 18px 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: rgba(255, 247, 237, 0.88);
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta span {
  background: rgba(255, 255, 255, 0.14);
  color: #fff7ed;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.detail-tags span {
  background: rgba(251, 191, 36, 0.18);
  color: #fed7aa;
  border: 1px solid rgba(253, 186, 116, 0.2);
}

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

.player-section {
  max-width: 1220px;
  margin: -70px auto 0;
  padding: 0 20px 34px;
  position: relative;
  z-index: 5;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.28);
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.2), rgba(17, 24, 39, 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-3), var(--brand-2));
  font-size: 34px;
  box-shadow: 0 18px 38px rgba(234, 88, 12, 0.3);
}

.play-layer strong {
  font-size: 20px;
}

.video-shell.playing .play-layer {
  opacity: 0;
  visibility: hidden;
}

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

.article-card {
  padding: 26px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid rgba(146, 64, 14, 0.08);
  box-shadow: 0 16px 38px rgba(120, 53, 15, 0.08);
}

.article-card h2 {
  margin: 0 0 14px;
  color: #7c2d12;
  font-size: 26px;
}

.article-card p {
  margin: 0 0 14px;
  color: #4b5563;
  line-height: 1.95;
  font-size: 17px;
}

.site-footer {
  margin-top: 50px;
  background: linear-gradient(135deg, #111827, #431407);
  color: #fff7ed;
}

.footer-grid {
  max-width: 1220px;
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 247, 237, 0.72);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  color: #fed7aa;
  font-weight: 700;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .movie-grid,
  .library-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

@media (max-width: 820px) {
  .menu-toggle {
    display: grid;
    place-items: center;
  }

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

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

  .hero,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 44px;
  }

  .hero-poster {
    justify-self: start;
    width: min(260px, 72vw);
  }

  .detail-wrap {
    grid-template-columns: 1fr;
    padding-top: 36px;
  }

  .detail-cover {
    width: min(260px, 72vw);
  }

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

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

@media (max-width: 540px) {
  .top-nav {
    padding: 12px 14px;
  }

  .brand strong {
    font-size: 18px;
  }

  .search-shell {
    flex-direction: column;
  }

  .search-shell button {
    min-height: 44px;
  }

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

  .movie-grid,
  .library-grid,
  .featured-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 46px 76px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-cover {
    width: 76px;
  }

  .rank-title {
    font-size: 17px;
  }

  .compact-hero {
    margin: 16px 14px 0;
  }
}
