:root {
  color-scheme: light;
  --primary-50: #faf5f0;
  --primary-100: #f4e8d9;
  --primary-600: #a05f3d;
  --primary-700: #854c34;
  --primary-900: #5a3629;
  --secondary-50: #f0f5f0;
  --secondary-100: #dbe8db;
  --accent-500: #ea7e20;
  --ink: #172033;
  --muted: #667085;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f9fafb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--primary-50) 0%, #ffffff 32%, var(--soft) 100%);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--primary-700);
  font-weight: 800;
}

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

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

.logo-title {
  font-size: 21px;
  letter-spacing: 0.02em;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: #344054;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-form input {
  width: min(280px, 36vw);
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  padding: 10px 42px 10px 16px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.search-form button {
  position: absolute;
  right: 5px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--primary-600);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--primary-700);
  background: var(--primary-50);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 0 18px;
}

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

.mobile-nav a {
  display: block;
  border-radius: 12px;
  padding: 11px 12px;
  color: #344054;
  font-weight: 650;
}

.mobile-nav a:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

.hero {
  position: relative;
  margin: 28px 0 34px;
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(135deg, var(--primary-900), var(--primary-700) 48%, #1f2937);
  box-shadow: 0 26px 70px rgba(90, 54, 41, 0.24);
}

.hero-slide {
  display: none;
  min-height: 540px;
  isolation: isolate;
}

.hero-slide.active {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.72fr);
}

.hero-cover {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-size: cover;
  opacity: 0.34;
  transform: scale(1.03);
}

.hero-slide::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(22, 24, 29, 0.92) 0%, rgba(22, 24, 29, 0.62) 45%, rgba(22, 24, 29, 0.42) 100%),
    radial-gradient(circle at 20% 20%, rgba(234, 126, 32, 0.32), transparent 36%);
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 540px;
  padding: 64px 58px;
  color: white;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 8px 13px;
  color: #ffe8c8;
  background: rgba(255, 255, 255, 0.11);
  font-size: 13px;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(34px, 5.6vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 660px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 17px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  color: #6b3b25;
  background: var(--primary-100);
  font-size: 13px;
  font-weight: 750;
}

.hero .badge {
  color: #fff5e8;
  background: rgba(255, 255, 255, 0.16);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent-500), var(--primary-600));
  box-shadow: 0 16px 30px rgba(234, 126, 32, 0.28);
}

.btn-light {
  color: white;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
}

.btn-soft {
  color: var(--primary-700);
  background: var(--primary-50);
}

.hero-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px 46px 42px 0;
}

.feature-card {
  width: min(360px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
}

.feature-poster,
.poster {
  display: block;
  width: 100%;
  background-position: center;
  background-size: cover;
}

.feature-poster {
  aspect-ratio: 3 / 4;
}

.feature-info {
  padding: 18px;
  color: white;
}

.feature-info strong {
  display: block;
  font-size: 18px;
}

.feature-info span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.hero-controls {
  position: absolute;
  right: 34px;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-controls button,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-controls button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.15);
}

.hero-dots {
  display: flex;
  gap: 7px;
}

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

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

.section {
  margin: 42px 0;
}

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

.section-kicker {
  margin: 0 0 4px;
  color: var(--primary-700);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.15;
}

.section-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.filter-bar button,
.filter-bar a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  color: #475467;
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  transition: all 0.2s ease;
}

.filter-bar button:hover,
.filter-bar button.active,
.filter-bar a:hover {
  border-color: var(--primary-600);
  color: white;
  background: var(--primary-600);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  background: white;
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(160, 95, 61, 0.42);
  transform: translateY(-5px);
  box-shadow: 0 24px 52px rgba(16, 24, 40, 0.12);
}

.poster-link {
  display: block;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-100), var(--secondary-100));
}

.poster {
  aspect-ratio: 3 / 4;
  transition: transform 0.35s ease;
}

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

.card-ribbon {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  color: white;
  background: rgba(0, 0, 0, 0.48);
  font-size: 12px;
  font-weight: 780;
  backdrop-filter: blur(8px);
}

.movie-body {
  padding: 14px;
}

.movie-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.movie-title a:hover {
  color: var(--primary-700);
}

.movie-line {
  display: -webkit-box;
  min-height: 42px;
  margin: 8px 0 11px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.movie-meta span {
  border-radius: 999px;
  padding: 4px 8px;
  color: #667085;
  background: #f2f4f7;
  font-size: 12px;
  font-weight: 720;
}

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 26px;
  padding: 24px;
  color: white;
  background: var(--primary-900);
  box-shadow: 0 22px 48px rgba(16, 24, 40, 0.14);
}

.category-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(120deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.26)), var(--cat-bg);
  background-position: center;
  background-size: cover;
  transition: transform 0.3s ease;
}

.category-card:hover::before {
  transform: scale(1.06);
}

.category-card > * {
  position: relative;
  z-index: 1;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 26px;
}

.category-card p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
}

.category-card span {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff3e7;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 780;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 78px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.06);
}

.rank-num {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--primary-700), var(--accent-500));
  font-weight: 900;
}

.rank-cover {
  display: block;
  width: 78px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  background-position: center;
  background-size: cover;
}

.rank-title {
  margin: 0;
  font-size: 18px;
}

.rank-summary {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-score {
  color: var(--accent-500);
  font-size: 22px;
  font-weight: 900;
}

.page-hero {
  margin: 28px 0 34px;
  border-radius: 30px;
  padding: 46px;
  color: white;
  background: linear-gradient(135deg, var(--primary-900), var(--primary-700));
  box-shadow: 0 26px 60px rgba(90, 54, 41, 0.20);
}

.page-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.83);
  font-size: 17px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-700);
  font-weight: 750;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.detail-main,
.detail-side,
.content-panel {
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: 26px;
  background: white;
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.07);
}

.detail-main {
  overflow: hidden;
}

.watch-panel {
  padding: 18px;
  background: #0b111d;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #05070d;
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #05070d;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(234, 126, 32, 0.18), rgba(5, 7, 13, 0.35));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--accent-500), var(--primary-600));
  box-shadow: 0 22px 50px rgba(234, 126, 32, 0.38);
  cursor: pointer;
}

.play-button svg {
  margin-left: 4px;
}

.detail-content {
  padding: 28px;
}

.detail-content h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.14;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 24px;
}

.info-row span {
  border-radius: 999px;
  padding: 7px 11px;
  color: #475467;
  background: #f2f4f7;
  font-size: 13px;
  font-weight: 760;
}

.prose h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.prose p {
  margin: 0 0 16px;
  color: #344054;
  font-size: 16px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 24px 24px 0 0;
  background-position: center;
  background-size: cover;
}

.side-content {
  padding: 18px;
}

.side-content h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.related-list {
  display: grid;
  gap: 12px;
}

.related-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 8px;
  transition: background 0.2s ease;
}

.related-card:hover {
  background: var(--primary-50);
}

.related-thumb {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background-position: center;
  background-size: cover;
}

.related-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.content-panel {
  padding: 26px;
}

.no-results {
  display: none;
  border: 1px dashed rgba(160, 95, 61, 0.4);
  border-radius: 20px;
  padding: 24px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-weight: 760;
}

.no-results.visible {
  display: block;
}

.site-footer {
  margin-top: 64px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  color: #667085;
  background: rgba(255, 255, 255, 0.7);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .detail-poster {
    border-radius: 24px 0 0 24px;
  }
}

@media (max-width: 860px) {
  .nav-links,
  .header-actions .search-form {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-nav .search-form {
    display: flex;
    margin: 8px 0 12px;
  }

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

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

  .hero-content {
    min-height: auto;
    padding: 48px 28px 24px;
  }

  .hero-side {
    padding: 0 28px 82px;
  }

  .hero-controls {
    right: 22px;
    bottom: 22px;
  }

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

  .rank-item {
    grid-template-columns: 42px 64px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    font-size: 18px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .logo-title {
    font-size: 18px;
  }

  .logo-subtitle {
    display: none;
  }

  .hero {
    border-radius: 24px;
    margin-top: 18px;
  }

  .hero-content {
    padding: 34px 20px 18px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero-summary {
    font-size: 15px;
  }

  .hero-side {
    padding: 0 20px 76px;
  }

  .feature-card {
    border-radius: 22px;
  }

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

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

  .page-hero {
    border-radius: 24px;
    padding: 30px 22px;
  }

  .detail-content,
  .content-panel {
    padding: 20px;
  }

  .watch-panel {
    padding: 10px;
  }

  .detail-side {
    display: block;
  }

  .detail-poster {
    border-radius: 24px 24px 0 0;
  }
}
