
:root {
  --primary-900: #333d4f;
  --primary-800: #39475d;
  --primary-700: #42536f;
  --primary-600: #506688;
  --primary-100: #ebeef3;
  --accent-500: #eab308;
  --accent-400: #facc15;
  --neutral-950: #101622;
  --neutral-900: #171717;
  --neutral-700: #404040;
  --neutral-600: #525252;
  --neutral-300: #d4d4d4;
  --neutral-200: #e5e5e5;
  --neutral-100: #f5f5f5;
  --neutral-50: #fafafa;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 12px 28px rgba(16, 22, 34, 0.14);
  --shadow-lg: 0 24px 60px rgba(16, 22, 34, 0.26);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--neutral-900);
  background: var(--neutral-50);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.68;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 229, 229, 0.8);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-900);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-logo {
  font-size: 22px;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--primary-900);
  background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(234, 179, 8, 0.26);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--neutral-700);
  font-weight: 700;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary-600);
}

.top-search,
.search-form,
.inline-search,
.big-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.search-form input,
.inline-search input,
.big-search input,
.movie-filter {
  border: 1px solid var(--neutral-300);
  border-radius: 12px;
  background: var(--white);
  color: var(--neutral-900);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input,
.search-form input {
  width: 235px;
  padding: 10px 12px;
}

.top-search input:focus,
.search-form input:focus,
.inline-search input:focus,
.big-search input:focus,
.movie-filter:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(80, 102, 136, 0.18);
}

.top-search button,
.search-form button,
.inline-search button,
.big-search button {
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.top-search button:hover,
.search-form button:hover,
.inline-search button:hover,
.big-search button:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: var(--neutral-100);
  color: var(--primary-900);
  padding: 10px 13px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--neutral-200);
  padding: 16px;
  background: var(--white);
}

.mobile-panel a {
  display: block;
  padding: 10px 0;
  color: var(--neutral-700);
  font-weight: 700;
}

.mobile-panel.is-open {
  display: block;
}

.hero-carousel {
  position: relative;
  background: var(--neutral-950);
}

.hero-stage {
  position: relative;
  height: 560px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transition: opacity 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
}

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  color: var(--accent-400);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 12px 0 16px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content h2 + p,
.hero-content p {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--primary-900);
  background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
  box-shadow: 0 14px 30px rgba(234, 179, 8, 0.26);
}

.btn-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  font-size: 34px;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 28px;
  background: var(--accent-400);
}

.section-block {
  padding: 70px 0;
}

.muted-block {
  background: var(--primary-100);
}

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

.section-head h2,
.page-hero h1,
.rank-panel h2,
.content-card h2,
.info-card h2 {
  margin: 6px 0 0;
  color: var(--primary-900);
  line-height: 1.15;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-head a,
.chip-row a,
.side-link {
  color: var(--primary-600);
  font-weight: 900;
}

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

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(229, 229, 229, 0.84);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5.15;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-900), var(--primary-600));
}

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

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

.movie-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.72));
  opacity: 0.85;
}

.movie-year,
.movie-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.movie-year {
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.movie-play {
  left: 12px;
  bottom: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--primary-900);
  background: var(--accent-400);
}

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

.movie-title {
  color: var(--primary-900);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-title:hover {
  color: var(--primary-600);
}

.movie-meta {
  color: var(--neutral-600);
  font-size: 13px;
}

.movie-info p {
  margin: 0;
  color: var(--neutral-700);
  font-size: 14px;
}

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

.category-tile {
  display: flex;
  min-height: 188px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--radius);
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-900), var(--primary-600));
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-tile span {
  color: var(--accent-400);
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 600;
}

.tile-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 18px;
}

.tile-covers img {
  aspect-ratio: 3 / 4;
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

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

.in-panel {
  margin-bottom: 20px;
}

.rank-panel,
.content-card,
.info-card,
.filter-panel {
  border: 1px solid rgba(229, 229, 229, 0.84);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.rank-panel {
  position: sticky;
  top: 88px;
  padding: 22px;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: var(--neutral-50);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: var(--primary-100);
  transform: translateX(3px);
}

.rank-num {
  color: var(--accent-500);
  font-size: 18px;
  font-weight: 900;
}

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

.rank-text strong,
.rank-text em {
  display: block;
}

.rank-text strong {
  color: var(--primary-900);
  font-size: 15px;
}

.rank-text em {
  color: var(--neutral-600);
  font-size: 12px;
  font-style: normal;
}

.page-hero,
.detail-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-900), var(--primary-600));
  background-position: center;
  background-size: cover;
}

.page-hero {
  padding: 86px 0;
}

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

.page-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.crumb a:hover {
  color: var(--accent-400);
}

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

.filter-panel.stacked {
  display: block;
}

.inline-search input {
  min-width: 280px;
  padding: 12px 14px;
}

.chip-row,
.select-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip-row a {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--primary-100);
}

.movie-filter {
  min-width: 160px;
  padding: 12px 14px;
}

.big-search {
  max-width: 680px;
  margin-top: 26px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

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

.detail-hero {
  padding: 44px 0 70px;
}

.detail-hero-content {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  width: 240px;
  aspect-ratio: 4 / 5.3;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}

.detail-hero h1 {
  margin: 8px 0 14px;
  color: var(--white);
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
}

.detail-hero p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 26px;
}

.detail-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--primary-900);
  background: rgba(250, 204, 21, 0.92);
  font-size: 13px;
  font-weight: 900;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(16, 22, 34, 0.26), rgba(16, 22, 34, 0.82));
  cursor: pointer;
}

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

.big-play {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 999px;
  color: var(--primary-900);
  background: var(--accent-400);
  font-size: 36px;
  box-shadow: 0 18px 50px rgba(250, 204, 21, 0.26);
}

.player-layer strong,
.player-layer em {
  display: block;
  text-align: center;
}

.player-layer strong {
  font-size: 24px;
}

.player-layer em {
  color: rgba(255, 255, 255, 0.72);
  font-style: normal;
}

.content-card,
.info-card {
  padding: 24px;
}

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

.content-card p {
  color: var(--neutral-700);
  font-size: 17px;
}

.detail-side {
  display: grid;
  gap: 18px;
}

.info-card dl {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 12px 16px;
  margin: 18px 0 0;
}

.info-card dt {
  color: var(--neutral-600);
}

.info-card dd {
  margin: 0;
  color: var(--primary-900);
  font-weight: 800;
}

.side-link {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--neutral-200);
}

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

.empty-state {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  padding: 26px;
  border-radius: var(--radius);
  color: var(--neutral-700);
  background: var(--white);
  text-align: center;
}

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

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: var(--primary-900);
  padding: 44px 0;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

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

.footer-grid p {
  max-width: 620px;
  margin: 12px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-weight: 800;
}

.footer-links a:hover {
  color: var(--accent-400);
}

@media (max-width: 1120px) {
  .top-search {
    display: none;
  }

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

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

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

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

  .hero-stage {
    height: 600px;
  }

  .hero-control {
    display: none;
  }

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

  .rank-panel {
    position: static;
  }

  .detail-poster {
    width: 180px;
  }

  .filter-panel,
  .section-head,
  .footer-grid {
    align-items: stretch;
    flex-direction: column;
  }

  .big-search,
  .inline-search {
    width: 100%;
  }

  .inline-search input,
  .big-search input {
    min-width: 0;
    width: 100%;
  }
}

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

  .site-logo {
    font-size: 18px;
  }

  .hero-stage {
    height: 560px;
  }

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

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .all-grid,
  .category-grid,
  .rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-title {
    font-size: 15px;
  }

  .category-tile {
    min-height: 168px;
  }

  .detail-poster {
    width: 150px;
  }

  .content-card,
  .info-card {
    padding: 18px;
  }

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