:root {
  --bg: #f7f7f8;
  --panel: #ffffff;
  --text: #171717;
  --muted: #666b76;
  --line: #e8e8eb;
  --brand: #f97316;
  --brand-dark: #ea580c;
  --brand-red: #ef4444;
  --dark: #111827;
  --dark-soft: #1f2937;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--brand), var(--brand-red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-red));
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.34);
  font-size: 14px;
}

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

.nav-link {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
}

.nav-dropdown {
  position: relative;
  padding: 22px 0;
}

.dropdown-panel {
  position: absolute;
  top: 62px;
  left: -18px;
  width: 190px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

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

.dropdown-panel a {
  padding: 9px 12px;
  border-radius: 10px;
  color: #374151;
  font-size: 14px;
}

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

.top-search {
  width: 310px;
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 999px;
  overflow: hidden;
}

.top-search input,
.mobile-search input,
.search-page-form input,
.category-filter input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 11px 14px;
  color: #111827;
}

.top-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  padding: 11px 18px;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-size: 26px;
  color: #374151;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 16px 18px;
  background: #fff;
}

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

.mobile-search {
  display: flex;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, #f97316, #ef4444 55%, #ec4899);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.22), transparent 24%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.54), rgba(17, 24, 39, 0.28)),
    linear-gradient(135deg, rgba(249, 115, 22, 0.58), rgba(239, 68, 68, 0.45));
}

.hero-content {
  position: relative;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 360px;
  align-items: center;
  gap: 60px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .eyebrow,
.page-hero .eyebrow {
  color: #ffedd5;
}

.hero h1 {
  margin: 0 0 20px;
  max-width: 780px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
}

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

.hero-tags span,
.detail-genres span,
.movie-tags span,
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.detail-genres span,
.movie-tags span,
.tag-cloud a {
  background: #fff7ed;
  color: var(--brand-dark);
}

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

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.22s ease;
}

.primary-btn {
  padding: 13px 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-red));
  box-shadow: 0 18px 30px rgba(239, 68, 68, 0.28);
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 44px rgba(239, 68, 68, 0.34);
}

.ghost-btn {
  padding: 12px 22px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 16px 36px rgba(249, 115, 22, 0.45);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
}

.hero-controls button {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 26px;
  height: 8px;
  border-radius: 999px;
  transition: 0.25s ease;
}

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

.section {
  padding: 72px 0;
}

.soft-section {
  background: #fff7ed;
}

.dark-section {
  padding: 72px 0;
  color: #fff;
  background: linear-gradient(135deg, #111827, #1f2937 55%, #0f172a);
}

.category-section {
  background: #fff;
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

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

.section-head.light p {
  color: #cbd5e1;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
  aspect-ratio: 16 / 10;
}

.compact .movie-cover {
  aspect-ratio: 3 / 4;
}

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

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

.quality,
.duration,
.rank-badge,
.rank-number {
  position: absolute;
  z-index: 2;
  border-radius: 8px;
  padding: 4px 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.quality {
  top: 10px;
  left: 10px;
  background: var(--brand);
}

.duration {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.72);
}

.rank-badge,
.rank-number {
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-red));
}

.cover-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(249, 115, 22, 0.94);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: 0.25s ease;
}

.movie-card:hover .cover-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-info h3 a:hover,
.wide-body h3 a:hover,
.side-list a:hover span {
  color: var(--brand);
}

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

.movie-meta,
.wide-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #6b7280;
  font-size: 13px;
}

.movie-meta a {
  color: var(--brand-dark);
  font-weight: 800;
}

.movie-tags {
  margin-top: 12px;
}

.movie-tags span {
  padding: 4px 9px;
  font-size: 12px;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  transition: 0.25s ease;
}

.wide-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
}

.wide-cover {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  background: #000;
  aspect-ratio: 16 / 10;
}

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

.wide-body h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 20px;
}

.wide-body p {
  margin: 0 0 14px;
  color: #cbd5e1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-tile {
  position: relative;
  min-height: 132px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.28));
}

.category-tile span {
  position: relative;
  z-index: 1;
}

.page-main {
  background: var(--bg);
}

.page-hero {
  padding: 86px 0 70px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.16), transparent 26%),
    linear-gradient(135deg, var(--brand), var(--brand-red));
}

.page-hero h1 {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
}

.category-filter,
.search-page-form {
  width: min(680px, 100%);
  margin-top: 28px;
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.category-filter input,
.search-page-form input {
  color: #fff;
}

.category-filter input::placeholder,
.search-page-form input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

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

.category-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.category-card-cover {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 180px;
  overflow: hidden;
  background: #111827;
}

.category-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.45s ease;
}

.category-card-body {
  padding: 24px;
}

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

.category-card-body p {
  margin: 0 0 18px;
  color: var(--muted);
}

.text-link {
  color: var(--brand);
}

.detail-hero {
  padding: 56px 0;
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(249, 115, 22, 0.45), transparent 28%),
    linear-gradient(135deg, #111827, #1f2937 58%, #0f172a);
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.lead {
  max-width: 820px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 20px;
}

.detail-meta {
  margin-bottom: 16px;
  color: #d1d5db;
}

.detail-genres {
  margin-bottom: 28px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.72));
  cursor: pointer;
}

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

.player-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.42);
  font-size: 30px;
}

.player-cover strong {
  font-size: 20px;
}

.content-card,
.side-card {
  margin-top: 24px;
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0 0 24px;
  color: #374151;
  font-size: 17px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.side-list a {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-list img {
  width: 74px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.side-list span {
  display: grid;
  gap: 4px;
  font-weight: 900;
}

.side-list small {
  color: var(--muted);
  font-weight: 600;
}

.pager-card {
  display: grid;
  gap: 10px;
}

.pager-card a {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f9fafb;
  color: #374151;
  font-weight: 800;
}

.pager-card a:hover {
  color: var(--brand);
  background: #fff7ed;
}

.search-status {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #fff;
  color: #374151;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.site-footer {
  padding-top: 56px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
}

.site-footer p {
  max-width: 420px;
  color: #94a3b8;
}

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

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-bottom {
  margin-top: 44px;
  padding: 22px 16px;
  display: flex;
  justify-content: center;
  gap: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 14px;
}

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

@media (max-width: 1080px) {
  .top-search {
    display: none;
  }

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

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

  .wide-grid,
  .category-list,
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

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

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

  .hero,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 52px 0 92px;
  }

  .hero-poster {
    width: min(240px, 70vw);
    justify-self: center;
  }

  .section-head {
    display: grid;
  }

  .wide-card {
    grid-template-columns: 130px minmax(0, 1fr);
  }

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

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

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

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

  .footer-grid,
  .footer-bottom {
    display: grid;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 20px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero p,
  .lead,
  .page-hero p {
    font-size: 16px;
  }

  .hero-actions,
  .detail-meta {
    display: grid;
  }

  .movie-grid,
  .compact-grid,
  .wide-grid,
  .category-list {
    grid-template-columns: 1fr;
  }

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

  .category-card-cover {
    height: 140px;
  }

  .content-card,
  .side-card {
    padding: 20px;
  }
}
