:root {
  --bg: #f8fafc;
  --bg-soft: #f1f5f9;
  --surface: #ffffff;
  --surface-dark: #0f172a;
  --text: #0f172a;
  --muted: #64748b;
  --muted-dark: #cbd5e1;
  --line: #e2e8f0;
  --brand: #f59e0b;
  --brand-dark: #d97706;
  --blue: #2563eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

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: 50;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  height: var(--header-height);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr minmax(240px, 340px);
  gap: 28px;
  align-items: center;
}

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.35);
}

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

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #111827;
  background: #fef3c7;
}

.header-search {
  position: relative;
}

.header-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  background: white;
  color: var(--text);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 88vw);
  max-height: 420px;
  overflow: auto;
  display: none;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
}

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

.search-result {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
}

.search-result:hover {
  background: #f8fafc;
}

.search-result img,
.search-result .result-fallback {
  width: 54px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, #111827, #334155);
}

.search-result strong {
  display: block;
  margin-bottom: 4px;
}

.search-result span {
  color: var(--muted);
  font-size: 13px;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f8fafc;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #0f172a;
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  color: white;
  background: #0f172a;
}

.hero-slider {
  position: relative;
  min-height: 70vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.25)), var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 25%, rgba(245, 158, 11, 0.22), transparent 32%), linear-gradient(0deg, #0f172a 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 56px;
  align-items: center;
  padding: 70px 0;
}

.hero-copy {
  max-width: 720px;
}

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

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

.hero-line {
  max-width: 680px;
  margin: 24px 0 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 600;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: #92400e;
  background: #fef3c7;
  backdrop-filter: none;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.32);
}

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

.primary-button.small {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
}

.ghost-button {
  color: white;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.ghost-button.dark {
  color: #0f172a;
  border-color: var(--line);
  background: white;
}

.ghost-button.light {
  color: white;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  background: linear-gradient(135deg, #1f2937, #0f172a);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.46);
  transform: rotate(2deg);
}

.hero-poster img,
.poster-link img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: #f8fafc;
  background: linear-gradient(135deg, #111827, #334155);
  text-align: center;
  font-weight: 800;
}

.image-hidden + .poster-fallback,
.image-hidden ~ .poster-fallback {
  display: flex;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 30px;
  background: var(--brand);
}

.content-section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 0;
}

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

.section-header.left-only {
  justify-content: flex-start;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.04em;
}

.section-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--brand-dark);
  font-weight: 800;
}

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

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

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

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

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background: #cbd5e1;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
}

.movie-card-compact .poster-link {
  aspect-ratio: 16 / 10;
}

.poster-link img {
  transition: transform 0.5s ease;
}

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

.score-badge,
.play-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 10px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.score-badge {
  top: 10px;
  right: 10px;
  background: var(--brand);
}

.play-badge {
  left: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  top: 10px;
  left: 10px;
  background: #ef4444;
}

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

.movie-card-body h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.movie-card-body h3 a:hover {
  color: var(--brand-dark);
}

.movie-meta,
.movie-line {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.movie-line {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.highlight-section {
  padding-top: 86px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 22px;
  color: white;
  background-image: linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.2)), var(--category-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.category-card span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.category-card strong {
  margin-top: 8px;
  font-size: 22px;
}

.category-card em {
  margin-top: 8px;
  color: #e2e8f0;
  font-style: normal;
  font-size: 14px;
}

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

.page-hero,
.detail-hero {
  width: min(1200px, calc(100% - 32px));
  margin: 32px auto 0;
  border-radius: 30px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: white;
  box-shadow: var(--shadow);
}

.page-hero {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 48px;
}

.page-hero p:not(.eyebrow) {
  max-width: 740px;
  color: #dbeafe;
  line-height: 1.8;
}

.category-overview-list {
  width: min(1200px, calc(100% - 32px));
  margin: 48px auto 0;
  display: grid;
  gap: 28px;
}

.category-overview-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: white;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.category-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.category-overview-head h2 {
  margin: 0;
  font-size: 30px;
}

.category-overview-head p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--muted);
}

.filter-panel {
  position: sticky;
  top: calc(var(--header-height) + 12px);
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px 160px auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-panel span {
  color: var(--muted);
  white-space: nowrap;
  font-weight: 800;
}

.breadcrumb {
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--brand-dark);
  font-weight: 700;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 42px;
  padding: 38px;
}

.detail-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  background: linear-gradient(135deg, #111827, #334155);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

.detail-info {
  align-self: center;
}

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

.detail-one-line {
  max-width: 800px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
}

.player-section {
  width: min(1200px, calc(100% - 32px));
  margin: 56px auto 0;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.player-video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: white;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.76));
  cursor: pointer;
}

.play-overlay.hidden {
  display: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 999px;
  color: #111827;
  background: var(--brand);
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.38);
  font-size: 32px;
}

.play-overlay strong {
  font-size: 24px;
}

.play-overlay small {
  color: #e2e8f0;
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 14px;
  z-index: 3;
  margin: 0;
  color: #f8fafc;
  font-size: 13px;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 24px;
}

.text-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: white;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.text-card h2 {
  margin: 0 0 16px;
}

.text-card p {
  margin: 0 0 14px;
  color: #334155;
  line-height: 1.9;
}

.review-card {
  background: #fffbeb;
}

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

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

.footer-brand {
  color: white;
  font-size: 20px;
}

.footer-brand-block p {
  max-width: 560px;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: white;
}

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

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

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

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

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

@media (max-width: 1100px) {
  .poster-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .hero-content {
    grid-template-columns: 1fr 260px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    grid-template-columns: auto auto;
    height: auto;
    min-height: var(--header-height);
    padding: 12px 0;
  }

  .mobile-menu-button {
    display: block;
    justify-self: end;
  }

  .main-nav,
  .header-search {
    grid-column: 1 / -1;
  }

  .main-nav {
    display: none;
    justify-content: flex-start;
    overflow: auto;
    padding-bottom: 6px;
  }

  .main-nav.open {
    display: flex;
  }

  .header-search {
    display: none;
  }

  .main-nav.open + .header-search,
  .header-search.open {
    display: block;
  }

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

  .hero-poster {
    width: min(260px, 70vw);
    transform: none;
  }

  .hero-arrow {
    display: none;
  }

  .poster-grid,
  .landscape-grid,
  .mini-grid,
  .ranking-list,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-hero,
  .detail-hero {
    padding: 30px;
  }

  .page-hero {
    display: block;
  }

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

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

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

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

  .category-overview-head {
    display: block;
  }

  .category-overview-head .primary-button {
    margin-top: 18px;
  }
}

@media (max-width: 520px) {
  .poster-grid,
  .landscape-grid,
  .mini-grid,
  .ranking-list,
  .category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .content-section {
    padding-top: 52px;
  }

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

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-line,
  .detail-one-line {
    font-size: 16px;
  }

  .page-hero,
  .detail-hero,
  .category-overview-card,
  .text-card {
    border-radius: 22px;
    padding: 22px;
  }
}
