* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #e2e8f0;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.35);
  backdrop-filter: blur(14px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1280px);
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 20px;
}

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

.brand-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.25);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08);
}

.brand-text,
.footer-brand {
  font-size: 21px;
  background: linear-gradient(90deg, #22d3ee, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #e2e8f0;
  font-weight: 600;
}

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

.nav-links a:hover,
.mobile-links a:hover,
.footer-links a:hover,
.movie-card h3 a:hover {
  color: #22d3ee;
}

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

.nav-search input,
.mobile-search input,
.search-hero input {
  width: 260px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 999px;
  outline: none;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.78);
  padding: 10px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.search-hero input:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
  background: rgba(15, 23, 42, 0.88);
}

.nav-search button,
.mobile-search button,
.search-hero button,
.cta-primary,
.cta-secondary,
.player-start {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.nav-search button,
.mobile-search button,
.search-hero button {
  padding: 10px 18px;
  font-weight: 700;
}

.nav-search button:hover,
.mobile-search button:hover,
.search-hero button:hover,
.cta-primary:hover,
.cta-secondary:hover,
.player-start:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.3);
  filter: brightness(1.06);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.72);
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(71, 85, 105, 0.6);
  background: rgba(15, 23, 42, 0.98);
  padding: 16px 24px 24px;
}

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

.mobile-search {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.mobile-search input {
  width: 100%;
}

.mobile-links {
  display: grid;
  gap: 12px;
  color: #cbd5e1;
  font-weight: 600;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.16) 100%);
}

.hero-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.hero-badge,
.category-badge,
.meta-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.92);
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  max-width: 820px;
  margin: 18px 0 16px;
  color: #ffffff;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

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

.cta-primary,
.cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 26px;
  font-weight: 800;
}

.cta-secondary {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.68);
  transform: translateY(-50%) scale(1.06);
}

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

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

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

.hero-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #22d3ee;
}

.page-shell,
.content-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 64px 24px;
}

.content-shell {
  padding-top: 40px;
}

.home-sections {
  display: grid;
  gap: 80px;
}

.feature-panel,
.category-card,
.detail-panel,
.player-card,
.search-box,
.ranking-list {
  border: 1px solid rgba(71, 85, 105, 0.56);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.46);
  box-shadow: 0 22px 70px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(12px);
}

.feature-panel {
  padding: 32px;
}

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

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(26px, 3vw, 34px);
}

.section-heading h2 span {
  width: 5px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, #22d3ee, #2563eb);
}

.section-more {
  color: #67e8f9;
  font-weight: 700;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.58);
  box-shadow: 0 12px 35px rgba(2, 6, 23, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  background: rgba(51, 65, 85, 0.72);
  box-shadow: 0 22px 50px rgba(6, 182, 212, 0.16);
  transform: translateY(-5px);
}

.poster-wrap,
.large-cover,
.horizontal-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #334155;
}

.poster-wrap {
  aspect-ratio: 3 / 4;
}

.large-cover {
  aspect-ratio: 16 / 9;
}

.horizontal-cover {
  width: 190px;
  flex: 0 0 190px;
}

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

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.85);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body,
.horizontal-body {
  padding: 18px;
}

.card-body h3,
.horizontal-body h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
}

.card-body p,
.horizontal-body p {
  display: -webkit-box;
  margin: 0 0 14px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.mini-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
}

.card-meta a,
.mini-meta a {
  color: #22d3ee;
}

.movie-card-large {
  position: relative;
}

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.08));
}

.movie-card-large .category-badge {
  position: absolute;
  left: 18px;
  top: 18px;
}

.large-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 10px;
  padding: 26px;
}

.large-copy strong {
  color: #ffffff;
  font-size: 25px;
  line-height: 1.25;
}

.large-copy em {
  color: #cbd5e1;
  font-size: 15px;
  font-style: normal;
  line-height: 1.6;
}

.movie-card-horizontal {
  display: flex;
  min-height: 180px;
}

.scroller {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  scrollbar-color: #334155 transparent;
}

.scroller .movie-card {
  width: 250px;
  flex: 0 0 250px;
}

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

.category-card {
  display: grid;
  min-height: 185px;
  padding: 26px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-card:hover {
  border-color: rgba(34, 211, 238, 0.8);
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.24), rgba(37, 99, 235, 0.16));
  transform: translateY(-4px);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.category-card p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.7;
}

.page-hero {
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.94), rgba(51, 65, 85, 0.72));
  border-bottom: 1px solid rgba(71, 85, 105, 0.5);
}

.page-hero-inner {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 64px 24px;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 16px;
  color: #ffffff;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 850px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.ranking-list {
  overflow: hidden;
}

.ranking-row {
  display: grid;
  grid-template-columns: 72px 110px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(71, 85, 105, 0.42);
}

.ranking-row:last-child {
  border-bottom: 0;
}

.rank-num {
  color: #22d3ee;
  font-size: 28px;
  font-weight: 900;
}

.ranking-row img {
  width: 110px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  object-fit: cover;
}

.rank-copy h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 21px;
}

.rank-copy p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.6;
}

.detail-layout {
  display: grid;
  gap: 34px;
}

.player-card {
  overflow: hidden;
}

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

.player-shell video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  font-size: 18px;
  font-weight: 800;
  transform: translate(-50%, -50%);
}

.play-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.player-shell.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
}

.detail-panel {
  padding: 32px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a {
  color: #67e8f9;
}

.detail-title {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.detail-meta span,
.detail-meta a {
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.72);
  padding: 8px 12px;
  font-size: 14px;
}

.detail-meta a {
  color: #67e8f9;
}

.detail-block {
  margin-top: 28px;
}

.detail-block h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 23px;
}

.detail-block p {
  margin: 0;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.9;
}

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

.tag-cloud span {
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.78);
  padding: 8px 13px;
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 32px;
}

.prev-next a {
  flex: 1;
  border: 1px solid rgba(71, 85, 105, 0.54);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.52);
  padding: 18px;
  color: #cbd5e1;
}

.prev-next a:hover {
  border-color: rgba(34, 211, 238, 0.7);
  color: #ffffff;
}

.search-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.search-hero input {
  width: min(100%, 520px);
}

.search-box {
  min-height: 340px;
  padding: 28px;
}

.search-status {
  color: #94a3b8;
  margin-bottom: 24px;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(71, 85, 105, 0.5);
  background: rgba(2, 6, 23, 0.36);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  gap: 36px;
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 42px 24px 24px;
}

.footer-inner p {
  max-width: 680px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 12px 18px;
  color: #cbd5e1;
}

.copyright {
  margin: 0;
  padding: 0 24px 34px;
  text-align: center;
  color: #64748b;
}

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

  .nav-toggle {
    display: block;
  }

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

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

@media (max-width: 860px) {
  .hero {
    min-height: 560px;
  }

  .hero-copy {
    padding: 42px 22px 74px;
  }

  .hero-control {
    width: 40px;
    height: 40px;
  }

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

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

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

  .feature-panel,
  .detail-panel {
    padding: 22px;
  }

  .movie-card-horizontal {
    display: block;
  }

  .horizontal-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .ranking-row {
    grid-template-columns: 48px 86px 1fr;
  }

  .ranking-row .cta-secondary {
    grid-column: 2 / 4;
    width: max-content;
  }

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

@media (max-width: 560px) {
  .nav-inner {
    padding: 0 16px;
  }

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

  .hero {
    height: 74vh;
  }

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

  .cta-primary,
  .cta-secondary {
    width: 100%;
  }

  .page-shell,
  .content-shell,
  .page-hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .feature-panel {
    border-radius: 18px;
    padding: 18px;
  }

  .grid-3,
  .grid-4,
  .grid-5,
  .movie-list-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 40px 78px 1fr;
    gap: 12px;
    padding: 16px;
  }

  .rank-copy h2 {
    font-size: 18px;
  }

  .player-start {
    white-space: nowrap;
    font-size: 16px;
  }
}
