:root {
  --sky: #0284c7;
  --sky-dark: #0369a1;
  --blue: #2563eb;
  --slate: #0f172a;
  --muted: #64748b;
  --line: #dbeafe;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #111827;
  background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 42%, #f8fafc 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(219, 234, 254, 0.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

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

.brand-copy small {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

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

.desktop-nav a,
.mobile-nav a {
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--sky);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: #334155;
  background: #e0f2fe;
}

.mobile-nav {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 16px;
}

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

.mobile-nav a:hover,
.mobile-nav a.active {
  background: #eff6ff;
}

.hero {
  position: relative;
  height: min(70vh, 620px);
  min-height: 480px;
  overflow: hidden;
  background: #020617;
}

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

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.75s ease, transform 1.2s ease;
  pointer-events: none;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 30%, rgba(14, 165, 233, 0.28), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.72) 44%, rgba(2, 6, 23, 0.20) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.05));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 96px;
  max-width: 720px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 750;
  background: linear-gradient(90deg, var(--sky), var(--blue));
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.25);
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-heading h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.detail-heading p {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.hero-meta span,
.hero-meta a {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  color: #ffffff;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--sky), var(--blue));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.btn-ghost {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

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

.btn-primary:hover,
.btn-ghost:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.36);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 32px;
  background: #ffffff;
}

.hero-search {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 22px;
  z-index: 2;
  max-width: 560px;
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 0 12px;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.hero-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--slate);
  font-weight: 800;
  background: #ffffff;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 62px 20px 0;
}

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

.section-title.tight {
  margin-bottom: 18px;
}

.section-title h2,
.toolbar h2,
.detail-card h2,
.detail-side h2 {
  margin: 0;
  color: #0f172a;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.section-title a {
  color: var(--sky);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(219, 234, 254, 0.95);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(14, 165, 233, 0.34);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #dbeafe;
}

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

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

.poster-badge,
.poster-type {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 132, 199, 0.86);
  backdrop-filter: blur(8px);
}

.poster-badge {
  left: 10px;
  top: 10px;
}

.poster-type {
  right: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.68);
}

.card-body {
  padding: 16px;
}

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

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

.card-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.card-desc {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-list span,
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: #075985;
  font-size: 12px;
  font-weight: 750;
  background: linear-gradient(90deg, #e0f2fe, #dbeafe);
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 138px 1fr;
  align-items: stretch;
}

.movie-card-horizontal .poster-link {
  aspect-ratio: auto;
  height: 100%;
  min-height: 150px;
}

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

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

.category-card,
.category-overview-card,
.tag-cloud-panel,
.ranking-panel,
.detail-card,
.detail-side,
.toolbar {
  border: 1px solid rgba(219, 234, 254, 0.95);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
}

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

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

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

.category-card span,
.category-card small {
  position: relative;
  z-index: 1;
}

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

.category-card small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

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

.ranking-panel {
  padding: 22px;
  position: sticky;
  top: 92px;
}

.large-panel {
  max-height: calc(100vh - 112px);
  overflow: auto;
}

.ranking-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.ranking-link {
  display: grid;
  grid-template-columns: 40px 54px 1fr;
  align-items: center;
  gap: 12px;
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--sky), var(--blue));
}

.ranking-link img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ranking-copy strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-copy small {
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tag-cloud-panel {
  padding: 28px;
  margin-bottom: 62px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-cloud a {
  font-size: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tag-cloud a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.18);
}

.page-hero,
.detail-top {
  max-width: 1180px;
  margin: 28px auto 0;
  border-radius: 34px;
  padding: 56px;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 20%, rgba(125, 211, 252, 0.28), transparent 30%),
    linear-gradient(135deg, #0f172a, #0c4a6e 58%, #1d4ed8);
  box-shadow: var(--shadow);
}

.compact-hero {
  min-height: 280px;
}

.category-hero,
.ranking-hero {
  min-height: 340px;
}

.link-meta a:hover {
  background: rgba(255, 255, 255, 0.28);
}

.category-overview-card {
  overflow: hidden;
  padding: 0;
  display: grid;
  grid-template-rows: 140px 1fr;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-overview-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  overflow: hidden;
}

.category-thumbs img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.category-overview-card div:last-child {
  padding: 18px;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-overview-card p {
  min-height: 50px;
  margin: 0 0 16px;
  color: #475569;
  line-height: 1.6;
}

.category-overview-card span {
  color: var(--sky);
  font-weight: 850;
}

.toolbar {
  margin-bottom: 24px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.toolbar p {
  margin: 8px 0 0;
  color: var(--muted);
}

.search-toolbar {
  align-items: flex-end;
}

.search-box {
  display: grid;
  gap: 8px;
  min-width: 260px;
  color: #475569;
  font-weight: 800;
}

.search-box.wide {
  flex: 1;
}

.search-box.narrow {
  min-width: 220px;
}

.search-box input,
.search-box select {
  width: 100%;
  height: 46px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  outline: 0;
  padding: 0 16px;
  color: #0f172a;
  background: #ffffff;
}

.search-box input:focus,
.search-box select:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  border-radius: 18px;
  padding: 22px;
  text-align: center;
  color: #475569;
  background: #ffffff;
}

.empty-state.is-visible {
  display: block;
}

.detail-top {
  padding: 36px 44px 44px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.detail-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.detail-heading p {
  max-width: 760px;
}

.player-section {
  max-width: 1180px;
  margin: 28px auto 0;
  padding: 0 20px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.movie-video,
.player-cover,
.player-cover img,
.player-gradient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  z-index: 1;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #020617;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
  object-fit: cover;
  filter: brightness(0.74);
}

.player-gradient {
  background:
    radial-gradient(circle at center, rgba(14, 165, 233, 0.24), transparent 34%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.18));
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  color: #ffffff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.36);
  transform: translate(-50%, -50%);
}

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

.detail-card {
  padding: 32px;
}

.detail-card h2 {
  margin-top: 0;
  margin-bottom: 14px;
}

.detail-card h2:not(:first-child) {
  margin-top: 30px;
}

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

.detail-side {
  overflow: hidden;
  align-self: start;
}

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

.side-meta {
  padding: 20px;
}

.side-meta p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.large-tags span {
  font-size: 13px;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid #dbeafe;
  background: rgba(255, 255, 255, 0.78);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 32px;
}

.footer-brand p {
  max-width: 460px;
  margin: 18px 0 0;
  color: #475569;
  line-height: 1.7;
}

.site-footer h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.site-footer a {
  color: #475569;
}

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

.footer-bottom {
  border-top: 1px solid #e0f2fe;
  padding: 18px 20px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

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

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

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

  .ranking-panel {
    position: static;
  }
}

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

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

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

  .brand-copy small {
    display: none;
  }

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

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 122px;
  }

  .hero p,
  .page-hero p,
  .detail-heading p {
    font-size: 16px;
  }

  .hero-control {
    display: none;
  }

  .hero-search {
    left: 20px;
    right: 20px;
    bottom: 54px;
  }

  .section {
    padding-top: 44px;
  }

  .section-title,
  .toolbar,
  .detail-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .movie-card-horizontal {
    grid-template-columns: 112px 1fr;
  }

  .page-hero,
  .detail-top {
    margin: 20px 20px 0;
    padding: 34px 24px;
    border-radius: 26px;
  }

  .player-section {
    margin-top: 20px;
  }

  .player-frame {
    border-radius: 22px;
  }

  .play-button {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }

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

@media (max-width: 520px) {
  .header-inner {
    height: 64px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .hero h1,
  .hero h2,
  .page-hero h1,
  .detail-heading h1 {
    font-size: 34px;
  }

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

  .hero-search {
    border-radius: 24px;
    flex-direction: column;
  }

  .hero-search input {
    min-height: 40px;
  }

  .category-overview-card {
    grid-template-rows: 120px 1fr;
  }

  .category-thumbs img {
    height: 120px;
  }

  .detail-card {
    padding: 24px;
  }
}
