* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #1e293b;
  --panel-lift: #24344b;
  --line: #1e293b;
  --line-strong: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #64748b;
  --ocean: #0ea5e9;
  --ocean-dark: #0284c7;
  --ocean-soft: rgba(14, 165, 233, 0.18);
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(14, 165, 233, 0.16), transparent 30rem),
    radial-gradient(circle at 85% 2%, rgba(56, 189, 248, 0.11), transparent 34rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

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(51, 65, 85, 0.65);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--ocean), var(--ocean-dark));
  box-shadow: 0 0 28px rgba(14, 165, 233, 0.45);
  font-size: 14px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong,
.footer-brand strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-nav-link {
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #ffffff;
  background: var(--ocean-dark);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #e2e8f0;
  background: var(--panel-soft);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 10px 24px 18px;
  border-top: 1px solid var(--line-strong);
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav-link {
  padding: 11px 14px;
}

.hero-slider {
  position: relative;
  height: 60vh;
  min-height: 500px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.1)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.68), transparent 42%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  transform: translateY(-50%);
  width: min(680px, calc(100% - 48px));
  animation: fadeIn 0.5s ease;
}

.hero-badge,
.eyebrow,
.type-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--ocean-dark);
  font-weight: 700;
}

.hero-badge,
.eyebrow {
  padding: 7px 14px;
  font-size: 13px;
}

.hero-content h1 {
  margin: 20px 0 16px;
  max-width: 760px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  margin: 0;
  max-width: 650px;
  color: #cbd5e1;
  font-size: 19px;
}

.hero-meta,
.meta-line,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.hero-meta {
  margin-top: 18px;
  font-size: 14px;
}

.hero-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
  content: "•";
  margin-left: 10px;
  color: #475569;
}

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

.primary-button,
.ghost-button,
.panel-link,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  min-height: 52px;
  padding: 0 28px;
  color: #ffffff;
  background: var(--ocean);
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.23);
}

.primary-button:hover {
  background: var(--ocean-dark);
  transform: translateY(-2px) scale(1.02);
}

.ghost-button {
  min-height: 52px;
  padding: 0 24px;
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.24);
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
}

.ghost-button:hover {
  color: #ffffff;
  border-color: rgba(14, 165, 233, 0.65);
  background: rgba(14, 165, 233, 0.18);
}

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

.hero-control:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.06);
}

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

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

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

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

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

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.home-shell {
  display: grid;
  gap: 70px;
}

.content-section {
  display: grid;
  gap: 24px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2,
.ranking-panel h2,
.player-section h2,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-more,
.panel-link,
.text-button {
  color: #7dd3fc;
  font-size: 14px;
}

.slate-panel,
.ranking-panel,
.player-section,
.detail-article,
.detail-side,
.category-card-full {
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.slate-panel {
  padding: 28px;
}

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

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

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

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scrollbar-width: thin;
}

.movie-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--panel-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  background: var(--panel-lift);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

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

.poster-link img,
.horizontal-cover img,
.category-tile img,
.category-card-media img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover img,
.category-tile:hover img,
.category-card-full:hover img {
  transform: scale(1.06);
}

.poster-overlay,
.poster-gradient {
  position: absolute;
  inset: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.poster-overlay {
  background: rgba(0, 0, 0, 0.38);
}

.poster-gradient {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.08));
}

.movie-card:hover .poster-overlay {
  background: rgba(0, 0, 0, 0.18);
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.92);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.play-icon.large {
  width: 64px;
  height: 64px;
  opacity: 0;
}

.movie-card:hover .play-icon {
  transform: translate(-50%, -50%) scale(1.12);
}

.movie-card:hover .play-icon.large {
  opacity: 1;
}

.type-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  background: rgba(15, 23, 42, 0.82);
  font-size: 12px;
}

.large-card .poster-link h3 {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  margin: 0;
  color: #ffffff;
  font-size: 20px;
  line-height: 1.3;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body {
  padding: 16px;
}

.card-body h3,
.horizontal-info h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body h3 a:hover,
.horizontal-info h3 a:hover,
.category-card-full h2 a:hover {
  color: #38bdf8;
}

.card-body p,
.horizontal-info p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-line {
  justify-content: space-between;
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #bae6fd;
  background: var(--ocean-soft);
  font-size: 12px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 14px;
  padding: 10px;
}

.horizontal-cover {
  position: relative;
  min-height: 96px;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

.horizontal-info {
  min-width: 0;
  padding: 4px 6px 4px 0;
}

.rank-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
  font-size: 13px;
}

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

.category-tile {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel-soft);
  box-shadow: var(--shadow);
}

.category-tile span {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.15));
}

.category-tile strong,
.category-tile small {
  position: absolute;
  left: 16px;
  right: 16px;
  z-index: 2;
}

.category-tile strong {
  bottom: 54px;
  font-size: 20px;
}

.category-tile small {
  bottom: 16px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.ranking-panel {
  padding: 24px;
}

.ranking-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.panel-link {
  width: 100%;
  min-height: 46px;
  margin-top: 18px;
  border: 1px solid rgba(14, 165, 233, 0.45);
  background: rgba(14, 165, 233, 0.1);
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 34px;
  padding: 58px;
  border-radius: 26px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.26), rgba(15, 23, 42, 0.78)),
    var(--panel);
  box-shadow: var(--shadow);
}

.small-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #7dd3fc;
}

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

.category-card-full {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

.category-card-media {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 160px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--panel-soft);
}

.category-card-media img {
  min-width: 0;
}

.category-card-full h2 {
  margin: 4px 0 8px;
  font-size: 24px;
}

.category-card-full p {
  margin: 0 0 18px;
  color: var(--muted);
}

.rank-layout {
  max-width: 920px;
}

.page-ranking {
  margin-top: 0;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 760px;
  margin-top: 26px;
}

.search-box input {
  width: 100%;
  height: 54px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  outline: none;
  padding: 0 18px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.82);
}

.search-box input:focus {
  border-color: var(--ocean);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.search-box button {
  height: 54px;
  border: 0;
  border-radius: 14px;
  padding: 0 24px;
  color: #ffffff;
  background: var(--ocean-dark);
  font-weight: 800;
  cursor: pointer;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-bottom: 34px;
  padding: 30px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.18), transparent 26rem),
    rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(51, 65, 85, 0.72);
  box-shadow: var(--shadow);
}

.detail-poster {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: var(--panel-soft);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.detail-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
}

.lead-text {
  margin: 0 0 18px;
  color: #cbd5e1;
  font-size: 18px;
}

.detail-tags {
  margin: 20px 0 24px;
}

.player-section {
  display: grid;
  gap: 18px;
  margin-bottom: 34px;
  padding: 24px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.2));
  cursor: pointer;
}

.video-overlay.hidden {
  display: none;
}

.video-overlay span {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.92);
  box-shadow: 0 0 46px rgba(14, 165, 233, 0.45);
  font-size: 34px;
}

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

.detail-article,
.detail-side {
  padding: 28px;
}

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

.detail-article p {
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 17px;
}

.detail-side dl {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.detail-side dl div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}

.detail-side dt {
  color: var(--subtle);
}

.detail-side dd {
  margin: 0;
  color: #e2e8f0;
}

.detail-side a {
  color: #7dd3fc;
}

.detail-pager {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.detail-pager a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #dbeafe;
  background: rgba(14, 165, 233, 0.13);
}

.site-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.65);
  background: rgba(15, 23, 42, 0.88);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
}

.footer-brand {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.footer-brand p,
.copyright {
  margin: 6px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 22px;
  color: #cbd5e1;
  font-size: 14px;
}

.footer-links a:hover {
  color: #7dd3fc;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 1120px) {
  .large-grid,
  .movie-grid,
  .compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .ranking-panel,
  .detail-side {
    width: 100%;
  }
}

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

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

  .hero-slider {
    min-height: 540px;
  }

  .hero-control {
    display: none;
  }

  .page-shell {
    padding: 36px 18px 58px;
  }

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

  .category-card-full,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 36px 24px;
  }

  .detail-poster {
    max-width: 100%;
  }
}

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

  .brand-text strong {
    font-size: 18px;
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-actions,
  .section-heading,
  .search-box {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .primary-button,
  .ghost-button,
  .search-box button {
    width: 100%;
  }

  .large-grid,
  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview {
    grid-template-columns: 1fr;
  }

  .slate-panel,
  .ranking-panel,
  .player-section,
  .detail-article,
  .detail-side,
  .detail-hero {
    padding: 18px;
  }

  .horizontal-card {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .horizontal-cover {
    min-height: 86px;
  }

  .detail-side dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
