:root {
  color-scheme: light;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --indigo: #4f46e5;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f0f9ff;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 45%, #eef2ff 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.08);
}

.nav-wrap {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 24px rgba(6, 182, 212, 0.34);
  font-size: 13px;
  padding-left: 2px;
}

.brand-text {
  font-size: 21px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--cyan-dark), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--cyan-dark);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: #374151;
}

.mobile-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 22px 18px;
  border-top: 1px solid var(--line);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.active {
  background: #f0f9ff;
}

.hero {
  position: relative;
  height: min(720px, 72vh);
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.58) 45%, rgba(2, 6, 23, 0.18)), linear-gradient(0deg, rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.08) 45%);
}

.hero-content {
  position: absolute;
  inset: 0;
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 48px;
}

.hero-copy {
  max-width: 700px;
  color: #fff;
}

.hero-kicker,
.hero-tags,
.detail-meta,
.detail-tags,
.genre-strip,
.tag-row,
.meta-row,
.filter-row,
.quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-kicker span,
.hero-tags span,
.detail-tags span,
.genre-strip span,
.tag-row span {
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 750;
}

.hero-kicker span:first-child {
  background: var(--cyan);
  color: #fff;
}

.hero-kicker span:last-child,
.hero-tags span {
  background: rgba(255, 255, 255, 0.17);
  color: #fff;
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 900;
}

.hero p {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

.primary-btn,
.ghost-btn,
.search-box button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn,
.search-box button {
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.25);
}

.primary-btn:hover,
.search-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(37, 99, 235, 0.34);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.23);
  transform: translateY(-2px);
}

.hero-poster {
  width: 310px;
  justify-self: end;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

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

.hero-dot.active {
  width: 58px;
  background: #fff;
}

.quick-search-panel {
  max-width: 1180px;
  margin: -44px auto 0;
  position: relative;
  z-index: 4;
  padding: 0 22px;
}

.search-box,
.inline-search {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.search-box input,
.inline-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 0 18px;
  color: #0f172a;
  outline: none;
  background: #fff;
}

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

.quick-links {
  justify-content: center;
  margin-top: 18px;
}

.quick-links a,
.filter-chip {
  border: 1px solid rgba(8, 145, 178, 0.18);
  border-radius: 999px;
  padding: 9px 15px;
  background: rgba(255, 255, 255, 0.78);
  color: #0f766e;
  font-weight: 750;
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.09);
}

.filter-chip {
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover,
.quick-links a:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.page-section,
.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 70px 22px;
}

.page-shell {
  padding-top: 30px;
}

.flush {
  padding-left: 0;
  padding-right: 0;
}

.section-soft {
  max-width: none;
  margin: 0;
  padding-left: max(22px, calc((100vw - 1180px) / 2 + 22px));
  padding-right: max(22px, calc((100vw - 1180px) / 2 + 22px));
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(10px);
}

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

.section-head h2,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.035em;
  color: #0f172a;
}

.section-head p,
.page-hero p,
.category-card-large p,
.footer-brand p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.section-more,
.text-link {
  color: var(--cyan-dark);
  font-weight: 850;
}

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

.category-tile {
  min-height: 210px;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
  isolation: isolate;
}

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

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.1));
  z-index: 1;
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
  display: block;
  margin: 0 18px;
}

.category-tile strong {
  padding-top: 124px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile em {
  margin-top: 8px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

.category-tile:hover img {
  transform: scale(1.08);
}

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

.movie-card {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #020617;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.07);
  opacity: 0.86;
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-weight: 850;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 8px 13px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.meta-row {
  color: var(--cyan-dark);
  font-size: 13px;
  font-weight: 750;
  justify-content: space-between;
}

.card-body h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

.card-body h3 a:hover {
  color: var(--cyan-dark);
}

.card-body p {
  margin: 0;
  min-height: 68px;
  color: #64748b;
  line-height: 1.65;
  font-size: 14px;
}

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

.tag-row span {
  padding: 5px 9px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 12px;
}

.ranking-block {
  padding-top: 60px;
}

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

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

.ranking-row {
  display: grid;
  grid-template-columns: 44px 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ranking-row:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.13);
}

.ranking-index {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.ranking-row img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-info {
  min-width: 0;
}

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

.ranking-info strong {
  font-weight: 850;
  color: #111827;
}

.ranking-info em {
  margin-top: 5px;
  font-style: normal;
  color: #64748b;
  font-size: 13px;
}

.ranking-score {
  color: #f59e0b;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--cyan-dark);
}

.page-hero {
  border-radius: 30px;
  padding: 42px;
  color: #0f172a;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 254, 255, 0.82));
  box-shadow: var(--shadow);
  margin-bottom: 34px;
}

.page-hero p {
  max-width: 720px;
  margin: 14px 0 0;
}

.category-hero .inline-search,
.small-hero .inline-search {
  margin-top: 24px;
}

.inline-search {
  max-width: 720px;
  margin-top: 24px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.filter-row {
  margin-top: 20px;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 18px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
}

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

.category-images img {
  height: 150px;
  width: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.category-card-large h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.category-card-large h2 a:hover {
  color: var(--cyan-dark);
}

.empty-state {
  margin: 28px 0 0;
  padding: 18px;
  text-align: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

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

.player-card,
.detail-content,
.side-card {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-element {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: #020617;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

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

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92px;
  height: 92px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.34);
}

.play-button b {
  font-size: 36px;
  padding-left: 6px;
}

.detail-content {
  margin-top: 24px;
  padding: 30px;
}

.detail-content h1 {
  margin-bottom: 14px;
}

.detail-meta span {
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 750;
  font-size: 13px;
}

.lead-text {
  margin: 22px 0;
  color: #334155;
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags span,
.genre-strip span {
  color: #0e7490;
  background: #ecfeff;
}

.detail-content h2,
.side-card h2 {
  margin: 28px 0 12px;
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
}

.detail-content p {
  color: #475569;
  line-height: 1.9;
}

.genre-strip {
  margin-top: 24px;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 22px;
}

.side-card {
  padding: 20px;
}

.poster-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
}

.poster-side h2 {
  margin-top: 16px;
}

.poster-side p {
  margin: 0;
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-list a {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-list img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
}

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

.side-list strong {
  font-weight: 850;
}

.side-list em {
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
  font-style: normal;
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 50px 22px 28px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  color: #fff;
  font-size: 20px;
}

.site-footer h3 {
  color: #fff;
  margin: 0 0 16px;
  font-size: 18px;
}

.site-footer a {
  display: block;
  margin: 10px 0;
  color: #cbd5e1;
}

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

.footer-bottom {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid rgba(203, 213, 225, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .hero-content,
  .detail-layout,
  .footer-main {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

  .category-list-large,
  .ranking-list.compact {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero {
    min-height: 560px;
    height: 68vh;
  }

  .hero-content {
    padding: 30px 18px 72px;
  }

  .hero h1 {
    font-size: 40px;
  }

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

  .quick-search-panel {
    margin-top: -26px;
    padding: 0 16px;
  }

  .search-box,
  .inline-search {
    flex-direction: column;
  }

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

  .page-section,
  .page-shell {
    padding: 46px 16px;
  }

  .page-shell {
    padding-top: 22px;
  }

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

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

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

  .category-images img {
    height: 130px;
  }

  .ranking-row {
    grid-template-columns: 34px 54px minmax(0, 1fr);
  }

  .ranking-row img {
    width: 54px;
    height: 74px;
  }

  .ranking-score {
    display: none;
  }

  .detail-content,
  .side-card,
  .page-hero {
    padding: 22px;
    border-radius: 22px;
  }

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

  .footer-main,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 460px) {
  .brand-text {
    font-size: 18px;
  }

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

  .card-body p {
    min-height: auto;
  }
}
