* {
  box-sizing: border-box;
}

:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(28, 25, 23, 0.08);
  --shadow-md: 0 16px 40px rgba(28, 25, 23, 0.14);
  --shadow-lg: 0 28px 70px rgba(28, 25, 23, 0.24);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--stone-800);
  background: linear-gradient(180deg, var(--stone-50), var(--stone-100));
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--stone-800), var(--stone-700), var(--stone-800));
  box-shadow: var(--shadow-md);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: var(--stone-900);
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-500), #fbbf24);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 21px;
  letter-spacing: 0.03em;
}

.brand-text small {
  color: #d6d3d1;
  font-size: 12px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #e7e5e4;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: var(--amber-600);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
}

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

.hero-slider,
.hero-slide,
.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transform: scale(1.03);
}

.hero-shade {
  background:
    radial-gradient(circle at 78% 25%, rgba(245, 158, 11, 0.32), transparent 30%),
    linear-gradient(90deg, rgba(28, 25, 23, 0.96) 0%, rgba(28, 25, 23, 0.72) 42%, rgba(28, 25, 23, 0.24) 100%),
    linear-gradient(0deg, var(--stone-900) 0%, rgba(28, 25, 23, 0.1) 46%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: end;
  gap: 52px;
  padding-bottom: 70px;
  color: var(--white);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-600);
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 700px;
  margin: 0 0 22px;
  color: #e7e5e4;
  font-size: 18px;
}

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

.hero-tags {
  margin-bottom: 26px;
}

.hero-tags a,
.hero-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #f5f5f4;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
}

.primary-btn,
.ghost-btn,
.section-more,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.primary-btn:hover,
.search-form button:hover {
  background: var(--amber-500);
  transform: translateY(-2px);
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

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

.hero-poster {
  align-self: end;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  transform: rotate(1deg);
}

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

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--amber-500);
}

.feature-strip {
  padding: 38px 0 8px;
}

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

.content-section {
  padding: 58px 0;
}

.white-section {
  background: var(--white);
}

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

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.15;
}

.section-head p {
  margin: 0;
  color: var(--stone-600);
}

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

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

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

.movie-card {
  height: 100%;
}

.movie-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.movie-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--stone-800);
}

.movie-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

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

.movie-link:hover .movie-thumb::after {
  opacity: 1;
}

.movie-badge,
.movie-time {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 4px 9px;
  border-radius: 8px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.movie-badge {
  left: 10px;
  background: var(--amber-600);
}

.movie-time {
  right: 10px;
  background: rgba(28, 25, 23, 0.82);
  backdrop-filter: blur(10px);
}

.movie-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.movie-info h3 {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--stone-800);
  font-size: 17px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-info p {
  display: -webkit-box;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--stone-600);
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  color: var(--stone-500);
  font-size: 13px;
}

.movie-card-large .movie-info h3 {
  font-size: 20px;
}

.search-section {
  padding: 24px 0 48px;
}

.search-panel,
.search-box-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--stone-800), var(--stone-700));
  box-shadow: var(--shadow-md);
}

.search-panel h2,
.search-box-wide h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.search-panel p {
  margin: 0;
  color: #d6d3d1;
}

.search-form {
  display: flex;
  width: min(100%, 520px);
  gap: 10px;
}

.search-form input,
.category-filter {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  padding: 0 16px;
  outline: none;
  background: var(--white);
}

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

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 20px;
  color: var(--white);
  background: var(--stone-800);
  box-shadow: var(--shadow-sm);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img {
  opacity: 0.64;
  transform: scale(1.08);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(28, 25, 23, 0.96), rgba(28, 25, 23, 0.12));
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 1;
  display: block;
}

.category-tile span {
  margin: 118px 18px 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 0 18px 18px;
  color: #e7e5e4;
  font-size: 14px;
}

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

.rank-card a {
  position: relative;
  display: grid;
  min-height: 150px;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  border-radius: 18px;
  padding: 12px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.rank-card img {
  width: 126px;
  height: 126px;
  border-radius: 14px;
  object-fit: cover;
}

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

.rank-card p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--stone-600);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-card span:not(.rank-num) {
  color: var(--stone-500);
  font-size: 12px;
}

.rank-num {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: var(--white);
  font-weight: 900;
  background: var(--amber-600);
}

.page-hero {
  padding: 76px 0 68px;
  color: var(--white);
  background:
    radial-gradient(circle at 78% 14%, rgba(245, 158, 11, 0.28), transparent 32%),
    linear-gradient(120deg, var(--stone-900), var(--stone-700));
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #e7e5e4;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: #e7e5e4;
  font-size: 14px;
}

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

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.category-filter {
  max-width: 520px;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.search-result-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.search-result-card img {
  width: 110px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
}

.search-result-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.search-result-card p {
  margin: 0 0 6px;
  color: var(--stone-600);
  font-size: 14px;
}

.search-result-card span {
  color: var(--stone-500);
  font-size: 13px;
}

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

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

.side-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.side-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

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

.side-links a {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--stone-700);
  background: var(--stone-100);
}

.side-links a:hover {
  color: var(--white);
  background: var(--amber-600);
}

.detail-hero {
  padding: 34px 0 56px;
  color: var(--white);
  background:
    radial-gradient(circle at 74% 14%, rgba(245, 158, 11, 0.28), transparent 34%),
    linear-gradient(135deg, var(--stone-900), var(--stone-700));
}

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

.player-card {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  background: #000000;
}

.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.14));
  cursor: pointer;
}

.play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: var(--amber-600);
  box-shadow: 0 18px 45px rgba(217, 119, 6, 0.45);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 25px solid var(--white);
}

.detail-side {
  overflow: hidden;
  border-radius: 24px;
  color: var(--stone-800);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.detail-side img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.detail-meta-card {
  padding: 22px;
}

.detail-meta-card h1 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.2;
}

.detail-meta-card p {
  margin: 0 0 16px;
  color: var(--stone-600);
}

.detail-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-meta-list span {
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--stone-700);
  background: var(--stone-100);
  font-size: 13px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.detail-article {
  max-width: 900px;
  padding: 32px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.detail-article h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 22px;
  color: var(--stone-700);
  font-size: 17px;
}

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

.tag-list span {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--amber-700);
  background: var(--amber-100);
  font-weight: 700;
}

.site-footer {
  color: #e7e5e4;
  background: var(--stone-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0;
}

.footer-brand {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  color: #d6d3d1;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-links a {
  color: #d6d3d1;
}

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

.footer-bottom {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #d6d3d1;
}

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

@media (max-width: 1080px) {
  .movie-grid,
  .category-grid,
  .rank-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-poster {
    display: none;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 18px;
    background: var(--stone-800);
  }

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

  .nav-link {
    padding: 12px 14px;
  }

  .hero {
    min-height: 600px;
  }

  .hero-content {
    padding-bottom: 86px;
  }

  .feature-grid,
  .movie-grid,
  .category-grid,
  .rank-grid,
  .rank-list,
  .search-results,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .search-panel,
  .search-box-wide,
  .filter-bar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .search-form {
    width: 100%;
  }
}

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

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

  .feature-grid,
  .movie-grid,
  .category-grid,
  .rank-grid,
  .rank-list,
  .search-results,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-card a,
  .search-result-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .rank-card img,
  .search-result-card img {
    width: 96px;
    height: 96px;
  }

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

  .detail-article {
    padding: 22px;
  }
}
