:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --orange-600: #ea580c;
  --orange-700: #c2410c;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 16px 38px rgba(120, 53, 15, 0.14);
  --shadow-strong: 0 24px 60px rgba(17, 24, 39, 0.28);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-900);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, var(--amber-50), #fff7ed 45%, var(--amber-100));
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--amber-800), var(--orange-700), var(--amber-800));
  box-shadow: 0 12px 28px rgba(120, 53, 15, 0.25);
}

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

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.brand-copy strong {
  display: block;
  font-size: 24px;
  letter-spacing: 0.04em;
}

.brand-copy em {
  display: block;
  color: var(--amber-100);
  font-size: 12px;
  font-style: normal;
}

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

.desktop-nav a,
.mobile-panel a {
  border-radius: 12px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.9);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 99px;
  background: #fff;
}

.mobile-panel {
  display: none;
  background: rgba(120, 53, 15, 0.98);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel-inner {
  display: grid;
  gap: 6px;
  padding: 12px 0 20px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: #fff;
  background: #111827;
}

.hero-slider {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  filter: saturate(1.1);
}

.hero-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(120, 53, 15, 0.78) 45%, rgba(17, 24, 39, 0.58)), radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.36), transparent 35%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(1180px, calc(100% - 32px));
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 54px;
  padding: 70px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff7ed;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px);
}

.hero h1,
.page-hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p {
  max-width: 720px;
  color: #ffedd5;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.75;
}

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

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--amber-900);
  font-size: 13px;
  font-weight: 700;
  background: var(--amber-100);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 24px;
  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: #fff;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  box-shadow: 0 18px 36px rgba(234, 88, 12, 0.32);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(16px);
}

.hero-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
  transform: rotate(2deg);
}

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

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

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

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

.section {
  padding: 62px 0;
}

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

.section-heading span {
  color: var(--amber-700);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.section-heading a,
.text-link {
  color: var(--amber-700);
  font-weight: 800;
}

.section-heading.compact {
  display: block;
}

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

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

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

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 52px rgba(120, 53, 15, 0.2);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  background: #111827;
}

.movie-card.large .poster-wrap {
  aspect-ratio: 5 / 4;
}

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

.movie-card:hover .poster-wrap img,
.compact-item:hover img,
.rank-row:hover img,
.related-item:hover img {
  transform: scale(1.08);
}

.poster-wrap::after {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.08));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap::after {
  opacity: 1;
}

.card-badge,
.duration-badge {
  position: absolute;
  z-index: 2;
  top: 14px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  left: 14px;
  background: var(--amber-600);
}

.card-badge.inline {
  position: static;
  display: inline-flex;
}

.duration-badge {
  right: 14px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
}

.play-mark {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--amber-600);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.78);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.rank-info h2 a:hover,
.category-overview-card h2 a:hover {
  color: var(--amber-700);
}

.card-body p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-500);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--gray-500);
  font-size: 14px;
}

.category-strip {
  border-radius: 34px;
  margin: 0 auto;
  width: min(1220px, calc(100% - 24px));
  background: linear-gradient(90deg, #fff7ed, #fef3c7);
}

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

.category-tile,
.category-overview-card {
  display: grid;
  min-height: 168px;
  border-radius: var(--radius);
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-700), var(--orange-600));
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 46px rgba(120, 53, 15, 0.2);
}

.category-tile strong,
.category-overview-card h2 {
  font-size: 24px;
}

.category-tile span,
.category-overview-card p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.accent-orange { background: linear-gradient(135deg, #c2410c, #f97316); }
.accent-red { background: linear-gradient(135deg, #991b1b, #f43f5e); }
.accent-violet { background: linear-gradient(135deg, #5b21b6, #a855f7); }
.accent-rose { background: linear-gradient(135deg, #9f1239, #fb7185); }
.accent-emerald { background: linear-gradient(135deg, #065f46, #10b981); }
.accent-cyan { background: linear-gradient(135deg, #155e75, #06b6d4); }
.accent-slate { background: linear-gradient(135deg, #334155, #64748b); }

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.wide-list,
.rank-card,
.side-card,
.detail-card,
.filter-panel {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.wide-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.compact-item,
.related-item {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 16px;
  padding: 10px;
  transition: background 0.2s ease;
}

.compact-item:hover,
.related-item:hover {
  background: var(--gray-50);
}

.compact-item img,
.related-item img {
  width: 118px;
  height: 76px;
  flex: 0 0 auto;
  border-radius: 14px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.compact-item strong,
.related-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--gray-900);
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-item em,
.related-item em {
  display: block;
  margin-top: 6px;
  color: var(--gray-500);
  font-size: 13px;
  font-style: normal;
}

.rank-card {
  position: sticky;
  top: 100px;
  align-self: start;
  padding: 24px;
}

.rank-card a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--gray-100);
  padding: 12px 0;
}

.rank-card b,
.rank-index {
  color: var(--amber-700);
  font-size: 22px;
}

.rank-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-card em {
  color: var(--gray-500);
  font-style: normal;
}

.page-hero {
  color: #fff;
  background: linear-gradient(90deg, var(--amber-900), var(--orange-700), var(--amber-900));
}

.page-hero.slim {
  padding: 72px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
}

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

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

.category-overview-card {
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}

.category-cover {
  display: grid;
  gap: 12px;
}

.thumb-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.thumb-stack img {
  aspect-ratio: 1;
  border-radius: 12px;
  object-fit: cover;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 74px 180px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.rank-poster {
  overflow: hidden;
  border-radius: 16px;
}

.rank-poster img {
  width: 180px;
  height: 112px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.rank-info h2 {
  margin: 0 0 10px;
}

.rank-info p {
  margin: 0 0 12px;
  color: var(--gray-500);
  line-height: 1.6;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 16px;
  padding: 18px;
  margin-bottom: 18px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--gray-700);
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  background: #fffaf0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber-600);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.filter-panel button {
  align-self: end;
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  color: #fff;
  font-weight: 800;
  background: var(--amber-700);
  cursor: pointer;
}

.filter-status {
  margin-bottom: 20px;
  color: var(--gray-500);
  font-weight: 700;
}

.search-grid .movie-card.is-hidden {
  display: none;
}

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

.watch-crumb {
  padding: 16px 0;
  color: #fff;
  background: #111827;
}

.watch-crumb .breadcrumb {
  margin-bottom: 0;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow-strong);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.18));
  cursor: pointer;
}

.player-overlay span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}

.player-overlay.is-hidden {
  display: none;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  border-radius: 14px;
  padding: 12px 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
}

.player-message.is-visible {
  display: block;
}

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-card h1 {
  margin: 18px 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.detail-card h2,
.side-card h2 {
  margin: 28px 0 12px;
  font-size: 22px;
}

.detail-card p {
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.9;
}

.detail-tags {
  margin-top: 18px;
}

.detail-side {
  position: sticky;
  top: 100px;
}

.side-card {
  padding: 22px;
}

.site-footer {
  margin-top: 40px;
  color: #d1d5db;
  background: linear-gradient(90deg, #111827, #1f2937, #111827);
}

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

.footer-main p {
  max-width: 680px;
  color: #9ca3af;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 0;
  color: #9ca3af;
}

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

  .menu-toggle {
    display: flex;
  }

  .hero-content,
  .split-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

  .detail-side,
  .rank-card {
    position: static;
  }
}

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

  .hero,
  .hero-slider {
    min-height: 590px;
  }

  .hero-content {
    padding: 48px 0 86px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .cards-grid,
  .featured-grid,
  .category-grid,
  .category-overview-grid,
  .category-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-card.large .poster-wrap,
  .poster-wrap {
    aspect-ratio: 3 / 4;
  }

  .card-body {
    padding: 14px;
  }

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

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 48px 96px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-poster img {
    width: 96px;
    height: 78px;
  }

  .rank-info p {
    display: none;
  }

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

  .footer-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .brand-copy strong {
    font-size: 20px;
  }

  .brand-copy em {
    display: none;
  }

  .cards-grid,
  .featured-grid,
  .category-page-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-actions {
    display: grid;
  }
}
