:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --deep: #0f172a;
  --card: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 54%, #0f172a 100%);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.22);
}

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

.nav-shell {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.32);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.main-nav a,
.mobile-nav a {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: #67e8f9;
}

.nav-search {
  padding: 9px 16px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.hero-carousel {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 10% 10%, rgba(6, 182, 212, 0.28), transparent 28%), linear-gradient(135deg, #0f172a 0%, #1e3a8a 52%, #0891b2 100%);
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(28px);
  opacity: 0.38;
  pointer-events: none;
}

.orb-one {
  top: 12%;
  left: 4%;
  width: 260px;
  height: 260px;
  background: #22d3ee;
}

.orb-two {
  right: 6%;
  bottom: 8%;
  width: 340px;
  height: 340px;
  background: #2563eb;
}

.hero-shell {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  padding: 74px 0 84px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 54px;
  align-items: center;
}

.hero-slide.is-active {
  display: grid;
  animation: heroFade 0.65s ease both;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #0891b2;
  background: rgba(6, 182, 212, 0.12);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-carousel .eyebrow,
.page-hero .eyebrow,
.detail-hero .eyebrow {
  color: #a5f3fc;
  background: rgba(255, 255, 255, 0.14);
}

.hero-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  color: #a5f3fc;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.primary-btn,
.ghost-btn,
.text-link,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
}

.primary-btn {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  color: #0f172a;
  background: #fff;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(15, 23, 42, 0.3);
}

.ghost-btn {
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  border-radius: 28px;
  box-shadow: 0 34px 90px rgba(2, 6, 23, 0.46);
  background: rgba(15, 23, 42, 0.28);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.45s ease;
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.82));
}

.hero-poster span {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  color: #fff;
  font-weight: 900;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 32px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 58px;
  background: #67e8f9;
}

.content-section {
  padding: 66px 0;
}

.category-section {
  background: linear-gradient(135deg, #fff7ed 0%, #fff1f2 100%);
}

.latest-section {
  background: #fff;
}

.ranking-strip {
  color: #fff;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #0f172a 100%);
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.section-link {
  color: var(--blue);
}

.ranking-strip .section-link,
.ranking-strip .eyebrow {
  color: #67e8f9;
}

.ranking-strip .movie-card {
  background: rgba(255, 255, 255, 0.96);
}

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

.category-tile,
.category-card-large,
.story-card,
.player-card,
.related-panel,
.filter-panel {
  border: 1px solid rgba(226, 232, 240, 0.88);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.category-tile {
  display: block;
  min-height: 232px;
  padding: 18px;
  border-radius: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-card-large:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.16);
}

.category-covers {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 8px;
  height: 108px;
  margin-bottom: 16px;
}

.category-covers img,
.category-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  background: #dbeafe;
}

.category-covers img:first-child {
  grid-row: span 2;
}

.category-tile h3,
.movie-card h3,
.category-card-large h2,
.story-card h2,
.player-card h2,
.related-panel h2 {
  margin: 0;
  color: var(--ink);
}

.category-tile p {
  color: var(--muted);
  line-height: 1.65;
}

.category-tile span,
.text-link {
  color: var(--blue);
  font-weight: 900;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
  transition: opacity 0.2s ease;
}

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

.movie-type,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(37, 99, 235, 0.94);
}

.movie-type {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.play-hover {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-items: center;
  color: #2563eb;
  font-size: 34px;
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.play-hover::before {
  content: "";
  position: absolute;
  width: 66px;
  height: 66px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.22);
}

.play-hover {
  text-indent: 4px;
}

.play-hover::after {
  content: "▶";
  position: relative;
  z-index: 2;
}

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

.movie-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px;
}

.movie-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--blue);
}

.movie-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.movie-meta span,
.movie-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 800;
}

.movie-tags {
  margin-top: 10px;
}

.page-hero,
.detail-hero {
  color: #fff;
  background: radial-gradient(circle at 15% 15%, rgba(103, 232, 249, 0.26), transparent 24%), linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
}

.page-hero .content-shell {
  padding: 72px 0;
}

.page-hero h1,
.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.page-hero p,
.detail-info p {
  max-width: 780px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.75;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.breadcrumb a:hover {
  color: #fff;
}

.hero-mini-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.horizontal-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.horizontal-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
}

.horizontal-card img {
  width: 86px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  flex: 0 0 auto;
}

.horizontal-card span {
  min-width: 0;
}

.horizontal-card strong,
.horizontal-card em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horizontal-card strong {
  font-size: 14px;
}

.horizontal-card em {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-style: normal;
}

.category-list {
  display: grid;
  gap: 22px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  padding: 22px;
  border-radius: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card-large h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.category-card-large p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.category-card-large ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.category-card-large li a {
  color: #334155;
  font-weight: 800;
}

.category-card-large li a:hover {
  color: var(--blue);
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-keyword {
  margin-bottom: 14px;
}

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

.detail-hero .content-shell {
  padding: 44px 0 58px;
}

.detail-top {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.38);
  background: rgba(255, 255, 255, 0.1);
}

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

.detail-info .primary-btn {
  margin-top: 24px;
}

.detail-section {
  padding-top: 42px;
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card,
.story-card,
.related-panel {
  border-radius: 24px;
  padding: 22px;
}

.player-card h2,
.story-card h2,
.related-panel h2 {
  margin-bottom: 16px;
  font-size: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  aspect-ratio: 16 / 9;
  box-shadow: 0 22px 50px rgba(2, 6, 23, 0.28);
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
  z-index: 1;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #fff;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.32), rgba(2, 6, 23, 0.72));
}

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

.play-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  color: var(--blue);
  font-size: 34px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 44px rgba(2, 6, 23, 0.3);
}

.player-overlay strong {
  font-size: 18px;
}

.story-card p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
  font-size: 17px;
}

.detail-tags.wide {
  margin-top: 0;
}

.related-panel {
  position: sticky;
  top: 92px;
}

.related-panel .horizontal-card {
  margin-bottom: 12px;
  color: var(--ink);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.related-panel .horizontal-card em {
  color: var(--muted);
}

.wide-link {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  justify-content: center;
  border-radius: 12px;
  background: #eff6ff;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #020617);
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: start;
  padding: 42px 0 24px;
}

.footer-logo {
  color: #fff;
}

.site-footer p {
  max-width: 520px;
  margin: 16px 0 0;
  line-height: 1.75;
}

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

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

[data-filter-hidden="true"] {
  display: none !important;
}

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

  .hero-slide,
  .detail-grid,
  .detail-top {
    grid-template-columns: 1fr;
  }

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

  .related-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .main-nav,
  .nav-search {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero-shell {
    min-height: auto;
    padding: 54px 0 76px;
  }

  .hero-slide {
    gap: 32px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 280px;
  }

  .hero-dots {
    bottom: 28px;
  }

  .category-grid,
  .movie-grid,
  .filter-selects,
  .footer-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-card-large {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .content-shell,
  .footer-shell,
  .footer-bottom,
  .hero-shell,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

  .category-grid,
  .movie-grid,
  .filter-selects,
  .footer-shell,
  .hero-mini-list {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 46px 0;
  }

  .detail-cover {
    max-width: 280px;
  }

  .category-card-large ul {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }
}
