: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;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --black: #000000;
  --shadow: 0 18px 45px rgba(120, 53, 15, 0.16);
  --soft-shadow: 0 10px 25px rgba(120, 53, 15, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 235, 0.94);
  border-bottom: 1px solid var(--amber-200);
  box-shadow: 0 8px 24px rgba(120, 53, 15, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.35);
}

.brand-mark span {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid var(--white);
  margin-left: 3px;
}

.brand-text {
  font-size: 21px;
  line-height: 1;
  white-space: nowrap;
}

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

.nav-link {
  position: relative;
  color: var(--amber-800);
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 3px;
  border-radius: 999px;
  background: var(--amber-600);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
}

.header-search input,
.mobile-search input {
  width: 230px;
  border: 1px solid var(--amber-300);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  padding: 10px 13px;
  outline: none;
  background: var(--white);
}

.header-search input:focus,
.mobile-search input:focus {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 0 12px 12px 0;
  padding: 11px 15px;
  color: var(--white);
  background: var(--amber-600);
  cursor: pointer;
}

.header-search button:hover,
.mobile-search button:hover {
  background: var(--amber-700);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--amber-100);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--amber-800);
}

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

.mobile-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mobile-nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--amber-100);
  color: var(--amber-800);
  font-weight: 650;
}

.mobile-nav-link.active {
  color: var(--white);
  background: var(--amber-600);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--gray-900);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 43%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 700px;
  color: var(--white);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-300);
  font-weight: 800;
  margin-bottom: 14px;
}

.hero-kicker::before {
  content: "★";
}

.hero h1,
.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.hero-tags,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-meta {
  margin-bottom: 16px;
}

.hero-meta span,
.hero-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
}

.hero-meta span {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.hero-tags span {
  background: var(--amber-100);
  color: var(--amber-900);
}

.hero-actions {
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.section-more,
.category-card .open,
.player-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.primary-btn:hover,
.category-card:hover .open,
.player-link:hover {
  background: var(--amber-700);
  transform: translateY(-2px);
}

.ghost-btn {
  padding: 0 24px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.10);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.70);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--amber-500);
}

main {
  width: 100%;
}

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

.page-wrap {
  padding: 54px 0;
}

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

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

.section-heading h2,
.page-heading h1 {
  margin: 0 0 8px;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.section-heading p,
.page-heading p {
  margin: 0;
  color: var(--gray-600);
  font-size: 16px;
  line-height: 1.7;
}

.section-more {
  padding: 0 18px;
  color: var(--amber-700);
  background: var(--amber-100);
}

.section-more:hover {
  color: var(--white);
  background: var(--amber-600);
}

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--gray-900);
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: var(--gray-200);
}

.movie-card.small .poster-wrap {
  height: 190px;
}

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

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

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

.movie-card:hover .poster-wrap::after {
  background: rgba(0, 0, 0, 0.36);
}

.rating-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border-radius: 8px;
  padding: 5px 8px;
  color: var(--white);
  background: var(--amber-600);
  font-size: 13px;
  font-weight: 800;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-600);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  display: flex;
  min-height: 170px;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 9px;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--gray-500);
  font-size: 14px;
}

.card-body p {
  margin: 0 0 12px;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.genre-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.genre-row span,
.tag-row span {
  border-radius: 8px;
  padding: 5px 8px;
  color: var(--amber-700);
  background: var(--amber-100);
  font-size: 12px;
  font-weight: 700;
}

.category-band {
  background: linear-gradient(135deg, var(--amber-900), #9a3412);
  color: var(--white);
}

.category-band .section-heading h2,
.category-band .section-heading p {
  color: var(--white);
}

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

.category-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 23px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.75;
}

.category-card .open {
  width: fit-content;
  margin-top: 20px;
  padding: 0 18px;
  color: var(--white);
  background: var(--amber-600);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 100px 1fr auto;
  gap: 18px;
  align-items: center;
  border-radius: var(--radius);
  padding: 14px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  font-size: 22px;
  font-weight: 900;
}

.rank-cover {
  height: 74px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--gray-200);
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-body h3 {
  margin: 0 0 7px;
  font-size: 20px;
}

.rank-body p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.6;
}

.rank-score {
  color: var(--amber-700);
  font-size: 20px;
  font-weight: 900;
}

.filter-panel {
  margin-bottom: 30px;
  border-radius: var(--radius);
  padding: 22px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.search-box-large {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.search-box-large input {
  flex: 1;
  min-height: 52px;
  border: 1px solid var(--amber-300);
  border-radius: 14px;
  padding: 0 16px;
  outline: none;
}

.search-box-large button {
  border: 0;
  border-radius: 14px;
  padding: 0 24px;
  color: var(--white);
  background: var(--amber-600);
  font-weight: 800;
  cursor: pointer;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--amber-800);
  background: var(--amber-100);
  cursor: pointer;
  font-weight: 750;
}

.filter-chip.active {
  color: var(--white);
  background: var(--amber-600);
}

.search-state {
  margin: 0 0 18px;
  color: var(--gray-600);
  font-weight: 700;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--gray-600);
  font-size: 14px;
}

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

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

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.player-stage {
  position: relative;
  overflow: hidden;
  background: var(--black);
  aspect-ratio: 16 / 9;
}

.player-stage video {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--black);
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.74));
  cursor: pointer;
}

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

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--amber-600);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  font-size: 38px;
  padding-left: 6px;
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: none;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--white);
  background: rgba(185, 28, 28, 0.90);
}

.player-error.show {
  display: block;
}

.player-info,
.detail-card,
.side-card {
  padding: 24px;
}

.player-info h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}

.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 0;
}

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--amber-900);
  background: var(--amber-100);
  font-weight: 750;
}

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

.detail-card h2,
.side-card h2 {
  margin: 0 0 15px;
  font-size: 24px;
}

.detail-card p {
  color: var(--gray-700);
  line-height: 1.9;
  margin: 0 0 18px;
}

.side-card {
  margin-bottom: 24px;
}

.side-poster {
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 16px;
  background: var(--gray-200);
}

.side-poster img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.side-links {
  display: grid;
  gap: 12px;
}

.side-links a {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: var(--amber-50);
}

.side-links img {
  width: 72px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
}

.side-links strong {
  display: block;
  margin-bottom: 5px;
  line-height: 1.35;
}

.side-links span {
  color: var(--gray-500);
  font-size: 13px;
}

.site-footer {
  background: linear-gradient(135deg, var(--amber-950, #451a03), var(--amber-900));
  color: var(--amber-100);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

.footer-logo {
  color: var(--amber-200);
  font-size: 22px;
}

.footer-brand p,
.site-footer li,
.site-footer a {
  color: var(--amber-100);
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--amber-300);
}

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

.footer-bottom {
  border-top: 1px solid rgba(253, 230, 138, 0.22);
  padding: 20px;
  text-align: center;
  color: var(--amber-100);
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  width: 44px;
  height: 44px;
  display: none;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-600);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 22px;
}

.back-top.show {
  display: block;
}

.empty-state {
  border-radius: var(--radius);
  padding: 42px;
  text-align: center;
  background: var(--white);
  box-shadow: var(--soft-shadow);
  color: var(--gray-600);
}

@media (max-width: 1024px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

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

  .side-poster img {
    height: 360px;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 60px;
  }

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

  .hero {
    min-height: 600px;
  }

  .hero-copy {
    padding-top: 24px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .poster-wrap {
    height: 210px;
  }

  .rank-item {
    grid-template-columns: 48px 76px 1fr;
  }

  .rank-score {
    grid-column: 3;
  }

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

  .search-box-large {
    flex-direction: column;
  }

  .search-box-large button {
    min-height: 48px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .poster-wrap,
  .movie-card.small .poster-wrap {
    height: 280px;
  }

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

  .player-info,
  .detail-card,
  .side-card {
    padding: 18px;
  }
}
