:root {
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --red: #dc2626;
  --yellow: #facc15;
  --blue: #2563eb;
  --green: #16a34a;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --card: #ffffff;
  --dark: #111827;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #f3f4f6;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--orange), var(--red));
  color: #fff;
  box-shadow: 0 10px 24px rgba(194, 65, 12, 0.25);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--orange);
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08);
}

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

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

.nav-link {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fef3c7;
  transform: translateY(-1px);
}

.top-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.top-search input,
.mobile-search input,
.filter-input,
.search-panel input,
.search-panel select {
  border: 0;
  outline: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
}

.top-search input {
  width: 230px;
  padding: 9px 14px;
}

.top-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.mobile-search button,
.primary-button,
.search-panel button {
  color: #fff;
  background: var(--orange-dark);
}

.top-search button {
  padding: 9px 16px;
}

.top-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.search-panel button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(124, 45, 18, 0.25);
  background: #9a3412;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.mobile-nav {
  display: none;
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(154, 52, 18, 0.55);
}

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

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

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

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

.hero-carousel {
  position: relative;
  height: min(640px, calc(100vh - 64px));
  min-height: 430px;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
  transform: scale(1.03);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.98) 0%, rgba(17, 24, 39, 0.58) 46%, rgba(17, 24, 39, 0.16) 100%);
}

.hero-inner {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 0 0 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: end;
  gap: 34px;
}

.hero-copy {
  max-width: 760px;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: rgba(234, 88, 12, 0.95);
}

.pill.soft {
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-copy h1 {
  margin: 16px 0 16px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 26px;
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.88);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
}

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

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.42);
  background: rgba(255, 255, 255, 0.1);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.52);
  transform: translateY(-50%) scale(1.06);
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.main-shell {
  padding: 48px 0 64px;
}

.content-section {
  margin-bottom: 54px;
}

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

.section-head h2,
.page-title h1,
.detail-copy h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  flex: none;
  color: var(--orange);
  font-weight: 800;
}

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

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

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.poster-wrap img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.movie-card.small .poster-wrap img {
  height: 190px;
}

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

.type-badge,
.card-channel {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  color: #fff;
  background: var(--orange);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.34);
}

.hover-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 38px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.26);
  transition: opacity 0.25s ease;
}

.movie-card a:hover .hover-play {
  opacity: 1;
}

.card-body {
  padding: 14px 14px 16px;
}

.card-body h3 {
  min-height: 46px;
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.42;
  font-weight: 900;
  color: #1f2937;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card a:hover .card-body h3 {
  color: var(--orange);
}

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

.card-meta,
.list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #6b7280;
  font-size: 12px;
}

.card-meta {
  justify-content: space-between;
}

.card-channel {
  margin-top: 10px;
  padding: 3px 9px;
  color: var(--orange-dark);
  background: #ffedd5;
}

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

.category-tile {
  position: relative;
  min-height: 142px;
  overflow: hidden;
  padding: 22px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #fb923c, #dc2626);
  box-shadow: 0 16px 30px rgba(220, 38, 38, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.category-tile:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 22px 40px rgba(220, 38, 38, 0.28);
}

.category-tile h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

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

.list-card a {
  display: grid;
  grid-template-columns: auto 132px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.06);
  transition: background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.list-card a:hover {
  transform: translateY(-2px);
  background: #fff7ed;
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.1);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--orange);
  background: #ffedd5;
  font-size: 18px;
  font-weight: 900;
}

.list-card img {
  width: 132px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
}

.list-card h3 {
  margin: 0 0 5px;
  font-size: 18px;
  font-weight: 900;
}

.list-card p {
  margin: 0 0 8px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.page-hero {
  padding: 56px 0 34px;
  background: linear-gradient(135deg, #fff7ed, #ffffff 55%, #fee2e2);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--orange-dark);
  font-size: 14px;
  font-weight: 800;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  margin: 24px 0 30px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.07);
}

.search-panel input,
.search-panel select,
.filter-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.search-panel button {
  padding: 12px 18px;
}

.no-results {
  display: none;
  padding: 28px;
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: #fff;
}

.no-results.show {
  display: block;
}

.detail-hero {
  position: relative;
  min-height: 450px;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
}

.detail-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.52;
}

.detail-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.56));
}

.detail-hero .container {
  position: relative;
  z-index: 2;
  min-height: 450px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  align-items: end;
  padding: 60px 0 48px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.38);
}

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

.detail-copy h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 58px);
}

.detail-copy p {
  max-width: 830px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
  color: #fef3c7;
  font-weight: 800;
}

.detail-main {
  padding: 42px 0 64px;
}

.player-card {
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.22);
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  text-align: center;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
}

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

.play-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--orange);
  background: #fff;
  font-size: 30px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  transition: transform 0.22s ease;
}

.play-overlay:hover .play-circle {
  transform: scale(1.08);
}

.play-overlay strong {
  max-width: 80%;
  font-size: 20px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  margin-top: 28px;
}

.detail-box,
.side-box {
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.07);
}

.detail-box h2,
.side-box h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.detail-box p {
  margin: 0 0 18px;
  color: #374151;
  font-size: 16px;
}

.side-box {
  align-self: start;
}

.side-box dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.side-box div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
}

.side-box dt {
  color: var(--muted);
}

.side-box dd {
  margin: 0;
  font-weight: 800;
}

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

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 42px 0 26px;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  margin: 10px 0 0;
  color: #9ca3af;
}

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

.footer-links a:hover {
  color: #fed7aa;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .hero-inner {
    grid-template-columns: 1fr 190px;
  }

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

@media (max-width: 720px) {
  .container,
  .nav-shell,
  .page-title {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-carousel {
    height: 560px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-bottom: 54px;
  }

  .hero-poster {
    display: none;
  }

  .hero-control {
    display: none;
  }

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

  .poster-wrap img,
  .movie-card.small .poster-wrap img {
    height: 210px;
  }

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

  .category-tile {
    min-height: 126px;
    padding: 18px;
  }

  .list-card a {
    grid-template-columns: auto 96px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .list-card img {
    width: 96px;
    height: 70px;
  }

  .list-card h3 {
    font-size: 16px;
  }

  .list-card p {
    -webkit-line-clamp: 1;
  }

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

  .detail-hero .container {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 18px;
    min-height: 360px;
    padding: 38px 0 34px;
  }

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

  .detail-copy p {
    font-size: 15px;
  }

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

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

  .poster-wrap img,
  .movie-card.small .poster-wrap img {
    height: 180px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 15px;
  }

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

  .detail-poster {
    display: none;
  }

  .play-circle {
    width: 64px;
    height: 64px;
    font-size: 26px;
  }
}
