:root {
  --page-bg: #fff7ed;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --brand: #ea580c;
  --brand-dark: #9a3412;
  --brand-soft: #ffedd5;
  --gold: #fbbf24;
  --paper: #ffffff;
  --line: rgba(154, 52, 18, 0.14);
  --shadow: 0 20px 45px rgba(154, 52, 18, 0.14);
  --shadow-soft: 0 12px 26px rgba(124, 45, 18, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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: 100;
  color: #ffffff;
  background: linear-gradient(90deg, #ea580c 0%, #d97706 52%, #c2410c 100%);
  box-shadow: 0 10px 30px rgba(154, 52, 18, 0.22);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #9a3412;
  background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
  box-shadow: inset 0 -2px 8px rgba(154, 52, 18, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.brand-text small {
  margin-top: 4px;
  color: #ffedd5;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a,
.nav-drop > button {
  border: 0;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.nav-drop:hover > button {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.18);
}

.nav-drop {
  position: relative;
}

.nav-drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 180px;
  padding: 8px;
  border-radius: 16px;
  background: #ffffff;
  color: var(--text-main);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s ease;
}

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

.nav-drop-menu a {
  display: block;
  color: var(--text-main);
  padding: 10px 12px;
}

.nav-drop-menu a:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
}

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

.hero-carousel {
  position: relative;
  margin: 28px auto 48px;
  min-height: 600px;
  overflow: hidden;
  border-radius: 32px;
  color: #ffffff;
  background: #431407;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 34px;
  align-items: center;
  padding: clamp(26px, 5vw, 64px);
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.85s ease, transform 0.85s ease, visibility 0.85s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(67, 20, 7, 0.92) 0%, rgba(124, 45, 18, 0.78) 48%, rgba(0, 0, 0, 0.36) 100%),
    radial-gradient(circle at 12% 16%, rgba(251, 191, 36, 0.36), transparent 24rem);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.hero-content p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #ffedd5;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 0.82rem;
  font-weight: 800;
}

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

.btn-primary,
.btn-secondary,
.section-link,
.play-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #7c2d12;
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.32);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn-primary:hover,
.btn-secondary:hover,
.section-link:hover,
.play-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  justify-self: end;
  width: min(360px, 100%);
  transform: rotate(2deg);
}

.hero-poster a {
  display: block;
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 34px 64px rgba(0, 0, 0, 0.38);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: clamp(26px, 5vw, 64px);
  bottom: 26px;
  display: flex;
  gap: 10px;
}

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

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

.home-search {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: min(620px, 100%);
  margin-top: 28px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.home-search input {
  width: 100%;
  border: 0;
  outline: 0;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  color: #7c2d12;
  background: #fff7ed;
}

.home-search button {
  border: 0;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  color: #7c2d12;
  background: #fbbf24;
  font-weight: 900;
}

.section-block {
  margin: 54px 0;
}

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

.section-heading.compact {
  margin-bottom: 16px;
}

.section-heading > div > p {
  margin: 0 0 6px;
  color: var(--brand);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-heading h2,
.page-title h1 {
  margin: 0;
  color: #431407;
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-desc,
.page-title p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--text-muted);
  line-height: 1.8;
}

.section-link {
  color: #ffffff;
  background: linear-gradient(135deg, #ea580c, #c2410c);
  box-shadow: var(--shadow-soft);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 8px 20px rgba(124, 45, 18, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #ffedd5, #fef3c7);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.year-badge,
.type-badge {
  position: absolute;
  top: 10px;
  border-radius: 999px;
  padding: 4px 8px;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
}

.year-badge {
  left: 10px;
  background: rgba(234, 88, 12, 0.92);
}

.type-badge {
  right: 10px;
  background: rgba(67, 20, 7, 0.74);
  backdrop-filter: blur(6px);
}

.movie-info {
  padding: 14px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: var(--brand);
}

.movie-info p {
  min-height: 42px;
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.movie-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 0.75rem;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  padding: 22px;
  border-radius: 24px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(154, 52, 18, 0.96), rgba(234, 88, 12, 0.84)),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.66), transparent 10rem);
  box-shadow: var(--shadow-soft);
}

.category-card strong {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.category-card p {
  color: #ffedd5;
  line-height: 1.7;
  margin: 0 0 20px;
}

.category-card span {
  font-weight: 900;
  color: #fef3c7;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 94px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(124, 45, 18, 0.07);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #7c2d12;
  background: linear-gradient(135deg, #fef3c7, #fbbf24);
  font-weight: 900;
  font-size: 1.1rem;
}

.rank-item img {
  width: 94px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.rank-item h3 a:hover {
  color: var(--brand);
}

.rank-item p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-item .movie-meta {
  margin-top: 10px;
}

.page-title {
  margin: 38px 0 26px;
  padding: 34px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-shell {
  margin: 26px 0;
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 0.8fr));
  gap: 14px;
}

.filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  outline: 0;
  color: var(--text-main);
  background: #fff7ed;
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: rgba(234, 88, 12, 0.42);
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.08);
}

.empty-state {
  display: none;
  margin: 24px 0;
  padding: 28px;
  border-radius: 24px;
  color: var(--text-muted);
  background: #ffffff;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.empty-state.visible {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 26px;
  align-items: start;
  margin: 0 0 44px;
}

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

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

.player-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(67, 20, 7, 0.68)),
    radial-gradient(circle at center, rgba(251, 191, 36, 0.24), transparent 18rem);
  cursor: pointer;
}

.player-layer.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-layer span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #7c2d12;
  background: linear-gradient(135deg, #fef3c7, #fbbf24);
  font-size: 2rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.detail-card {
  padding: 22px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 18px;
}

.detail-card h1 {
  margin: 0;
  color: #431407;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  line-height: 1.15;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 900;
}

.detail-section {
  margin: 28px 0;
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-section h2 {
  margin: 0 0 14px;
  color: #431407;
  font-size: 1.6rem;
}

.detail-section p {
  margin: 0;
  color: #4b5563;
  line-height: 1.95;
  font-size: 1.02rem;
}

.play-link {
  width: 100%;
  margin-top: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #ea580c, #c2410c);
}

.site-footer {
  margin-top: 68px;
  color: #ffffff;
  background: linear-gradient(90deg, #7c2d12, #9a3412);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, auto);
  gap: 28px;
  align-items: start;
}

.footer-brand {
  color: #fef3c7;
  font-size: 1.4rem;
}

.footer-inner p {
  max-width: 560px;
  color: #ffedd5;
  line-height: 1.7;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: flex-end;
}

.footer-inner nav a {
  color: #ffedd5;
  font-weight: 800;
}

.footer-inner nav a:hover {
  color: #ffffff;
}

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 68px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 20px;
    color: var(--text-main);
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .site-nav a,
  .nav-drop > button {
    color: var(--text-main);
    text-align: left;
  }

  .nav-drop-menu {
    position: static;
    width: 100%;
    visibility: visible;
    opacity: 1;
    transform: none;
    box-shadow: none;
    background: #fff7ed;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 22px;
  }

  .hero-poster {
    width: min(220px, 70vw);
    justify-self: start;
    transform: none;
  }

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

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

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

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

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

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

  .footer-inner nav {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  main,
  .header-inner,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

  .brand-text strong {
    font-size: 1.05rem;
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel {
    margin-top: 16px;
    min-height: 680px;
  }

  .hero-slide {
    padding: 22px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 2.25rem;
  }

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

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

  .rank-item {
    grid-template-columns: 42px 72px minmax(0, 1fr);
  }

  .rank-num {
    width: 38px;
    height: 38px;
  }

  .rank-item img {
    width: 72px;
  }

  .detail-section,
  .detail-card,
  .page-title,
  .filter-shell {
    padding: 20px;
    border-radius: 22px;
  }
}

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