:root {
  --primary-50: #faf5f0;
  --primary-100: #f4e8d9;
  --primary-300: #dab388;
  --primary-600: #a05f3d;
  --primary-700: #854c34;
  --primary-900: #5a3629;
  --secondary-50: #f0f5f0;
  --secondary-700: #386243;
  --secondary-900: #223426;
  --accent-500: #ea7e20;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --surface: #ffffff;
  --line: #e5e7eb;
  --shadow: 0 18px 45px rgba(90, 54, 41, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  background: linear-gradient(180deg, #f9fafb 0%, #fffaf5 100%);
  min-height: 100vh;
}

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

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

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(229, 231, 235, 0.9);
  box-shadow: 0 4px 18px rgba(17, 24, 39, 0.05);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-700);
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-700), var(--accent-500));
  box-shadow: 0 12px 24px rgba(160, 95, 61, 0.25);
}

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

.brand-name {
  font-size: 18px;
}

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

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

.nav-link,
.mobile-nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 650;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--primary-700);
  background: var(--primary-50);
}

.nav-link:hover {
  transform: translateY(-1px);
}

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

.top-search input,
.mobile-search input,
.page-search-form input {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-width: 190px;
  padding: 10px 14px;
  outline: none;
  background: #ffffff;
  transition: border 0.25s ease, box-shadow 0.25s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.page-search-form input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(160, 95, 61, 0.12);
}

.top-search button,
.mobile-search button,
.page-search-form button,
.btn-primary {
  border: none;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary-600);
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.page-search-form button:hover,
.btn-primary:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(160, 95, 61, 0.25);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--primary-700);
}

.mobile-menu {
  padding: 12px 20px 18px;
  border-top: 1px solid var(--line);
}

.mobile-menu nav {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.hero-carousel {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-900), var(--secondary-900));
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 18, 16, 0.9) 0%, rgba(25, 23, 21, 0.65) 44%, rgba(20, 18, 16, 0.14) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.1) 42%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-500);
  color: #ffffff;
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 18px;
}

.hero-content h1,
.hero-content h2,
.simple-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-movie-title {
  margin-top: 10px !important;
  color: #f9e7d6;
  font-size: clamp(24px, 3vw, 38px) !important;
}

.hero-content p,
.simple-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2.1vw, 20px);
  line-height: 1.75;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  transition: background 0.25s ease, transform 0.25s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

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

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

.hero-tags span,
.detail-meta span,
.tag-row span,
.filter-bar button {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.hero-dots {
  position: absolute;
  right: 36px;
  bottom: 36px;
  display: flex;
  gap: 9px;
  z-index: 3;
}

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

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

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 20px 0;
}

.content-section:last-child {
  padding-bottom: 72px;
}

.compact-section {
  padding-top: 44px;
}

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

.section-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.025em;
}

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

.section-more {
  flex: 0 0 auto;
  color: var(--primary-700);
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 132px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #ffffff, var(--primary-50));
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.category-card:hover,
.movie-card:hover,
.category-overview-card:hover,
.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(160, 95, 61, 0.28);
}

.category-card-name {
  color: var(--primary-900);
  font-size: 20px;
  font-weight: 900;
}

.category-card-desc {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-100), var(--secondary-50));
}

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

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

.poster-badge,
.poster-duration {
  position: absolute;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster-badge {
  top: 10px;
  left: 10px;
  background: var(--primary-600);
}

.poster-duration {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.72);
}

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

.movie-card-body h3 {
  margin: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p {
  margin: 9px 0 12px;
  color: #5b6472;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta span {
  color: var(--text-muted);
  font-size: 12px;
}

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

.movie-card-horizontal .movie-card-link {
  display: grid;
  grid-template-columns: 180px 1fr;
}

.movie-card-horizontal .poster-frame {
  aspect-ratio: auto;
  min-height: 126px;
  height: 100%;
}

.page-hero,
.detail-hero {
  max-width: 1280px;
  margin: 34px auto 0;
  border-radius: 28px;
  overflow: hidden;
}

.simple-hero {
  padding: clamp(42px, 8vw, 84px);
  color: #ffffff;
  background: radial-gradient(circle at 22% 18%, rgba(234, 126, 32, 0.32), transparent 34%), linear-gradient(135deg, var(--primary-900), var(--secondary-900));
}

.simple-hero p {
  color: rgba(255, 255, 255, 0.84);
}

.category-overview-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 15px 38px rgba(17, 24, 39, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-overview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.08));
}

.category-overview-text {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  color: #ffffff;
}

.category-overview-text strong {
  font-size: 24px;
  font-weight: 900;
}

.category-overview-text em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

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

.rank-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.rank-item a {
  display: grid;
  grid-template-columns: 64px 150px 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-number {
  color: var(--accent-500);
  font-size: 28px;
  font-weight: 950;
  text-align: center;
}

.rank-item img {
  width: 150px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--primary-100);
}

.rank-copy {
  display: grid;
  gap: 6px;
}

.rank-copy strong {
  font-size: 18px;
  font-weight: 900;
}

.rank-copy em {
  color: #4b5563;
  font-style: normal;
  line-height: 1.55;
}

.rank-copy small {
  color: var(--text-muted);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 34px;
  padding: clamp(24px, 4vw, 42px);
  color: #ffffff;
  background: radial-gradient(circle at 22% 20%, rgba(234, 126, 32, 0.26), transparent 34%), linear-gradient(135deg, var(--primary-900), var(--secondary-900));
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.28);
  background: var(--primary-100);
}

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

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

.detail-info .breadcrumb,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.breadcrumb a {
  color: #ffffff;
  font-weight: 800;
}

.detail-one-line {
  color: rgba(255, 255, 255, 0.86);
}

.detail-meta {
  margin-top: 24px;
}

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

.player-section {
  max-width: 1280px;
  margin: 34px auto 0;
  padding: 0 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.2);
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary-600);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
  font-size: 34px;
  text-indent: 5px;
}

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

.detail-copy-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.05);
}

.detail-copy-card h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 24px;
  font-weight: 900;
}

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

.filter-bar {
  margin-bottom: 22px;
}

.filter-bar button {
  border: 1px solid var(--primary-100);
  color: var(--primary-700);
  background: var(--primary-50);
  cursor: pointer;
}

.filter-bar button:hover,
.filter-bar button.is-active {
  color: #ffffff;
  background: var(--primary-600);
}

.search-hero .page-search-form {
  margin-top: 28px;
  max-width: 680px;
}

.search-hero .page-search-form input {
  flex: 1;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fffaf5, #f3f4f6);
}

.footer-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  gap: 22px;
}

.footer-main p {
  max-width: 620px;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-links,
.footer-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.footer-links a,
.footer-category-links a {
  color: var(--text-muted);
  font-weight: 700;
}

.footer-links a:hover,
.footer-category-links a:hover {
  color: var(--primary-700);
}

.copyright {
  margin: 0;
  color: #9ca3af;
  font-size: 14px;
}

.is-filtered-out {
  display: none !important;
}

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

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

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

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .hero-carousel {
    min-height: 560px;
  }

  .hero-content {
    bottom: 56px;
  }

  .hero-dots {
    left: 20px;
    right: auto;
    bottom: 22px;
  }

  .movie-grid,
  .category-grid,
  .category-overview-grid,
  .small-grid,
  .rank-layout,
  .detail-copy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-poster img {
    min-height: 260px;
  }

  .rank-item a {
    grid-template-columns: 52px 104px 1fr;
    gap: 12px;
  }

  .rank-item img {
    width: 104px;
    height: 70px;
  }

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

@media (max-width: 560px) {
  .nav-wrap {
    padding: 12px 14px;
  }

  .brand-sub {
    display: none;
  }

  .hero-carousel {
    min-height: 610px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.2));
  }

  .hero-content {
    width: calc(100% - 28px);
  }

  .hero-actions {
    display: grid;
  }

  .content-section {
    padding: 42px 14px 0;
  }

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

  .movie-grid,
  .category-grid,
  .category-overview-grid,
  .small-grid,
  .rank-layout,
  .detail-copy-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal .movie-card-link,
  .rank-item a {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal .poster-frame,
  .rank-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .rank-number {
    text-align: left;
  }

  .page-hero,
  .detail-hero {
    margin: 18px 14px 0;
    border-radius: 22px;
  }

  .simple-hero,
  .detail-hero {
    padding: 28px 20px;
  }

  .player-section {
    padding: 0 14px;
  }

  .player-shell {
    border-radius: 20px;
  }

  .play-icon {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
