* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: #292524;
  background: #fafaf9;
  line-height: 1.6;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #1c1917;
}

.brand-name {
  font-size: 20px;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #047857);
  box-shadow: 0 10px 28px rgba(2, 132, 199, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: #57534e;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #0284c7;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-button,
.menu-button {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  color: #57534e;
  background: #f5f5f4;
  transition: all 0.2s ease;
}

.search-button:hover,
.menu-button:hover {
  color: #0369a1;
  background: #e0f2fe;
}

.menu-button {
  display: none;
}

.nav-search {
  display: none;
  padding: 0 0 18px;
}

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

.nav-search-form,
.hero-search,
.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.input-field {
  width: 100%;
  border: 1px solid #d6d3d1;
  border-radius: 12px;
  padding: 12px 16px;
  color: #292524;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
}

.btn-primary,
.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 12px 22px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: #0284c7;
}

.btn-primary:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

.btn-glass {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-slider {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: #0c0a09;
}

.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;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.05));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 720px;
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 12px;
  color: #38bdf8;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
}

.hero-content p:not(.hero-kicker) {
  max-width: 640px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

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

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

.hero-dot.active {
  width: 32px;
  background: #ffffff;
}

.intro-band {
  padding: 42px 0 22px;
  background: linear-gradient(135deg, #f0f9ff, #ecfdf5);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: center;
}

.intro-grid h1,
.page-hero h1 {
  margin: 0 0 12px;
  color: #1c1917;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.intro-grid p,
.page-hero p {
  margin: 0;
  color: #57534e;
}

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

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

.section-heading h2 {
  margin: 0;
  color: #1c1917;
  font-size: 26px;
  line-height: 1.2;
}

.section-heading-actions {
  align-items: center;
}

.text-link {
  color: #0284c7;
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
}

.movie-link {
  display: block;
  height: 100%;
}

.movie-thumb {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: #e7e5e4;
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.rank-badge {
  left: 10px;
  right: auto;
  background: #0284c7;
}

.movie-info {
  padding: 16px;
}

.movie-info h2 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #1c1917;
  font-size: 16px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-info h2 {
  color: #0284c7;
}

.movie-info p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #57534e;
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #78716c;
  font-size: 12px;
}

.movie-meta span {
  border-radius: 999px;
  padding: 3px 9px;
  background: #f5f5f4;
}

.movie-meta.light span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 2px 0 12px;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.rail-item {
  flex: 0 0 288px;
  scroll-snap-align: start;
}

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

.rail-controls button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #44403c;
  background: #f5f5f4;
}

.rail-controls button:hover {
  color: #0369a1;
  background: #e0f2fe;
}

.featured-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.featured-side {
  display: grid;
  gap: 22px;
}

.movie-card-horizontal .movie-link {
  display: grid;
  grid-template-columns: 190px 1fr;
}

.horizontal-thumb {
  height: 100%;
  min-height: 172px;
}

.large-thumb {
  height: 366px;
}

.large-card-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 28px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12));
}

.large-card-overlay h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.large-card-overlay p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.9);
}

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

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

.category-card {
  position: relative;
  display: grid;
  min-height: 230px;
  overflow: hidden;
  border-radius: 18px;
  color: #ffffff;
  background: #0c0a09;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.category-card:hover img {
  transform: scale(1.06);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.2));
}

.category-card div {
  position: relative;
  z-index: 1;
  align-self: end;
  padding: 22px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.page-hero {
  padding: 80px 0 54px;
}

.simple-hero {
  color: #ffffff;
  background: radial-gradient(circle at 20% 10%, rgba(14, 165, 233, 0.5), transparent 32%), linear-gradient(135deg, #0c4a6e, #064e3b);
}

.simple-hero h1,
.simple-hero p {
  color: #ffffff;
}

.filter-panel {
  grid-template-columns: 1fr 180px 160px;
  margin-bottom: 26px;
}

.empty-state {
  margin-top: 24px;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  color: #57534e;
  background: #ffffff;
}

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

.ranking-list .movie-card-horizontal .movie-link {
  grid-template-columns: 170px 1fr;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  color: #ffffff;
  background: #0c0a09;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(1.08);
  transform: scale(1.04);
}

.detail-bg-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.28));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: center;
  min-height: 540px;
  padding: 56px 0;
}

.detail-cover {
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #38bdf8;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
}

.detail-tags span {
  border-radius: 999px;
  padding: 6px 11px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.16);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.2));
  z-index: 2;
}

.player-overlay[hidden] {
  display: none;
}

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  color: #0284c7;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25);
}

.detail-article,
.side-card {
  margin-top: 24px;
  border-radius: 18px;
  padding: 26px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.detail-article h2,
.side-card h2 {
  margin: 0 0 14px;
  color: #1c1917;
  font-size: 23px;
}

.detail-article p {
  margin: 0 0 24px;
  color: #44403c;
}

.detail-article p:last-child {
  margin-bottom: 0;
}

.side-card dl {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px 14px;
  margin: 0;
}

.side-card dt {
  color: #78716c;
}

.side-card dd {
  margin: 0;
  color: #292524;
  font-weight: 700;
}

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

.site-footer {
  margin-top: 56px;
  color: #d6d3d1;
  background: #1c1917;
}

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

.footer-brand {
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 18px;
}

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

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #d6d3d1;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  border-top: 1px solid #292524;
  padding: 18px;
  text-align: center;
  color: #a8a29e;
}

@media (min-width: 768px) {
  .hero-slider {
    height: 600px;
  }
}

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

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

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

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

  .nav-links {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 0 0 18px 18px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    padding: 12px;
  }

  .hero-slider {
    height: 540px;
  }

  .hero-content {
    max-width: none;
    padding-right: 54px;
    padding-left: 6px;
  }

  .hero-arrow {
    width: 36px;
    height: 36px;
  }

  .intro-grid,
  .featured-layout,
  .footer-grid,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-search,
  .nav-search-form,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .movie-card-horizontal .movie-link,
  .ranking-list .movie-card-horizontal .movie-link {
    grid-template-columns: 140px 1fr;
  }

  .detail-cover {
    max-width: 280px;
  }
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 17px;
  }

  .search-button {
    display: none;
  }

  .hero-slider {
    height: 520px;
  }

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

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .category-grid,
  .rank-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rail-item {
    flex-basis: 78vw;
  }

  .movie-card-horizontal .movie-link,
  .ranking-list .movie-card-horizontal .movie-link {
    grid-template-columns: 1fr;
  }

  .horizontal-thumb {
    height: 210px;
  }

  .detail-hero-inner {
    padding: 36px 0;
  }

  .detail-tags span {
    font-size: 13px;
  }
}
