:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #020617;
  --dark-soft: #0f172a;
  --accent: #14b8a6;
  --accent-strong: #0f766e;
  --accent-soft: rgba(20, 184, 166, 0.14);
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.16);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 35px rgba(2, 6, 23, 0.24);
}

.site-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-mark,
.footer-logo span {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  color: #ffffff;
  font-size: 15px;
  box-shadow: 0 12px 28px rgba(20, 184, 166, 0.32);
}

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

.nav-link {
  color: #cbd5e1;
  font-weight: 700;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #2dd4bf;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #e2e8f0;
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-menu.is-open {
  display: grid;
  gap: 10px;
}

.mobile-menu .nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.hero {
  position: relative;
  height: 680px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg,
.hero-bg img,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg img {
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  background:
    radial-gradient(
      circle at 80% 25%,
      rgba(20, 184, 166, 0.2),
      transparent 28%
    ),
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.94) 0%,
      rgba(15, 23, 42, 0.7) 44%,
      rgba(15, 23, 42, 0.24) 100%
    ),
    linear-gradient(
      0deg,
      #020617 0%,
      rgba(2, 6, 23, 0.18) 48%,
      rgba(2, 6, 23, 0.55) 100%
    );
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 56px;
  padding: 74px 0 120px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #2dd4bf;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero-desc {
  max-width: 720px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

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

.hero-tags {
  margin: 22px 0 0;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span {
  background: rgba(20, 184, 166, 0.18);
  color: #ccfbf1;
  border: 1px solid rgba(45, 212, 191, 0.35);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(20, 184, 166, 0.28);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-ghost.dark {
  color: var(--ink);
  border-color: var(--line);
  background: #ffffff;
}

.btn-soft {
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.25);
}

.btn.full {
  width: 100%;
  margin-top: 12px;
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.46);
  transform: rotate(2deg);
}

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

.hero-poster:hover img {
  transform: scale(1.07);
}

.hero-poster span {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 184, 166, 0.92);
  color: #ffffff;
  font-size: 24px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.hero-tools {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 30px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.hero-dot.is-active {
  background: #2dd4bf;
}

.hero-search {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-search input,
.filter-search input {
  width: 100%;
  border: 0;
  outline: 0;
}

.hero-search input {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.hero-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.content-section,
.page-main {
  padding: 56px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-title-card h1 {
  margin: 0;
  letter-spacing: -0.05em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-heading p,
.page-hero p,
.detail-one-line {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--accent-strong);
  font-weight: 900;
}

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

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

.movie-card.is-hidden {
  display: none;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

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

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent);
}

.type-badge,
.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #ffffff;
}

.type-badge {
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.72);
}

.year-badge {
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  background: rgba(20, 184, 166, 0.9);
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  padding: 7px 11px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

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

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

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

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

.category-tile,
.category-card a {
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 220px;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
}

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

.category-tile:hover img,
.category-card a:hover img {
  transform: scale(1.08);
  opacity: 0.72;
}

.category-tile::after,
.category-card a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.14));
}

.category-tile div,
.category-card-body {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 22px;
  color: #ffffff;
}

.category-tile h3,
.category-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-tile p,
.category-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

.page-hero {
  overflow: hidden;
  border-radius: 32px;
  padding: 48px;
  background:
    radial-gradient(
      circle at 90% 15%,
      rgba(20, 184, 166, 0.24),
      transparent 28%
    ),
    linear-gradient(135deg, #0f172a, #020617);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.page-hero.small-hero h1 {
  color: #ffffff;
  font-size: clamp(38px, 6vw, 66px);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 17px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: #64748b;
  font-weight: 800;
}

.breadcrumb a {
  color: var(--accent-strong);
}

.breadcrumb-dark {
  color: #cbd5e1;
}

.breadcrumb-dark a {
  color: #5eead4;
}

.filter-panel {
  margin: 26px 0;
  padding: 18px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.filter-search input {
  min-height: 52px;
  padding: 0 18px;
  border-radius: 16px;
  background: #f1f5f9;
  color: var(--ink);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: #e2e8f0;
  color: #334155;
  font-weight: 900;
  cursor: pointer;
}

.filter-chip.is-active {
  background: var(--accent);
  color: #ffffff;
}

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

.category-card a {
  min-height: 280px;
}

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mini-list span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.player-shell {
  background: #020617;
  padding: 24px 0 42px;
}

.video-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #020617;
  color: #ffffff;
  cursor: pointer;
  z-index: 5;
}

.player-cover.is-hidden {
  display: none;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle,
    rgba(20, 184, 166, 0.15),
    rgba(2, 6, 23, 0.78)
  );
}

.play-icon,
.play-text {
  position: relative;
  z-index: 2;
}

.play-icon {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  box-shadow: 0 18px 38px rgba(20, 184, 166, 0.36);
  font-size: 30px;
}

.play-text {
  font-size: 18px;
  font-weight: 900;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 30px;
  padding: 42px 0 20px;
}

.detail-title-card,
.detail-text-block,
.detail-side {
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.detail-title-card,
.detail-text-block {
  padding: 28px;
}

.detail-title-card h1 {
  font-size: clamp(34px, 5vw, 58px);
}

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

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

.detail-text-block {
  margin-top: 22px;
}

.detail-text-block h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-text-block p {
  margin: 0 0 14px;
  color: #334155;
  font-size: 16px;
}

.detail-side {
  align-self: start;
  padding: 18px;
  position: sticky;
  top: 94px;
}

.side-poster {
  overflow: hidden;
  display: block;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

.side-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-section {
  padding-top: 28px;
}

.site-footer {
  margin-top: 34px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer p,
.site-footer ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: #2dd4bf;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
}

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

  .hero-inner {
    grid-template-columns: 1fr 280px;
    gap: 28px;
  }

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

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

  .mobile-toggle {
    display: block;
  }

  .hero {
    height: 760px;
  }

  .hero-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    padding-bottom: 158px;
  }

  .hero h1 {
    font-size: clamp(38px, 13vw, 62px);
  }

  .hero-desc {
    font-size: 16px;
  }

  .hero-poster {
    width: 168px;
    transform: none;
  }

  .hero-tools {
    bottom: 102px;
  }

  .hero-search {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .hero-search button {
    min-height: 44px;
  }

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

  .movie-grid,
  .category-grid,
  .category-list-grid,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-grid {
    gap: 18px;
  }

  .category-tile,
  .category-card a {
    min-height: 240px;
  }

  .page-hero {
    padding: 34px 24px;
    border-radius: 24px;
  }

  .filter-panel {
    border-radius: 20px;
  }

  .detail-side {
    position: static;
  }

  .video-wrap {
    border-radius: 16px;
  }
}

@media (max-width: 520px) {
  .container,
  .site-nav,
  .mobile-menu,
  .footer-inner,
  .hero-inner,
  .hero-tools {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 21px;
  }

  .content-section,
  .page-main {
    padding: 38px 0;
  }

  .movie-card-link {
    display: grid;
    grid-template-columns: 118px 1fr;
    border-radius: 18px;
  }

  .poster-frame {
    aspect-ratio: 3 / 4;
  }

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

  .movie-card-body h3 {
    font-size: 16px;
  }

  .movie-card-body p {
    min-height: 42px;
    font-size: 13px;
  }

  .tag-row {
    display: none;
  }

  .play-icon {
    width: 64px;
    height: 64px;
    font-size: 24px;
  }
}
