:root {
  --page-bg: #fff7ed;
  --page-bg-2: #fffbeb;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #fed7aa;
  --brand: #f97316;
  --brand-dark: #ea580c;
  --brand-soft: #ffedd5;
  --black: #111827;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
  --shadow-soft: 0 8px 24px rgba(17, 24, 39, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, var(--page-bg), var(--page-bg-2));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 247, 237, 0.92);
  border-bottom: 1px solid rgba(254, 215, 170, 0.8);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 900;
  font-size: 22px;
  border-radius: 13px;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.brand-text {
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.header-search {
  display: flex;
  width: min(380px, 35vw);
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 0;
  outline: none;
  color: var(--text);
  background: var(--white);
}

.header-search input {
  padding: 10px 14px 10px 18px;
}

.header-search button,
.mobile-search button,
.search-panel button,
.btn-primary,
.btn-ghost {
  border: 0;
  cursor: pointer;
  font-weight: 700;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-panel button,
.btn-primary {
  color: var(--white);
  background: var(--brand);
}

.header-search button {
  padding: 0 18px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  color: #374151;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand-dark);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: var(--brand-soft);
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--brand-dark);
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav nav {
  display: grid;
  gap: 8px;
}

.mobile-nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.72);
}

.mobile-nav-link.is-active {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.mobile-search input {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.mobile-search button {
  padding: 0 16px;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.05));
}

.hero-content {
  max-width: 620px;
  color: var(--white);
  padding: 64px 0;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -1px;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
}

.hero-content p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

.hero-tags span,
.pill,
.card-meta span,
.detail-meta span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffedd5;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
}

.btn-primary:hover,
.search-panel button:hover,
.header-search button:hover,
.mobile-search button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 24px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 32px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.is-active {
  background: var(--brand);
}

main {
  min-height: 60vh;
}

.page-section {
  padding: 58px 0 0;
}

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

.section-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--brand-dark);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

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

.section-heading a {
  color: var(--brand-dark);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(245px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.horizontal-scroll .movie-card {
  scroll-snap-align: start;
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111827;
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0));
}

.card-year,
.card-play {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.card-year {
  top: 12px;
  left: 12px;
  padding: 4px 9px;
  background: rgba(0, 0, 0, 0.56);
}

.card-play {
  right: 12px;
  bottom: 12px;
  padding: 6px 11px;
  background: var(--brand);
}

.card-body {
  padding: 15px;
}

.card-title {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
  line-height: 1.35;
}

.card-title:hover {
  color: var(--brand-dark);
}

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

.card-meta span,
.detail-meta span,
.rank-meta span {
  color: #9a3412;
  background: var(--brand-soft);
}

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

.category-card {
  min-height: 180px;
  padding: 22px;
  border: 1px solid rgba(254, 215, 170, 0.85);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 237, 213, 0.78));
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.category-card span {
  color: var(--brand-dark);
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 26px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
  gap: 28px;
  padding-top: 24px;
}

.detail-main,
.detail-side,
.content-box,
.search-panel {
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-main {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  background: #000;
}

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

.player-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.34);
  cursor: pointer;
}

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

.play-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(249, 115, 22, 0.94);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
  font-size: 32px;
  line-height: 1;
}

.detail-content {
  padding: 26px;
}

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

.detail-content h2,
.content-box h2,
.detail-side h2 {
  margin: 24px 0 12px;
  font-size: 24px;
}

.detail-content p,
.content-box p {
  margin: 0 0 14px;
  color: #374151;
}

.detail-meta {
  margin: 14px 0 18px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.pill {
  color: #9a3412;
  background: var(--brand-soft);
}

.detail-side {
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 96px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 96px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.side-item strong {
  display: block;
  line-height: 1.35;
}

.side-item span {
  color: var(--muted);
  font-size: 13px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 58px 168px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-number {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: var(--white);
  background: linear-gradient(135deg, #fb923c, #ea580c);
  font-weight: 900;
}

.rank-cover img {
  width: 168px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  background: #111827;
}

.rank-title {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 20px;
  font-weight: 900;
}

.rank-title:hover {
  color: var(--brand-dark);
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
}

.content-box,
.search-panel {
  padding: 24px;
}

.search-panel {
  margin: 24px 0;
}

.search-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 170px 160px 110px;
  gap: 12px;
}

.search-panel input,
.search-panel select {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.search-panel button {
  min-height: 44px;
  padding: 0 18px;
}

.empty-state {
  padding: 40px 0;
  color: var(--muted);
  text-align: center;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 28px;
  padding: 44px 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.site-footer p,
.site-footer ul {
  margin: 0;
  padding: 0;
}

.site-footer li {
  list-style: none;
  margin: 8px 0;
}

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

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

  .mobile-menu-button {
    display: block;
  }

  .header-search {
    width: min(440px, 44vw);
  }

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

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

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

  .hero,
  .hero-slide img {
    min-height: 560px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.34));
  }

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

  .detail-side {
    position: static;
  }

  .search-form-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

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

  .card-body {
    padding: 12px;
  }

  .section-heading {
    display: block;
  }

  .section-heading a {
    display: inline-block;
    margin-top: 10px;
  }

  .rank-card {
    grid-template-columns: 44px 96px 1fr;
    gap: 10px;
    padding: 12px;
  }

  .rank-cover img {
    width: 96px;
  }

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

  .rank-info p {
    display: none;
  }

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