:root {
  --bg: #f6fbff;
  --panel: rgba(255, 255, 255, 0.92);
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(14, 165, 233, 0.16);
  --brand: #0284c7;
  --brand-dark: #0369a1;
  --brand-soft: #e0f2fe;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(14, 165, 233, 0.18), transparent 32rem),
    linear-gradient(180deg, #eff9ff 0%, #ffffff 44%, #f8fafc 100%);
}

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.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-dark);
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 22px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  border-radius: 15px;
  background: linear-gradient(135deg, #38bdf8, #0369a1);
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.28);
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  color: #475569;
  border-radius: 999px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.nav-link:hover,
.mobile-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--brand-soft);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--brand-dark);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 10px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.hero-slider {
  width: min(var(--max), calc(100% - 32px));
  margin: 28px auto 34px;
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: #020617;
}

.hero-track {
  min-height: 560px;
  position: relative;
}

.hero-slide {
  min-height: 560px;
  padding: clamp(32px, 6vw, 74px);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.hero-slide[hidden] {
  display: none;
}

.hero-content {
  max-width: 740px;
  color: #ffffff;
}

.hero-kicker,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 7px 13px;
  margin-bottom: 14px;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-kicker {
  color: #ffffff;
  background: rgba(14, 165, 233, 0.34);
  border-color: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.hero-content h1 {
  font-size: clamp(36px, 6vw, 68px);
}

.hero-content h2 {
  margin-top: 12px;
  font-size: clamp(28px, 5vw, 56px);
}

.hero-content p {
  max-width: 680px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.8;
}

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

.primary-button,
.ghost-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--brand-dark);
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.section-link {
  color: #ffffff;
  background: linear-gradient(135deg, #38bdf8, #0369a1);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  right: 26px;
  bottom: 26px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

.content-section,
.page-main,
.detail-main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

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

.page-main,
.detail-main {
  padding: 30px 0 56px;
}

.intro-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(224, 242, 254, 0.82));
  box-shadow: 0 18px 50px rgba(14, 165, 233, 0.12);
}

.intro-strip h2,
.section-head h2,
.page-hero h1,
.detail-content h1,
.detail-content h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.intro-strip h2,
.section-head h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.intro-strip p,
.page-hero p,
.detail-lead,
.detail-content p,
.card-line,
.category-tile p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

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

.section-head.is-left {
  align-items: start;
  justify-content: start;
}

.section-head a {
  color: var(--brand-dark);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 24px 64px rgba(14, 165, 233, 0.17);
}

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

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

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

.poster-badge,
.play-mini {
  position: absolute;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(2, 132, 199, 0.9);
  backdrop-filter: blur(10px);
}

.poster-badge {
  top: 12px;
}

.play-mini {
  bottom: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.card-body {
  padding: 16px;
}

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

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

.card-meta {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.tag-list,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-list span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.movie-card.is-compact {
  display: grid;
  grid-template-columns: 120px 1fr;
  min-height: 170px;
}

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

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

.category-tile {
  min-height: 164px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.18), transparent 9rem),
    #ffffff;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.4);
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 32px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 10px 14px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.06);
}

.rank-no {
  color: var(--brand);
  font-weight: 900;
  font-size: 18px;
}

.rank-item img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

.page-hero {
  padding: clamp(34px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 100% 10%, rgba(14, 165, 233, 0.2), transparent 18rem),
    linear-gradient(135deg, #ffffff, #eff9ff);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
}

.page-hero h1 {
  font-size: clamp(36px, 6vw, 58px);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  font-size: 18px;
}

.filter-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
}

.search-box {
  flex: 1;
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 900;
}

.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  color: #0f172a;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 999px;
  outline: none;
  background: #f8fafc;
}

.search-box input:focus {
  border-color: rgba(14, 165, 233, 0.8);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chips button {
  min-height: 40px;
  padding: 0 14px;
  color: #0369a1;
  border: 0;
  border-radius: 999px;
  background: #e0f2fe;
  cursor: pointer;
  font-weight: 900;
}

.filter-chips button.is-active {
  color: #ffffff;
  background: #0284c7;
}

.empty-state {
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border-radius: 18px;
  background: #ffffff;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: #64748b;
  font-weight: 700;
}

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

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

.detail-player,
.detail-side,
.detail-content,
.related-section {
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
}

.detail-player {
  overflow: hidden;
}

.movie-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #020617;
}

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

.player-mask {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  cursor: pointer;
  background: #020617;
}

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

.big-play {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 7px;
  color: var(--brand-dark);
  font-size: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.34);
}

.movie-player.is-playing .player-mask {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-side {
  padding: 18px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
}

.detail-meta-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.detail-meta-card span {
  min-width: 0;
  padding: 10px 8px;
  overflow: hidden;
  color: #0369a1;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  border-radius: 14px;
  background: #e0f2fe;
  font-size: 13px;
  font-weight: 900;
}

.detail-content {
  margin-top: 28px;
  padding: clamp(24px, 4vw, 42px);
}

.detail-content h1 {
  font-size: clamp(34px, 6vw, 54px);
}

.detail-lead {
  margin: 18px 0 0;
  font-size: 20px;
}

.detail-content h2 {
  margin-top: 34px;
  font-size: 28px;
}

.detail-content p {
  font-size: 17px;
}

.related-section {
  margin-top: 28px;
  padding: 30px;
}

.site-footer {
  margin-top: 32px;
  padding: 42px 0;
  color: #475569;
  border-top: 1px solid rgba(226, 232, 240, 0.88);
  background: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px;
  align-items: center;
}

.footer-inner p {
  max-width: 620px;
  margin: 12px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  color: #0369a1;
  border-radius: 999px;
  background: #e0f2fe;
  font-weight: 800;
}

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
    align-items: center;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .hero-track,
  .hero-slide {
    min-height: 520px;
  }

  .intro-strip,
  .section-head,
  .filter-panel,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

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

  .rank-item {
    grid-template-columns: 38px 52px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .mobile-nav,
  .hero-slider,
  .content-section,
  .page-main,
  .detail-main,
  .footer-inner {
    width: min(100% - 22px, var(--max));
  }

  .site-logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .hero-slider,
  .page-hero,
  .intro-strip,
  .detail-player,
  .detail-side,
  .detail-content,
  .related-section {
    border-radius: 22px;
  }

  .hero-track,
  .hero-slide {
    min-height: 480px;
  }

  .hero-slide {
    padding: 28px 22px 58px;
  }

  .hero-dots {
    left: 22px;
    right: auto;
  }

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

  .movie-card.is-compact {
    grid-template-columns: 106px 1fr;
  }

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

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

  .big-play {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
