* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f8fafc;
  color: #0f172a;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(6, 182, 212, 0.36);
}

.brand-text {
  font-size: 21px;
  background: linear-gradient(90deg, #0891b2, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  color: #334155;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link.active,
.mobile-link:hover {
  color: #0891b2;
}

.mobile-menu-button {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.mobile-menu-button span {
  width: 22px;
  height: 2px;
  background: #334155;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px 18px 18px;
  border-top: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.96);
}

.mobile-nav.open {
  display: flex;
}

.mobile-link {
  padding: 10px 4px;
  color: #334155;
  font-weight: 650;
}

.hero-carousel {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: #0f172a;
}

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

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.2));
}

.hero-content-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 74px;
  max-width: 1180px;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(34px, 7vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-pills,
.detail-meta-tags,
.pill-row,
.tag-cloud,
.hero-actions,
.center-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-pills {
  margin-bottom: 18px;
}

.hero-pills span,
.detail-meta-tags span,
.detail-meta-tags a,
.pill-row span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
}

.hero-pills span {
  padding: 6px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-pills span:first-child {
  background: #0891b2;
}

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

.primary-button {
  color: #ffffff;
  background: #0891b2;
  box-shadow: 0 16px 35px rgba(8, 145, 178, 0.28);
}

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

.primary-button:hover {
  background: #0e7490;
  box-shadow: 0 18px 38px rgba(8, 145, 178, 0.34);
}

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

.ghost-button.light {
  color: #0f172a;
  background: #e0f2fe;
}

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

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

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.section {
  padding: 56px 0;
}

.section-white {
  background: #ffffff;
}

.section-soft {
  background: linear-gradient(135deg, #ffffff, #ecfeff 55%, #eff6ff);
}

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

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

.section-heading h2,
.page-hero h1,
.detail-content h1 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
  margin: 0;
  color: #64748b;
  font-size: 16px;
}

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

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

.movie-card {
  min-width: 0;
}

.scroll-row .movie-card {
  width: 286px;
  flex: 0 0 auto;
}

.scroll-row {
  display: flex;
  gap: 18px;
  padding-bottom: 16px;
  overflow-x: auto;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

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

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

.movie-card-shade {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.72), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card-link:hover .movie-card-shade {
  opacity: 1;
}

.play-mark,
.player-button {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0891b2;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  font-size: 22px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 36px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 12px 25px rgba(239, 68, 68, 0.35);
}

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

.movie-card-body h3 {
  margin: 8px 0 8px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 13px;
}

.pill-row span,
.detail-meta-tags span,
.detail-meta-tags a,
.tag-cloud span {
  padding: 5px 10px;
  color: #475569;
  background: #f1f5f9;
}

.detail-meta-tags a {
  color: #0891b2;
  background: #ecfeff;
}

.category-preview-list {
  display: grid;
  gap: 34px;
}

.category-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.category-preview-head h3 {
  position: relative;
  margin: 0;
  padding-left: 16px;
  font-size: 22px;
}

.category-preview-head h3::before {
  position: absolute;
  left: 0;
  top: 4px;
  width: 4px;
  height: 24px;
  content: "";
  background: #0891b2;
  border-radius: 999px;
}

.category-preview-head a {
  color: #0891b2;
  font-weight: 700;
}

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

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

.rank-item:hover {
  transform: translateX(4px);
  border-color: #67e8f9;
}

.rank-item span {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: #0891b2;
  border-radius: 50%;
  font-weight: 800;
}

.rank-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item em {
  color: #64748b;
  font-size: 13px;
  font-style: normal;
}

.center-actions {
  justify-content: center;
  margin-top: 28px;
}

.page-hero {
  padding: 72px 0;
  background: linear-gradient(135deg, #ecfeff, #ffffff 52%, #dbeafe);
  border-bottom: 1px solid #e2e8f0;
}

.slim-hero,
.search-hero,
.category-hero {
  position: relative;
  overflow: hidden;
}

.slim-hero::after,
.search-hero::after,
.category-hero::after {
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 340px;
  height: 340px;
  content: "";
  background: rgba(6, 182, 212, 0.16);
  border-radius: 50%;
  filter: blur(4px);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 12px;
  color: #0891b2;
  background: #ecfeff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

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

.category-card a {
  display: block;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 130px;
  background: #0f172a;
}

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

.category-card-body {
  padding: 20px;
}

.category-card-body h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.category-card-body p {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 14px;
}

.category-card-body span {
  color: #0891b2;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.empty-state {
  display: none;
  padding: 42px;
  color: #64748b;
  text-align: center;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
}

.empty-state.visible {
  display: block;
}

.detail-top {
  padding: 36px 0 22px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.breadcrumb a {
  color: #67e8f9;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #020617;
  border-radius: 20px;
  box-shadow: 0 26px 60px rgba(2, 6, 23, 0.44);
}

.movie-player,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player {
  z-index: 1;
  background: #020617;
}

.player-cover {
  z-index: 2;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #020617;
}

.player-cover.hidden {
  display: none;
}

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

.player-cover-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.18));
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  transform: translate(-50%, -50%);
  font-size: 30px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 22px 42px rgba(2, 6, 23, 0.35);
}

.detail-side-card {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.detail-side-card span {
  padding: 10px 12px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
}

.detail-content,
.side-rank {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.detail-content {
  padding: 30px;
}

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

.detail-content h2 {
  margin: 30px 0 10px;
  font-size: 23px;
}

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

.lead-text {
  color: #334155 !important;
  font-size: 18px !important;
}

.detail-meta-tags {
  margin-top: 18px;
}

.tag-cloud {
  margin-top: 26px;
}

.side-rank {
  padding: 22px;
}

.side-rank h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.side-rank-list a {
  display: grid;
  gap: 3px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.side-rank-list a:hover {
  transform: translateX(3px);
  border-color: #67e8f9;
}

.side-rank-list span {
  color: #64748b;
  font-size: 13px;
}

.site-footer {
  margin-top: 42px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 34px;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.site-footer p {
  color: #94a3b8;
  font-size: 14px;
}

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

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #94a3b8;
  font-size: 14px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-top: 22px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 14px;
}

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

@media (min-width: 768px) {
  .hero-carousel {
    height: 600px;
  }
}

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

  .filter-panel,
  .detail-layout,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-side {
    display: none;
  }
}

@media (max-width: 760px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-button {
    display: flex;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 88px;
  }

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

  .hero-prev {
    left: 12px;
  }

  .hero-next {
    right: 12px;
  }

  .movie-grid,
  .small-grid,
  .category-grid,
  .filter-panel,
  .rank-list,
  .detail-layout,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 42px 0;
  }

  .page-hero {
    padding: 52px 0;
  }

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

  .rank-item em {
    grid-column: 2;
  }

  .detail-content {
    padding: 22px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
