:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #162033;
  --card: #1e293b;
  --card-hover: #243449;
  --line: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #64748b;
  --ocean: #0ea5e9;
  --ocean-dark: #0284c7;
  --ocean-light: #38bdf8;
  --amber: #f59e0b;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.12), transparent 32rem), var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ocean), var(--ocean-dark));
  color: white;
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.28);
  font-size: 15px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-copy strong {
  color: white;
  font-size: 18px;
  line-height: 1.18;
  white-space: nowrap;
}

.brand-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

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

.nav-link {
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 650;
}

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

.menu-button {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  color: white;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 12px 16px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: var(--panel);
}

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

.mobile-link {
  display: block;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 650;
}

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.56) 48%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 720px;
  padding-top: 28px;
  animation: fadeIn 0.55s ease both;
}

.hero h1 {
  margin: 14px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(17px, 2.2vw, 21px);
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  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 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 13px;
  font-weight: 760;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  background: var(--ocean);
  color: white;
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.28);
}

.ghost-button {
  border: 1px solid rgba(226, 232, 240, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  backdrop-filter: blur(12px);
}

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

.primary-button:hover {
  background: var(--ocean-dark);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 38px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(14px);
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 32px;
  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.48);
  transition: width 0.22s ease, background 0.22s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: white;
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ocean-dark);
  color: white;
  font-size: 13px;
  font-weight: 750;
}

.home-layout,
.page-main,
.detail-main {
  padding: 56px 0;
}

.home-layout {
  display: grid;
  gap: 66px;
}

.page-main,
.detail-main {
  display: grid;
  gap: 36px;
}

.section-block,
.panel-section,
.content-card,
.filter-panel,
.page-hero,
.detail-hero,
.watch-section {
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.panel-section,
.content-card,
.filter-panel,
.page-hero,
.detail-hero,
.watch-section {
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: var(--shadow);
}

.section-block {
  display: grid;
  gap: 22px;
}

.panel-section {
  padding: 26px;
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.watch-section h2,
.content-card h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-heading a {
  color: var(--ocean-light);
  font-size: 14px;
  font-weight: 700;
}

.large-grid,
.poster-grid,
.category-grid,
.category-overview-grid,
.split-section {
  display: grid;
  gap: 18px;
}

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

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

.all-grid {
  align-items: stretch;
}

.scroll-row {
  display: grid;
  grid-auto-columns: minmax(250px, 1fr);
  grid-auto-flow: column;
  gap: 16px;
  margin: 0 -26px;
  padding: 0 26px 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
  min-width: 250px;
  scroll-snap-align: start;
}

.movie-card,
.movie-row,
.category-tile,
.category-overview-card,
.rank-item {
  min-width: 0;
}

.movie-card a,
.movie-row a,
.category-tile,
.category-overview-card a,
.rank-item a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: var(--card);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.movie-card a:hover,
.movie-row a:hover,
.category-tile:hover,
.category-overview-card a:hover,
.rank-item a:hover {
  background: var(--card-hover);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.26);
  transform: translateY(-3px);
}

.card-cover,
.row-cover,
.detail-poster,
.category-poster-stack,
.player-shell {
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.card-cover {
  aspect-ratio: 16 / 9;
}

.card-cover img,
.row-cover img,
.detail-poster img,
.category-poster-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-cover img,
.row-cover img,
.hero-image,
.detail-poster img {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.card-body {
  padding: 14px;
}

.card-body h3,
.row-body h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: white;
  font-size: 15px;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card a:hover h3,
.movie-row a:hover h3 {
  color: var(--ocean-light);
}

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

.card-meta {
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.cover-type,
.cover-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(10px);
}

.cover-pill {
  left: 14px;
  right: auto;
  top: auto;
  bottom: 60px;
  background: var(--ocean-dark);
}

.play-circle,
.player-button {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.9);
  color: white;
  box-shadow: 0 14px 35px rgba(14, 165, 233, 0.28);
}

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.play-circle.small {
  width: 44px;
  height: 44px;
}

.movie-card a:hover .play-circle,
.movie-row a:hover .play-circle {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.05);
}

.large-cover .cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.04) 58%);
}

.split-section {
  grid-template-columns: 1.05fr 0.95fr;
  align-items: start;
}

.compact-panel {
  height: 100%;
}

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

.category-tile {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.category-tile strong {
  display: block;
  margin-bottom: 8px;
  color: white;
  font-size: 18px;
}

.category-tile span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-list {
  display: grid;
  gap: 10px;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 48px 74px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px;
}

.rank-no {
  display: grid;
  place-items: center;
  color: var(--ocean-light);
  font-size: 18px;
  font-weight: 850;
}

.rank-item img {
  width: 74px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.rank-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-copy strong,
.rank-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy strong {
  color: white;
  font-size: 14px;
}

.rank-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.movie-row-list {
  display: grid;
  gap: 12px;
}

.movie-row a {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
}

.row-cover {
  aspect-ratio: 16 / 10;
}

.row-body {
  min-width: 0;
  padding: 16px 16px 16px 0;
}

.page-hero {
  padding: clamp(28px, 5vw, 50px);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(15, 23, 42, 0.96) 45%, rgba(2, 6, 23, 0.96));
}

.small-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
}

.small-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

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

.breadcrumb a:hover {
  color: var(--ocean-light);
}

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

.category-overview-card a {
  display: grid;
  grid-template-rows: 150px 1fr;
}

.category-poster-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.category-copy {
  padding: 18px;
}

.category-copy h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-copy p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.category-copy span {
  color: var(--ocean-light);
  font-size: 13px;
  font-weight: 750;
}

.filter-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.sticky-filter {
  position: sticky;
  top: 84px;
  z-index: 30;
}

.filter-panel label {
  color: #cbd5e1;
  font-weight: 750;
}

.filter-panel input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.72);
  color: white;
  padding: 0 16px;
}

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

[data-card].is-hidden {
  display: none;
}

.detail-hero {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 30px;
  padding: 24px;
}

.detail-poster {
  border-radius: 18px;
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow);
}

.detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

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

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

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

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-cloud span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.92);
  color: #cbd5e1;
  font-size: 12px;
}

.watch-section {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.player-shell {
  border-radius: 18px;
  aspect-ratio: 16 / 9;
  background: black;
}

.movie-video,
.player-overlay,
.player-overlay img,
.player-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  z-index: 1;
  background: black;
  object-fit: contain;
}

.player-overlay {
  z-index: 2;
  border: 0;
  padding: 0;
  background: black;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-overlay img {
  object-fit: cover;
}

.player-shade {
  background: rgba(0, 0, 0, 0.46);
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 78px;
  height: 78px;
  font-size: 30px;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-overlay:hover .player-button {
  background: var(--ocean-dark);
  transform: translate(-50%, -50%) scale(1.08);
}

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

.content-card {
  padding: 24px;
}

.content-card p {
  margin: 14px 0 0;
  color: #cbd5e1;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.96);
}

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

.footer-brand p {
  max-width: 520px;
  margin: 16px 0 0;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--muted);
  font-size: 14px;
}

.site-footer a:hover {
  color: var(--ocean-light);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--subtle);
  font-size: 13px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .split-section,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: flex;
  }

  .brand-copy strong {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content {
    padding-right: 18px;
  }

  .hero-arrow {
    display: none;
  }

  .home-layout,
  .page-main,
  .detail-main {
    padding: 36px 0;
  }

  .large-grid,
  .poster-grid,
  .category-grid,
  .category-overview-grid,
  .rank-columns,
  .detail-content {
    grid-template-columns: 1fr 1fr;
  }

  .poster-grid.all-grid {
    grid-template-columns: 1fr 1fr;
  }

  .panel-section,
  .watch-section,
  .content-card,
  .detail-hero {
    padding: 18px;
  }

  .movie-row a {
    grid-template-columns: 126px 1fr;
    gap: 12px;
  }

  .row-body {
    padding: 12px 12px 12px 0;
  }

  .rank-item a {
    grid-template-columns: 42px 62px 1fr;
  }

  .rank-item img {
    width: 62px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .large-grid,
  .poster-grid,
  .category-grid,
  .category-overview-grid,
  .rank-columns,
  .detail-content,
  .poster-grid.all-grid {
    grid-template-columns: 1fr;
  }

  .card-cover,
  .detail-poster {
    aspect-ratio: 16 / 10;
  }

  .hero h1,
  .detail-copy h1,
  .small-hero h1 {
    letter-spacing: -0.04em;
  }

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

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