:root {
  --amber: #f59e0b;
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --ink: #1f2937;
  --muted: #6b7280;
  --paper: #ffffff;
  --warm: #fff7ed;
  --line: rgba(148, 163, 184, 0.32);
  --shadow: 0 20px 45px rgba(120, 53, 15, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 12px 28px rgba(194, 65, 12, 0.22);
}

.site-nav {
  width: min(1200px, calc(100% - 32px));
  min-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;
  color: white;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--orange);
  background: white;
  box-shadow: inset 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.brand-text {
  font-size: 1.28rem;
}

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

.nav-links a {
  color: rgba(255, 255, 255, 0.88);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links .nav-active {
  color: var(--orange-dark);
  background: white;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: white;
}

main {
  width: 100%;
}

.hero-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border-radius: 34px;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 15%, rgba(251, 191, 36, 0.48), transparent 34%), linear-gradient(135deg, #111827, #431407 62%, #9a3412);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.14));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(700px, calc(100% - 56px));
  padding: 76px 56px;
  color: white;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fed7aa;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.12rem;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 0.82rem;
  font-weight: 800;
}

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

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

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

.primary-btn,
.home-search button {
  color: white;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.24);
  border: 0;
}

.ghost-btn {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.home-search button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-thumbs {
  position: absolute;
  z-index: 5;
  left: 56px;
  right: 56px;
  bottom: 30px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.hero-thumb {
  text-align: left;
  border: 0;
  border-radius: 16px;
  padding: 12px;
  color: white;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.hero-thumb span {
  display: block;
  color: #fed7aa;
  font-size: 0.75rem;
  font-weight: 900;
}

.hero-thumb strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-thumb.is-active {
  background: rgba(245, 158, 11, 0.92);
}

.hero-rank-card {
  border-radius: 30px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

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

.hero-rank-head span {
  font-weight: 900;
}

.hero-rank-head a,
.section-more,
.text-link {
  color: var(--orange);
  font-weight: 900;
}

.hot-link {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.hot-link:hover span:nth-child(2) {
  color: var(--orange);
}

.rank-num {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-size: 0.78rem;
  font-weight: 900;
}

.hot-link em {
  color: var(--orange);
  font-style: normal;
  font-weight: 900;
}

.quick-search-section,
.content-section,
.category-overview-list,
.detail-layout,
.related-section {
  width: min(1200px, calc(100% - 32px));
  margin: 34px auto;
}

.home-search {
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 28px;
  padding: 22px;
  background: white;
  box-shadow: var(--shadow);
}

.home-search label {
  display: block;
  margin-bottom: 10px;
  color: var(--orange-dark);
  font-weight: 900;
}

.home-search div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.home-search input,
.search-box input,
.sort-box select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
  background: #fffaf0;
}

.home-search input:focus,
.search-box input:focus,
.sort-box select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

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

.section-heading h2 {
  margin: 5px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
}

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

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

.category-tile {
  position: relative;
  min-height: 210px;
  padding: 20px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
  box-shadow: 0 14px 28px rgba(120, 53, 15, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -45px;
  bottom: -45px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.5), rgba(234, 88, 12, 0));
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 42px rgba(120, 53, 15, 0.16);
}

.category-count {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--orange-dark);
  background: #ffedd5;
  font-size: 0.8rem;
  font-weight: 900;
}

.category-tile h3 {
  margin: 18px 0 8px;
  font-size: 1.35rem;
}

.category-tile p,
.category-tile small {
  position: relative;
  z-index: 1;
  color: var(--muted);
  line-height: 1.65;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 26px;
  background: white;
  box-shadow: 0 14px 30px rgba(120, 53, 15, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #78350f, #ea580c 55%, #fbbf24);
}


.poster-frame img,
.detail-cover img {
  position: relative;
  z-index: 2;
}

.poster-frame img.is-missing,
.detail-cover img.is-missing,
.hero-bg img.is-missing {
  opacity: 0;
}

.poster-frame .poster-fallback,
.detail-cover .poster-fallback {
  z-index: 1;
}

.poster-frame img,
.detail-cover img,
.ranking-row img,
.category-overview-posters img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-frame img.is-missing,
.detail-cover img.is-missing,
.ranking-row img.is-missing,
.category-overview-posters img.is-missing {
  opacity: 0;
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  font-size: 1.2rem;
  font-weight: 900;
}

.rating-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 30px;
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(10px);
  font-weight: 900;
}

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

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 1.12rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--orange);
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-card-compact h3 {
  font-size: 1rem;
}

.amber-panel {
  padding: 28px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.95), rgba(254, 243, 199, 0.95));
}

.ranking-preview,
.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 52px 64px minmax(0, 1fr) 70px 110px;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: 0 10px 22px rgba(120, 53, 15, 0.07);
}

.ranking-index {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 900;
}

.ranking-row img {
  width: 64px;
  height: 84px;
  border-radius: 14px;
  background: linear-gradient(135deg, #78350f, #ea580c);
}

.ranking-title strong,
.ranking-title small {
  display: block;
}

.ranking-title small {
  margin-top: 4px;
  color: var(--muted);
}

.ranking-score {
  color: var(--orange);
  font-weight: 900;
}

.ranking-views {
  color: var(--muted);
  text-align: right;
  font-size: 0.92rem;
}

.page-hero,
.detail-hero {
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(135deg, #431407, #ea580c 55%, #f59e0b);
  color: white;
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 64px;
}

.page-hero p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-stat-row span {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.filter-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 26px;
  background: white;
  box-shadow: 0 14px 30px rgba(120, 53, 15, 0.08);
}

.search-box span,
.sort-box span {
  display: block;
  margin: 0 0 6px 4px;
  color: var(--orange-dark);
  font-weight: 900;
}

.filter-count {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 14px;
  color: var(--orange-dark);
  background: #ffedd5;
  font-weight: 900;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: white;
  box-shadow: 0 14px 30px rgba(120, 53, 15, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-text span {
  color: var(--orange);
  font-weight: 900;
}

.category-overview-text h2 {
  margin: 10px 0;
  font-size: 2rem;
}

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

.category-overview-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.category-overview-posters a {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #78350f, #f97316);
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  padding: 34px;
  background: radial-gradient(circle at 15% 0%, rgba(251, 191, 36, 0.55), transparent 35%), linear-gradient(135deg, #111827, #431407 58%, #ea580c);
}

.detail-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #78350f, #ea580c);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.25);
}

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

.breadcrumb a:hover {
  color: white;
}

.detail-one-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.12rem;
  line-height: 1.8;
}

.detail-meta,
.detail-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span,
.detail-score-row span,
.detail-score-row a {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  font-weight: 800;
}

.detail-score-row strong {
  display: inline-flex;
  width: 58px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #7c2d12;
  background: #fef3c7;
  font-size: 1.25rem;
}

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

.player-section {
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #050505;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  color: white;
  text-align: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.56));
  cursor: pointer;
}

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

.play-button {
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 38px rgba(234, 88, 12, 0.38);
  font-size: 2rem;
  cursor: pointer;
}

.player-status {
  margin: 0;
  padding: 12px 18px;
  color: #fed7aa;
  background: #111827;
  font-size: 0.92rem;
}

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

.detail-article,
.detail-side-card {
  border-radius: 28px;
  padding: 28px;
  background: white;
  box-shadow: 0 14px 30px rgba(120, 53, 15, 0.08);
}

.detail-article h2,
.detail-side-card h2 {
  margin-top: 0;
}

.detail-article p {
  color: #374151;
  font-size: 1.03rem;
  line-height: 1.95;
}

dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 0.9rem;
}

dd {
  margin: -8px 0 6px;
  font-weight: 800;
}

.site-footer {
  margin-top: 64px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}

.footer-logo {
  color: white;
  font-size: 1.4rem;
  font-weight: 900;
}

.site-footer h3 {
  color: white;
  margin-top: 0;
}

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

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

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

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

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

  .hero-rank-card {
    order: 2;
  }

  .category-overview-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-nav {
    min-height: 60px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 60px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: var(--shadow);
  }

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

  .hero-wrap,
  .quick-search-section,
  .content-section,
  .category-overview-list,
  .detail-layout,
  .player-section,
  .page-hero,
  .detail-hero {
    width: min(100% - 20px, 1200px);
    margin-top: 18px;
  }

  .hero-carousel {
    min-height: 620px;
    border-radius: 24px;
  }

  .hero-content {
    width: 100%;
    padding: 42px 24px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: clamp(2rem, 12vw, 3.4rem);
  }

  .hero-thumbs {
    left: 18px;
    right: 18px;
    grid-template-columns: repeat(2, 1fr);
  }

  .home-search div,
  .filter-toolbar,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-hero {
    padding: 28px;
    border-radius: 24px;
  }

  .detail-cover {
    max-width: 260px;
  }

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

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

  .ranking-row img {
    width: 54px;
    height: 72px;
  }

  .ranking-views {
    display: none;
  }

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

@media (max-width: 480px) {
  .category-grid,
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

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