:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --dark: #0f172a;
  --accent: #f97316;
  --accent-strong: #ea580c;
  --accent-soft: rgba(249, 115, 22, .14);
  --shadow: 0 18px 55px rgba(15, 23, 42, .12);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  backdrop-filter: blur(18px);
}

.header-shell {
  max-width: 1240px;
  height: 74px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), #fb7185);
  color: white;
  box-shadow: 0 12px 28px rgba(249, 115, 22, .32);
}

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

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

.nav-link {
  padding: 10px 13px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  min-width: 270px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  box-shadow: 0 8px 26px rgba(15, 23, 42, .06);
}

.header-search input,
.large-search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.header-search input {
  padding: 0 12px;
}

.header-search button,
.large-search-form button,
.filter-panel button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.header-search button:hover,
.large-search-form button:hover,
.filter-panel button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  padding: 10px 14px;
  font-weight: 800;
}

.mobile-nav {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 18px;
}

.mobile-nav a {
  display: block;
  padding: 11px 14px;
  border-radius: 14px;
  color: #334155;
  font-weight: 700;
}

.mobile-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.mobile-category-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

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

.hero-slider {
  position: relative;
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 52px;
  padding: 95px max(28px, calc((100vw - 1240px) / 2 + 22px)) 145px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity .7s ease, transform 1s ease;
}

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

.hero-content {
  max-width: 780px;
  color: white;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 74px);
  line-height: .96;
  letter-spacing: -.055em;
}

.hero-content p {
  max-width: 690px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, .84);
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags {
  margin: 28px 0;
}

.hero-tags span,
.detail-tags span {
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: white;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.ghost-button,
.section-more,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 24px;
  background: var(--accent);
  color: white;
  box-shadow: 0 18px 38px rgba(249, 115, 22, .34);
}

.primary-button:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
}

.ghost-button {
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, .22);
  color: white;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(14px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, .18);
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 34px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, .45);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: white;
  font-size: 30px;
  line-height: 1;
  backdrop-filter: blur(12px);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .42);
  transition: width .2s ease, background .2s ease;
}

.hero-dot.active {
  width: 32px;
  background: white;
}

.hero-thumbs {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 4;
  width: min(960px, calc(100vw - 44px));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  transform: translateX(-50%);
}

.hero-thumb {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 16px;
  background: rgba(15, 23, 42, .6);
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(16px);
}

.hero-thumb.active {
  border-color: rgba(249, 115, 22, .9);
  background: rgba(249, 115, 22, .24);
  color: white;
}

.hero-thumb img {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  object-fit: cover;
}

.hero-thumb span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-search-panel,
.content-section,
.page-hero,
.detail-hero,
.breadcrumbs {
  width: min(1240px, calc(100vw - 44px));
  margin-left: auto;
  margin-right: auto;
}

.home-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 36px;
  margin-top: -46px;
  position: relative;
  z-index: 8;
  padding: 28px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search-panel h2,
.section-heading h2,
.detail-copy h2,
.category-overview-body h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -.04em;
  line-height: 1.1;
}

.home-search-panel p,
.page-hero p,
.category-overview-body p,
.detail-copy p,
.footer-brand p,
.footer-column p {
  color: var(--muted);
}

.large-search-form {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
}

.large-search-form input {
  padding: 0 16px;
}

.large-search-form button {
  padding: 13px 22px;
}

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

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

.section-more,
.text-link {
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: 10px 16px;
}

.section-more:hover,
.text-link:hover {
  background: rgba(249, 115, 22, .2);
  transform: translateY(-1px);
}

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

.category-tile {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
  color: white;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .14);
  transition: transform .25s ease, box-shadow .25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, .2);
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.category-tile strong {
  margin-top: 6px;
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
}

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(15, 23, 42, .08);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 66px rgba(15, 23, 42, .16);
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #111827;
}

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

.movie-card:hover .poster-frame img {
  transform: scale(1.06);
}

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .62));
}

.score-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-weight: 900;
}

.score-badge {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  background: rgba(15, 23, 42, .78);
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ef4444, var(--accent));
  box-shadow: 0 10px 24px rgba(239, 68, 68, .3);
}

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

.movie-card h3 {
  min-height: 3.1em;
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-line {
  min-height: 3.2em;
  margin: 9px 0;
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta-row {
  gap: 6px;
  font-size: 12px;
  color: #475569;
}

.movie-meta-row span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f1f5f9;
}

.tag-line {
  overflow: hidden;
  margin-top: 9px;
  color: var(--accent-strong);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-hero {
  margin-top: 34px;
  padding: 58px;
  border-radius: var(--radius-lg);
  background-color: var(--dark);
  background-size: cover;
  background-position: center;
  color: white;
  box-shadow: var(--shadow);
}

.simple-page-hero {
  background: radial-gradient(circle at top right, rgba(249, 115, 22, .38), transparent 36%), linear-gradient(135deg, #0f172a, #111827);
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 66px);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, .74);
  font-size: 17px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-top: 24px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--accent-strong);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px auto;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .07);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

.filter-panel button {
  min-height: 46px;
}

.no-results {
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: white;
  color: var(--muted);
  text-align: center;
}

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

.category-overview-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .09);
}

.category-cover {
  min-height: 210px;
  display: flex;
  align-items: end;
  padding: 24px;
  background-size: cover;
  background-position: center;
  color: white;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.category-overview-body {
  padding: 22px;
}

.category-overview-body ul {
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.category-overview-body li + li {
  margin-top: 8px;
}

.category-overview-body li a {
  color: #334155;
}

.category-overview-body li a:hover {
  color: var(--accent-strong);
}

.detail-hero {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 38px;
  align-items: end;
  margin-top: 18px;
  padding: 56px;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  color: white;
  box-shadow: var(--shadow);
}

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

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

.detail-info h1 {
  font-size: clamp(36px, 5vw, 68px);
}

.detail-one-line {
  max-width: 830px;
  color: rgba(255, 255, 255, .84);
  font-size: 18px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 26px 0;
}

.detail-meta-grid span {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(12px);
}

.detail-meta-grid strong {
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
}

.detail-tags {
  margin-bottom: 24px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #020617;
  box-shadow: 0 26px 80px rgba(15, 23, 42, .24);
}

.player-card video {
  width: 100%;
  min-height: 360px;
  max-height: 720px;
  background: #020617;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, .18), rgba(2, 6, 23, .72));
  color: white;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  transition: opacity .2s ease, visibility .2s ease;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 20px 46px rgba(249, 115, 22, .38);
}

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

.detail-copy-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
}

.detail-copy article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .07);
}

.related-grid .compact-card .movie-card-line {
  min-height: auto;
}

.site-footer {
  margin-top: 76px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-shell {
  width: min(1240px, calc(100vw - 44px));
  margin: 0 auto;
  padding: 54px 0;
  display: grid;
  grid-template-columns: 1.3fr .7fr .9fr 1fr;
  gap: 34px;
}

.footer-logo .brand-text,
.footer-column h2 {
  color: white;
}

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

.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column li + li {
  margin-top: 9px;
}

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

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

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

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

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

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

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 70px;
    padding-bottom: 170px;
  }

  .hero-poster {
    display: none;
  }

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

  .hero-thumb:nth-child(n + 4) {
    display: none;
  }

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

  .filter-panel,
  .detail-hero,
  .detail-copy-grid,
  .footer-shell {
    grid-template-columns: 1fr;
  }

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

  .footer-shell {
    gap: 22px;
  }
}

@media (max-width: 680px) {
  .header-shell {
    height: 66px;
    padding: 0 16px;
  }

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

  .home-hero,
  .hero-slider {
    min-height: 620px;
  }

  .hero-slide {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .home-search-panel,
  .content-section,
  .page-hero,
  .detail-hero,
  .breadcrumbs,
  .footer-shell {
    width: min(100vw - 28px, 1240px);
  }

  .home-search-panel,
  .page-hero,
  .detail-hero {
    padding: 24px;
    border-radius: 22px;
  }

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

  .large-search-form input {
    min-height: 44px;
  }

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

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

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

  .movie-card h3 {
    font-size: 14px;
  }

  .movie-card-line,
  .tag-line {
    font-size: 12px;
  }

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

  .player-card video {
    min-height: 240px;
  }
}

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

  .mobile-category-row {
    grid-template-columns: 1fr;
  }
}
