* {
  box-sizing: border-box;
}

:root {
  --bg: #fff8ef;
  --surface: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #f3dfc2;
  --amber: #d97706;
  --amber-dark: #b45309;
  --orange: #ea580c;
  --shadow: 0 18px 55px rgba(146, 64, 14, 0.16);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff7ed 0, #fffbeb 34%, #fff 76%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  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, 251, 235, 0.88);
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 28px rgba(146, 64, 14, 0.08);
}

.nav-shell {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--amber-dark);
  letter-spacing: -0.02em;
}

.brand {
  font-size: 24px;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(217, 119, 6, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-weight: 700;
}

.site-nav a,
.nav-dropdown > button {
  border: 0;
  background: transparent;
  color: #4b5563;
  font: inherit;
  cursor: pointer;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.nav-dropdown:hover > button {
  color: var(--amber);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  min-width: 180px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown-panel a {
  padding: 8px 12px;
  border-radius: 12px;
}

.nav-dropdown-panel a:hover {
  background: #fff7ed;
}

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

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

.nav-search input,
.hero-search input,
.filter-bar input,
.filter-bar select,
.search-page-form input {
  min-width: 0;
  border: 1px solid #f1d7b4;
  border-radius: 999px;
  background: #fff;
  padding: 11px 15px;
  color: var(--ink);
  outline: 0;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-search input:focus,
.hero-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-page-form input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.nav-search button,
.hero-search button,
.search-page-form button,
.primary-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.28);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--amber-dark);
  font-size: 26px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.65fr);
  gap: 48px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 22px 92px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.01);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(1.1);
  opacity: 0.38;
  transform: scale(1.08);
}

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

.hero-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.66), rgba(146, 64, 14, 0.62));
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content .eyebrow {
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(254, 243, 199, 0.22);
}

.hero-content h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 760px;
  margin: 0;
  color: #fdecc8;
  font-size: 19px;
}

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

.hero-tags {
  margin: 24px 0 0;
}

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

.hero-tags span {
  background: rgba(255, 247, 237, 0.16);
  color: #fff7ed;
  border: 1px solid rgba(255, 247, 237, 0.2);
}

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

.ghost-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 247, 237, 0.3);
  border-radius: 999px;
  padding: 10px 17px;
  color: #fff7ed;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.hero-poster {
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 34px 75px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

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

.hero-dots button.is-active {
  background: #f59e0b;
}

.section-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 22px;
}

.intro-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 24px;
  align-items: center;
  margin-top: -34px;
  position: relative;
  z-index: 6;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.intro-strip h2,
.section-title h2,
.page-hero h1,
.ranking-block h2,
.detail-content h2 {
  margin: 0;
  color: #111827;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.intro-strip h2,
.page-hero h1 {
  font-size: clamp(32px, 5vw, 54px);
}

.hero-search,
.search-page-form {
  display: flex;
  gap: 10px;
}

.hero-search input,
.search-page-form input {
  flex: 1;
}

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

.section-title span {
  display: block;
  color: var(--amber);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

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

.section-title a {
  color: var(--amber-dark);
  font-weight: 900;
}

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

.featured-grid .movie-card.featured:nth-child(1),
.featured-grid .movie-card.featured:nth-child(8) {
  grid-column: span 2;
}

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid #f5e6cc;
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(146, 64, 14, 0.1);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fde68a, #fed7aa);
}

.card-cover img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.36s ease;
}

.movie-card a:hover .card-cover img {
  transform: scale(1.06);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.36));
}

.card-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  color: #fff;
  background: rgba(217, 119, 6, 0.95);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.card-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  opacity: 0;
  backdrop-filter: blur(10px);
  transform: translate(-50%, -50%) scale(0.92);
  transition: 0.24s ease;
}

.movie-card a:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 18px;
}

.card-body h2 {
  min-height: 3.1em;
  margin: 0 0 8px;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.35;
}

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

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.card-meta {
  justify-content: space-between;
  margin-bottom: 12px;
}

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

.category-tile {
  min-height: 154px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #f3dfc2;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff, #fff7ed);
  box-shadow: 0 10px 28px rgba(146, 64, 14, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

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

.category-tile span {
  color: #6b7280;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

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

.ranking-panel,
.ranking-block,
.detail-content article {
  padding: 24px;
  background: #fff;
  border: 1px solid #f3dfc2;
  border-radius: 26px;
  box-shadow: 0 12px 34px rgba(146, 64, 14, 0.1);
}

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

.rank-item,
.ranking-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #fff7ed;
}

.rank-item span,
.ranking-row span {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border-radius: 10px;
  font-weight: 900;
}

.rank-item strong,
.ranking-row strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item em,
.ranking-row em {
  grid-column: 2;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  max-width: 1240px;
  margin: 34px auto 0;
  padding: 72px 22px;
}

.page-hero.slim {
  text-align: center;
}

.page-hero p {
  max-width: 780px;
  margin: 18px auto 0;
  color: #6b7280;
  font-size: 18px;
}

.category-hero {
  min-height: 350px;
  border-bottom: 1px solid #f3dfc2;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: #92400e;
  font-weight: 800;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.filter-bar input {
  flex: 1;
}

.filter-bar select {
  min-width: 180px;
}

.movie-card.is-hidden {
  display: none;
}

.rankings-layout {
  display: grid;
  gap: 26px;
}

.ranking-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.ranking-row {
  grid-template-columns: 42px 72px minmax(0, 1fr);
  background: #fffaf0;
}

.ranking-row img {
  width: 72px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-row em {
  grid-column: 3;
}

.search-page-form {
  max-width: 720px;
  margin: 28px auto 0;
}

.search-status {
  margin-bottom: 22px;
  color: #92400e;
  font-size: 20px;
  font-weight: 900;
}

.detail-hero {
  max-width: 1240px;
  margin: 34px auto 0;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 30px;
  align-items: center;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #111827;
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.28);
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: #111827;
  cursor: pointer;
  overflow: hidden;
}

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

.player-cover span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(245, 158, 11, 0.86);
  border: 4px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  font-size: 32px;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.36);
}

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

.detail-info {
  padding: 28px;
  border: 1px solid #f3dfc2;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 10px 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-info p {
  color: #4b5563;
  font-size: 18px;
}

.detail-meta span {
  padding: 7px 12px;
  color: #92400e;
  background: #fff7ed;
  border-radius: 999px;
}

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

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

.detail-content p {
  color: #4b5563;
  font-size: 17px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #f3dfc2;
  border-radius: 18px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.compact-card img {
  height: 76px;
  object-fit: cover;
  border-radius: 14px;
}

.compact-card strong,
.compact-card em {
  display: block;
}

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

.compact-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.site-footer {
  margin-top: 42px;
  color: #fff;
  background: linear-gradient(135deg, #111827, #1f2937 55%, #431407);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 22px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 38px;
}

.footer-brand {
  color: #fbbf24;
  font-size: 24px;
}

.site-footer p {
  color: #d1d5db;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fbbf24;
  font-size: 18px;
}

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

.footer-links a {
  color: #e5e7eb;
}

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

.footer-bottom {
  padding: 18px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  color: #d1d5db;
}

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

  .hero-slide,
  .detail-hero,
  .two-column,
  .intro-strip,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 360px;
  }

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

  .ranking-table,
  .compact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0 0 18px;
  }

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

  .nav-dropdown-panel {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    margin-top: 8px;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-slide {
    padding-top: 48px;
    gap: 26px;
  }

  .hero-poster {
    transform: none;
  }

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

  .featured-grid .movie-card.featured:nth-child(1),
  .featured-grid .movie-card.featured:nth-child(8) {
    grid-column: auto;
  }

  .section-title,
  .filter-bar,
  .hero-search,
  .search-page-form {
    flex-direction: column;
    align-items: stretch;
  }

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