:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --teal: #0d9488;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --dark: #0b1220;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, rgba(13, 148, 136, 0.12), transparent 32rem), var(--bg);
  line-height: 1.6;
}

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

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

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link {
  position: relative;
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -9px;
  height: 3px;
  border-radius: 999px;
  background: var(--teal);
  transition: right 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--teal);
}

.nav-link:hover::after,
.nav-link.active::after {
  right: 0;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: #eef2f7;
  font-size: 24px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: #334155;
  font-weight: 700;
  background: rgba(241, 245, 249, 0.8);
}

.mobile-link.active,
.mobile-link:hover {
  color: var(--teal);
  background: rgba(13, 148, 136, 0.1);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a 0%, #0d9488 48%, #2563eb 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.2), transparent 28rem), radial-gradient(circle at 86% 12%, rgba(34, 211, 238, 0.28), transparent 24rem), linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.45));
}

.hero-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 78px 0 24px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  align-items: center;
  gap: 48px;
  min-height: 460px;
}

.hero-slide.active {
  display: grid;
  animation: fadeUp 0.55s ease both;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow,
.rank-hero .eyebrow {
  color: #a7f3d0;
}

.hero h1,
.rank-hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-summary,
.rank-hero p,
.page-hero p,
.detail-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.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 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #0f766e;
  background: rgba(240, 253, 250, 0.92);
}

.tag-row span {
  color: #0f766e;
  background: #ccfbf1;
}

.tag-row.large span {
  font-size: 13px;
  padding: 7px 12px;
}

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

.primary-btn,
.ghost-btn,
.section-link,
.text-btn,
.inline-action a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.text-btn:hover,
.inline-action a:hover {
  transform: translateY(-2px);
}

.hero-cover,
.rank-hero-cover,
.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.16);
}

.hero-cover::before,
.rank-hero-cover::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(34, 211, 238, 0.25));
}

.hero-cover img,
.rank-hero-cover img,
.detail-poster img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  border-radius: inherit;
}

.hero-cover span {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 16px;
  color: #fff;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(14px);
}

.hero-thumbs {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 46px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 9px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  cursor: pointer;
  text-align: left;
}

.hero-thumb.active {
  background: rgba(255, 255, 255, 0.25);
}

.hero-thumb img {
  width: 46px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-thumb span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  font-weight: 800;
}

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

.section-head {
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

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

.section-link,
.text-btn,
.inline-action a {
  color: var(--teal);
  background: #ecfeff;
}

.filter-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px auto;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(14px);
}

.filter-panel label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select,
.filter-panel button {
  width: 100%;
  min-height: 44px;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.filter-panel button {
  align-self: end;
  border: 0;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}

.empty-state {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 16px;
  color: #64748b;
  text-align: center;
  background: #f1f5f9;
}

.inline-action {
  margin-top: 16px;
  text-align: right;
}

.category-grid,
.movie-grid,
.rank-grid,
.category-overview-grid {
  display: grid;
  gap: 20px;
}

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

.category-card,
.category-overview-cover {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border-radius: 24px;
  color: #fff;
  box-shadow: var(--shadow);
}

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

.category-card:hover img,
.category-overview-card:hover img,
.movie-card:hover img {
  transform: scale(1.06);
}

.category-layer,
.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 18%, rgba(15, 23, 42, 0.9));
}

.category-card strong,
.category-card em {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-card strong {
  bottom: 58px;
  font-size: 20px;
}

.category-card em {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-style: normal;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
}

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

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 25px rgba(239, 68, 68, 0.26);
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  margin: 0 0 8px;
  min-height: 52px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-body h3 a:hover {
  color: var(--teal);
}

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

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

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf2f7;
  font-size: 13px;
  font-weight: 900;
}

.card-actions a {
  color: var(--teal);
}

.card-actions span {
  color: #f59e0b;
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
}

.movie-card.compact .poster-link img {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card.compact .movie-body h3 {
  min-height: auto;
  font-size: 16px;
}

.movie-card.compact .movie-line {
  min-height: auto;
}

.page-hero,
.rank-hero,
.detail-top {
  width: min(1180px, calc(100% - 32px));
  margin: 36px auto 0;
  border-radius: 34px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #0d9488 58%, #2563eb);
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 70px;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.82);
}

.rank-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  align-items: center;
  padding: 46px;
}

.rank-hero-cover img {
  aspect-ratio: 3 / 4.05;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  border-radius: 28px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.category-overview-card h2 {
  margin: 0 0 8px;
}

.category-overview-card p {
  color: var(--muted);
  margin: 0 0 12px;
}

.category-overview-card ul {
  margin: 0 0 14px;
  padding-left: 18px;
  color: #334155;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.rank-table th,
.rank-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
}

.rank-table th {
  color: #0f766e;
  font-size: 13px;
  background: #f0fdfa;
}

.rank-table a {
  font-weight: 900;
}

.detail-top {
  padding: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

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

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

.detail-info .detail-line {
  color: rgba(255, 255, 255, 0.85);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.detail-meta div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
}

.detail-meta dt {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.detail-meta dd {
  margin: 4px 0 0;
  color: #fff;
  font-weight: 900;
}

.player-section {
  padding-top: 36px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.player-overlay span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.35);
}

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

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

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

.content-card {
  border-radius: 26px;
  padding: 26px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 12px;
}

.content-card p {
  margin: 0;
  color: #334155;
}

.site-footer {
  margin-top: 50px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.9fr 1fr;
  gap: 34px;
}

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

.site-footer p,
.site-footer a,
.site-footer li {
  color: rgba(255, 255, 255, 0.72);
}

.site-footer a:hover {
  color: #5eead4;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.56);
  font-size: 14px;
}

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

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

  .footer-grid,
  .filter-panel,
  .rank-hero,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-cover {
    max-width: 380px;
  }
}

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

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

  .header-inner {
    height: 68px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .hero {
    min-height: auto;
  }

  .hero-shell {
    padding: 42px 0 20px;
  }

  .hero h1,
  .rank-hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-thumbs {
    grid-template-columns: 1fr;
    margin-bottom: 30px;
  }

  .category-grid,
  .movie-grid,
  .rank-grid,
  .category-overview-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

  .section-head.split {
    display: grid;
  }

  .page-hero,
  .rank-hero,
  .detail-top {
    margin-top: 20px;
    padding: 28px;
    border-radius: 26px;
  }

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

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

@media (max-width: 520px) {
  .section {
    padding: 42px 0;
  }

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

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