* {
  box-sizing: border-box;
}

:root {
  --amber: #d97706;
  --orange: #ea580c;
  --amber-dark: #b45309;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #fff7ed;
  --paper: #ffffff;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f8fafc;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 12px 30px rgba(180, 83, 9, 0.22);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-mark,
.footer-brand span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: var(--amber);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

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

.desktop-nav a,
.mobile-links a {
  font-weight: 600;
  opacity: 0.9;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-links a:hover,
.mobile-links a.active {
  color: #ffedd5;
  opacity: 1;
}

.top-search,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.page-filter input,
.page-filter select {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
}

.top-search input,
.mobile-search input {
  width: 180px;
  padding: 10px 12px;
}

.top-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.section-more {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.mobile-search button {
  padding: 10px 14px;
  color: var(--amber-dark);
  background: #ffedd5;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 22px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  background: var(--amber-dark);
}

.mobile-links {
  display: grid;
  gap: 12px;
  padding: 12px 0;
}

.mobile-search {
  align-items: stretch;
}

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

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  display: none;
  width: min(420px, 90vw);
  overflow: hidden;
  color: var(--ink);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

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

.search-result {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

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

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

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000000 0%, rgba(0, 0, 0, 0.72) 36%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
  max-width: 1180px;
}

.hero-content h1 {
  max-width: 760px;
  margin: 16px 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
}

.hero-content p {
  max-width: 680px;
  color: #e5e7eb;
  font-size: 19px;
  line-height: 1.75;
}

.hero-kicker,
.page-hero span,
.detail-meta span,
.card-tags span,
.mini-tags span,
.detail-tags span,
.overview-body span,
.wide-head span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.hero-kicker {
  padding: 7px 12px;
  background: var(--amber);
}

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

.hero-tags span,
.detail-tags span,
.mini-tags span {
  padding: 6px 10px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.16);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 26px;
}

.primary-btn {
  color: #ffffff;
  background: var(--amber);
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.35);
}

.primary-btn:hover,
.section-more:hover,
.top-search button:hover,
.mobile-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.24);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.44);
  font-size: 34px;
  cursor: pointer;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--amber);
}

.page-section {
  padding: 58px 0;
}

.light-section,
.category-section {
  background: #ffffff;
}

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

.search-block {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, 2fr);
  gap: 22px;
  align-items: center;
  margin-top: -40px;
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-block span {
  color: var(--amber);
  font-weight: 800;
}

.search-block h2 {
  margin: 8px 0 0;
  font-size: clamp(22px, 3vw, 32px);
}

.page-filter {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  margin-bottom: 28px;
}

.home-filter {
  margin-bottom: 0;
}

.page-filter input,
.page-filter select {
  width: 100%;
  padding: 13px 14px;
  border-color: var(--line);
  background: #ffffff;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

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

.section-line {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), rgba(217, 119, 6, 0));
}

.section-more {
  padding: 10px 14px;
  color: var(--amber-dark);
  background: #ffedd5;
}

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

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

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

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

.movie-card,
.wide-card,
.category-tile,
.overview-card,
.story-card {
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.wide-card:hover,
.category-tile:hover,
.overview-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

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

.poster-wrap img,
.category-tile img,
.overview-image img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-wrap img,
.category-tile:hover img,
.overview-card:hover .overview-image img {
  transform: scale(1.08);
}

.poster-meta,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster-meta {
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
}

.rank-badge {
  left: 12px;
  background: var(--amber);
  font-style: normal;
}

.card-body {
  padding: 16px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.card-tags span {
  padding: 5px 8px;
  color: var(--amber-dark);
  background: #ffedd5;
  font-size: 12px;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 9px;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mini-tags span {
  color: var(--muted);
  background: #f3f4f6;
}

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

.wide-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 220px;
}

.wide-poster {
  min-height: 220px;
  overflow: hidden;
  background: #111827;
}

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

.wide-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
}

.wide-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.wide-head strong {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: var(--amber);
}

.wide-head span {
  padding: 5px 9px;
  color: var(--amber-dark);
  background: #ffedd5;
  font-size: 12px;
}

.wide-info h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.wide-info p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

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

.category-tile {
  position: relative;
  min-height: 240px;
  color: #ffffff;
  background: #111827;
}

.category-tile img {
  position: absolute;
  inset: 0;
  opacity: 0.72;
}

.category-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), transparent);
}

.category-tile div {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 1;
}

.category-tile span {
  color: #ffedd5;
  font-weight: 800;
}

.category-tile h3 {
  margin: 8px 0;
  font-size: 28px;
}

.category-tile p {
  margin: 0;
  color: #f3f4f6;
}

.page-hero {
  padding: 78px 0;
  color: #ffffff;
  background: radial-gradient(circle at top left, #f59e0b, #c2410c 44%, #111827 100%);
}

.page-hero span {
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.16);
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: #ffedd5;
  line-height: 1.7;
  font-size: 18px;
}

.overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
}

.overview-image {
  min-height: 260px;
  overflow: hidden;
  background: #111827;
}

.overview-body {
  padding: 24px;
}

.overview-body span {
  padding: 6px 10px;
  color: var(--amber-dark);
  background: #ffedd5;
}

.overview-body h2 {
  margin: 16px 0 10px;
}

.overview-body p {
  color: var(--muted);
  line-height: 1.7;
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.overview-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--ink);
  background: #f3f4f6;
  font-size: 13px;
}

.filter-empty {
  display: none;
  margin-bottom: 20px;
  padding: 16px;
  border-radius: 16px;
  color: var(--muted);
  background: #ffffff;
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  filter: blur(16px);
  transform: scale(1.06);
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.48));
}

.detail-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
  min-height: 560px;
  padding: 58px 0;
}

.detail-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.15);
  border-radius: 26px;
  background: #111827;
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #ffedd5;
  font-size: 14px;
}

.detail-info h1 {
  margin: 18px 0;
  font-size: clamp(34px, 6vw, 62px);
}

.detail-line {
  max-width: 760px;
  color: #e5e7eb;
  font-size: 19px;
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  padding: 7px 10px;
  color: #ffedd5;
  background: rgba(255, 255, 255, 0.14);
}

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

.player-section {
  margin-top: -52px;
  position: relative;
  z-index: 5;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.video-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.08));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.player-panel.is-playing .video-cover {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--amber);
  font-size: 34px;
  box-shadow: 0 18px 40px rgba(217, 119, 6, 0.4);
}

.video-cover strong {
  max-width: min(680px, 90%);
  font-size: clamp(22px, 4vw, 38px);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.story-card {
  padding: 28px;
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.story-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
  font-size: 16px;
}

.site-footer {
  margin-top: 40px;
  color: #d1d5db;
  background: #111827;
}

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

.footer-brand {
  margin-bottom: 14px;
  color: #ffffff;
}

.site-footer p,
.site-footer li {
  color: #9ca3af;
  line-height: 1.75;
}

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

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

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

.site-footer h3 {
  color: #ffffff;
}

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

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

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

  .menu-toggle {
    display: block;
  }

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

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

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

  .home-grid,
  .wide-grid,
  .category-grid,
  .overview-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .header-inner {
    gap: 12px;
  }

  .brand {
    font-size: 19px;
  }

  .top-search {
    display: none;
  }

  .hero-carousel {
    height: 520px;
  }

  .hero-content {
    bottom: 64px;
  }

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

  .hero-arrow {
    display: none;
  }

  .search-block,
  .page-filter,
  .detail-hero-inner,
  .overview-card,
  .wide-card {
    grid-template-columns: 1fr;
  }

  .search-block {
    margin-top: 0;
    border-radius: 0;
    width: 100%;
  }

  .page-filter {
    gap: 10px;
  }

  .movie-grid,
  .home-grid,
  .compact-grid,
  .all-grid,
  .top-rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .movie-card h3 {
    min-height: 44px;
    font-size: 15px;
  }

  .wide-card {
    min-height: auto;
  }

  .wide-poster {
    min-height: auto;
    aspect-ratio: 16 / 10;
  }

  .category-tile {
    min-height: 220px;
  }

  .detail-hero-inner {
    min-height: auto;
  }

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

  .player-section {
    width: 100%;
    margin-top: 0;
  }

  .player-panel {
    border-radius: 0;
  }

  .story-card {
    padding: 22px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .home-grid,
  .compact-grid,
  .all-grid,
  .top-rank-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1,
  .detail-info h1 {
    font-size: 34px;
  }
}
