:root {
  --primary: #006fc6;
  --primary-dark: #0b3f6e;
  --primary-soft: #f0f7ff;
  --accent: #0d9485;
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --card: #ffffff;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.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.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 22px rgba(0, 111, 198, 0.24);
}

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

.site-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-toggle {
  display: none;
  border: 0;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 24px;
  border-radius: 10px;
  padding: 6px 12px;
}

.hero-wrap {
  padding: 32px 0 12px;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #0f172a, #0b3f6e 52%, #0d9485);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

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

.hero-slide img.image-missing,
.detail-hero > img.image-missing,
.movie-poster img.image-missing,
.category-tile__cover img.image-missing,
.side-list img.image-missing {
  opacity: 0;
}

.hero-overlay,
.detail-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 30%, rgba(0, 111, 198, 0.35), transparent 26%),
    linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.1));
}

.hero-content {
  position: absolute;
  left: clamp(24px, 7vw, 82px);
  bottom: clamp(32px, 7vw, 86px);
  width: min(720px, calc(100% - 48px));
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #dbeafe;
  font-weight: 700;
  letter-spacing: 0.04em;
}

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

.hero-content p,
.detail-hero__content p {
  margin: 0;
  max-width: 760px;
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.88);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 28px rgba(0, 111, 198, 0.28);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.44);
  font-size: 34px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.hero-carousel:hover .hero-arrow {
  opacity: 1;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.hero-arrow--prev {
  left: 18px;
}

.hero-arrow--next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

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

.quick-search-panel,
.section-block,
.category-preview,
.page-main {
  padding: 42px 0;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

.quick-search-panel h2,
.section-head h2,
.page-title h1,
.detail-main-card h2,
.detail-side-card h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.quick-search-panel p,
.section-head p,
.page-title p,
.category-tile p {
  margin: 8px 0 0;
  color: var(--muted);
}

.filter-bar,
.search-console {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select,
.search-console input,
.search-console select {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 0 14px;
  color: var(--text);
  font: inherit;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-console input:focus,
.search-console select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 111, 198, 0.12);
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

.score,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  line-height: 1;
}

.score {
  right: 10px;
  bottom: 10px;
  padding: 7px 9px;
  background: rgba(15, 23, 42, 0.78);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  padding: 9px 8px;
  text-align: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.movie-card__body {
  padding: 16px;
}

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

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

.movie-meta,
.movie-one-line {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

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

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 700;
}

.ranking-strip {
  padding: 34px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--accent));
  color: #ffffff;
}

.ranking-strip .section-head p,
.ranking-strip .section-more {
  color: rgba(255, 255, 255, 0.82);
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
}

.rank-list a:hover {
  background: rgba(255, 255, 255, 0.22);
}

.rank-list b {
  color: #bfdbfe;
}

.rank-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-list em {
  font-style: normal;
  font-weight: 900;
}

.page-title {
  margin-bottom: 28px;
}

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

.category-tile {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.category-tile__cover {
  position: relative;
  min-height: 190px;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.category-tile__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-tile__cover span,
.category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
  font-weight: 900;
}

.category-tile__cover span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 12px;
}

.category-tile > div {
  padding: 22px 22px 22px 0;
}

.category-tile h2 {
  margin: 0;
}

.category-count {
  min-width: 96px;
  min-height: 52px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.page-title--category {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}

.filter-bar--page {
  margin-bottom: 24px;
}

.search-console {
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.search-console input {
  flex: 1;
  min-width: 260px;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0b3f6e, #0d9485);
}

.detail-hero__content {
  position: relative;
  z-index: 2;
  padding: 170px 0 86px;
  color: #ffffff;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.detail-stats span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.player-section {
  margin-top: -64px;
  position: relative;
  z-index: 3;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.25);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  padding: 18px 30px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(0, 111, 198, 0.34);
}

.player-box.is-playing .player-start {
  display: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  padding: 38px 0 68px;
}

.detail-main-card,
.detail-side-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #ffffff;
  padding: 28px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.tag-row--detail {
  margin-bottom: 24px;
}

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

.info-list div {
  padding: 14px;
  border-radius: 14px;
  background: var(--primary-soft);
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
}

.info-list dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.rich-text p {
  margin: 0 0 18px;
  color: #334155;
  font-size: 17px;
}

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

.side-list a {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.side-list a:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.side-list img {
  width: 58px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.side-list span {
  font-weight: 800;
}

.side-list em {
  font-style: normal;
  color: #d97706;
  font-weight: 900;
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 54px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

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

.site-footer a {
  display: block;
  margin: 7px 0;
  color: #cbd5e1;
}

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

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

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

  .quick-search-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

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

  .hero-arrow {
    opacity: 1;
  }

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

  .rank-list,
  .info-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-tile {
    grid-template-columns: 130px 1fr;
  }

  .category-tile__cover {
    min-height: 160px;
  }
}

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

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

  .hero-carousel {
    height: 460px;
  }

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

  .hero-dots {
    left: 18px;
    right: auto;
    bottom: 16px;
  }

  .filter-bar,
  .search-console {
    align-items: stretch;
  }

  .filter-bar input,
  .filter-bar select,
  .filter-bar .btn,
  .search-console input,
  .search-console select {
    width: 100%;
  }

  .movie-grid,
  .movie-grid--six {
    grid-template-columns: 1fr;
  }

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

  .category-tile > div {
    padding: 0 20px 20px;
  }

  .page-title--category {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-hero {
    min-height: 500px;
  }

  .detail-hero__content {
    padding-top: 120px;
  }

  .detail-main-card,
  .detail-side-card {
    padding: 20px;
  }
}
