* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #fff8ec;
  --bg-soft: #fffbf3;
  --panel: #ffffff;
  --panel-strong: #fff3d7;
  --text: #2b1707;
  --muted: #7a4b16;
  --line: #f4d9a4;
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-soft: #fef3c7;
  --accent: #f97316;
  --shadow: 0 22px 55px rgba(120, 53, 15, 0.16);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.20), transparent 34rem),
    linear-gradient(180deg, #fff7e6 0%, #fffaf2 48%, #ffffff 100%);
}

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, rgba(255, 251, 235, 0.96), rgba(254, 243, 199, 0.96), rgba(255, 237, 213, 0.96));
  border-bottom: 1px solid rgba(217, 119, 6, 0.16);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 32px rgba(120, 53, 15, 0.08);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.28);
}

.logo-text {
  display: grid;
  line-height: 1.1;
}

.logo-text strong {
  font-size: 22px;
  color: var(--brand-dark);
  letter-spacing: -0.03em;
}

.logo-text small {
  margin-top: 4px;
  color: #b45309;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: #7c2d12;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  font-weight: 700;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #ea580c);
  transform: translateY(-1px);
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search {
  width: 310px;
}

.top-search input,
.mobile-search input,
.big-search input,
.filter-field input,
.filter-field select {
  width: 100%;
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input,
.mobile-search input {
  height: 40px;
  padding: 0 14px;
}

.top-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-field input:focus,
.filter-field select:focus {
  border-color: rgba(217, 119, 6, 0.62);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.top-search button,
.mobile-search button,
.big-search button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #ea580c);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.18);
}

.top-search button,
.mobile-search button {
  height: 40px;
  padding: 0 16px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #7c2d12;
  background: #fff7ed;
  cursor: pointer;
  font-size: 24px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

main {
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  min-height: 620px;
  margin: 28px auto 0;
  border-radius: 34px;
  overflow: hidden;
  background: #431407;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.1fr 420px;
  gap: 40px;
  align-items: center;
  padding: 66px;
  background-position: center;
  background-size: cover;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-content {
  max-width: 690px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #7c2d12;
  background: rgba(254, 243, 199, 0.92);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.hero-content h1,
.page-hero h1,
.detail-intro h1 {
  margin: 18px 0;
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 1.05;
}

.hero-content h1 {
  font-size: clamp(42px, 6vw, 78px);
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.30);
}

.hero-content p {
  width: min(100%, 650px);
  font-size: 18px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.90);
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

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

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

.primary-btn,
.secondary-btn,
.quick-actions a,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.primary-btn,
.quick-actions a:first-child {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 16px 30px rgba(234, 88, 12, 0.28);
}

.secondary-btn,
.quick-actions a,
.more-link {
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid rgba(217, 119, 6, 0.18);
}

.primary-btn:hover,
.secondary-btn:hover,
.quick-actions a:hover,
.more-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(120, 53, 15, 0.16);
}

.hero-poster {
  position: relative;
  justify-self: end;
  width: min(100%, 380px);
  aspect-ratio: 3 / 4.2;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
  transform: rotate(2deg);
}

.hero-poster img,
.poster-link img,
.rank-cover img,
.detail-cover img,
.category-tile img,
.category-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #fed7aa, #fef3c7);
}

.hero-controls {
  position: absolute;
  right: 26px;
  bottom: 28px;
  display: flex;
  gap: 10px;
  z-index: 5;
}

.hero-controls button,
.hero-dots button {
  border: 0;
  cursor: pointer;
}

.hero-controls button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #7c2d12;
  background: rgba(255, 247, 237, 0.94);
  font-size: 28px;
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  left: 66px;
  bottom: 40px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.hero-dots button {
  width: 28px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dots button.active {
  width: 46px;
  background: #ffffff;
}

.section-block,
.filter-panel,
.page-hero,
.detail-hero {
  width: min(1200px, calc(100% - 32px));
  margin: 34px auto 0;
}

.intro-block,
.page-hero,
.filter-panel,
.detail-copy article,
.search-page-panel {
  border: 1px solid rgba(217, 119, 6, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 46px rgba(120, 53, 15, 0.08);
}

.intro-block {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 34px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading span {
  color: #b45309;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.section-heading h2 {
  margin: 8px 0 8px;
  color: #431407;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.section-heading p,
.page-hero p,
.detail-copy p,
.search-page-panel p {
  color: var(--muted);
  line-height: 1.9;
}

.line-between {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 20px;
  border-radius: 24px;
  color: #ffffff;
  background: #7c2d12;
  box-shadow: 0 18px 42px rgba(120, 53, 15, 0.14);
}

.category-tile:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(67, 20, 7, 0.12), rgba(67, 20, 7, 0.92));
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: transform 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 22px;
  font-weight: 950;
}

.category-tile p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(217, 119, 6, 0.12);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(120, 53, 15, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  background: #fed7aa;
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(234, 88, 12, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  font-style: normal;
  font-weight: 950;
}

.card-body {
  padding: 14px;
}

.card-meta,
.score-row,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.card-meta span,
.rank-meta span,
.detail-meta span {
  color: #92400e;
  background: #fff7ed;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  min-height: 48px;
  margin: 12px 0 8px;
  color: #431407;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 950;
}

.movie-card p {
  min-height: 64px;
  margin: 0 0 12px;
  color: #7a4b16;
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.score-row {
  justify-content: space-between;
  margin-top: 14px;
  color: #b45309;
  font-size: 13px;
  font-weight: 900;
}

.score-row a {
  color: #ea580c;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: auto 132px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(217, 119, 6, 0.12);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(120, 53, 15, 0.08);
}

.list-rank {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  font-weight: 950;
}

.rank-cover {
  display: block;
  height: 92px;
  border-radius: 16px;
  overflow: hidden;
  background: #fed7aa;
}

.rank-info h3 {
  margin: 0 0 8px;
  color: #431407;
  font-size: 20px;
  font-weight: 950;
}

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

.rank-meta strong {
  color: #ea580c;
}

.page-hero {
  min-height: 310px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  padding: 48px;
  background:
    radial-gradient(circle at 88% 20%, rgba(249, 115, 22, 0.20), transparent 22rem),
    linear-gradient(135deg, rgba(255, 247, 237, 0.95), rgba(254, 243, 199, 0.88));
}

.page-hero h1 {
  max-width: 800px;
  color: #431407;
  font-size: clamp(36px, 5vw, 62px);
}

.category-hero img {
  width: 260px;
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  box-shadow: 0 26px 60px rgba(120, 53, 15, 0.18);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.75fr 0.85fr;
  gap: 16px;
  padding: 18px;
}

.filter-field label {
  display: block;
  margin: 0 0 8px 4px;
  color: #92400e;
  font-size: 13px;
  font-weight: 950;
}

.filter-field input,
.filter-field select {
  min-height: 46px;
  padding: 0 16px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 36px;
  align-items: center;
  padding: 38px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 85% 20%, rgba(249, 115, 22, 0.18), transparent 24rem),
    linear-gradient(135deg, #fff7ed, #fffbeb);
  box-shadow: var(--shadow);
}

.detail-cover {
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  border-radius: 28px;
  background: #fed7aa;
  box-shadow: 0 28px 70px rgba(120, 53, 15, 0.18);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #92400e;
  font-size: 14px;
  font-weight: 800;
}

.detail-intro h1 {
  color: #431407;
  font-size: clamp(36px, 5vw, 66px);
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

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

.detail-tags {
  margin-bottom: 24px;
}

.player-section {
  scroll-margin-top: 100px;
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 30px;
  background: #09090b;
  box-shadow: 0 26px 80px rgba(24, 24, 27, 0.28);
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.54));
  cursor: pointer;
}

.play-overlay span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  background: rgba(234, 88, 12, 0.92);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.34);
  font-size: 42px;
}

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

.player-error {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  padding: 14px 18px;
  border-radius: 16px;
  color: #ffffff;
  background: rgba(127, 29, 29, 0.88);
}

.detail-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.detail-copy article {
  padding: 28px;
}

.detail-copy h2 {
  margin: 0 0 14px;
  color: #431407;
  font-size: 26px;
}

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

.search-page-panel {
  padding: 24px;
}

.big-search {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.big-search input {
  min-height: 56px;
  padding: 0 18px;
}

.big-search button {
  min-height: 56px;
  padding: 0 26px;
}

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

.empty-result {
  grid-column: 1 / -1;
  padding: 28px;
  border-radius: 20px;
  color: #92400e;
  background: #fff7ed;
  text-align: center;
  font-weight: 900;
}

.site-footer {
  margin-top: 54px;
  padding: 34px 0;
  color: #78350f;
  background: linear-gradient(90deg, #fffbeb, #fff7ed);
  border-top: 1px solid rgba(217, 119, 6, 0.14);
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff7ed;
  font-weight: 800;
}

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

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

  .hero-slide {
    grid-template-columns: 1fr 300px;
    padding: 42px;
  }

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

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

  .home-rank,
  .detail-copy {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

  .mobile-link {
    display: block;
    padding: 12px 14px;
    font-weight: 900;
  }

  .mobile-search {
    margin-top: 6px;
  }

  .hero-carousel {
    min-height: 720px;
    border-radius: 26px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: end;
    padding: 28px;
  }

  .hero-poster {
    justify-self: start;
    width: 210px;
    order: -1;
  }

  .hero-dots {
    left: 28px;
  }

  .intro-block,
  .line-between,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-hero {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .category-hero img {
    width: 190px;
  }

  .detail-cover {
    width: min(100%, 300px);
  }

  .rank-row {
    grid-template-columns: auto 92px 1fr;
    gap: 12px;
  }

  .rank-cover {
    height: 82px;
  }
}

@media (max-width: 540px) {
  .header-inner {
    width: min(100% - 20px, 1200px);
  }

  .logo-text small {
    display: none;
  }

  .hero-carousel,
  .section-block,
  .filter-panel,
  .page-hero,
  .detail-hero {
    width: min(100% - 20px, 1200px);
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .movie-grid,
  .search-results {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 1fr;
  }

  .list-rank {
    width: 100%;
    height: 36px;
  }

  .rank-cover {
    height: 180px;
  }

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