* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #020617;
  color: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(30, 41, 59, 0.92);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1240px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 16px 40px rgba(14, 165, 233, 0.25);
  color: #ffffff;
  font-size: 16px;
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  white-space: nowrap;
}

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

.nav-link:hover,
.nav-link.is-active {
  color: #22d3ee;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #e2e8f0;
  font-size: 26px;
  cursor: pointer;
}

.mobile-nav {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px 20px;
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(51, 65, 85, 0.8);
}

.mobile-nav a {
  padding: 8px 0;
  color: #cbd5e1;
}

.mobile-nav a:hover {
  color: #22d3ee;
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  max-width: 1240px;
  margin: 32px auto 64px;
  padding: 0 20px;
}

.hero-stage {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 20%, rgba(6, 182, 212, 0.25), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.86) 45%, rgba(15, 23, 42, 0.32) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 55%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 74px);
  bottom: clamp(32px, 7vw, 82px);
  max-width: 620px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.22);
  border: 1px solid rgba(34, 211, 238, 0.32);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5.8vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 560px;
  margin: 0 0 18px;
  color: #cbd5e1;
  font-size: 17px;
}

.hero-tags,
.tag-list,
.filter-chips,
.detail-meta,
.card-meta,
.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.tag-list span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #e2e8f0;
  font-size: 13px;
}

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

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.ghost-button {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.72);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 3;
}

.hero-control.previous {
  left: 18px;
}

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.35);
  cursor: pointer;
}

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

.section-block,
.category-section,
.page-section,
.detail-layout,
.watch-wrap {
  max-width: 1240px;
  margin: 0 auto 64px;
  padding: 0 20px;
}

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

.section-head h2,
.section-block > h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-head a {
  color: #22d3ee;
  font-weight: 700;
}

.intro-search {
  padding: 28px 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.55));
  border: 1px solid rgba(51, 65, 85, 0.8);
}

.intro-search h2 {
  margin: 0 0 8px;
}

.intro-search p {
  margin: 0 0 20px;
  color: #94a3b8;
}

.search-panel {
  display: grid;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 680px);
  min-height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.74);
  border: 1px solid rgba(71, 85, 105, 0.88);
}

.search-box span {
  color: #22d3ee;
  font-size: 22px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
}

.filter-chips a {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(71, 85, 105, 0.68);
  color: #cbd5e1;
  font-size: 14px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.filter-chips a:hover {
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.7);
}

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

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

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: #1e293b;
  border: 1px solid rgba(51, 65, 85, 0.6);
}

.poster-link img,
.rail-poster img,
.ranking-cover img,
.detail-cover,
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img,
.rail-poster img {
  transition: transform 0.5s ease;
}

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

.poster-link::after,
.rail-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 58%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .poster-link::after,
.rail-card:hover .rail-poster::after {
  opacity: 1;
}

.year-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #cbd5e1;
  font-size: 12px;
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  color: #ffffff;
  font-size: 22px;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.play-hover.small {
  width: 44px;
  height: 44px;
  font-size: 18px;
}

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

.card-content {
  padding-top: 12px;
}

.card-content h3,
.rail-card h3,
.ranking-item h3 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
}

.card-content h3 a:hover,
.rail-card h3 a:hover,
.ranking-item h3 a:hover {
  color: #22d3ee;
}

.card-content p,
.rail-card p,
.ranking-item p {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
}

.card-meta,
.ranking-meta {
  margin-top: 9px;
  color: #64748b;
  font-size: 12px;
}

.card-meta span,
.ranking-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.72);
}

.category-section {
  padding-top: 34px;
  padding-bottom: 42px;
  background: rgba(15, 23, 42, 0.32);
  border-top: 1px solid rgba(30, 41, 59, 0.6);
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 20px;
  background: #0f172a;
  border: 1px solid rgba(51, 65, 85, 0.72);
}

.category-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.25));
}

.category-tile > div {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
}

.category-tile strong {
  display: block;
  margin-bottom: 6px;
  color: #ffffff;
  font-size: 20px;
}

.category-tile p,
.category-tile em {
  display: block;
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
  font-style: normal;
}

.category-tile em {
  margin-top: 10px;
  color: #22d3ee;
}

.tile-number {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.rail-wrap {
  position: relative;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.rail-card {
  flex: 0 0 184px;
}

.rail-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #1e293b;
}

.rail-button {
  position: absolute;
  top: 40%;
  z-index: 3;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 26px;
  cursor: pointer;
}

.rail-button.left {
  left: -12px;
}

.rail-button.right {
  right: -12px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(51, 65, 85, 0.7);
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: #1e293b;
}

.ranking-cover span {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

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

.page-hero {
  max-width: 1240px;
  margin: 32px auto 46px;
  padding: 0 20px;
}

.page-hero > div {
  overflow: hidden;
  padding: clamp(34px, 7vw, 72px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 18%, rgba(34, 211, 238, 0.28), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.45));
  border: 1px solid rgba(51, 65, 85, 0.78);
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 14px;
  color: #67e8f9;
  font-weight: 800;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 680px;
  margin: 0;
  color: #cbd5e1;
  font-size: 17px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #22d3ee;
}

.no-result {
  margin-top: 24px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  color: #cbd5e1;
  text-align: center;
}

.watch-wrap {
  margin-top: 32px;
}

.detail-breadcrumb {
  margin: 0 0 16px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #000000;
  border: 1px solid rgba(51, 65, 85, 0.8);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.player-frame video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.46), rgba(2, 6, 23, 0.08));
  cursor: pointer;
  z-index: 2;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  color: #ffffff;
  font-size: 36px;
  box-shadow: 0 18px 50px rgba(6, 182, 212, 0.36);
}

.play-overlay.is-hidden {
  display: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
}

.detail-main h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.08;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.72);
  color: #cbd5e1;
  font-size: 14px;
}

.one-line {
  margin: 22px 0;
  padding: 18px 20px;
  border-left: 4px solid #06b6d4;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  font-size: 18px;
}

.text-card,
.side-card {
  margin-top: 24px;
  padding: 24px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(51, 65, 85, 0.74);
}

.text-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

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

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background: #1e293b;
  border: 1px solid rgba(51, 65, 85, 0.72);
}

.side-card p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  color: #94a3b8;
}

.side-card strong {
  color: #ffffff;
  text-align: right;
}

.compact-card .card-content p {
  display: none;
}

.site-footer {
  margin-top: 84px;
  background: #0f172a;
  border-top: 1px solid rgba(30, 41, 59, 0.92);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 36px;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: #94a3b8;
}

.footer-links strong {
  width: 100%;
  color: #ffffff;
}

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

.footer-bottom {
  padding: 18px 20px 28px;
  border-top: 1px solid rgba(30, 41, 59, 0.7);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 60px;
    padding: 0 16px;
  }

  .brand-text {
    font-size: 19px;
  }

  .hero {
    margin-top: 18px;
    margin-bottom: 44px;
    padding: 0 14px;
  }

  .hero-stage {
    min-height: 520px;
    border-radius: 22px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 52%, rgba(15, 23, 42, 0.4) 100%);
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 58px;
  }

  .hero p {
    font-size: 15px;
  }

  .hero-control {
    display: none;
  }

  .section-block,
  .category-section,
  .page-section,
  .detail-layout,
  .watch-wrap,
  .page-hero {
    margin-bottom: 44px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .movie-grid,
  .dense-grid,
  .ranking-list,
  .large-ranking,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .ranking-item {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .category-tile {
    min-height: 190px;
  }

  .rail-button {
    display: none;
  }

  .rail-card {
    flex-basis: 148px;
  }

  .page-hero > div {
    padding: 34px 22px;
    border-radius: 22px;
  }

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

  .detail-cover {
    max-width: 260px;
  }

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

@media (max-width: 440px) {
  .movie-grid,
  .dense-grid,
  .category-grid {
    gap: 13px;
  }

  .card-content h3 {
    font-size: 14px;
  }

  .card-content p,
  .card-meta {
    display: none;
  }

  .poster-link {
    border-radius: 14px;
  }

  .ranking-list,
  .large-ranking {
    grid-template-columns: 1fr;
  }
}
