* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #1e293b;
  background: #f8fafc;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
}

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

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #0891b2, #2563eb);
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.24);
}

.brand-text {
  font-size: 1.05rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.nav-link,
.mobile-panel a {
  padding: 0.75rem 0.95rem;
  border-radius: 0.75rem;
  color: #475569;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
}

.header-search input {
  width: 210px;
  border: 0;
  outline: 0;
  padding: 0.55rem 0.25rem 0.55rem 0.75rem;
  color: #334155;
  background: transparent;
}

.header-search button,
.hero-cta,
.filter-box button,
.player-button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #0891b2;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  padding: 0.55rem 0.95rem;
}

.header-search button:hover,
.hero-cta:hover,
.filter-box button:hover,
.player-button:hover {
  background: #0e7490;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(8, 145, 178, 0.24);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.8rem;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0.25rem 1rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.mobile-panel.open {
  display: grid;
  gap: 0.4rem;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(100%, 680px);
  color: #fff;
}

.hero-tags,
.detail-tags,
.tag-row,
.quick-links,
.meta-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.meta-pills span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-tags span {
  padding: 0.35rem 0.75rem;
  background: rgba(8, 145, 178, 0.94);
}

.hero-tags span:nth-child(2) {
  background: rgba(37, 99, 235, 0.92);
}

.hero h1 {
  margin: 1rem 0;
  font-size: clamp(2.6rem, 6vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 58rem;
  margin: 0;
  color: #e2e8f0;
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.45rem 0 1.8rem;
  color: #cbd5e1;
  font-weight: 700;
}

.hero-actions,
.section-title,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.9rem 1.5rem;
  border-radius: 0.85rem;
}

.hero-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-radius: 0.85rem;
  color: #fff;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 2.8rem;
  height: 2.8rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.52);
  transform: translateY(-50%);
  cursor: pointer;
}

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

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  z-index: 4;
  display: flex;
  gap: 0.45rem;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 0.65rem;
  height: 0.65rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 2.2rem;
  background: #fff;
}

.section {
  padding: 4rem 0;
}

.section.alt {
  background: linear-gradient(180deg, #fff, #f1f5f9);
}

.section-title {
  justify-content: space-between;
  margin-bottom: 2rem;
}

.title-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.title-icon {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 0.75rem;
  color: #0891b2;
  background: #ecfeff;
}

.section h2,
.page-hero h1,
.detail-main h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.15;
}

.section-link {
  color: #0891b2;
  font-weight: 800;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-0.35rem);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

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

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

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

.poster-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent 70%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-overlay {
  opacity: 1;
}

.play-dot {
  width: 3.7rem;
  height: 3.7rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #0891b2;
  box-shadow: 0 18px 35px rgba(8, 145, 178, 0.32);
}

.type-badge,
.year-badge {
  position: absolute;
  top: 0.7rem;
  padding: 0.28rem 0.6rem;
  border-radius: 0.45rem;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.type-badge {
  left: 0.7rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.year-badge {
  right: 0.7rem;
  background: #0891b2;
}

.card-body {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.card-body strong {
  color: #0f172a;
  font-size: 1.05rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-line {
  min-height: 2.75rem;
  color: #64748b;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: #64748b;
  font-size: 0.82rem;
}

.card-meta span:first-child,
.tag-row span {
  padding: 0.22rem 0.55rem;
  color: #0e7490;
  background: #cffafe;
}

.tag-row {
  align-items: flex-start;
}

.tag-row span {
  color: #475569;
  background: #f1f5f9;
}

.category-tile {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-0.35rem);
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.32);
}

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

.category-thumbs img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0.65rem;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.3);
  transition: transform 0.35s ease;
}

.category-tile strong {
  font-size: 1.2rem;
}

.category-tile span:last-child {
  color: #cffafe;
  font-weight: 700;
}

.rank-list {
  display: grid;
  gap: 0.85rem;
}

.rank-row {
  display: grid;
  grid-template-columns: 3.4rem 8rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-0.2rem);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.rank-number {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #0891b2, #2563eb);
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 0.75rem;
  background: #0f172a;
}

.rank-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.rank-copy {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}

.rank-copy strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  overflow: hidden;
  color: #64748b;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: #64748b;
  font-weight: 700;
  white-space: nowrap;
}

.page-hero {
  padding: 4.5rem 0;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.3), transparent 30%),
    linear-gradient(135deg, #020617, #0f172a 55%, #164e63);
}

.page-hero p {
  max-width: 800px;
  color: #cbd5e1;
  line-height: 1.8;
}

.page-hero h1 {
  color: #fff;
}

.quick-links {
  margin-top: 1.5rem;
}

.quick-links a {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.filter-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.filter-box input,
.filter-box select {
  min-height: 2.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  padding: 0 0.85rem;
  color: #334155;
  outline-color: #0891b2;
  background: #fff;
}

.filter-box input {
  flex: 1 1 260px;
}

.filter-box button {
  min-height: 2.8rem;
  padding: 0 1rem;
}

.no-results {
  display: none;
  padding: 2rem;
  border-radius: 1rem;
  color: #64748b;
  text-align: center;
  background: #fff;
}

.no-results.show {
  display: block;
}

.breadcrumb {
  margin: 1.5rem 0;
  color: #64748b;
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #0891b2;
  font-weight: 800;
}

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

.video-box {
  position: relative;
  overflow: hidden;
  border-radius: 1.1rem;
  background: #000;
  box-shadow: 0 24px 65px rgba(15, 23, 42, 0.22);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.16));
  cursor: pointer;
}

.play-overlay.hide {
  display: none;
}

.player-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.35rem;
  border-radius: 0.9rem;
}

.detail-main {
  display: grid;
  gap: 1.5rem;
}

.detail-card,
.side-card {
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.detail-card {
  padding: 1.5rem;
}

.detail-card p {
  color: #475569;
  line-height: 1.9;
}

.detail-tags span,
.meta-pills span {
  padding: 0.36rem 0.7rem;
  color: #0e7490;
  background: #ecfeff;
}

.side-card {
  position: sticky;
  top: 96px;
  padding: 1rem;
}

.side-poster {
  overflow: hidden;
  border-radius: 0.9rem;
  background: #0f172a;
}

.side-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.meta-table {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.meta-table div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid #e2e8f0;
}

.meta-table dt {
  color: #64748b;
}

.meta-table dd {
  margin: 0;
  color: #0f172a;
  font-weight: 800;
  text-align: right;
}

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

.compact-card .card-line {
  min-height: auto;
  -webkit-line-clamp: 1;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 2rem;
  padding: 3rem 0;
}

.footer-brand {
  color: #fff;
  font-size: 1.15rem;
}

.site-footer h2 {
  margin: 0 0 1rem;
  color: #fff;
  font-size: 1rem;
}

.site-footer p {
  max-width: 560px;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 0.65rem;
}

.footer-links.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.footer-bottom {
  padding: 1rem;
  border-top: 1px solid #334155;
  text-align: center;
  color: #94a3b8;
}

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

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero {
    height: 64vh;
    min-height: 480px;
  }

  .hero-arrow {
    display: none;
  }

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

  .rank-row {
    grid-template-columns: 2.8rem 6.5rem minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 1rem, 1280px);
  }

  .brand-text {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    min-height: 560px;
  }

  .grid.cards,
  .grid.categories,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 2.5rem 5.5rem minmax(0, 1fr);
    gap: 0.7rem;
  }

  .filter-box {
    display: grid;
  }

  .filter-box input,
  .filter-box select,
  .filter-box button {
    width: 100%;
  }
}
