* {
  box-sizing: border-box;
}

:root {
  --page: #f8fafc;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --dark: #111827;
  --rose: #f43f5e;
  --orange: #f97316;
  --pink: #ec4899;
  --amber: #f59e0b;
  --card: #ffffff;
  --soft: rgba(255, 255, 255, 0.78);
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.14);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

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

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

.brand-name,
.footer-brand span:last-child {
  font-size: 1.25rem;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  box-shadow: 0 10px 25px rgba(244, 63, 94, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: #334155;
  font-weight: 700;
}

.desktop-nav a {
  transition: color 0.24s ease, transform 0.24s ease;
}

.desktop-nav a:hover {
  color: var(--orange);
  transform: translateY(-2px);
}

.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fff7ed;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

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

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.mobile-nav a {
  display: block;
  padding: 12px 4px;
  font-weight: 800;
  color: #334155;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #0f172a;
}

.hero-track {
  position: relative;
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 680px;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 25%, rgba(249, 115, 22, 0.34), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.25) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 1) 0%, transparent 44%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  padding: 96px 0 130px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fb7185;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  width: min(850px, 100%);
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 6.7rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-summary {
  width: min(720px, 100%);
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 26px;
}

.hero-tags span,
.detail-meta span,
.detail-meta strong,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
}

.hero-tags span {
  padding: 9px 15px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.hero-actions,
.section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-actions {
  margin-top: 34px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 0;
  font-weight: 900;
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.primary-button,
.home-search button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--pink));
  box-shadow: 0 18px 35px rgba(244, 63, 94, 0.34);
}

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

.primary-button:hover,
.ghost-button:hover,
.home-search button:hover {
  transform: translateY(-3px);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 2rem;
  z-index: 5;
}

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

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

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

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

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

.search-strip,
.section-shell,
.footer-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.search-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  margin-top: -58px;
  position: relative;
  z-index: 10;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-strip h2,
.section-heading h2,
.detail-article h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: -0.04em;
}

.search-strip p,
.channel-panel p,
.category-card p,
.detail-article p {
  color: var(--muted);
  line-height: 1.8;
}

.home-search {
  display: flex;
  gap: 12px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
}

.home-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 16px;
}

.section-shell {
  padding: 78px 0 0;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-heading a {
  color: var(--orange);
  font-weight: 900;
}

.featured-grid,
.movie-grid,
.category-grid,
.channel-grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

.movie-card,
.category-card,
.channel-panel,
.player-shell,
.detail-article,
.filter-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #fff7ed, #ffe4e6);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.score-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.score-badge {
  right: 12px;
  top: 12px;
  min-width: 46px;
  height: 30px;
  border-radius: 999px;
  background: #f59e0b;
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  min-height: 48px;
  color: #111827;
  font-size: 1.03rem;
  font-weight: 900;
  line-height: 1.35;
}

.card-title:hover {
  color: var(--rose);
}

.card-body p {
  min-height: 48px;
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.card-meta span {
  padding: 5px 9px;
  color: #475569;
  background: #f1f5f9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-list span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #be123c;
  background: #fff1f2;
  font-size: 0.78rem;
  font-weight: 800;
}

.category-card,
.channel-panel a {
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 230px;
  border-radius: var(--radius);
  color: #ffffff;
}

.category-card img,
.channel-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.category-card::after,
.channel-panel a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.32));
}

.category-card span,
.category-card p,
.channel-name,
.channel-panel h2,
.channel-panel p {
  position: relative;
  z-index: 2;
}

.category-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-card span,
.channel-name {
  font-size: 1.35rem;
  font-weight: 900;
}

.category-card p,
.channel-panel p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.channel-panel {
  overflow: hidden;
  border-radius: var(--radius);
}

.channel-panel a {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.channel-panel h2 {
  margin: 8px 0 0;
  font-size: 1.45rem;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #9f1239 55%, #f97316);
}

.page-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
}

.page-hero > div {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.page-hero p:not(.eyebrow) {
  width: min(760px, 100%);
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.1rem;
  line-height: 1.8;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 24px;
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 14px;
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #475569;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.14);
}

.empty-state {
  padding: 42px;
  border-radius: 24px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
}

.ranking-list,
.ranking-full-list {
  display: grid;
  gap: 18px;
}

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

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

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px) saturate(1.1);
  transform: scale(1.08);
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.68)),
    radial-gradient(circle at 78% 18%, rgba(244, 63, 94, 0.36), transparent 34%);
}

.detail-shell {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 80px;
}

.breadcrumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.breadcrumbs a:hover {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  margin-top: 64px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

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

.detail-info h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 5.6rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.detail-line {
  width: min(830px, 100%);
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.18rem;
  line-height: 1.85;
}

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

.detail-meta span,
.detail-meta strong {
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
}

.detail-meta strong {
  background: #f59e0b;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(251, 113, 133, 0.48);
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.player-overlay-button {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(244, 63, 94, 0.24), rgba(15, 23, 42, 0.78));
  font-size: 1.05rem;
  font-weight: 900;
  transition: opacity 0.24s ease, visibility 0.24s ease;
  z-index: 3;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  box-shadow: 0 20px 55px rgba(244, 63, 94, 0.38);
  font-size: 1.7rem;
}

.detail-article {
  padding: 28px;
  border-radius: 28px;
}

.detail-article h2 + p {
  margin-top: 14px;
}

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

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

.site-footer {
  margin-top: 90px;
  color: #cbd5e1;
  background: #111827;
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 1fr 1fr;
  gap: 36px;
  padding: 54px 0;
}

.footer-main p {
  margin: 18px 0 0;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1rem;
}

.footer-links a {
  display: block;
  padding: 6px 0;
  color: #94a3b8;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 20px 16px;
  text-align: center;
  color: #94a3b8;
}

@media (max-width: 1180px) {
  .featured-grid,
  .movie-grid,
  .ranking-full-list,
  .category-grid,
  .channel-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .mobile-menu-toggle {
    display: inline-flex;
  }

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

  .hero-carousel,
  .hero-track,
  .hero-slide img {
    min-height: 620px;
  }

  .hero-control {
    display: none;
  }

  .search-strip,
  .detail-main,
  .footer-shell,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .search-strip {
    margin-top: 0;
    border-radius: 0;
    width: 100%;
  }

  .home-search {
    border-radius: 24px;
    flex-direction: column;
  }

  .home-search input {
    min-height: 46px;
  }

  .featured-grid,
  .movie-grid,
  .ranking-list,
  .ranking-full-list,
  .category-grid,
  .channel-grid,
  .index-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-poster {
    width: min(280px, 100%);
  }
}

@media (max-width: 560px) {
  .nav-shell {
    height: 64px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero-content {
    padding-top: 72px;
  }

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

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .section-shell {
    padding-top: 54px;
  }

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

  .featured-grid,
  .movie-grid,
  .ranking-list,
  .ranking-full-list,
  .category-grid,
  .channel-grid,
  .index-grid,
  .related-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .card-title,
  .card-body p {
    min-height: auto;
  }
}
