:root {
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-soft: #fffaf4;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #fed7aa;
  --accent: #f97316;
  --accent-dark: #c2410c;
  --red: #dc2626;
  --pink: #ec4899;
  --gold: #facc15;
  --shadow: 0 18px 45px rgba(124, 45, 18, 0.14);
  --shadow-strong: 0 28px 70px rgba(31, 41, 55, 0.26);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 32rem),
    linear-gradient(180deg, #fff7ed 0%, #fff 42%, #fff7ed 100%);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #7c2d12;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--accent), var(--pink));
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.32);
}

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

.desktop-nav {
  display: flex;
  gap: 0.15rem;
  margin-left: auto;
}

.desktop-nav a,
.mobile-panel a {
  padding: 0.65rem 0.9rem;
  color: #4b5563;
  border-radius: 999px;
  transition: 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: var(--accent-dark);
  background: #ffedd5;
}

.header-search {
  display: flex;
  align-items: center;
  width: min(330px, 30vw);
  overflow: hidden;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
}

.header-search input {
  width: 100%;
  min-width: 0;
  padding: 0.7rem 1rem;
  color: #7c2d12;
  background: transparent;
  border: 0;
  outline: 0;
}

.header-search button,
.big-search button {
  flex: 0 0 auto;
  padding: 0.72rem 1.05rem;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--red), var(--accent));
  border: 0;
  border-radius: 999px;
  transition: 0.2s ease;
}

.header-search button:hover,
.big-search button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.32);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0.65rem;
  cursor: pointer;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: #9a3412;
  border-radius: 999px;
}

.mobile-panel {
  display: grid;
  gap: 0.25rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 1rem;
}

.hero-carousel {
  position: relative;
  min-height: clamp(600px, 78vh, 820px);
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding: clamp(6rem, 8vw, 8rem) max(1rem, calc((100vw - 1180px) / 2)) 4rem;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.78)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent 58%),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.05);
}

.hero-slide::after {
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  content: "";
  background: linear-gradient(0deg, rgba(255, 247, 237, 1), rgba(255, 247, 237, 0));
}

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

.hero-content,
.hero-poster,
.detail-hero-inner,
.page-hero > div,
.page-hero > form {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.4rem 0.75rem;
  color: #fff7ed;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(249, 115, 22, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-heading h1 {
  margin: 0;
  font-size: clamp(2.55rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-content p,
.page-hero p,
.detail-heading p {
  max-width: 700px;
  margin: 1.2rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.2rem;
  font-weight: 800;
  border-radius: 999px;
  transition: 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--accent));
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

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

.hero-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.28);
  border-radius: 34px;
  box-shadow: var(--shadow-strong);
  transform: rotate(2deg);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  bottom: 3.5rem;
  left: 50%;
  display: flex;
  gap: 0.7rem;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 58px;
  background: #fff;
}

.quick-search-band,
.section-block,
.detail-layout,
.watch-section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.quick-search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 480px);
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  margin-top: -2rem;
  position: relative;
  z-index: 4;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(254, 215, 170, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-search-band h2,
.section-heading h2,
.detail-content-card h2 {
  margin: 0;
  color: #7c2d12;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.05em;
}

.quick-search-band p,
.section-heading span,
.movie-card-body p,
.category-copy,
.rank-info p,
.detail-content-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.big-search {
  display: flex;
  gap: 0.7rem;
  padding: 0.5rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
}

.big-search input {
  width: 100%;
  padding: 0.85rem 1rem;
  color: #7c2d12;
  background: transparent;
  border: 0;
  outline: 0;
}

.section-block {
  padding: clamp(3rem, 6vw, 5rem) 0 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-heading span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading a,
.text-button {
  color: var(--accent-dark);
  font-weight: 800;
}

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

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

.rank-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.movie-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(254, 215, 170, 0.9);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(124, 45, 18, 0.08);
  transition: 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7c2d12);
}

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

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

.play-chip,
.rank-badge {
  position: absolute;
  color: #fff;
  font-weight: 900;
  border-radius: 999px;
}

.play-chip {
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.42rem 0.7rem;
  background: rgba(249, 115, 22, 0.92);
}

.rank-badge {
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.36rem 0.62rem;
  background: linear-gradient(135deg, var(--red), var(--pink));
}

.movie-card-body {
  padding: 1rem;
}

.movie-meta-line,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.movie-meta-line span,
.tag-row span {
  padding: 0.25rem 0.5rem;
  color: #9a3412;
  font-size: 0.78rem;
  font-weight: 750;
  background: #ffedd5;
  border-radius: 999px;
}

.movie-card h3 {
  margin: 0.75rem 0 0.45rem;
  font-size: 1rem;
  line-height: 1.35;
}

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

.movie-card-body p {
  display: -webkit-box;
  min-height: 4.9em;
  margin: 0 0 0.8rem;
  overflow: hidden;
  font-size: 0.9rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  padding: 1.3rem;
  background:
    linear-gradient(135deg, rgba(220, 38, 38, 0.92), rgba(249, 115, 22, 0.9)),
    #f97316;
  border-radius: 28px;
  box-shadow: var(--shadow);
  transition: 0.22s ease;
}

.category-card:nth-child(3n + 2) {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.92), rgba(249, 115, 22, 0.88));
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.95), rgba(194, 65, 12, 0.9));
}

.category-card:hover {
  transform: translateY(-6px);
}

.category-name {
  position: relative;
  z-index: 2;
  display: block;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-copy {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 88%;
  margin-top: 0.6rem;
  color: rgba(255, 255, 255, 0.86);
}

.category-cover-stack {
  position: absolute;
  right: -18px;
  bottom: -20px;
  display: grid;
  grid-template-columns: repeat(2, 76px);
  gap: 0.55rem;
  width: 170px;
  transform: rotate(-8deg);
  opacity: 0.92;
}

.category-cover-stack img {
  aspect-ratio: 2 / 3;
  border: 4px solid rgba(255, 255, 255, 0.45);
  border-radius: 16px;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.2);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.page-hero {
  display: grid;
  align-items: center;
  min-height: 380px;
  padding: 7rem max(1rem, calc((100vw - 1180px) / 2)) 4rem;
  background:
    linear-gradient(120deg, rgba(17, 24, 39, 0.95), rgba(124, 45, 18, 0.88), rgba(249, 115, 22, 0.68)),
    radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.45), transparent 24rem);
}

.page-hero h1,
.detail-heading h1 {
  max-width: 900px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(254, 215, 170, 0.9);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(124, 45, 18, 0.08);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 0.85rem 1rem;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  outline: 0;
}

.rank-list {
  display: grid;
  gap: 0.75rem;
}

.rank-row {
  display: grid;
  grid-template-columns: 64px 74px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(254, 215, 170, 0.9);
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(124, 45, 18, 0.07);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  font-weight: 950;
  background: linear-gradient(135deg, var(--red), var(--accent));
  border-radius: 16px;
}

.rank-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
  border-radius: 14px;
}

.rank-info h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.rank-info p {
  display: -webkit-box;
  margin: 0 0 0.5rem;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.detail-hero {
  min-height: 640px;
}

.detail-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.78)),
    linear-gradient(0deg, rgba(17, 24, 39, 0.82), transparent 55%),
    var(--detail-image) center / cover no-repeat;
  filter: blur(2px) saturate(1.1);
  transform: scale(1.04);
}

.detail-hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  content: "";
  background: linear-gradient(0deg, #fff7ed, transparent);
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: end;
  width: min(1180px, calc(100% - 2rem));
  min-height: 640px;
  margin: 0 auto;
  padding: 7rem 0 5rem;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.28);
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
}

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #fed7aa;
}

.watch-section {
  margin-top: -3rem;
  position: relative;
  z-index: 3;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
  border: 1px solid rgba(254, 215, 170, 0.8);
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0.7rem;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.58));
  border: 0;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.video-overlay.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 0.25rem;
  color: #fff;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--red), var(--accent));
  border-radius: 999px;
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.38);
}

.detail-layout {
  padding-top: 2rem;
}

.detail-content-card {
  padding: clamp(1.25rem, 4vw, 2rem);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(254, 215, 170, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-content-card h2 + p {
  margin-top: 0.8rem;
}

.detail-content-card h2:not(:first-child) {
  margin-top: 2rem;
}

.movie-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1rem 0;
}

.movie-facts div {
  padding: 0.9rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 18px;
}

.movie-facts dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.movie-facts dd {
  margin: 0.2rem 0 0;
  color: #7c2d12;
  font-weight: 850;
}

.related-block {
  padding-bottom: 4rem;
}

.site-footer {
  margin-top: 4rem;
  color: #ffedd5;
  background: linear-gradient(135deg, #111827, #7c2d12);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0;
}

.footer-inner strong {
  color: #fff;
  font-size: 1.2rem;
}

.footer-inner p {
  max-width: 620px;
  color: rgba(255, 237, 213, 0.78);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-content: flex-start;
  justify-content: flex-end;
}

.footer-links a {
  padding: 0.45rem 0.75rem;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.empty-result {
  padding: 1.5rem;
  color: #9a3412;
  text-align: center;
  background: #ffedd5;
  border-radius: 18px;
}

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

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

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

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

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

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .hero-slide,
  .quick-search-band,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    align-content: center;
    padding-top: 6rem;
  }

  .hero-poster {
    display: none;
  }

  .quick-search-band {
    margin-top: 1rem;
  }

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

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

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

  .rank-row .text-button {
    grid-column: 3;
    justify-self: start;
  }

  .detail-cover {
    width: min(260px, 72vw);
  }
}

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

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

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

  .hero-content h1,
  .hero-content h2,
  .page-hero h1,
  .detail-heading h1 {
    font-size: clamp(2.2rem, 14vw, 3.6rem);
  }

  .hero-actions,
  .big-search,
  .footer-inner,
  .section-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .movie-grid-home,
  .rank-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-facts {
    grid-template-columns: 1fr;
  }

  .video-shell {
    border-radius: 18px;
  }
}
