:root {
  --cyan-50: #ecfeff;
  --cyan-100: #cffafe;
  --cyan-300: #67e8f9;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;
  --cyan-700: #0e7490;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 4px 18px rgba(15, 23, 42, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--slate-800);
  background: linear-gradient(135deg, var(--slate-50), var(--slate-100));
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--cyan-600), var(--blue-700));
  box-shadow: 0 12px 30px rgba(14, 116, 144, 0.26);
}

.navbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--cyan-600);
  background: var(--white);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.96rem;
  font-weight: 600;
}

.nav-links a {
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: rgba(255, 255, 255, 0.85);
  transition: transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cyan-100);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.mobile-toggle {
  display: none;
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 9px 12px;
}

.mobile-nav {
  display: none;
  padding: 0 0 18px;
}

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

.mobile-nav a {
  color: var(--white);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.hero {
  position: relative;
  height: 60vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 1s ease, transform 1.4s ease;
  transform: scale(1.02);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.84), rgba(15, 23, 42, 0.56), rgba(15, 23, 42, 0.12));
}

.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(100%, 720px);
  color: var(--white);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.badge-cyan {
  color: var(--white);
  background: var(--cyan-600);
}

.badge-blue {
  color: var(--white);
  background: var(--blue-600);
}

.badge-soft {
  color: var(--cyan-700);
  background: var(--cyan-100);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 4.5rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.hero p {
  margin: 22px 0 0;
  max-width: 680px;
  color: var(--slate-200);
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 22px;
  color: var(--slate-200);
  font-weight: 700;
}

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

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

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

.btn-primary {
  color: var(--white);
  background: var(--cyan-600);
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.35);
}

.btn-primary:hover {
  background: var(--cyan-700);
}

.btn-ghost {
  color: var(--white);
  background: rgba(15, 23, 42, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(0, 0, 0, 0.52);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--white);
}

.section {
  padding: 56px 0;
}

.section-soft {
  background: linear-gradient(180deg, var(--white), var(--slate-100));
}

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

.section-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--slate-800);
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  line-height: 1.2;
  font-weight: 900;
}

.section-title::before {
  content: "";
  width: 8px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan-500), var(--blue-600));
}

.section-desc {
  margin: 8px 0 0;
  color: var(--slate-600);
  line-height: 1.7;
}

.more-link {
  color: var(--cyan-600);
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transform: translateY(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--slate-900);
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0));
  transition: opacity 0.3s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.play-hover {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--cyan-600);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.55);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-label {
  position: absolute;
  z-index: 4;
  top: 10px;
  padding: 5px 9px;
  border-radius: 8px;
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 800;
}

.card-type {
  left: 10px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
}

.card-year {
  right: 10px;
  background: var(--cyan-600);
}

.card-body {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.card-title {
  margin: 0;
  color: var(--slate-800);
  font-size: 1.07rem;
  font-weight: 900;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.movie-card:hover .card-title {
  color: var(--cyan-600);
}

.card-line {
  min-height: 42px;
  margin: 0;
  color: var(--slate-600);
  font-size: 0.92rem;
  line-height: 1.55;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--slate-500);
  font-size: 0.78rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

.tag-cyan {
  color: var(--cyan-700);
  background: var(--cyan-100);
}

.tag-blue {
  color: var(--blue-700);
  background: var(--blue-100);
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 26px;
  border-radius: var(--radius);
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -34px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 46px rgba(8, 145, 178, 0.26);
}

.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 900;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--cyan-100);
  font-size: 0.92rem;
  line-height: 1.65;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 60px 150px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-num {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan-600), var(--blue-600));
}

.rank-cover {
  width: 150px;
  height: 86px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--slate-900);
}

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

.rank-title {
  margin: 0 0 7px;
  color: var(--slate-800);
  font-size: 1.06rem;
  font-weight: 900;
}

.rank-item:hover .rank-title {
  color: var(--cyan-600);
}

.rank-line {
  margin: 0;
  color: var(--slate-600);
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.rank-side {
  display: grid;
  gap: 8px;
  justify-items: end;
  color: var(--slate-500);
  font-size: 0.88rem;
  white-space: nowrap;
}

.page-hero {
  padding: 58px 0 48px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1.1;
  font-weight: 900;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--slate-300);
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.search-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--slate-700);
  background: var(--slate-50);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus,
.filter-select:focus {
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
  gap: 28px;
}

.breadcrumb {
  margin: 0 0 20px;
  color: var(--cyan-600);
  font-weight: 800;
}

.player-card,
.detail-card {
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.22));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: 999px;
  padding: 16px 24px;
  color: var(--white);
  background: var(--cyan-600);
  box-shadow: 0 14px 34px rgba(8, 145, 178, 0.32);
  font-size: 1.02rem;
  font-weight: 900;
}

.play-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--cyan-600);
  background: var(--white);
}

.detail-body {
  padding: 24px;
}

.detail-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.1;
  font-weight: 900;
  color: var(--slate-800);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.detail-text {
  color: var(--slate-700);
  line-height: 1.9;
}

.detail-text h2 {
  margin: 30px 0 12px;
  color: var(--slate-800);
  font-size: 1.35rem;
  font-weight: 900;
}

.detail-text p {
  margin: 0 0 16px;
}

.poster-panel {
  padding: 18px;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  object-fit: cover;
  background: var(--slate-900);
}

.side-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan-50), var(--blue-50));
}

.side-box h2 {
  margin: 0 0 12px;
  color: var(--slate-800);
  font-size: 1.1rem;
  font-weight: 900;
}

.side-box p {
  margin: 0;
  color: var(--slate-600);
  line-height: 1.7;
}

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

.hidden-card {
  display: none !important;
}

.site-footer {
  margin-top: auto;
  color: var(--white);
  background: linear-gradient(180deg, var(--slate-800), var(--slate-900));
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0 32px;
}

.footer-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 900;
}

.footer-inner p,
.footer-inner a {
  color: var(--slate-300);
  line-height: 1.8;
  font-size: 0.92rem;
}

.footer-inner a:hover {
  color: var(--cyan-300);
}

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--slate-400);
  font-size: 0.88rem;
}

@media (min-width: 768px) {
  .hero {
    height: 70vh;
  }
}

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

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

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

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

  .navbar {
    min-height: 64px;
  }

  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: 560px;
    height: auto;
  }

  .hero-slide::before {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.62));
  }

  .hero-arrow {
    top: auto;
    bottom: 72px;
  }

  .hero-prev {
    left: 18px;
  }

  .hero-next {
    right: 18px;
  }

  .section-head {
    display: grid;
    align-items: start;
  }

  .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 46px 1fr;
  }

  .rank-cover,
  .rank-side {
    display: none;
  }

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

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