:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --blue-600: #2563eb;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --dark: #030712;
  --radius: 22px;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-900);
  background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 55%, #f8fafc 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--sky-500), var(--blue-600));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.2);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: clamp(20px, 2vw, 28px);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-4deg);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 650;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: var(--dark);
}

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.4s ease;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  padding: 110px 0 140px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.20);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-head h1,
.detail-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #075985;
  background: var(--sky-100);
  font-size: 13px;
  font-weight: 700;
}

.hero .hero-tags span,
.detail-hero .hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-actions,
.center-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.home-search button {
  color: #fff;
  background: var(--sky-500);
  box-shadow: 0 12px 25px rgba(14, 165, 233, 0.35);
}

.primary-btn:hover,
.home-search button:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--sky-600);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.hero-side-panel {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: flex-end;
  padding-top: 150px;
  pointer-events: none;
}

.glass-panel {
  width: min(380px, 36vw);
  padding: 20px;
  border-radius: var(--radius);
  color: #fff;
  background: rgba(15, 23, 42, 0.50);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.main-content {
  padding: 52px 0;
}

.quick-search-panel,
.content-card,
.category-overview-card,
.player-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.quick-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 460px);
  gap: 24px;
  align-items: center;
  padding: 28px;
  margin-bottom: 50px;
}

.quick-search-panel h2,
.content-card h2,
.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.quick-search-panel p,
.page-head p,
.section-title p,
.category-overview-card p,
.site-footer p {
  color: var(--slate-500);
}

.home-search,
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-search input,
.search-box input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: #fff;
  color: var(--slate-900);
  outline: none;
}

.home-search input,
.search-box input {
  padding: 0 18px;
}

.filter-bar select {
  padding: 0 42px 0 16px;
}

.search-box {
  flex: 1;
  padding: 0 14px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: #fff;
}

.search-box input {
  border: 0;
  padding: 0;
}

.section-title {
  margin: 20px 0 22px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.poster-image,
.compact-thumb {
  display: block;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-image {
  transform: scale(1.07);
  filter: saturate(1.15);
}

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.34);
  font-size: 40px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 132, 199, 0.94);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.meta-line,
.card-desc {
  margin: 0 0 9px;
  color: var(--slate-500);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 42px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-card {
  min-height: 156px;
  padding: 22px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
}

.category-card span,
.category-card strong,
.category-card small {
  display: block;
}

.category-card span {
  font-weight: 900;
  font-size: 20px;
}

.category-card strong {
  margin: 8px 0;
  font-size: 40px;
  line-height: 1;
}

.category-card small {
  color: #dbeafe;
}

.compact-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--slate-900);
  transition: transform 0.2s ease, background 0.2s ease;
}

.compact-card:hover {
  transform: translateX(4px);
  background: #fff;
}

.compact-thumb {
  width: 64px;
  aspect-ratio: 1 / 1;
  border-radius: 13px;
}

.compact-card strong,
.compact-card small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-card strong {
  -webkit-line-clamp: 1;
  font-size: 14px;
}

.compact-card small {
  color: var(--slate-500);
  -webkit-line-clamp: 2;
  font-size: 12px;
}

.page-head {
  min-height: 58vh;
}

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

.breadcrumb a::after {
  content: "/";
  margin-left: 8px;
  color: var(--slate-400, #94a3b8);
}

.breadcrumb.light {
  color: #dbeafe;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 170px 150px;
  gap: 12px;
  align-items: center;
  margin: 28px 0;
}

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

.category-overview-card {
  padding: 24px;
}

.category-overview-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.category-overview-head strong {
  color: var(--sky-600);
  font-size: 30px;
  white-space: nowrap;
}

.text-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--sky-600);
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 1fr minmax(260px, 0.7fr) 70px;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.10);
}

.rank-num {
  color: var(--sky-600);
  font-weight: 900;
  font-size: 20px;
}

.rank-title {
  font-weight: 850;
}

.rank-meta {
  color: var(--slate-500);
  font-size: 14px;
}

.rank-score {
  justify-self: end;
  color: #f97316;
  font-weight: 900;
}

.search-summary {
  margin: 0 0 22px;
  color: var(--slate-500);
  font-weight: 700;
}

.detail-hero {
  color: #fff;
  background-position: center;
  background-size: cover;
}

.detail-hero-inner {
  padding: 74px 0 80px;
}

.detail-title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 30px;
}

.detail-title-row p {
  max-width: 850px;
  color: #dbeafe;
  font-size: 18px;
}

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

.detail-main,
.detail-side {
  display: grid;
  gap: 24px;
}

.player-card {
  overflow: hidden;
}

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

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

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(14, 165, 233, 0.88);
  box-shadow: 0 20px 45px rgba(14, 165, 233, 0.35);
  cursor: pointer;
  font-size: 34px;
  transform: translate(-50%, -50%);
}

.big-play.is-hidden {
  display: none;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: calc(100% - 36px);
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  font-size: 13px;
}

.source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
  background: #fff;
}

.source-tab {
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  padding: 8px 15px;
  color: var(--slate-700);
  background: var(--slate-50);
  cursor: pointer;
}

.source-tab.is-active {
  color: #fff;
  border-color: var(--sky-500);
  background: var(--sky-500);
}

.content-card {
  padding: 24px;
}

.content-card p {
  margin: 0;
  color: var(--slate-700);
  font-size: 17px;
}

.info-card dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-card div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--slate-100);
  padding-bottom: 12px;
}

.info-card dt {
  color: var(--slate-500);
}

.info-card dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.tag-row.large span {
  min-height: 34px;
  font-size: 14px;
}

.site-footer {
  margin-top: 30px;
  color: #cbd5e1;
  background: #111827;
}

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

.footer-brand {
  color: #fff;
  margin-bottom: 14px;
}

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

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a:hover {
  color: var(--sky-400);
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

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

@media (max-width: 1080px) {
  .desktop-nav {
    gap: 12px;
    font-size: 14px;
  }

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

  .hero-side-panel {
    display: none;
  }

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header-inner {
    min-height: 64px;
  }

  .hero {
    min-height: 560px;
  }

  .hero-content {
    padding: 78px 0 110px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-panel,
  .detail-title-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .home-search {
    flex-direction: column;
    align-items: stretch;
  }

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

  .category-grid,
  .category-overview-grid,
  .compact-list.two-col {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 42px 1fr 60px;
  }

  .rank-meta {
    grid-column: 2 / -1;
  }

  .content-card,
  .quick-search-panel,
  .category-overview-card {
    padding: 18px;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

  .card-desc {
    display: none;
  }
}
