:root {
  --bg-start: #f8fafc;
  --bg-mid: #eff6ff;
  --bg-end: #ecfeff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --dark: #020617;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, var(--bg-start), var(--bg-mid), var(--bg-end));
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
  font-size: 14px;
}

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

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

.nav-link,
.mobile-nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #475569;
  font-weight: 600;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #eef2ff;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #1e293b;
}

.mobile-nav {
  display: none;
  padding: 8px 20px 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.hero-section {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: #ffffff;
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(34, 211, 238, 0.28), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.70), rgba(15, 23, 42, 0.18));
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 70vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 44px;
}

.hero-copy {
  max-width: 680px;
  animation: fadeIn 0.8s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #22d3ee;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--blue);
}

.hero-copy h1,
.page-hero h1,
.detail-info-text h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-meta {
  margin: 26px 0;
}

.hero-meta span,
.detail-meta span,
.meta-row span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.25s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

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

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
}

.dark-ghost {
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.75);
}

.hero-panel {
  display: block;
}

.hero-panel a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 2 / 3;
  transform: rotate(2deg);
}

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

.hero-panel span,
.play-glow,
.horizontal-cover span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 46px;
  background: rgba(2, 6, 23, 0.25);
  opacity: 0;
  transition: 0.25s ease;
}

.hero-panel a:hover span,
.movie-cover:hover .play-glow,
.horizontal-cover:hover span {
  opacity: 1;
}

.section-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 20px;
}

.section-wrap.no-pad {
  padding-top: 0;
  padding-bottom: 0;
}

.section-band {
  padding: 56px 0;
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.85), rgba(236, 254, 255, 0.95));
}

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

.section-heading h2,
.side-panel h2,
.content-main h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.04em;
}

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

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

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

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

.movie-card,
.category-card,
.side-panel,
.catalog-tools,
.content-main,
.detail-info-card,
.player-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.movie-card {
  transition: 0.25s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.movie-cover img,
.horizontal-cover img,
.category-image img,
.ranking-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .movie-cover img,
.horizontal-card:hover .horizontal-cover img,
.category-card:hover .category-image img,
.ranking-item:hover .ranking-thumb img {
  transform: scale(1.08);
}

.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.duration-badge {
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.68);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.movie-card h3,
.horizontal-card h3,
.ranking-content h3,
.category-body h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.horizontal-card h3 a:hover,
.ranking-content h3 a:hover,
.category-body h2 a:hover {
  color: var(--blue);
}

.movie-card p,
.horizontal-card p,
.ranking-content p,
.category-body p,
.side-panel p,
.content-main p,
.detail-info-text p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.movie-card p {
  display: -webkit-box;
  min-height: 50px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row,
.detail-tags,
.pill-links,
.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row {
  margin: 14px 0;
}

.tag-row span,
.detail-tags a,
.pill-links a,
.category-samples a {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 800;
}

.rail-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x proximity;
}

.horizontal-card {
  flex: 0 0 270px;
  scroll-snap-align: start;
}

.horizontal-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.horizontal-card h3 {
  margin-top: 14px;
}

.horizontal-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

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

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 54px 140px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.ranking-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.ranking-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.ranking-content p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.side-panel {
  position: sticky;
  top: 88px;
  padding: 24px;
}

.side-panel p {
  margin: 12px 0 18px;
}

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

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

.category-image {
  position: relative;
  display: block;
  height: 180px;
  overflow: hidden;
  background: #0f172a;
}

.category-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.75));
}

.category-image span {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 1;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.category-body {
  padding: 20px;
}

.category-body p {
  min-height: 56px;
  margin-bottom: 16px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 72px 20px;
  text-align: center;
  background:
    radial-gradient(circle at 25% 10%, rgba(37, 99, 235, 0.22), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(6, 182, 212, 0.20), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(239,246,255,0.92));
}

.page-hero h1 {
  color: var(--text);
}

.page-hero p {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
}

.catalog-page {
  padding-top: 40px;
}

.catalog-tools {
  margin-bottom: 28px;
  padding: 18px;
}

.catalog-tools label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 800;
}

.catalog-tools input,
.catalog-tools select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 12px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
}

.search-field {
  margin-bottom: 14px;
}

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

.catalog-grid .is-hidden {
  display: none;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
}

.detail-bg div {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.80)),
    linear-gradient(90deg, rgba(37, 99, 235, 0.20), rgba(6, 182, 212, 0.12));
}

.detail-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 20px 64px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

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

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

.player-card {
  padding: 14px;
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(148, 163, 184, 0.25);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(2, 6, 23, 0.18);
  cursor: pointer;
  transition: 0.25s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.28);
  font-size: 32px;
  padding-left: 5px;
}

.play-overlay:hover {
  background: rgba(2, 6, 23, 0.06);
}

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

.detail-info-card {
  display: grid;
  grid-template-rows: auto 1fr;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
}

.detail-info-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info-text {
  padding: 20px;
}

.detail-info-text h1 {
  font-size: 30px;
}

.detail-info-text p {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.detail-meta {
  margin-top: 18px;
  color: #ffffff;
}

.detail-content {
  padding-bottom: 30px;
}

.content-main {
  padding: 28px;
}

.content-main h2 {
  margin-top: 26px;
  margin-bottom: 12px;
  font-size: 28px;
}

.content-main h2:first-child {
  margin-top: 0;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.info-table div {
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
}

.info-table span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.info-table strong {
  color: var(--text);
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

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

.site-footer p {
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 46px;
  height: 46px;
  display: none;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

.back-top.show {
  display: grid;
  place-items: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .hero-content,
  .split-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    display: none;
  }

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

  .side-panel {
    position: static;
  }

  .detail-info-card {
    grid-template-columns: 160px 1fr;
    grid-template-rows: 1fr;
  }

  .detail-info-card img {
    height: 100%;
  }

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

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

  .mobile-toggle {
    display: block;
  }

  .header-inner {
    height: 60px;
  }

  .hero-section,
  .hero-content {
    min-height: 620px;
  }

  .hero-content {
    padding: 52px 20px;
  }

  .hero-actions,
  .section-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .three-cols,
  .four-cols,
  .category-grid,
  .wide-category-grid {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 44px 96px minmax(0, 1fr);
    gap: 10px;
  }

  .ranking-content p {
    -webkit-line-clamp: 1;
  }

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

  .detail-info-card img {
    max-height: 360px;
  }

  .info-table,
  .tool-row {
    grid-template-columns: 1fr;
  }

  .section-wrap {
    padding: 48px 16px;
  }

  .page-hero {
    padding: 56px 16px;
  }
}
