* {
  box-sizing: border-box;
}

:root {
  --orange: #f97316;
  --orange-deep: #ea580c;
  --pink: #ec4899;
  --purple: #8b5cf6;
  --yellow: #f59e0b;
  --green: #10b981;
  --blue: #3b82f6;
  --slate: #1f2937;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(229, 231, 235, 0.95);
  --paper: #ffffff;
  --soft: #fff7ed;
  --shadow: 0 20px 45px rgba(124, 45, 18, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #fff7ed 0%, #fdf2f8 48%, #f5f3ff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--orange);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  box-shadow: 0 12px 24px rgba(236, 72, 153, 0.28);
}

.brand-text,
.footer-brand {
  background: linear-gradient(90deg, var(--orange), var(--pink));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #374151;
  font-weight: 650;
  white-space: nowrap;
}

.nav-links a,
.mobile-menu a,
.site-footer a {
  transition: color 180ms ease, transform 180ms ease;
}

.nav-links a:hover,
.mobile-menu a:hover,
.site-footer a:hover {
  color: var(--orange);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #374151;
  background: #fff7ed;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  color: #374151;
  font-weight: 650;
}

.hero-carousel {
  position: relative;
  height: 78vh;
  min-height: 560px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 900ms ease, transform 1200ms ease;
  pointer-events: none;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #f97316, #ec4899 55%, #8b5cf6);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
  color: #fff;
}

.hero-content h1,
.page-hero h1,
.detail-intro h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 18px;
  padding: 9px 16px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  box-shadow: 0 12px 30px rgba(236, 72, 153, 0.28);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.28);
}

.btn-light {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

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

.quick-search-shell,
.content-section,
.rank-shell,
.category-preview,
.detail-layout,
.related-section,
.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search-shell {
  position: relative;
  z-index: 5;
  margin-top: -42px;
}

.quick-search {
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.quick-search label {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.quick-search div,
.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(249, 115, 22, 0.55);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.content-section,
.category-preview {
  padding: 72px 0 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-link {
  color: var(--orange);
  font-weight: 800;
  white-space: nowrap;
}

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

.category-card {
  min-height: 198px;
  padding: 22px;
  border-radius: 26px;
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 60px rgba(124, 45, 18, 0.18);
}

.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 18px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.category-card strong {
  display: block;
  font-size: 21px;
  margin-bottom: 10px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
}

.category-sample {
  margin-top: 12px !important;
  font-size: 13px;
  opacity: 0.86;
}

.tone-orange {
  background: linear-gradient(135deg, #fb923c, #ec4899);
}

.tone-red {
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.tone-slate {
  background: linear-gradient(135deg, #4b5563, #111827);
}

.tone-pink {
  background: linear-gradient(135deg, #f472b6, #ec4899);
}

.tone-yellow {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.tone-purple {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.tone-amber {
  background: linear-gradient(135deg, #d97706, #92400e);
}

.tone-green {
  background: linear-gradient(135deg, #10b981, #059669);
}

.tone-blue {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
}

.tone-cyan {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
}

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(124, 45, 18, 0.16);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #fb923c, #ec4899 60%, #8b5cf6);
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent);
  transition: opacity 180ms ease;
}

.movie-card:hover .movie-cover::after {
  opacity: 1;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease, opacity 180ms ease;
}

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

.cover-category,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--orange);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.rank-badge {
  left: 12px;
  right: auto;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--pink));
}

.movie-info {
  padding: 18px;
}

.movie-title {
  display: block;
  min-height: 56px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.45;
  font-weight: 900;
  transition: color 180ms ease;
}

.movie-title:hover {
  color: var(--orange);
}

.movie-desc {
  min-height: 54px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  margin-top: 14px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

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

.movie-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #ea580c;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 750;
}

.rank-section {
  margin-top: 78px;
  padding: 72px 0;
  background: linear-gradient(90deg, rgba(255, 237, 213, 0.9), rgba(252, 231, 243, 0.95));
}

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

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

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
}

.movie-card-horizontal .movie-cover {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card-horizontal .movie-title {
  min-height: auto;
}

.page-hero,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 36px auto 0;
  border-radius: 34px;
  background: linear-gradient(135deg, #fb923c, #ec4899 58%, #8b5cf6);
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 58px;
  color: #fff;
}

.page-hero p {
  max-width: 820px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

.compact-hero h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.filter-panel {
  grid-template-columns: 1fr 210px 210px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.empty-state {
  padding: 24px;
  border-radius: 18px;
  color: var(--muted);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

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

.breadcrumb a {
  color: var(--orange);
  font-weight: 750;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  padding: 30px;
  color: #fff;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #fb923c, #ec4899, #8b5cf6);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.24);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.detail-intro {
  align-self: center;
}

.detail-intro h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

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

.player-section h2 {
  margin: 0 0 18px;
  font-size: 30px;
  font-weight: 900;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 26px 58px rgba(15, 23, 42, 0.24);
}

.player-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #020617;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 200ms ease, visibility 200ms ease;
}

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

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  box-shadow: 0 18px 38px rgba(236, 72, 153, 0.34);
  font-size: 26px;
}

.player-overlay strong {
  font-size: 22px;
  letter-spacing: 0.02em;
}

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

.detail-block {
  padding: 30px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-block h2 {
  margin: 0 0 18px;
  font-size: 28px;
  font-weight: 900;
}

.detail-block p {
  margin: 0 0 16px;
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
}

.site-footer {
  margin-top: 86px;
  padding: 54px 0 28px;
  background: rgba(255, 255, 255, 0.84);
  border-top: 1px solid var(--line);
}

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

.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

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

  .ranking-grid,
  .ranking-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .brand,
  .footer-brand {
    font-size: 18px;
  }

  .hero-carousel {
    height: 72vh;
    min-height: 520px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.4));
  }

  .hero-content h1,
  .page-hero h1,
  .detail-intro h1 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .quick-search div,
  .filter-panel,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .movie-card-horizontal {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .movie-card-horizontal .movie-info {
    padding: 14px;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .mobile-menu,
  .quick-search-shell,
  .content-section,
  .rank-shell,
  .category-preview,
  .detail-layout,
  .related-section,
  .breadcrumb,
  .page-hero,
  .detail-hero,
  .player-section,
  .footer-grid,
  .copyright {
    width: min(100% - 22px, 1180px);
  }

  .hero-carousel {
    height: 74vh;
    min-height: 500px;
  }

  .hero-content {
    width: min(100% - 22px, 1180px);
  }

  .hero-actions,
  .detail-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

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

  .category-grid,
  .movie-grid,
  .feature-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

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

  .movie-card-horizontal .movie-cover {
    aspect-ratio: 16 / 10;
  }

  .detail-poster img {
    aspect-ratio: 16 / 10;
  }
}
