:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-500: #78716c;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --amber-50: #fffbeb;
  --amber-200: #fde68a;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --white: #ffffff;
  --black: #000000;
  --shadow-soft: 0 14px 35px rgba(28, 25, 23, 0.12);
  --shadow-card: 0 10px 24px rgba(28, 25, 23, 0.11);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--stone-800);
  background: linear-gradient(180deg, var(--stone-50) 0%, rgba(255, 251, 235, 0.58) 100%);
  line-height: 1.55;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.86);
  border-bottom: 1px solid rgba(214, 211, 209, 0.75);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), #92400e);
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.32);
}

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--stone-700);
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: var(--stone-900);
}

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--stone-900);
  cursor: pointer;
  padding: 10px;
}

.mobile-menu-btn span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: var(--white);
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.mobile-cat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mobile-cat-row a {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--amber-50);
  color: var(--amber-700);
  font-size: 13px;
}

.hero {
  position: relative;
  height: 78vh;
  min-height: 580px;
  overflow: hidden;
  background: var(--stone-900);
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(28, 25, 23, 0.96) 0%, rgba(28, 25, 23, 0.72) 42%, rgba(28, 25, 23, 0.18) 100%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1240px) / 2));
  right: max(32px, calc((100vw - 1240px) / 2));
  bottom: 9%;
  z-index: 2;
  max-width: 780px;
  color: var(--white);
}

.hero-pill,
.type-badge,
.year-badge,
.rank-badge,
.detail-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 750;
}

.hero-pill {
  padding: 6px 12px;
  margin-bottom: 16px;
  color: var(--white);
  background: rgba(217, 119, 6, 0.92);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5.4vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0 0 28px;
  max-width: 720px;
  color: rgba(245, 245, 244, 0.9);
  font-size: clamp(16px, 2vw, 22px);
}

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

.btn-primary,
.btn-secondary,
.section-more,
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  min-height: 48px;
  padding: 0 24px;
}

.btn-secondary {
  min-height: 48px;
  padding: 0 22px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-primary:hover,
.btn-secondary:hover,
.section-more:hover,
.search-button:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.34);
  cursor: pointer;
}

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

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 32px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--amber-500);
}

.hero-strip {
  width: min(1240px, calc(100% - 32px));
  margin: -58px auto 0;
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.search-panel,
.hot-panel,
.page-hero,
.content-section,
.category-card,
.detail-panel,
.player-card {
  border: 1px solid rgba(214, 211, 209, 0.72);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.search-panel {
  padding: 22px;
}

.search-panel h2,
.hot-panel h2,
.content-section h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--stone-900);
}

.search-panel p,
.hot-panel p,
.section-heading p,
.page-hero p,
.detail-title p {
  color: var(--stone-500);
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-form input,
.page-search input {
  width: 100%;
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  background: var(--white);
  padding: 14px 15px;
  outline: none;
}

.search-form input:focus,
.page-search input:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.search-button {
  border: 0;
  padding: 0 18px;
  cursor: pointer;
}

.hot-panel {
  padding: 20px;
}

.hot-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.hot-list a,
.ranking-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 15px;
  background: rgba(255, 251, 235, 0.74);
}

.rank-badge {
  width: 32px;
  height: 32px;
  justify-content: center;
  color: var(--white);
  background: var(--stone-900);
}

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

.main-wrap {
  padding: 54px 0 70px;
}

.page-wrap {
  padding: 34px 0 70px;
}

.content-section {
  padding: 24px;
  margin-bottom: 28px;
}

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

.section-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 6px 0 0;
}

.section-more {
  min-height: 40px;
  padding: 0 16px;
  color: var(--amber-700);
  background: var(--amber-50);
}

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--stone-200);
  box-shadow: var(--shadow-card);
}

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

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

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

.type-badge,
.year-badge {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  color: var(--white);
  font-size: 12px;
}

.type-badge {
  top: 10px;
  right: 10px;
  background: rgba(217, 119, 6, 0.9);
}

.year-badge {
  left: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.56);
}

.movie-info {
  padding: 12px 2px 0;
}

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

.movie-info h3 a:hover {
  color: var(--amber-700);
}

.one-line {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--stone-500);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  color: var(--stone-500);
  font-size: 12px;
}

.meta-row span,
.tag-row {
  overflow: hidden;
}

.meta-row span,
.tag-row span {
  max-width: 100%;
}

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

.category-card {
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(28, 25, 23, 0.14);
}

.category-card strong {
  display: block;
  margin-bottom: 9px;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: var(--stone-500);
  font-size: 14px;
}

.page-hero {
  padding: clamp(24px, 5vw, 54px);
  margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.93), rgba(255, 251, 235, 0.9));
}

.page-hero h1 {
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  margin: 12px 0 0;
  font-size: 17px;
}

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

.filter-bar button {
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--stone-700);
  padding: 9px 14px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(28, 25, 23, 0.08);
}

.filter-bar button.active,
.filter-bar button:hover {
  color: var(--white);
  background: var(--stone-900);
}

.page-search {
  margin: 0 0 20px;
}

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

.ranking-row {
  grid-template-columns: 48px 72px 1fr auto;
  background: var(--white);
  box-shadow: 0 6px 18px rgba(28, 25, 23, 0.08);
}

.ranking-row img {
  width: 72px;
  height: 98px;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-row h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.ranking-row p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--stone-500);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.player-card {
  overflow: hidden;
  background: var(--stone-900);
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--black);
  cursor: pointer;
}

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.22));
  cursor: pointer;
}

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

.play-button {
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(217, 119, 6, 0.93);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
  cursor: pointer;
  font-size: 34px;
  padding-left: 8px;
}

.detail-title {
  padding: 22px;
  color: var(--white);
}

.detail-title h1 {
  color: var(--white);
  font-size: clamp(26px, 3.3vw, 42px);
}

.detail-title p {
  margin: 10px 0 0;
  color: rgba(245, 245, 244, 0.8);
}

.detail-panel {
  padding: 24px;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

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

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.detail-badge {
  padding: 7px 10px;
  color: var(--amber-700);
  background: var(--amber-50);
  font-size: 13px;
}

.article-body {
  margin-top: 26px;
}

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

.article-body p {
  margin: 0;
  color: var(--stone-700);
  font-size: 16px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 251, 235, 0.68);
}

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

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  font-style: normal;
}

.compact-card em {
  margin-top: 4px;
  color: var(--stone-500);
  font-size: 12px;
  font-style: normal;
}

.breadcrumb {
  margin: 0 0 16px;
  color: var(--stone-500);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--amber-700);
}

.site-footer {
  border-top: 1px solid rgba(214, 211, 209, 0.82);
  background: var(--stone-900);
  color: var(--stone-200);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  padding: 38px 0;
}

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

.footer-inner p {
  color: var(--stone-300);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
  justify-content: end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

[hidden] {
  display: none !important;
}

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

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

  .hero-strip,
  .detail-hero {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-menu-btn {
    display: block;
  }

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

  .mobile-nav .nav-link {
    display: block;
    margin-bottom: 6px;
  }

  .hero {
    min-height: 620px;
    height: 86vh;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 92px;
  }

  .hero-arrow {
    top: auto;
    bottom: 28px;
  }

  .hero-prev {
    left: 22px;
  }

  .hero-next {
    left: 78px;
    right: auto;
  }

  .hero-dots {
    right: 22px;
    left: auto;
    transform: none;
  }

  .hero-strip {
    margin-top: 18px;
  }

  .search-form {
    flex-direction: column;
  }

  .search-button {
    min-height: 46px;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    margin-top: 12px;
  }

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

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

  .ranking-row {
    grid-template-columns: 42px 56px 1fr;
  }

  .ranking-row img {
    width: 56px;
    height: 78px;
  }

  .ranking-row .btn-primary {
    grid-column: 2 / -1;
    min-height: 42px;
  }

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

  .footer-links {
    justify-content: start;
  }
}

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

  .content-section,
  .detail-panel,
  .search-panel,
  .hot-panel {
    padding: 18px;
  }
}
