:root {
  --brand-orange: #f97316;
  --brand-red: #ef4444;
  --brand-pink: #ec4899;
  --brand-amber: #f59e0b;
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: #fff7ed;
  --line: #f1f5f9;
  --card: #ffffff;
  --dark: #111827;
  --shadow: 0 20px 50px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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: 80;
  color: #fff;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-red), var(--brand-pink));
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.28);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.brand-mark,
.footer-brand span {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.brand-text strong {
  display: block;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.brand-text small {
  display: block;
  opacity: 0.86;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff7d6;
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 44px;
  left: 0;
  min-width: 210px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #374151;
}

.dropdown-panel a:hover {
  background: #fff7ed;
  color: var(--brand-red);
}

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

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
}

.header-search input,
.mobile-search input {
  width: 220px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 8px 10px;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.header-search button,
.mobile-search button,
.filter-bar button {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--brand-red);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 28px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-panel.open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
}

.hero-slider {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow);
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.45), rgba(236, 72, 153, 0.18)),
    linear-gradient(0deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.02));
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  bottom: clamp(34px, 8vw, 80px);
  max-width: 650px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff7d6;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 12px 0 18px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.detail-info p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags span,
.card-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(12px);
}

.card-tags span,
.detail-tags span {
  color: #c2410c;
  background: #ffedd5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

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

.primary-btn,
.cta-band a {
  color: var(--brand-red);
  background: #fff;
  box-shadow: 0 14px 34px rgba(255, 255, 255, 0.18);
}

.ghost-btn {
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.primary-btn:hover,
.ghost-btn:hover,
.cta-band a:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 72px;
  bottom: 34px;
  display: flex;
  gap: 8px;
}

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

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

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-radius: 32px;
  background: linear-gradient(180deg, #fff, #fff7ed);
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  margin: 0 0 4px;
  font-size: 26px;
}

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

.channel-strip {
  padding: 44px 0 18px;
}

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

.section-head.centered {
  display: block;
  text-align: center;
}

.section-head h2,
.story-card h2,
.player-wrap h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p,
.story-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-head a {
  color: var(--brand-red);
  font-weight: 900;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.chip-row a {
  padding: 12px 18px;
  border-radius: 999px;
  background: #fff;
  color: #c2410c;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.14);
}

.content-section {
  padding: 62px 0;
}

.warm-section {
  width: 100%;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(135deg, #fff7ed, #fdf2f8);
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card a:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.16);
}

.poster-frame {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #fb923c, #ec4899);
}

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

.movie-card a:hover img,
.category-card a:hover img,
.rank-card a:hover img {
  transform: scale(1.08);
}

.poster-frame figcaption {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
}

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

.movie-card-body h2 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 800;
}

.card-meta span:first-child {
  color: #f59e0b;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 34px;
}

.compact-head {
  margin-bottom: 20px;
}

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

.rank-card a {
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 116px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.rank-card img {
  width: 86px;
  height: 86px;
  border-radius: 16px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rank-card strong {
  display: block;
  font-size: 18px;
}

.rank-card span:not(.rank-num) {
  display: block;
  color: #f97316;
  font-size: 13px;
  font-weight: 800;
}

.rank-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-pink));
  border-bottom-right-radius: 14px;
  z-index: 2;
}

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

.compact-card .movie-card-body p {
  display: none;
}

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

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

.category-card a {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border-radius: 26px;
  box-shadow: var(--shadow);
  background: #111827;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.66;
  transition: transform 0.45s ease;
}

.category-card div {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 22px;
  color: #fff;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.02));
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.86);
}

.category-card span {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  color: #c2410c;
  background: #fff;
  font-weight: 900;
}

.cta-band,
.page-hero {
  margin: 0 auto;
  color: #fff;
  text-align: center;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-red), var(--brand-pink));
}

.cta-band {
  padding: 72px 20px;
}

.cta-band h2 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.05em;
}

.cta-band p {
  margin: 0 0 26px;
  font-size: 20px;
  opacity: 0.9;
}

.page-hero {
  min-height: 340px;
  display: grid;
  place-items: center;
  padding: 70px 18px;
}

.slim-hero {
  min-height: 300px;
}

.page-hero > div {
  width: min(860px, 100%);
}

.page-hero h1 {
  color: #fff;
}

.filter-bar {
  position: sticky;
  top: 92px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px auto;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 12px 16px;
  outline: 0;
  color: var(--ink);
  background: #fff;
}

.filter-bar button {
  color: #fff;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-pink));
}

.no-result {
  display: none;
  margin-top: 24px;
  padding: 28px;
  border-radius: 24px;
  text-align: center;
  color: #92400e;
  background: #fff7ed;
  font-weight: 900;
}

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

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

.detail-top {
  padding: 42px 0;
  color: #fff;
  background:
    radial-gradient(circle at 15% 10%, rgba(249, 115, 22, 0.48), transparent 32%),
    radial-gradient(circle at 85% 20%, rgba(236, 72, 153, 0.52), transparent 30%),
    #111827;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
  max-width: 850px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.detail-meta span {
  padding: 9px 13px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.14);
}

.player-section {
  padding: 54px 0;
  background: #050608;
}

.player-wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  color: #fff;
}

.player-wrap h2 {
  margin-bottom: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

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

.center-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  color: var(--brand-red);
  background: rgba(255, 255, 255, 0.94);
  font-size: 34px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  z-index: 5;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.center-play:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.player-shell.is-playing .center-play {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.story-card {
  padding: 30px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.story-card p {
  font-size: 17px;
}

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

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, #1f2937, #111827);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 22px;
}

.footer-brand span {
  color: #fff;
  background: rgba(249, 115, 22, 0.26);
}

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

.site-footer p {
  margin: 14px 0 0;
  max-width: 520px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.footer-links a {
  color: #d1d5db;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px;
  text-align: center;
  color: #9ca3af;
}

@media (max-width: 1100px) {
  .hero-section,
  .two-column-section,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

  .hero-panel h2 {
    grid-column: 1 / -1;
  }

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

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

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

  .nav-wrap {
    min-height: 68px;
  }

  .brand {
    min-width: 0;
  }

  .brand-text strong {
    font-size: 20px;
  }

  .mobile-search input {
    flex: 1;
    width: auto;
  }

  .hero-section {
    margin-top: 16px;
  }

  .hero-slider {
    min-height: 520px;
    border-radius: 24px;
  }

  .hero-content {
    left: 24px;
    right: 24px;
    bottom: 58px;
  }

  .hero-dots {
    left: 24px;
    bottom: 24px;
  }

  .hero-panel,
  .mini-grid,
  .full-rank-list,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

  .detail-poster {
    max-width: 280px;
  }
}

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

  .hero-slider {
    min-height: 560px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .rank-card a {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .rank-card img {
    width: 74px;
    height: 74px;
  }

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