html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #332d29;
  background: #f8f4ef;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #ffffff;
  background: rgba(37, 31, 28, 0.96);
  box-shadow: 0 14px 40px rgba(27, 23, 21, 0.18);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: linear-gradient(135deg, #d9864a, #a95636);
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(203, 111, 63, 0.36);
}

.brand-name {
  font-size: 22px;
}

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

.nav-link,
.mobile-nav-link {
  color: #e7e5e4;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #e1a06a;
}

.header-search {
  display: flex;
  align-items: center;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(77, 72, 69, 0.8);
  border-radius: 999px;
}

.header-search input,
.mobile-search input,
.search-panel input,
.filter-input {
  border: 0;
  outline: 0;
  color: #332d29;
  background: #ffffff;
}

.header-search input {
  width: 220px;
  padding: 11px 14px;
  color: #ffffff;
  background: transparent;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: #b8b1ad;
}

.header-search button,
.mobile-search button,
.search-panel button,
.hero-actions a,
.section-link,
.primary-button,
.secondary-button {
  border: 0;
  cursor: pointer;
  font-weight: 700;
}

.header-search button {
  padding: 11px 16px;
  color: #fff;
  background: #cb6f3f;
}

.menu-button {
  display: none;
  margin-left: auto;
  padding: 9px 12px;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 14px;
  padding: 0 24px 22px;
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-search {
  display: flex;
  overflow: hidden;
  border-radius: 14px;
}

.mobile-search input {
  min-width: 0;
  flex: 1;
  padding: 12px 14px;
}

.mobile-search button {
  padding: 0 16px;
  color: #fff;
  background: #cb6f3f;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  color: #ffffff;
  background: #251f1c;
}

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

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

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

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #251f1c 0%, rgba(37, 31, 28, 0.72) 46%, rgba(37, 31, 28, 0.18) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 40px;
  align-items: center;
  max-width: 1280px;
  min-height: 72vh;
  margin: 0 auto;
  padding: 86px 24px 72px;
}

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

.hero-badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: #ffffff;
  background: #cb6f3f;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero h2 {
  font-size: clamp(34px, 6vw, 70px);
}

.hero-text {
  max-width: 680px;
  margin: 0 0 20px;
  color: #e7e5e4;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.detail-meta span,
.card-meta-line span {
  padding: 6px 10px;
  color: #f5eee8;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 14px;
}

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

.primary-button,
.secondary-button,
.hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.hero-actions a:first-child {
  color: #ffffff;
  background: #cb6f3f;
  box-shadow: 0 14px 30px rgba(203, 111, 63, 0.32);
}

.secondary-button,
.hero-actions a:last-child {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.primary-button:hover,
.secondary-button:hover,
.hero-actions a:hover {
  transform: translateY(-2px);
}

.hero-panel {
  padding: 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px);
}

.hero-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 800;
}

.hero-controls {
  display: flex;
  gap: 8px;
}

.hero-controls button {
  width: 34px;
  height: 34px;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid transparent;
  color: #ffffff;
  text-align: left;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  border-color: rgba(225, 160, 106, 0.75);
  background: rgba(203, 111, 63, 0.24);
  transform: translateX(2px);
}

.hero-thumb img {
  width: 82px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
}

.hero-thumb strong,
.hero-thumb small {
  display: block;
}

.hero-thumb strong {
  overflow: hidden;
  font-size: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-thumb small {
  margin-top: 4px;
  color: #d6d3d1;
}

.main-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.section-muted {
  background: #ede8e3;
}

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

.section-header h2,
.page-title,
.detail-title {
  margin: 0;
  color: #2f2925;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-header p,
.page-intro,
.category-card p,
.detail-summary p,
.detail-review p {
  color: #665d58;
  line-height: 1.78;
}

.section-link {
  color: #cb6f3f;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(63, 54, 48, 0.11);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 38px rgba(63, 54, 48, 0.16);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #d1ccc9;
}

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

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

.poster-wrap::after {
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.poster-type,
.poster-play {
  position: absolute;
  z-index: 2;
}

.poster-type {
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
  border-radius: 9px;
  font-size: 12px;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: #cb6f3f;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.movie-card-body strong {
  overflow: hidden;
  color: #2f2925;
  font-size: 17px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  color: #8c837e;
  font-size: 13px;
}

.movie-meta span:first-child {
  max-width: 60%;
  overflow: hidden;
  padding: 4px 8px;
  color: #a95636;
  background: #faeee0;
  border-radius: 8px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.category-card {
  min-height: 188px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #eee4dc;
  border-radius: 24px;
  box-shadow: 0 10px 24px rgba(63, 54, 48, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px rgba(63, 54, 48, 0.14);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: #2f2925;
}

.category-card p {
  margin: 0 0 18px;
}

.page-hero {
  background: linear-gradient(135deg, #2f2925, #5c3b2d 55%, #cb6f3f);
  color: #ffffff;
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 76px 24px;
}

.page-hero .page-title,
.page-hero .page-intro {
  color: #ffffff;
}

.page-hero .page-intro {
  max-width: 760px;
  margin-top: 16px;
  color: #f0e6dd;
}

.filter-bar,
.search-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 26px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #eee4dc;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(63, 54, 48, 0.08);
}

.filter-input,
.search-panel input {
  min-width: 0;
  flex: 1;
  padding: 13px 16px;
  background: #f8f4ef;
  border-radius: 14px;
}

.search-panel button {
  padding: 13px 20px;
  color: #fff;
  background: #cb6f3f;
  border-radius: 14px;
}

.empty-state {
  display: none;
  padding: 28px;
  color: #665d58;
  text-align: center;
  background: #ffffff;
  border-radius: 18px;
}

.empty-state.is-visible {
  display: block;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 88px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(63, 54, 48, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(63, 54, 48, 0.14);
}

.rank-number {
  color: #cb6f3f;
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 88px;
  height: 66px;
  object-fit: cover;
  background: #d1ccc9;
  border-radius: 12px;
}

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

.rank-content strong,
.rank-content span {
  display: block;
}

.rank-content strong {
  margin-bottom: 6px;
  color: #2f2925;
  font-size: 18px;
}

.rank-content span {
  overflow: hidden;
  color: #6f6762;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  color: #8c837e;
  font-size: 14px;
  white-space: nowrap;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #7a706b;
  font-size: 14px;
}

.breadcrumb a {
  color: #a95636;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 24px;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.24);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.32));
  transition: opacity 0.25s ease;
}

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

.player-cover span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding-left: 4px;
  color: #fff;
  background: #cb6f3f;
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(203, 111, 63, 0.4);
}

.player-cover strong {
  font-size: 20px;
}

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

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

.detail-card,
.side-card {
  padding: 26px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(63, 54, 48, 0.1);
}

.detail-title {
  margin-top: 26px;
  margin-bottom: 16px;
}

.detail-meta {
  margin-bottom: 24px;
}

.detail-meta span {
  color: #5f5550;
  background: #f1e8df;
}

.detail-summary,
.detail-review,
.tag-block {
  margin-top: 24px;
}

.detail-summary h2,
.detail-review h2,
.tag-block h2,
.side-card h2 {
  margin: 0 0 12px;
  color: #2f2925;
  font-size: 22px;
}

.detail-review p {
  padding: 18px;
  background: #f8f4ef;
  border-left: 4px solid #cb6f3f;
  border-radius: 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  padding: 7px 12px;
  color: #5f5550;
  background: #f1e8df;
  border-radius: 999px;
  font-size: 14px;
}

.side-card {
  position: sticky;
  top: 96px;
}

.mini-list {
  display: grid;
  gap: 14px;
}

.mini-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.mini-card img {
  width: 112px;
  height: 74px;
  object-fit: cover;
  background: #d1ccc9;
  border-radius: 14px;
}

.mini-card strong,
.mini-card small {
  display: block;
}

.mini-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: #2f2925;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-card small {
  margin-top: 5px;
  color: #8c837e;
}

.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.prev-next a {
  padding: 14px;
  background: #f8f4ef;
  border-radius: 14px;
}

.prev-next small,
.prev-next strong {
  display: block;
}

.prev-next small {
  color: #8c837e;
}

.prev-next strong {
  overflow: hidden;
  color: #2f2925;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.site-footer {
  color: #d6d3d1;
  background: #251f1c;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 30px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
}

.footer-brand {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
}

.footer-inner p {
  max-width: 620px;
  margin: 0;
  line-height: 1.75;
}

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

.footer-links a:hover {
  color: #e1a06a;
}

@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-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .side-card {
    position: relative;
    top: auto;
  }
}

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

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

  .header-inner {
    height: 64px;
  }

  .brand-name {
    font-size: 19px;
  }

  .hero,
  .hero-inner {
    min-height: 86vh;
  }

  .hero-inner {
    padding-top: 58px;
  }

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

  .rank-row {
    grid-template-columns: 42px 72px minmax(0, 1fr);
  }

  .rank-row img {
    width: 72px;
    height: 58px;
  }

  .rank-meta {
    display: none;
  }
}

@media (max-width: 620px) {
  .main-section,
  .page-hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .movie-card-body {
    padding: 13px;
  }

  .movie-card-body strong {
    font-size: 15px;
  }

  .hero-panel {
    padding: 14px;
  }

  .hero-thumb {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .hero-thumb img {
    width: 68px;
    height: 58px;
  }

  .section-header,
  .filter-bar,
  .search-panel,
  .footer-inner {
    display: block;
  }

  .section-link {
    display: inline-flex;
    margin-top: 12px;
  }

  .filter-input,
  .search-panel input {
    width: 100%;
  }

  .search-panel button {
    width: 100%;
    margin-top: 10px;
  }

  .prev-next {
    grid-template-columns: 1fr;
  }

  .footer-links {
    margin-top: 24px;
  }
}
