* {
  box-sizing: border-box;
}

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: #0f172a;
  background: #f8fafc;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.brand-text,
.footer-brand {
  font-size: 20px;
  line-height: 1;
  background: linear-gradient(135deg, #0891b2, #2563eb);
  -webkit-background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  overflow: hidden;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #0891b2;
  background: #ecfeff;
}

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

.nav-search input,
.mobile-panel input,
.filter-bar input,
.filter-bar select {
  height: 40px;
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  padding: 0 16px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
}

.nav-search button,
.mobile-panel button {
  height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: 0;
  background: transparent;
  padding: 10px;
  cursor: pointer;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: #0f172a;
  border-radius: 10px;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-panel a,
.mobile-panel form {
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px 14px;
  font-weight: 700;
  color: #334155;
}

.mobile-panel form {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  flex: 1;
}

.hero-slider {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.1)),
              linear-gradient(0deg, rgba(2, 6, 23, 0.98), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 980px;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 110px 24px 140px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  color: #67e8f9;
}

.eyebrow.dark {
  color: #0891b2;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0 0 20px;
  font-size: clamp(44px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 720px;
  margin: 0 0 30px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
}

.primary-button.small {
  min-height: 42px;
}

.ghost-button {
  min-height: 48px;
  padding: 0 22px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.ghost-button.dark {
  color: #0f172a;
  border-color: #cbd5e1;
  background: #ffffff;
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-size: 42px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.hero-quick-links {
  position: absolute;
  right: 32px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: 520px;
}

.hero-quick-links a {
  border-radius: 999px;
  padding: 9px 14px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.section-shell,
.page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

.section-shell.no-top {
  padding-top: 0;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-heading p,
.page-hero p,
.category-overview-head p {
  max-width: 760px;
  color: #64748b;
  line-height: 1.8;
}

.section-heading.split,
.category-overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
}

.text-link {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 0 18px;
  color: #0891b2;
  background: #ecfeff;
}

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

.feature-card {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border-radius: 28px;
  background: #e2e8f0;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.14);
}

.feature-card img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.feature-layer {
  position: absolute;
  inset: auto 0 0;
  padding: 90px 24px 24px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.feature-layer h2 {
  margin: 10px 0;
  font-size: 26px;
}

.feature-layer p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.7;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.06);
}

.year-badge,
.score-badge {
  position: absolute;
  top: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  background: rgba(8, 145, 178, 0.9);
  backdrop-filter: blur(10px);
}

.year-badge {
  left: 10px;
}

.score-badge {
  right: 10px;
  background: rgba(245, 158, 11, 0.92);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.68);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-body {
  padding: 16px;
}

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

.movie-body h2 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.3;
}

.movie-body h2 a:hover {
  color: #0891b2;
}

.movie-meta,
.movie-desc {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.movie-desc {
  margin-top: 8px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 8px;
  color: #0e7490;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 700;
}

.soft-panel {
  max-width: none;
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
}

.soft-panel > * {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

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

.category-tile,
.category-overview,
.page-hero,
.detail-hero,
.watch-section,
.detail-content article {
  border: 1px solid rgba(203, 213, 225, 0.7);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.07);
}

.category-tile {
  padding: 24px;
}

.category-title {
  display: inline-flex;
  margin-bottom: 12px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

.category-tile p {
  margin: 0 0 16px;
  color: #64748b;
  line-height: 1.7;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-links a {
  border-radius: 999px;
  padding: 7px 10px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 800;
}

.rank-list,
.wide-rank-list {
  display: grid;
  gap: 12px;
}

.rank-row,
.wide-rank-row {
  display: grid;
  align-items: center;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.rank-row {
  grid-template-columns: 64px 58px 1fr auto;
  gap: 14px;
  padding: 12px;
}

.rank-row img,
.wide-rank-row img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
  background: #e2e8f0;
}

.rank-num {
  color: #0891b2;
  font-size: 18px;
  font-weight: 900;
}

.rank-title {
  font-weight: 900;
}

.rank-meta {
  color: #64748b;
  font-size: 14px;
}

.page-main {
  padding-top: 42px;
}

.page-hero {
  padding: 46px;
  margin-bottom: 36px;
}

.page-hero.slim {
  padding: 38px;
}

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

.category-overview {
  padding: 28px;
  margin-bottom: 28px;
}

.category-overview-head {
  margin-bottom: 22px;
}

.category-overview-head h2 {
  margin: 0;
  font-size: 30px;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.filter-bar input {
  flex: 1;
  min-width: 0;
}

.filter-bar select {
  min-width: 160px;
}

.empty-result {
  display: none;
  border-radius: 22px;
  padding: 40px;
  text-align: center;
  color: #64748b;
  background: #ffffff;
}

.empty-result.show {
  display: block;
}

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

.top-rank-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border-radius: 28px;
  color: #ffffff;
  background: #020617;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.16);
}

.top-rank-card img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 0.35s ease;
}

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

.rank-crown {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
}

.top-rank-card div {
  position: absolute;
  inset: auto 0 0;
  padding: 70px 18px 18px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent);
}

.top-rank-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.top-rank-card p {
  color: #dbeafe;
  line-height: 1.6;
}

.wide-rank-row {
  grid-template-columns: 80px 70px 1fr;
  gap: 16px;
  padding: 14px;
}

.wide-rank-row h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.wide-rank-row p {
  margin: 0 0 6px;
  color: #64748b;
}

.wide-rank-row span:last-child {
  color: #0891b2;
  font-size: 13px;
  font-weight: 800;
}

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

.detail-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #0891b2;
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  padding: 30px;
  margin-bottom: 32px;
}

.detail-poster img {
  width: 100%;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #e2e8f0;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
  color: #475569;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #0f172a;
  background: #f1f5f9;
  font-weight: 800;
}

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

.watch-section {
  padding: 28px;
  margin-bottom: 30px;
}

.watch-section h2 {
  margin: 0 0 18px;
  font-size: 30px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  aspect-ratio: 16 / 9;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.24));
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

.player-play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.34);
}

.player-shell.is-playing .player-overlay {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-content article {
  padding: 28px;
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.detail-content p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
}

.detail-related {
  padding-left: 0;
  padding-right: 0;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  margin-top: 40px;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
  padding: 50px 24px 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 22px;
  font-weight: 900;
}

.footer-brand span {
  color: #22d3ee;
}

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

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

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 10px 0;
}

.site-footer a:hover {
  color: #67e8f9;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  padding: 22px 24px 30px;
  color: #94a3b8;
}

.hidden-card {
  display: none !important;
}

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

  .menu-toggle {
    display: flex;
  }

  .nav-search {
    margin-left: auto;
  }

  .site-header.menu-open .mobile-panel {
    display: grid;
  }

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

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

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

  .hero-slider,
  .hero-content {
    min-height: 620px;
  }

  .hero-arrow,
  .hero-quick-links {
    display: none;
  }

  .feature-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .home-grid,
  .small-grid,
  .search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .section-heading.split,
  .category-overview-head,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .page-hero,
  .category-overview,
  .detail-hero,
  .watch-section,
  .detail-content article {
    padding: 22px;
    border-radius: 22px;
  }

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

  .detail-poster {
    max-width: 260px;
  }

  .rank-row {
    grid-template-columns: 48px 54px 1fr;
  }

  .rank-meta {
    display: none;
  }

  .wide-rank-row {
    grid-template-columns: 52px 58px 1fr;
  }

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

@media (max-width: 520px) {
  .nav-shell,
  .mobile-panel,
  .section-shell,
  .page-main,
  .detail-main {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .movie-body {
    padding: 12px;
  }

  .movie-desc,
  .tag-row {
    display: none;
  }

  .player-shell {
    border-radius: 18px;
  }
}
