:root {
  --primary-50: #fef3e2;
  --primary-100: #fde6c5;
  --primary-300: #f9c052;
  --primary-400: #f7ad18;
  --primary-500: #d89410;
  --primary-600: #b6790d;
  --accent-50: #fff5ed;
  --accent-500: #f95c16;
  --accent-600: #ea420c;
  --secondary-50: #f5f7fa;
  --secondary-700: #4a5a82;
  --secondary-800: #353d59;
  --secondary-900: #2f344c;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --white: #ffffff;
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f9fafb;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.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);
  backdrop-filter: blur(12px);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

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

.brand-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  color: #fff;
  box-shadow: var(--shadow-soft);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #374151;
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--primary-600);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 8px;
  border-radius: 12px;
  background: transparent;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  border-radius: 999px;
  background: #111827;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  padding: 12px 16px 18px;
  background: #fff;
}

.mobile-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 600;
}

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

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 72px;
  color: #fff;
}

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

.hero-badges,
.hero-meta,
.meta-pills,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-badges span,
.meta-pills span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
}

.hero-badges span:first-child {
  background: var(--primary-500);
  color: #fff;
  padding: 6px 13px;
  font-weight: 700;
}

.hero-badges span:last-child {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 13px;
  backdrop-filter: blur(8px);
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
}

.hero p {
  max-width: 680px;
  margin: 0 0 20px;
  color: #e5e7eb;
  font-size: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  margin-bottom: 18px;
  color: #f3f4f6;
}

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

.hero-tags span,
.detail-tags span,
.movie-info .tag-row span {
  background: var(--primary-50);
  color: var(--primary-700, #945f0a);
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
}

.primary-button,
.secondary-button,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--primary-500);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover,
.secondary-button:hover,
.home-search button:hover {
  background: var(--primary-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.secondary-button {
  background: #fff;
  color: var(--primary-600);
  border: 1px solid var(--primary-100);
}

.secondary-button:hover {
  color: #fff;
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(6px);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

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

.hero-dots button.active {
  width: 28px;
  background: #fff;
}

.quick-search {
  position: relative;
  z-index: 5;
  margin-top: -42px;
}

.quick-search-card {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 560px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-hover);
}

.quick-search h2,
.section-head h2,
.category-panel h2,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  color: var(--secondary-900);
  line-height: 1.2;
}

.quick-search p,
.page-hero p,
.category-panel p,
.movie-desc,
.compact-card em,
.rank-main em,
.detail-content .lead {
  color: var(--muted);
}

.home-search,
.filter-bar {
  display: flex;
  gap: 12px;
}

.home-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  outline: none;
  padding: 0 16px;
}

.home-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 4px rgba(216, 148, 16, 0.14);
}

.section {
  padding: 72px 0;
}

.section-soft {
  background: linear-gradient(135deg, var(--primary-50), var(--secondary-50), var(--accent-50));
}

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

.section-head.compact {
  margin-bottom: 18px;
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.text-link {
  color: var(--primary-600);
  font-weight: 800;
}

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

.featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.all-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.72));
}

.poster-type,
.poster-score {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.poster-type {
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: rgba(249, 92, 22, 0.92);
}

.poster-score {
  right: 12px;
  bottom: 12px;
  padding: 4px 9px;
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(6px);
}

.movie-info {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.movie-info strong {
  display: block;
  min-height: 24px;
  color: var(--secondary-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-info em {
  color: #6b7280;
  font-size: 13px;
  font-style: normal;
}

.movie-desc {
  display: -webkit-box;
  min-height: 44px;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  gap: 6px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 32px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 64px minmax(0, 1fr) 96px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.rank-number {
  color: var(--primary-600);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-main {
  min-width: 0;
}

.rank-main strong,
.compact-card strong {
  display: block;
  color: var(--secondary-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-main em {
  display: -webkit-box;
  margin-top: 4px;
  font-size: 13px;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-meta {
  color: #6b7280;
  font-size: 13px;
  text-align: right;
}

.rank-meta b {
  color: var(--accent-600);
}

.ranking-list.wide .rank-row {
  grid-template-columns: 56px 70px minmax(0, 1fr) 130px;
}

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

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

.compact-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.compact-card img {
  width: 64px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
}

.compact-card em {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-style: normal;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.category-tile {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, var(--primary-50));
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.tile-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tile-images img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
}

.category-tile strong {
  color: var(--secondary-900);
  font-size: 20px;
}

.category-tile em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
}

.page-hero {
  background: linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
  color: #fff;
}

.page-hero.small {
  padding: 68px 0 58px;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 54px);
}

.page-hero p {
  max-width: 780px;
  color: #e5e7eb;
  font-size: 17px;
}

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

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

.category-panels {
  display: grid;
  gap: 24px;
}

.category-panel {
  padding: 24px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.category-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

.category-panel-head span {
  color: var(--primary-600);
  font-weight: 900;
}

.filter-bar {
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-bar input {
  flex: 1 1 300px;
}

.filter-bar select {
  flex: 0 1 180px;
}

.detail-top {
  padding: 30px 0 0;
  background: linear-gradient(135deg, var(--secondary-900), #151827);
}

.detail-top .breadcrumb {
  margin-top: 8px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.site-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: cover;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.2));
  color: #fff;
  text-align: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  display: inline-flex;
  width: 76px;
  height: 76px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  font-size: 32px;
  box-shadow: var(--shadow-hover);
}

.play-title {
  max-width: 780px;
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 900;
}

.play-subtitle {
  max-width: 680px;
  color: #e5e7eb;
}

.detail-section {
  padding-top: 48px;
}

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

.detail-poster {
  position: sticky;
  top: 88px;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-hover);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-content {
  padding: 30px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-content h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.detail-content .lead {
  font-size: 18px;
}

.meta-pills {
  margin: 20px 0;
}

.meta-pills span {
  padding: 7px 12px;
  background: var(--secondary-50);
  color: var(--secondary-800);
  font-weight: 700;
}

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

.content-block {
  margin-top: 26px;
}

.content-block h2 {
  margin: 0 0 10px;
  color: var(--secondary-900);
  font-size: 22px;
}

.content-block p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

.detail-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.detail-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-600);
  font-weight: 800;
}

.prose-card {
  padding: 32px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.prose-card h2 {
  margin-top: 0;
  color: var(--secondary-900);
}

.site-footer {
  background: linear-gradient(135deg, var(--secondary-900), var(--secondary-800), var(--secondary-900));
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0 34px;
}

.footer-intro p,
.footer-links a,
.footer-bottom {
  color: #d1d5db;
}

.footer-links {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

  .nav-toggle {
    display: block;
  }

  .quick-search-card,
  .two-column,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    position: static;
    max-width: 280px;
  }

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

@media (max-width: 680px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .hero {
    height: 72vh;
    min-height: 560px;
  }

  .hero-content {
    padding-bottom: 86px;
  }

  .hero-control {
    display: none;
  }

  .quick-search {
    margin-top: 0;
  }

  .quick-search-card {
    border-radius: 0;
    width: 100%;
  }

  .home-search,
  .filter-bar,
  .section-head,
  .category-panel-head,
  .footer-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .section {
    padding: 48px 0;
  }

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

  .movie-info {
    padding: 11px;
  }

  .movie-desc,
  .movie-info .tag-row {
    display: none;
  }

  .rank-row,
  .ranking-list.wide .rank-row {
    grid-template-columns: 36px 54px minmax(0, 1fr);
  }

  .rank-row img {
    width: 54px;
    height: 74px;
  }

  .rank-meta {
    display: none;
  }

  .compact-grid,
  .compact-grid.four {
    grid-template-columns: 1fr;
  }

  .detail-content {
    padding: 22px;
  }

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