:root {
  --blue: #2563eb;
  --blue-dark: #1e3a8a;
  --cyan: #06b6d4;
  --amber: #f59e0b;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f9fafb 0%, #eff6ff 52%, #ecfeff 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

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

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.28);
}

.brand-text {
  font-size: 26px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
  justify-content: flex-end;
}

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

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

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
}

.nav-search input {
  width: 200px;
  border: 0;
  outline: 0;
  padding: 8px 10px 8px 14px;
  background: transparent;
}

.nav-search button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #eff6ff;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--blue-dark);
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(105deg, #0f172a, #1e3a8a 54%, #155e75);
}

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

.hero-slide.active {
  opacity: 1;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.54) 48%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
  color: #ffffff;
}

.hero-content h1 {
  max-width: 720px;
  margin: 16px 0 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 650px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 16px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.28);
}

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

.hero-meta span {
  padding: 6px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.35);
}

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

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}

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

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

.section {
  padding: 64px 0;
}

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

.section-heading.center {
  text-align: center;
}

.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading p {
  margin: 0 0 8px;
  color: var(--blue);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.detail-card h1,
.related-panel h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.section-heading.light p,
.section-heading.light h2 {
  color: #ffffff;
}

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

.category-card {
  display: block;
  padding: 26px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.category-overview-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.category-card span {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.category-card strong,
.category-card em {
  display: block;
}

.category-card strong {
  font-size: 18px;
}

.category-card em {
  margin-top: 8px;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

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

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

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

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

.movie-card:hover .movie-cover img,
.compact-card:hover img,
.rank-row:hover img,
.category-poster-stack:hover img {
  transform: scale(1.08);
}

.movie-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.88);
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.32);
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.movie-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  padding: 5px 11px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info h3 a:hover,
.rank-content h3 a:hover,
.category-overview-card h2 a:hover {
  color: var(--blue);
}

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

.movie-meta,
.detail-meta {
  color: var(--muted);
  font-size: 13px;
}

.movie-meta span,
.detail-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f3f4f6;
}

.hot-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px;
  border-radius: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 26px 70px rgba(37, 99, 235, 0.25);
}

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

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

.compact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.recommend-panel .compact-card,
.related-panel .compact-card {
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.compact-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.2);
}

.compact-card img {
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
  transition: transform 0.35s ease;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  line-height: 1.35;
}

.compact-card em {
  margin-top: 7px;
  color: currentColor;
  opacity: 0.72;
  font-style: normal;
  font-size: 13px;
}

.rank-list {
  display: grid;
  gap: 16px;
}

.home-rank {
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 98px 60px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.rank-cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

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

.rank-number {
  font-size: 28px;
  font-weight: 950;
  color: var(--blue);
}

.rank-content h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.rank-content p {
  margin: 0 0 10px;
  color: var(--muted);
}

.text-link {
  color: var(--blue);
  font-weight: 900;
  white-space: nowrap;
}

.text-link:hover {
  color: var(--cyan);
}

.page-hero {
  padding: 82px 0;
  color: #ffffff;
  background: radial-gradient(circle at 18% 18%, rgba(6, 182, 212, 0.36), transparent 28%), linear-gradient(135deg, #0f172a, #1e3a8a 55%, #155e75);
}

.page-hero.small {
  padding: 58px 0;
}

.page-hero h1 {
  margin: 16px 0;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.category-overview {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 22px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-poster-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.category-poster-stack img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
  transition: transform 0.35s ease;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-overview-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.filter-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-weight: 800;
}

.filter-box input {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  padding: 12px 15px;
  border-radius: 999px;
}

.filter-box input:focus,
.search-panel input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-panel {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.search-panel input {
  flex: 1;
  border: 1px solid var(--line);
  outline: 0;
  padding: 14px 18px;
  border-radius: 999px;
}

.detail-top {
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #1e3a8a);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  color: rgba(255, 255, 255, 0.82);
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 28px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 26px;
}

.player-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.48));
  cursor: pointer;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 36px;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.42);
}

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

.detail-card,
.related-panel {
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.detail-labels,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-labels a,
.detail-labels span,
.tag-list span {
  padding: 7px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 800;
  font-size: 13px;
}

.detail-card h1 {
  margin: 20px 0 12px;
}

.detail-card h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.detail-card p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

.lead-text {
  margin-bottom: 12px !important;
  color: #111827 !important;
  font-size: 19px !important;
  font-weight: 700;
}

.review-box {
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.tag-list {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.tag-list span {
  color: #374151;
  background: #f3f4f6;
}

.related-panel {
  position: sticky;
  top: 90px;
}

.related-panel h2 {
  margin-bottom: 20px;
  font-size: 26px;
}

.related-list {
  display: grid;
  gap: 14px;
}

.site-footer {
  margin-top: 40px;
  padding: 42px 0;
  color: rgba(255, 255, 255, 0.78);
  background: #0f172a;
}

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

.footer-inner strong {
  display: block;
  color: #ffffff;
  font-size: 24px;
  margin-bottom: 8px;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.footer-links a:hover {
  color: #ffffff;
}

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

@media (max-width: 980px) {
  .mobile-toggle {
    display: block;
  }

  .site-nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .site-nav-menu.is-open {
    display: flex;
  }

  .nav-search {
    width: 100%;
  }

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

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    padding: 0 36px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .related-panel {
    position: static;
  }

  .rank-row {
    grid-template-columns: 80px 48px minmax(0, 1fr);
  }

  .rank-row .text-link {
    grid-column: 3;
  }
}

@media (max-width: 640px) {
  .brand-text {
    font-size: 22px;
  }

  .hero-carousel {
    height: 520px;
  }

  .hero-content {
    padding: 0;
  }

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

  .section {
    padding: 44px 0;
  }

  .section-heading.split,
  .toolbar,
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .category-grid,
  .movie-grid.four,
  .compact-grid,
  .compact-grid.three {
    grid-template-columns: 1fr;
  }

  .hot-panel {
    width: min(100% - 32px, 1180px);
    padding: 28px 18px;
  }

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 80px 1fr;
    gap: 12px;
  }

  .rank-number {
    position: absolute;
    margin: 8px;
    padding: 2px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--blue);
    font-size: 18px;
  }

  .rank-content,
  .rank-row .text-link {
    grid-column: 1 / -1;
  }

  .search-panel {
    flex-direction: column;
  }
}
