:root {
  color-scheme: light;
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #f97316;
  --primary-dark: #ea580c;
  --accent: #ef4444;
  --accent-soft: #fef2f2;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  object-fit: cover;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

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

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.25);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-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(--primary-dark);
}

.header-search,
.mobile-search,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input {
  width: 230px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
  background: #ffffff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.header-search button,
.mobile-search button,
.filter-panel button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 800;
}

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

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #111827;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px;
  background: #ffffff;
}

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

.mobile-search input {
  width: 100%;
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #f97316, #ef4444 48%, #ec4899);
  color: #ffffff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.28), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.18), rgba(17, 24, 39, 0.32));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: center;
  gap: 46px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.14;
  filter: blur(10px) saturate(120%);
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
}

.hero-content {
  max-width: 710px;
}

.hero-label,
.page-kicker,
.section-heading span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff7ed;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-kicker,
.section-heading span {
  color: var(--primary-dark);
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-subtitle {
  max-width: 620px;
  margin: 0 0 22px;
  font-size: clamp(18px, 2.2vw, 26px);
  color: rgba(255, 255, 255, 0.92);
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.tag-row span {
  background: #fff7ed;
  color: var(--primary-dark);
  font-size: 12px;
}

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

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

.btn-primary {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
}

.btn-primary:hover,
.btn-ghost:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-4px);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.btn-ghost.dark {
  border-color: rgba(255, 255, 255, 0.35);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.22);
  border-radius: 32px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.36);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 2.7;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.hero-featured {
  position: relative;
  z-index: 2;
  padding-bottom: 54px;
}

.hero-featured-title span,
.hero-featured-title h2,
.hero-featured-title a {
  color: #ffffff;
}

.section {
  padding: 70px 0;
}

.section-white {
  background: #ffffff;
}

.section-soft {
  background: linear-gradient(135deg, #eff6ff, #fff7ed);
}

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

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

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

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

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

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

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

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

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

.movie-card,
.category-card,
.ranking-item,
.player-card,
.detail-article,
.detail-side {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover,
.category-card:hover {
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #fecaca);
}

.poster img {
  width: 100%;
  aspect-ratio: 2 / 2.82;
  transition: transform 0.35s ease;
}

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

.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(10px);
}

.poster-type {
  right: 10px;
  bottom: 10px;
}

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

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.movie-card h3 a:hover,
.ranking-info h3 a:hover {
  color: var(--primary-dark);
}

.movie-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 116px 1fr;
  align-items: stretch;
}

.movie-card-compact .poster img {
  height: 100%;
  min-height: 174px;
  aspect-ratio: auto;
}

.category-card {
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 210px;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  background: #111827;
}

.category-preview img {
  width: 100%;
  height: 100%;
  min-height: 210px;
}

.category-info {
  padding: 24px;
}

.category-info h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

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

.category-info span {
  color: var(--primary-dark);
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0;
  background: linear-gradient(120deg, #fff7ed, #eff6ff 55%, #fdf2f8);
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  margin: 8px 0 12px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.page-hero p {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.filter-panel {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.filter-panel input {
  flex: 1;
  width: auto;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: auto 92px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

.ranking-cover {
  overflow: hidden;
  border-radius: 14px;
}

.ranking-cover img {
  width: 92px;
  height: 124px;
}

.ranking-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.ranking-info p {
  margin: 0 0 10px;
  color: var(--muted);
}

.ranking-action {
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.26;
  filter: blur(8px) saturate(120%);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.98), rgba(17, 24, 39, 0.6), rgba(17, 24, 39, 0.92));
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
}

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: center;
  gap: 38px;
  min-height: 520px;
  padding: 60px 0;
}

.detail-poster {
  overflow: hidden;
  border: 7px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 2.82;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

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

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
}

.detail-tags {
  margin-top: 22px;
}

.detail-main {
  padding-top: 46px;
}

.player-card {
  margin-bottom: 30px;
  padding: 12px;
  background: #111827;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
  font-size: 18px;
  font-weight: 900;
  transition: opacity 0.22s ease;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 48px rgba(239, 68, 68, 0.32);
}

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

.detail-article,
.detail-side {
  padding: 26px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

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

.detail-side dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.detail-side div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.detail-side dt {
  color: var(--muted);
  font-weight: 800;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 54px 0;
}

.footer-brand {
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 22px;
}

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

.site-footer p,
.site-footer ul {
  margin: 0;
  padding: 0;
  color: #9ca3af;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

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

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

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

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

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

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

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

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

  .nav-bar {
    min-height: 66px;
  }

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

  .hero-inner {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 24px;
    padding: 40px 0 90px;
  }

  .hero-poster {
    width: min(320px, 78vw);
    margin: 0 auto;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .movie-grid-wide,
  .featured-grid,
  .category-grid,
  .category-grid-large,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .ranking-item {
    grid-template-columns: auto 78px 1fr;
  }

  .ranking-action {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

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

  .section {
    padding: 46px 0;
  }

  .hero h1,
  .detail-copy h1,
  .page-hero h1 {
    letter-spacing: -0.04em;
  }

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

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

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

  .movie-card p {
    display: none;
  }

  .movie-card-compact {
    grid-template-columns: 92px 1fr;
  }

  .movie-card-compact .poster img {
    min-height: 138px;
  }

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

  .category-preview img {
    min-height: 120px;
  }

  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .ranking-item {
    grid-template-columns: 42px 72px 1fr;
    gap: 10px;
  }

  .ranking-cover img {
    width: 72px;
    height: 98px;
  }

  .ranking-info h3 {
    font-size: 17px;
  }

  .ranking-info p {
    display: none;
  }

  .detail-article,
  .detail-side {
    padding: 20px;
  }
}
