:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --blue-50: #eff6ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--sky-50), #ffffff 36%, #ffffff);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky-500), #2563eb);
  border-radius: 14px;
  box-shadow: 0 12px 25px rgba(14, 165, 233, 0.32);
}

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

.site-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #475569;
  font-weight: 600;
  transition: all 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--sky-600);
  background: var(--sky-50);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--sky-50);
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--sky-600);
  margin: 5px 0;
  border-radius: 2px;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 560px;
  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;
  background: linear-gradient(135deg, #1e293b, #0284c7);
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.48) 52%, rgba(2, 6, 23, 0.1));
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100% - 1180px) / 2));
  bottom: 82px;
  width: min(680px, calc(100% - 64px));
  color: #ffffff;
}

.hero-content h1,
.hero-content h2 {
  margin: 12px 0 18px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero-content p {
  margin: 0 0 22px;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.86);
  max-width: 620px;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
}

.detail-meta span,
.movie-meta span {
  background: var(--sky-50);
  color: var(--sky-600);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky-500), #2563eb);
  box-shadow: 0 16px 35px rgba(14, 165, 233, 0.28);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(14, 165, 233, 0.34);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.btn.full {
  width: 100%;
}

.hero-dots {
  position: absolute;
  right: max(32px, calc((100% - 1180px) / 2));
  bottom: 56px;
  display: flex;
  gap: 10px;
  z-index: 2;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--sky-500);
  color: #ffffff;
}

.eyebrow.light {
  background: var(--sky-100);
  color: var(--sky-600);
}

.section {
  padding: 72px 0;
}

.soft-section {
  background: linear-gradient(90deg, var(--sky-50), var(--blue-50));
}

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

.section-heading.compact {
  margin-bottom: 18px;
}

.section-heading h2,
.page-hero h1,
.detail-content h1 {
  margin: 10px 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-link,
.text-link {
  color: var(--sky-600);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.72);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sky-100), #dbeafe);
}

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

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

.poster-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.movie-card-body {
  padding: 16px;
}

.movie-card h3 {
  min-height: 54px;
  margin: 0 0 8px;
  font-size: 1.04rem;
  line-height: 1.35;
  font-weight: 800;
}

.movie-card h3 a:hover {
  color: var(--sky-600);
}

.movie-card p {
  min-height: 44px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  margin-bottom: 12px;
}

.movie-meta span {
  padding: 4px 9px;
  font-size: 0.76rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.76rem;
}

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

.category-card,
.category-overview-card {
  display: block;
  border-radius: 24px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.12);
}

.category-card span {
  display: block;
  margin-bottom: 10px;
  font-size: 1.3rem;
  font-weight: 900;
}

.category-card p,
.category-overview-card p,
.page-hero p {
  margin: 0;
  color: var(--muted);
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.category-cover-row img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--sky-100), #dbeafe);
}

.split-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 34px;
}

.rank-list,
.ranking-grid,
.latest-list,
.side-links {
  display: grid;
  gap: 12px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.88);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.rank-item:hover {
  color: var(--sky-600);
  border-color: var(--sky-100);
}

.rank-number,
.rank-dot {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky-500), #2563eb);
  font-weight: 900;
}

.rank-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-info {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.latest-item {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.88);
}

.latest-item img {
  width: 82px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--sky-100), #dbeafe);
}

.latest-item span {
  font-weight: 800;
}

.latest-item small {
  grid-column: 2;
  color: var(--muted);
}

.page-main {
  padding-bottom: 72px;
}

.page-hero {
  padding: 64px 0 32px;
}

.page-hero h1 {
  margin-bottom: 14px;
}

.search-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: center;
  margin: 42px 0 8px;
  padding: 24px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: var(--shadow);
}

.search-panel h2 {
  margin: 0 0 8px;
}

.search-panel p {
  margin: 0;
  color: var(--muted);
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #dbeafe;
  outline: none;
  border-radius: 999px;
  padding: 0 20px;
  background: var(--sky-50);
  color: var(--text);
}

.search-box input:focus {
  border-color: var(--sky-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.13);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  max-height: 420px;
  overflow: auto;
  z-index: 20;
  padding: 10px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.search-results.is-open {
  display: grid;
  gap: 8px;
}

.search-result-item {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 14px;
}

.search-result-item:hover {
  background: var(--sky-50);
}

.search-result-item strong {
  font-size: 0.96rem;
}

.search-result-item small {
  color: var(--muted);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.filter-bar button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #475569;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-bar button:hover,
.filter-bar button.active {
  color: #ffffff;
  background: var(--sky-500);
}

.detail-main {
  background: #f8fafc;
}

.watch-section {
  padding: 28px 0;
  background: #020617;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  font-weight: 900;
  font-size: 1.2rem;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--sky-600);
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25);
}

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

.detail-content,
.side-card {
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: var(--shadow);
}

.detail-content {
  padding: 32px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb a:hover {
  color: var(--sky-600);
}

.detail-content h1 {
  margin-bottom: 18px;
}

.detail-lead {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--sky-500);
  border-radius: 16px;
  background: var(--sky-50);
  color: #334155;
  font-size: 1.05rem;
}

.detail-content h2,
.side-card h2 {
  margin: 28px 0 12px;
  font-size: 1.45rem;
}

.detail-content p {
  color: #334155;
}

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

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

.side-card {
  padding: 18px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--sky-100), #dbeafe);
}

.site-footer {
  margin-top: 72px;
  padding: 48px 0 28px;
  color: #475569;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
}

.footer-inner p {
  max-width: 520px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: end;
  gap: 10px;
  max-width: 440px;
}

.footer-links strong {
  width: 100%;
  color: var(--text);
  text-align: right;
}

.footer-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--sky-50);
  color: var(--sky-600);
  font-size: 0.88rem;
  font-weight: 700;
}

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 22px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.9rem;
}

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

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

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

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 62px;
    left: 16px;
    right: 16px;
    display: none;
    padding: 12px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    border-radius: 14px;
  }

  .hero-carousel {
    min-height: 620px;
    height: 78vh;
  }

  .hero-content {
    left: 20px;
    bottom: 94px;
    width: calc(100% - 40px);
  }

  .hero-meta span {
    font-size: 0.78rem;
  }

  .hero-dots {
    left: 20px;
    right: auto;
    bottom: 44px;
  }

  .section {
    padding: 48px 0;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

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

  .movie-card h3 {
    min-height: auto;
    font-size: 0.96rem;
  }

  .movie-card p {
    display: none;
  }

  .rank-item {
    grid-template-columns: auto 1fr;
  }

  .rank-info {
    grid-column: 2;
  }

  .detail-content {
    padding: 22px;
  }

  .watch-section {
    padding: 0;
  }

  .video-shell {
    border-radius: 0;
    margin: 0 -16px;
  }

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

  .footer-links {
    justify-content: start;
  }

  .footer-links strong {
    text-align: left;
  }
}

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

  .hero-actions {
    display: grid;
  }

  .search-panel {
    padding: 18px;
  }
}
