:root {
  --bg: #f8fafc;
  --bg-soft: #eff6ff;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --card: #ffffff;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #06b6d4;
  --green: #16a34a;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 42%, #f8fafc 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.25);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.06);
}

.brand-text {
  font-size: 1.22rem;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #374151;
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
  color: var(--blue);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  color: #334155;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 16px;
  border-top: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 600;
}

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

.page-shell {
  padding: 32px 0 0;
}

.hero {
  position: relative;
  height: 500px;
  margin-bottom: 36px;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0.52) 47%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
  width: min(620px, 86%);
  padding-left: clamp(28px, 6vw, 72px);
  color: #ffffff;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--blue);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 1.08rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.hero-meta {
  margin-bottom: 24px;
}

.hero-meta span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.hero-meta span {
  padding: 4px 11px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-actions,
.search-hero-panel,
.block-title,
.section-heading {
  display: flex;
  align-items: center;
}

.hero-actions {
  gap: 14px;
}

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

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

.btn-primary {
  color: #ffffff;
  background: var(--blue);
}

.btn-primary:hover {
  background: var(--blue-dark);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.26);
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
  transition: background 0.2s ease;
}

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

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.search-hero-panel {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
  padding: 24px;
  border: 1px solid #dbeafe;
  border-radius: 24px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  box-shadow: var(--shadow-soft);
}

.search-hero-panel h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.search-hero-panel p {
  margin: 0;
  color: var(--muted);
}

.hero-search {
  display: flex;
  width: min(460px, 100%);
  padding: 6px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #dbeafe;
}

.hero-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0 14px;
  color: #0f172a;
  background: transparent;
}

.hero-search button {
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 800;
}

.content-section {
  margin-bottom: 64px;
}

.section-heading {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  line-height: 1.2;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
}

.section-heading span {
  height: 4px;
  flex: 1;
  min-width: 80px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), transparent);
}

.section-heading-cyan span {
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.section-heading-green span {
  background: linear-gradient(90deg, var(--green), transparent);
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #e5e7eb;
}

.movie-card-large .poster-frame {
  height: 320px;
}

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

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

.poster-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  color: #ffffff;
  text-align: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.82));
  opacity: 0;
  transition: opacity 0.28s ease;
}

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

.poster-layer p {
  margin: 0;
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.play-bubble {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
  font-size: 1.5rem;
}

.poster-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  max-width: calc(100% - 24px);
  padding: 4px 9px;
  overflow: hidden;
  border-radius: 9px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 9px;
  overflow: hidden;
  color: #111827;
  font-size: 1.05rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

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

.card-meta {
  justify-content: space-between;
  color: #64748b;
  font-size: 0.9rem;
}

.card-body p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-showcase {
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.category-showcase-block + .category-showcase-block {
  margin-top: 36px;
}

.block-title {
  justify-content: space-between;
  margin-bottom: 18px;
}

.block-title h3 {
  margin: 0;
  font-size: 1.32rem;
}

.block-title a,
.more-link {
  color: var(--blue);
  font-weight: 800;
}

.ranking-panel {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.rank-list li a,
.rank-row a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-list li a:hover,
.rank-row a:hover {
  border-color: #bfdbfe;
  transform: translateX(4px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.08);
}

.rank-num {
  width: 46px;
  color: var(--blue);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.rank-title,
.rank-row strong {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list em,
.rank-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.92rem;
  white-space: nowrap;
}

.more-link {
  display: inline-flex;
  margin-top: 18px;
}

.page-hero-small {
  margin-bottom: 28px;
  padding: 34px;
  border-radius: 26px;
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
  box-shadow: var(--shadow-soft);
}

.page-hero-small h1 {
  margin: 8px 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}

.page-hero-small p {
  width: min(780px, 100%);
  margin: 0;
  color: var(--muted);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.crumbs a {
  color: var(--blue);
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 22px;
  color: #ffffff;
  background: #0f172a;
  box-shadow: var(--shadow-soft);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.category-card:hover img {
  transform: scale(1.07);
  opacity: 0.7;
}

.category-card span {
  position: absolute;
  inset: auto 18px 18px;
  z-index: 2;
}

.category-card strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 900;
}

.category-card em {
  display: block;
  margin-top: 6px;
  color: #e5e7eb;
  font-style: normal;
}

.site-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px 150px;
  gap: 12px;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.site-filter input,
.site-filter select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dbe2ea;
  border-radius: 13px;
  outline: 0;
  padding: 0 13px;
  color: #111827;
  background: #f8fafc;
}

.site-filter input:focus,
.site-filter select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.no-results {
  padding: 34px;
  border: 1px dashed #bfdbfe;
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: #eff6ff;
}

.detail-shell {
  padding-top: 24px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.82fr);
  gap: 28px;
  margin-top: 22px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.56));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.36);
  font-size: 2.3rem;
}

.player-box.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-card,
.side-card {
  margin-top: 22px;
  padding: 24px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.detail-meta {
  margin-bottom: 16px;
}

.detail-meta span {
  padding: 5px 11px;
  color: #475569;
  background: #f1f5f9;
}

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

.tag-row span {
  padding: 5px 11px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 0.92rem;
}

.text-block {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}

.text-block h2,
.side-card h2 {
  margin: 0 0 10px;
  font-size: 1.28rem;
}

.text-block p {
  margin: 0;
  color: #374151;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 92px;
}

.side-card {
  margin-top: 0;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
}

.compact-card img {
  width: 112px;
  height: 72px;
  border-radius: 13px;
  object-fit: cover;
}

.compact-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 0.96rem;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.compact-card:hover strong {
  color: var(--blue);
}

.compact-card em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.84rem;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 42px 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

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

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid #dbe2ea;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

[hidden] {
  display: none !important;
}

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

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

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

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

  .detail-side {
    position: static;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    height: 430px;
    border-radius: 22px;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 0.82));
  }

  .hero-content {
    width: 100%;
    padding: 0 24px;
  }

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

  .search-hero-panel {
    align-items: stretch;
    flex-direction: column;
  }

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

  .site-filter {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 560px) {
  .container,
  .nav-wrap,
  .mobile-nav {
    width: min(100% - 22px, 1280px);
  }

  .page-shell {
    padding-top: 18px;
  }

  .hero {
    height: 390px;
    margin-bottom: 22px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 0.98rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-arrow {
    display: none;
  }

  .search-hero-panel,
  .category-showcase,
  .ranking-panel,
  .page-hero-small,
  .detail-card,
  .side-card {
    padding: 18px;
    border-radius: 18px;
  }

  .hero-search {
    flex-direction: column;
    gap: 8px;
  }

  .hero-search input {
    min-height: 42px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading span {
    width: 100%;
    flex: none;
  }

  .grid-three,
  .grid-four,
  .grid-six,
  .category-overview {
    grid-template-columns: 1fr;
  }

  .poster-frame,
  .movie-card-large .poster-frame {
    height: 260px;
  }

  .site-filter {
    grid-template-columns: 1fr;
  }

  .rank-list li a,
  .rank-row a {
    grid-template-columns: auto 1fr;
  }

  .rank-list em,
  .rank-row em {
    grid-column: 2;
    white-space: normal;
  }

  .compact-card {
    grid-template-columns: 96px 1fr;
  }

  .compact-card img {
    width: 96px;
    height: 64px;
  }
}
