:root {
  --color-bg: #f8fafc;
  --color-card: #ffffff;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-line: #e2e8f0;
  --color-cyan: #0891b2;
  --color-blue: #2563eb;
  --color-dark: #020617;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 10px 28px rgba(15, 23, 42, 0.10);
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f8fafc 100%);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  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: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(15, 23, 42, 0.08);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-logo span:last-child,
.footer-logo span:last-child {
  background: linear-gradient(90deg, var(--color-cyan), var(--color-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
  color: #ffffff;
  font-size: 15px;
  box-shadow: 0 10px 20px rgba(8, 145, 178, 0.25);
}

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

.nav-link {
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-cyan);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 10px;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--color-line);
  padding: 8px 16px 18px;
}

.mobile-menu.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  display: block;
  padding: 10px 0;
  color: #334155;
  font-weight: 700;
}

.mobile-link.active {
  color: var(--color-cyan);
}

.hero-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  padding-top: 32px;
}

.hero-carousel {
  position: relative;
  height: 560px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-dark);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.25);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.42) 42%, rgba(2, 6, 23, 0.86));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 44px;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--color-cyan);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content p {
  margin: 0 0 22px;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.hero-tags,
.card-meta,
.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 700;
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--color-cyan);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.26);
}

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

.btn-primary:hover {
  background: #0e7490;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.56);
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.hero-prev {
  left: 16px;
}

.hero-next {
  right: 16px;
}

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

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

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

.hero-ranking,
.rank-panel,
.search-panel,
.page-hero,
.category-card,
.player-section,
.detail-copy {
  background: #ffffff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.hero-ranking {
  padding: 22px;
}

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

.section-title.tight {
  display: block;
  margin-bottom: 16px;
}

.section-title span,
.page-hero span {
  display: block;
  color: var(--color-cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.section-title h2,
.page-hero h1 {
  margin: 4px 0 0;
  color: #1e293b;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-more,
.more-link {
  color: var(--color-cyan);
  font-weight: 800;
}

.rank-item {
  display: grid;
  grid-template-columns: auto 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: #f1f5f9;
  transform: translateX(3px);
}

.rank-item img {
  width: 74px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.rank-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.25;
}

.rank-item p {
  margin: 0 0 8px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.45;
}

.rank-item span:last-child {
  color: #64748b;
  font-size: 12px;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
  color: #ffffff;
  font-weight: 900;
  font-size: 13px;
}

.search-panel {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-top: 28px;
  padding: 24px;
}

.search-panel h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

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

.search-tools input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  outline: none;
  color: var(--color-text);
  background: #f8fafc;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-tools input:focus {
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 7px 13px;
  background: #e2e8f0;
  color: #334155;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  background: var(--color-cyan);
  color: #ffffff;
}

.content-section {
  margin-top: 54px;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: var(--color-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.movie-card-compact .card-cover {
  height: 210px;
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(2, 6, 23, 0.65));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--color-cyan);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.card-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 52px;
  opacity: 0;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  min-height: 42px;
  margin: 0 0 12px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  justify-content: space-between;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.tag-row {
  margin-top: 10px;
}

.tag-row span {
  display: inline-flex;
  border-radius: 8px;
  padding: 4px 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.tag-row.large span {
  padding: 7px 12px;
  font-size: 14px;
}

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

.category-tile,
.category-card {
  display: block;
  min-height: 150px;
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
  border: 1px solid #dbeafe;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.category-tile span,
.category-card-head span {
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

.category-tile p,
.category-card p {
  margin: 12px 0 0;
  color: var(--color-muted);
}

.category-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-card-head strong {
  color: var(--color-cyan);
  font-size: 26px;
}

.category-card small {
  display: block;
  margin-top: 18px;
  color: #64748b;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.rank-panel {
  align-self: start;
  padding: 22px;
}

.page-hero {
  margin-top: 32px;
  padding: 38px;
  background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 54%, #ffffff 100%);
}

.page-hero p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--color-muted);
  font-size: 18px;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 26px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--color-cyan);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-top: 24px;
  padding: 30px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0f172a 0%, #164e63 48%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.detail-intro h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.detail-intro p {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.detail-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}

.detail-meta li {
  min-width: 128px;
  padding: 10px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
}

.detail-meta span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.detail-meta strong {
  display: block;
  margin-top: 2px;
  color: #ffffff;
}

.detail-intro .tag-row span {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.detail-intro .btn-primary {
  margin-top: 24px;
}

.player-section {
  margin-top: 34px;
  padding: 24px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #020617;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(8, 145, 178, 0.32), rgba(2, 6, 23, 0.62));
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--color-cyan);
  box-shadow: 0 18px 42px rgba(8, 145, 178, 0.42);
  font-size: 34px;
  text-indent: 5px;
}

.player-box.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-copy {
  padding: 28px;
}

.detail-copy h2 {
  margin: 0 0 12px;
  color: #1e293b;
  font-size: 26px;
}

.detail-copy h2 + p {
  margin: 0 0 26px;
}

.detail-copy p {
  color: #475569;
  font-size: 17px;
}

.site-footer {
  margin-top: 70px;
  background: #0f172a;
  color: #cbd5e1;
}

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

.footer-logo span:last-child {
  color: #ffffff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.footer-brand p {
  max-width: 520px;
  margin: 18px 0 0;
  color: #94a3b8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

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

.site-footer li {
  margin-bottom: 9px;
}

.site-footer a:hover {
  color: #22d3ee;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 20px;
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
}

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

@media (max-width: 1100px) {
  .hero-wrap,
  .split-section,
  .detail-hero,
  .search-panel {
    grid-template-columns: 1fr;
  }

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

  .hero-ranking .section-title,
  .hero-ranking .more-link {
    grid-column: 1 / -1;
  }

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

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

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

  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .site-logo,
  .footer-logo {
    font-size: 22px;
  }

  .hero-wrap {
    padding-top: 18px;
  }

  .hero-carousel {
    height: 540px;
    border-radius: 18px;
  }

  .hero-content {
    padding: 26px;
  }

  .hero-content p {
    font-size: 16px;
  }

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

  .hero-ranking {
    display: block;
  }

  .catalog-grid,
  .compact-grid,
  .small-grid,
  .category-grid,
  .category-card-grid,
  .ranking-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .card-cover {
    height: 300px;
  }

  .page-hero,
  .detail-hero,
  .player-section,
  .detail-copy,
  .search-panel {
    padding: 22px;
  }

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

  .rank-item {
    grid-template-columns: auto 76px minmax(0, 1fr);
  }
}
