:root {
  --primary: #0059c0;
  --primary-deep: #00438d;
  --accent: #ff6b00;
  --ink: #0d1117;
  --muted: #6c757d;
  --line: #e9ecef;
  --panel: #ffffff;
  --soft: #f8f9fa;
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.10), 0 20px 25px -5px rgba(0, 0, 0, 0.04);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f8f9fa 0%, #e6f1ff 42%, #fff3e6 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: 80;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(13, 17, 23, 0.08);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 28px rgba(0, 89, 192, 0.28);
}

.brand-name {
  font-size: 21px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link {
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 15px;
  color: #343a40;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: #e6f1ff;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.header-search input {
  width: 190px;
  border: 0;
  outline: 0;
  padding: 7px 8px;
  background: transparent;
}

.header-search button,
.hero-search button,
.search-page-form button {
  border: 0;
  color: #fff;
  cursor: pointer;
  border-radius: 11px;
  padding: 8px 14px;
  background: var(--primary);
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.hero-search button:hover,
.search-page-form button:hover {
  background: var(--primary-deep);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #e6f1ff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--primary);
  border-radius: 99px;
}

.hero-slider {
  position: relative;
  min-height: 670px;
  color: #fff;
  background: #0d1117;
  overflow: hidden;
}

.hero-stage {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease, transform 0.75s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide > img,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.62) 42%, rgba(0, 0, 0, 0.20)), linear-gradient(0deg, rgba(13, 17, 23, 1), rgba(13, 17, 23, 0) 45%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 670px;
  margin: 0 auto;
  padding: 142px 0 210px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1 {
  margin: 0 0 18px;
  max-width: 780px;
  font-size: clamp(38px, 7vw, 74px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy p {
  width: min(680px, 100%);
  margin: 0 0 24px;
  color: #ced4da;
  font-size: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-tags,
.tag-row,
.filter-chips,
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

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

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

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

.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 14px 30px rgba(0, 89, 192, 0.28);
}

.btn-primary:hover {
  background: var(--primary-deep);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-small {
  min-height: 38px;
  padding: 8px 14px;
  color: #fff;
  background: var(--primary);
}

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(13, 17, 23, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-search,
.search-page-form {
  display: flex;
  gap: 10px;
}

.hero-search input,
.search-page-form input,
.filter-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 0 15px;
  outline: 0;
  background: rgba(255, 255, 255, 0.96);
}

.hero-links {
  margin: 14px 0;
}

.hero-links a {
  color: #dbeafe;
  font-size: 14px;
}

.hero-dots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.hero-dot {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 7px;
  color: #fff;
  text-align: left;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  overflow: hidden;
}

.hero-dot.is-active {
  border-color: var(--accent);
  background: rgba(255, 107, 0, 0.22);
}

.hero-dot img {
  width: 58px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-dot span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
}

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

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

.section-title span {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
}

.section-title a {
  color: var(--primary);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(13, 17, 23, 0.16);
}

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

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

.poster-shade,
.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0) 52%);
}

.play-chip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
  font-size: 13px;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.card-body p {
  margin: 0 0 12px;
  min-height: 48px;
  color: #495057;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body .tag-row span {
  color: var(--primary-deep);
  background: #e6f1ff;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  border-radius: 24px;
  overflow: hidden;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  box-shadow: var(--shadow);
}

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

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

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 1;
}

.category-tile strong {
  font-size: 25px;
  line-height: 1.2;
}

.category-tile em {
  margin-top: 8px;
  color: #e9ecef;
  font-style: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
  padding-bottom: 72px;
}

.rank-list,
.side-grid,
.overview-strip {
  display: grid;
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: auto 66px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 24px rgba(13, 17, 23, 0.07);
  transition: transform 0.2s ease, background 0.2s ease;
}

.compact-card:hover {
  transform: translateX(4px);
  background: #fff;
}

.compact-card img {
  width: 66px;
  height: 86px;
  object-fit: cover;
  border-radius: 14px;
}

.compact-card strong {
  display: block;
  font-size: 16px;
  line-height: 1.35;
}

.compact-card em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  font-weight: 900;
}

.site-footer {
  margin-top: 0;
  color: #cbd5e1;
  background: #0d1117;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.footer-inner strong {
  color: #fff;
  font-size: 22px;
}

.footer-inner p {
  max-width: 640px;
  margin: 10px 0 0;
}

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

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

.page-shell {
  padding-bottom: 76px;
}

.page-hero {
  position: relative;
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(255, 107, 0, 0.32), transparent 30%), linear-gradient(135deg, #0d1117, #00438d);
}

.compact-hero {
  min-height: 280px;
  display: flex;
  align-items: center;
}

.compact-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

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

.category-overview-list {
  width: min(1180px, calc(100% - 32px));
  margin: 38px auto 0;
  display: grid;
  gap: 22px;
}

.category-overview-card {
  border-radius: 26px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.overview-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

.overview-head h2 {
  margin: 0 0 6px;
}

.overview-head p {
  margin: 0;
  color: #495057;
}

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

.filter-panel {
  margin-top: 28px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.filter-search input {
  border-color: var(--line);
}

.filter-chips {
  margin-top: 14px;
}

.filter-chips button {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: #343a40;
  background: #edf2f7;
  cursor: pointer;
}

.filter-chips button.is-active {
  color: #fff;
  background: var(--primary);
}

[data-card].is-hidden {
  display: none;
}

.ranking-list {
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.ranking-row {
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.ranking-link {
  display: grid;
  grid-template-columns: 72px 116px 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.ranking-index {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
  font-size: 18px;
}

.ranking-link img {
  width: 116px;
  height: 150px;
  object-fit: cover;
  border-radius: 18px;
}

.ranking-copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
}

.ranking-copy em {
  display: block;
  color: var(--primary);
  font-style: normal;
  font-weight: 800;
  margin-bottom: 8px;
}

.ranking-copy b {
  display: block;
  color: #495057;
  font-weight: 500;
}

.search-panel {
  margin-bottom: 28px;
}

.search-state {
  margin-bottom: 18px;
  color: #495057;
  font-weight: 800;
}

.detail-page {
  background: #f8f9fa;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  color: #fff;
  overflow: hidden;
  background: #0d1117;
}

.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13, 17, 23, 0.92), rgba(13, 17, 23, 0.72) 45%, rgba(13, 17, 23, 0.35)), linear-gradient(0deg, #f8f9fa 0%, rgba(248, 249, 250, 0) 28%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 40px;
  align-items: center;
  padding: 70px 0 96px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #dbeafe;
  font-size: 14px;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: #ced4da;
  font-size: 19px;
}

.detail-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.detail-meta li {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
}

.detail-meta span {
  display: block;
  color: #cbd5e1;
  font-size: 12px;
}

.detail-meta strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 15px;
}

.large-tags span {
  background: rgba(255, 255, 255, 0.14);
}

.watch-section {
  margin-top: -78px;
  position: relative;
  z-index: 5;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 30px 90px rgba(13, 17, 23, 0.28);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.22));
  cursor: pointer;
}

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

.play-icon {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding-left: 5px;
  background: var(--accent);
  box-shadow: 0 16px 38px rgba(255, 107, 0, 0.36);
  font-size: 34px;
}

.content-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 42px 0 0;
}

.story-card {
  border-radius: 24px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.story-card p {
  margin: 0;
  color: #343a40;
  white-space: pre-line;
}

.related-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding-bottom: 72px;
}

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

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

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

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

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

  .detail-poster {
    width: min(310px, 80%);
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 66px;
  }

  .main-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    padding: 14px;
    border-radius: 20px;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    box-shadow: var(--shadow);
  }

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-slider,
  .hero-copy {
    min-height: 720px;
  }

  .hero-copy {
    padding: 92px 0 280px;
  }

  .hero-copy p {
    font-size: 16px;
    -webkit-line-clamp: 3;
  }

  .hero-panel {
    bottom: 16px;
    border-radius: 22px;
  }

  .hero-search,
  .search-page-form {
    flex-direction: column;
  }

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

  .movie-grid,
  .dense-grid,
  .category-grid,
  .overview-strip,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 13px;
  }

  .card-body h3 {
    font-size: 16px;
  }

  .split-layout {
    padding-bottom: 48px;
  }

  .footer-inner,
  .overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ranking-link {
    grid-template-columns: 48px 82px 1fr;
    gap: 12px;
  }

  .ranking-index {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 15px;
  }

  .ranking-link img {
    width: 82px;
    height: 112px;
    border-radius: 14px;
  }

  .ranking-copy strong {
    font-size: 17px;
  }

  .ranking-copy b {
    display: none;
  }

  .detail-layout {
    gap: 24px;
    padding-top: 40px;
  }

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

  .watch-section {
    width: calc(100% - 24px);
    margin-top: -56px;
  }

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

  .story-card {
    padding: 22px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .dense-grid,
  .category-grid,
  .overview-strip,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .compact-card {
    grid-template-columns: auto 58px 1fr;
  }

  .compact-card img {
    width: 58px;
    height: 76px;
  }
}
