:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-300: #fcd34d;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-900: #7c2d12;
  --slate-900: #0f172a;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

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

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.95), rgba(255, 247, 237, 0.95), rgba(255, 251, 235, 0.95));
  border-bottom: 1px solid var(--amber-200);
  box-shadow: 0 8px 24px rgba(120, 53, 15, 0.08);
  backdrop-filter: blur(14px);
}

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

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

.brand-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  color: var(--white);
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.05em;
}

.brand-text small {
  margin-top: 3px;
  color: var(--amber-600);
  font-size: 12px;
  font-weight: 600;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
}

.nav-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--amber-900);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-600);
}

.search-form {
  position: relative;
  width: 220px;
  flex: none;
}

.search-form input,
.page-filter input {
  width: 100%;
  border: 1px solid var(--amber-300);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--amber-900);
  outline: 0;
  padding: 10px 44px 10px 16px;
  box-shadow: inset 0 1px 2px rgba(120, 53, 15, 0.04);
}

.search-form button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--amber-100);
  color: var(--amber-700);
  font-size: 18px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--amber-900);
  font-size: 28px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), var(--orange-100), var(--amber-200));
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transform: scale(1.03);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.9) 0%, rgba(120, 53, 15, 0.64) 44%, rgba(120, 53, 15, 0.12) 100%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 44px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--amber-200);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 0 0 18px;
  color: var(--amber-100);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
}

.hero p,
.page-hero p {
  margin: 0;
  color: #fff7dc;
  font-size: 18px;
  line-height: 1.8;
}

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

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

.hero-tags span,
.card-tags span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(254, 243, 199, 0.9);
  color: var(--amber-800);
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.page-filter button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  background: var(--amber-600);
  color: var(--white);
  padding: 13px 28px;
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.34);
}

.primary-btn:hover,
.page-filter button:hover {
  transform: translateY(-2px);
  background: var(--amber-700);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: var(--white);
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.38);
  transform: rotate(2deg);
}

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

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-poster span,
.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(217, 119, 6, 0.94);
  color: var(--white);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

.hero-poster span {
  width: 72px;
  height: 72px;
  font-size: 26px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.44);
}

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

.content-section,
.category-section,
.rank-section {
  padding: 56px 0;
}

.category-section {
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.86), rgba(255, 255, 255, 0.88));
}

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

.section-heading h2 {
  margin: 0 0 8px;
  color: var(--amber-900);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
}

.section-heading p {
  margin: 0;
  color: var(--amber-700);
  line-height: 1.7;
}

.section-more {
  color: var(--amber-600);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 14px 28px rgba(120, 53, 15, 0.14);
  isolation: isolate;
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-tile:hover img {
  transform: scale(1.1);
}

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(120, 53, 15, 0.86), rgba(120, 53, 15, 0.08));
  z-index: 1;
}

.category-copy {
  position: absolute;
  inset: auto 18px 18px;
  z-index: 2;
  color: var(--white);
}

.category-copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 900;
}

.category-copy small {
  display: -webkit-box;
  color: #ffedd5;
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(120, 53, 15, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px rgba(120, 53, 15, 0.18);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--amber-200);
}

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

.movie-card:hover .card-cover img {
  transform: scale(1.07);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.02));
  transition: opacity 0.25s ease;
}

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

.card-play {
  z-index: 2;
  width: 48px;
  height: 48px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
}

.card-duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--white);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--amber-600);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: var(--amber-900);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card h3 a:hover {
  color: var(--amber-600);
}

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

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

.movie-card-wide .card-cover {
  aspect-ratio: auto;
  height: 100%;
}

.rank-section {
  background: linear-gradient(90deg, var(--amber-100), var(--orange-100));
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list a {
  display: grid;
  grid-template-columns: 44px 72px 1fr auto;
  align-items: center;
  gap: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  padding: 12px;
  box-shadow: 0 8px 18px rgba(120, 53, 15, 0.08);
}

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

.rank-list img {
  width: 72px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-copy strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 900;
}

.rank-copy small {
  color: var(--amber-700);
  line-height: 1.45;
}

.rank-score {
  border-radius: 999px;
  background: var(--amber-600);
  color: var(--white);
  padding: 6px 10px;
  font-weight: 900;
}

.page-hero {
  padding: 76px 0;
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.94), rgba(217, 119, 6, 0.84)), url("../1.jpg") center / cover;
}

.compact-hero {
  padding: 64px 0;
}

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

.page-hero p {
  max-width: 760px;
}

.page-filter {
  display: flex;
  max-width: 640px;
  gap: 12px;
  margin-top: 26px;
}

.page-filter button {
  border: 0;
  background: var(--amber-600);
  color: var(--white);
  padding: 0 24px;
  min-width: 112px;
}

.related-nav-section {
  padding: 0 0 52px;
}

.related-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  border-radius: 18px;
  background: var(--white);
  padding: 18px;
  box-shadow: 0 10px 24px rgba(120, 53, 15, 0.1);
}

.related-nav a {
  border-radius: 999px;
  background: var(--amber-100);
  color: var(--amber-800);
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 28px 0 14px;
  color: var(--amber-700);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--amber-600);
  font-weight: 800;
}

.detail-main {
  background: linear-gradient(180deg, #ffffff, var(--amber-50));
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 32px;
  align-items: start;
}

.watch-main h1 {
  margin: 0 0 20px;
  color: var(--amber-900);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
  font-weight: 900;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.26);
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.54));
  color: var(--white);
}

.player-start span {
  display: inline-flex;
  width: 84px;
  height: 84px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--amber-600);
  font-size: 30px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
}

.player-start.hidden {
  display: none;
}

.detail-article {
  margin-top: 28px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(120, 53, 15, 0.1);
  padding: 28px;
}

.detail-block + .detail-block {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--amber-200);
}

.detail-block h2,
.side-card h2,
.site-footer h2 {
  margin: 0 0 12px;
  color: var(--amber-900);
  font-size: 22px;
  font-weight: 900;
}

.detail-block p {
  margin: 0;
  color: var(--amber-800);
  font-size: 16px;
  line-height: 1.9;
}

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

.detail-cover {
  width: 100%;
  border-radius: 24px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  box-shadow: 0 24px 54px rgba(120, 53, 15, 0.2);
}

.side-card {
  margin-top: 18px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(120, 53, 15, 0.1);
  padding: 22px;
}

dl {
  margin: 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--amber-100);
}

dt {
  color: var(--amber-600);
  font-weight: 800;
}

dd {
  margin: 0;
  color: var(--amber-900);
  text-align: right;
}

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

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--amber-200);
  background: linear-gradient(180deg, var(--amber-50), var(--orange-100));
}

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

.site-footer p {
  color: var(--amber-700);
  line-height: 1.7;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: var(--amber-700);
  font-weight: 700;
}

.footer-bottom {
  border-top: 1px solid var(--amber-200);
  color: var(--amber-700);
  padding: 18px 0 26px;
  font-size: 14px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .main-nav {
    gap: 14px;
  }

  .search-form {
    width: 190px;
  }

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

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

  .detail-side {
    position: static;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }

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

  .main-nav,
  .search-form {
    display: none;
    width: 100%;
  }

  .site-header.menu-open .main-nav,
  .site-header.menu-open .search-form {
    display: flex;
  }

  .main-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 8px;
  }

  .search-form {
    margin-bottom: 8px;
  }

  .hero {
    height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 26px;
    padding-bottom: 66px;
  }

  .hero-poster {
    width: min(70vw, 270px);
    justify-self: start;
  }

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

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

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

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

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

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

  .hero {
    height: 760px;
  }

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

  .hero h2 {
    font-size: 28px;
  }

  .hero-actions,
  .page-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn,
  .ghost-btn,
  .page-filter button {
    width: 100%;
    min-height: 46px;
  }

  .category-grid,
  .category-grid-large,
  .movie-grid,
  .wide-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .rank-list a {
    grid-template-columns: 36px 66px 1fr;
  }

  .rank-score {
    display: none;
  }

  .movie-card-wide {
    grid-template-columns: 1fr;
  }

  .detail-article,
  .side-card {
    padding: 20px;
  }
}
