:root {
  --text: #1f2937;
  --muted: #6b7280;
  --line: #ffe2d1;
  --soft: #fff7ed;
  --accent: #f97316;
  --accent-2: #ec4899;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f8fafc;
  min-width: 320px;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(249, 115, 22, 0.16);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(236, 72, 153, 0.24);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

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

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.desktop-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-panel nav a {
  color: #374151;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel nav a:hover,
.mobile-panel nav a.is-active {
  color: var(--accent);
}

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

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

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

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--accent);
  border-radius: 99px;
}

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

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

.mobile-panel form {
  margin-bottom: 14px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 10px;
}

.hero {
  min-height: 600px;
  background: #111827;
}

.hero-stage {
  position: relative;
  min-height: 600px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.12)), var(--hero-image), linear-gradient(135deg, #111827, #7c2d12);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.03);
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(249, 115, 22, 0.32), transparent 30%), linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
  padding: 80px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: #fdba74;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-title-block h1 {
  max-width: 820px;
  margin: 16px 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-title-block p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(16px, 2.3vw, 22px);
  line-height: 1.8;
}

.hero-meta,
.detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 14px;
}

.hero-meta span,
.detail-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 13px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

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

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

.primary-button {
  padding: 12px 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 30px rgba(236, 72, 153, 0.28);
}

.ghost-button {
  padding: 11px 22px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.primary-button:hover,
.ghost-button:hover,
.panel-link:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 36px;
  cursor: pointer;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

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

.content-section {
  margin-bottom: 70px;
}

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

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link,
.panel-link {
  color: var(--accent);
  padding: 8px 0;
}

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

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

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

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

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

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

.poster {
  position: relative;
  display: block;
  min-height: 300px;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background-image: var(--poster-image), linear-gradient(135deg, #ffedd5, #fce7f3);
  background-size: cover;
  background-position: center;
}

.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.65), transparent);
}

.poster-img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.poster-img.is-missing {
  display: none;
}

.poster-badge,
.rank-mark {
  position: absolute;
  z-index: 2;
  left: 14px;
  bottom: 14px;
  padding: 7px 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.rank-mark {
  left: auto;
  right: 14px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--accent);
}

.movie-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.movie-card-large .poster {
  min-height: 330px;
}

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

.movie-card-horizontal .poster {
  min-height: 170px;
  border-radius: var(--radius) 0 0 var(--radius);
}

.highlight-section {
  padding: 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, #fff7ed, #fdf2f8);
}

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

.category-tile,
.category-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 146px;
  padding: 22px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.category-tile:hover,
.category-card:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-tile strong,
.category-card h2 {
  font-size: 22px;
  line-height: 1.2;
}

.category-tile span,
.category-card p {
  color: var(--muted);
  line-height: 1.7;
}

.category-tile:hover span,
.category-card:hover p {
  color: rgba(255, 255, 255, 0.86);
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.horizontal-list {
  display: grid;
  gap: 18px;
}

.rank-panel,
.white-card-section,
.detail-copy,
.detail-side-card,
.player-section {
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-panel {
  position: sticky;
  top: 102px;
  padding: 26px;
}

.rank-panel h2 {
  margin: 0 0 18px;
}

.rank-panel ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-panel li + li {
  margin-top: 12px;
}

.rank-panel a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #374151;
  font-weight: 800;
  line-height: 1.45;
}

.rank-panel span {
  width: 30px;
  height: 30px;
  display: grid;
  flex: none;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 10px;
}

.white-card-section {
  padding: 32px;
}

.page-hero,
.detail-hero {
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, #111827, #7c2d12 52%, #831843);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 20%, rgba(249, 115, 22, 0.42), transparent 26%), radial-gradient(circle at 80% 0%, rgba(236, 72, 153, 0.28), transparent 32%);
}

.compact-page-hero > div {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 86px 0 78px;
}

.compact-page-hero h1 {
  margin: 14px 0;
}

.page-filter {
  margin-top: 28px;
}

.page-filter input {
  width: min(520px, 100%);
}

.empty-tip {
  display: none;
  margin: 28px 0 0;
  padding: 20px;
  border-radius: 18px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
  text-align: center;
}

.empty-tip.is-visible {
  display: block;
}

.detail-hero {
  min-height: 560px;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.62)), var(--hero-image), linear-gradient(135deg, #111827, #7c2d12);
  background-size: cover;
  background-position: center;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 30%, rgba(249, 115, 22, 0.24), transparent 30%), linear-gradient(0deg, rgba(15, 23, 42, 0.86), transparent 44%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  align-items: center;
  gap: 42px;
  padding: 74px 0;
}

.detail-poster {
  min-height: 430px;
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
}

.detail-poster::after {
  border-radius: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-weight: 800;
}

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

.detail-container {
  padding-top: 42px;
}

.player-section {
  padding: 28px;
  margin-bottom: 34px;
}

.player-section h2 {
  margin: 0 0 20px;
  font-size: 28px;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #fff;
  border: 0;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.24), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-cover span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 38px rgba(236, 72, 153, 0.32);
  font-size: 30px;
}

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

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

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  margin-bottom: 54px;
}

.detail-copy,
.detail-side-card {
  padding: 32px;
}

.detail-copy h2,
.detail-side-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

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

.detail-copy p {
  margin: 0;
  color: #374151;
  line-height: 2;
  font-size: 17px;
}

.detail-side-card dl {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px 16px;
  margin: 0 0 22px;
}

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

.detail-side-card dd {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  padding: 46px 0;
}

.site-footer {
  color: #fff;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.footer-brand {
  margin-bottom: 14px;
  font-size: 24px;
  color: #fdba74;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(249, 115, 22, 0.48);
}

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

  .header-search {
    margin-left: auto;
  }

  .nav-toggle {
    display: block;
  }

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

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

  .split-section,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 68px;
  }

  .header-search {
    display: none;
  }

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

  .hero-arrow {
    display: none;
  }

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

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

  .movie-card-horizontal .poster {
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .detail-poster {
    width: min(280px, 80vw);
    min-height: 390px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .brand-text strong {
    font-size: 18px;
  }

  .brand-text small {
    display: none;
  }

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

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

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

  .movie-grid,
  .compact-grid,
  .all-grid,
  .large-grid,
  .category-grid,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

  .highlight-section,
  .white-card-section,
  .detail-copy,
  .detail-side-card,
  .player-section {
    padding: 22px;
  }

  .poster {
    min-height: 360px;
  }

  .detail-side-card dl {
    grid-template-columns: 1fr;
  }
}
