:root {
  --bg: #f0f9ff;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbeafe;
  --cyan: #06b6d4;
  --sky: #0ea5e9;
  --blue: #2563eb;
  --yellow: #fde047;
  --shadow: 0 20px 45px 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", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 28rem), var(--bg);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.96), rgba(6, 182, 212, 0.96), rgba(37, 99, 235, 0.96));
  box-shadow: 0 12px 28px rgba(14, 116, 144, 0.28);
  backdrop-filter: blur(18px);
}

.header-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--sky);
  background: #ffffff;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(14, 165, 233, 0.16);
  transition: transform 0.25s ease;
}

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

.brand-name {
  font-size: 21px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  color: #ffffff;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #083344;
  background: rgba(255, 255, 255, 0.92);
}

.nav-group {
  position: relative;
}

.nav-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 190px;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-group:hover .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu a {
  display: block;
  padding: 9px 12px;
  color: #334155;
  border-radius: 10px;
}

.nav-menu a:hover {
  color: #0369a1;
  background: #e0f2fe;
}

.header-search {
  display: flex;
  align-items: center;
  width: 315px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
}

.header-search input,
.mobile-search input,
.search-page-form input,
.inline-filter input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #0f172a;
  background: transparent;
}

.header-search input {
  padding: 8px 12px 8px 16px;
}

.header-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  border-radius: 999px;
  padding: 8px 15px;
  cursor: pointer;
}

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

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

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

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  background: #ffffff;
}

.mobile-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.mobile-links a {
  padding: 12px;
  color: #075985;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 14px;
}

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

.hero {
  position: relative;
  min-height: 560px;
  margin: 28px auto 32px;
  overflow: hidden;
  border-radius: 32px;
  background: #082f49;
  box-shadow: var(--shadow);
}

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

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: 36px;
  padding: 56px;
  color: #ffffff;
  background-position: center;
  background-size: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-content {
  max-width: 680px;
  position: relative;
  z-index: 2;
}

.hero-eyebrow,
.page-hero > p:first-child,
.section-heading p,
.detail-eyebrow,
.overview-copy > p:first-child {
  margin: 0 0 10px;
  color: #0891b2;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-eyebrow {
  color: #bae6fd;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 950;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

.hero-lead {
  max-width: 640px;
  margin: 22px 0 0;
  color: #e0f2fe;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span {
  padding: 6px 12px;
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #075985;
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  background: #cffafe;
}

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

.btn-ghost-dark {
  color: #075985;
  border: 1px solid #bae6fd;
  background: #ffffff;
}

.hero-poster {
  position: relative;
  z-index: 2;
  justify-self: center;
  width: min(360px, 100%);
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
  transition: transform 0.25s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-poster img,
.card-cover img,
.detail-poster img,
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px !important;
  height: 10px !important;
  padding: 0;
  background: rgba(255, 255, 255, 0.45) !important;
}

.hero-dot.is-active {
  width: 28px !important;
  background: #ffffff !important;
}

.intro-strip,
.section-block,
.category-overview-card,
.movie-article,
.player-section,
.detail-hero,
.page-hero {
  margin-bottom: 32px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.intro-strip {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.intro-strip h2,
.section-heading h2,
.page-hero h1,
.movie-article h2,
.player-section h2,
.detail-copy h1,
.overview-copy h2 {
  margin: 0;
  color: #0f172a;
  font-weight: 900;
}

.intro-strip h2 {
  font-size: clamp(24px, 4vw, 38px);
}

.intro-strip p,
.page-hero p,
.category-overview-card p,
.movie-article p,
.detail-lead {
  color: var(--muted);
}

.section-block {
  padding: 28px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: clamp(25px, 4vw, 34px);
}

.section-heading a {
  color: #0284c7;
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.18);
}

.card-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #cffafe);
}

.card-cover img {
  transition: transform 0.35s ease;
}

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

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #075985;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(8, 47, 73, 0.26);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #0f172a;
  background: #fde047;
  border-radius: 999px;
  font-weight: 900;
}

.card-body {
  padding: 15px;
}

.card-meta {
  color: #0891b2;
  font-size: 13px;
  font-weight: 800;
}

.card-body h3 {
  min-height: 3em;
  margin: 7px 0 8px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
}

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

.card-tags {
  margin-top: 12px;
}

.card-tags span {
  padding: 4px 8px;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

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

.movie-card-compact .card-body p {
  min-height: 4.4em;
  font-size: 13px;
}

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

.rank-panel,
.wide-rank-list {
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, #082f49, #0e7490);
  color: #ffffff;
}

.rank-panel h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

.rank-row img {
  width: 52px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #082f49;
  background: #fde047;
  border-radius: 999px;
  font-weight: 900;
}

.rank-title {
  color: #ffffff;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  display: none;
  color: #bae6fd;
  font-size: 13px;
}

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

.wide-rank-list .rank-meta {
  display: block;
  grid-column: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.category-tile {
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 20px;
  background: #ffffff;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(14, 116, 144, 0.15);
}

.tile-images {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  height: 84px;
  overflow: hidden;
  border-radius: 14px;
}

.category-tile h3 {
  margin: 14px 0 6px;
  font-size: 19px;
}

.category-tile p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.page-hero {
  position: relative;
  margin-top: 28px;
  padding: 54px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff, #e0f2fe);
}

.page-hero h1 {
  max-width: 860px;
  font-size: clamp(34px, 6vw, 62px);
}

.page-hero p {
  max-width: 780px;
  font-size: 18px;
}

.ranking-hero {
  color: #ffffff;
  background-size: cover;
  background-position: center;
}

.ranking-hero h1,
.ranking-hero p {
  color: #ffffff;
}

.ranking-hero > p:first-child {
  color: #bae6fd;
}

.inline-filter,
.search-page-form {
  display: flex;
  gap: 10px;
  max-width: 580px;
  margin-top: 26px;
}

.inline-filter input,
.search-page-form input {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: #ffffff;
}

.search-page-form button {
  padding: 0 24px;
}

.category-overview-list {
  display: grid;
  gap: 28px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}

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

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  color: #64748b;
  font-size: 14px;
}

.crumbs a {
  color: #0284c7;
  font-weight: 800;
}

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

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
}

.detail-lead {
  font-size: 19px;
}

.detail-tags span {
  color: #075985;
  background: #e0f2fe;
  border-color: #bae6fd;
}

.player-section {
  padding: 28px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  aspect-ratio: 16 / 9;
  box-shadow: 0 22px 48px rgba(2, 6, 23, 0.34);
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  text-align: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  color: #075985;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.28);
  font-size: 28px;
}

.player-cover strong {
  max-width: 80%;
  font-size: clamp(22px, 4vw, 36px);
}

.movie-article {
  padding: 32px;
}

.movie-article h2 {
  margin-top: 0;
  font-size: 28px;
}

.movie-article h2 + p {
  margin-top: 12px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.info-grid div {
  padding: 16px;
  border-radius: 16px;
  background: #f0f9ff;
}

.info-grid span {
  display: block;
  color: #64748b;
  font-size: 13px;
}

.info-grid strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
}

.site-footer {
  margin-top: 48px;
  color: #cbd5e1;
  background: #0f172a;
}

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

.footer-brand {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

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

.site-footer p {
  margin: 10px 0 0;
}

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

.footer-links a:hover {
  color: #22d3ee;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

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

  .section-split,
  .category-overview-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  .hero {
    min-height: 700px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 34px 24px 84px;
  }

  .hero-poster {
    width: min(260px, 82%);
  }

  .intro-strip,
  .detail-hero {
    grid-template-columns: 1fr;
    display: grid;
  }

  .intro-strip {
    align-items: start;
  }

  .movie-grid,
  .slim-grid,
  .wide-rank-list,
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 560px) {
  .header-shell,
  main,
  .footer-shell,
  .footer-bottom,
  .mobile-panel {
    width: min(100% - 20px, 1180px);
  }

  .brand-name {
    font-size: 17px;
  }

  .hero {
    border-radius: 22px;
    min-height: 650px;
  }

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

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

  .page-hero,
  .section-block,
  .detail-hero,
  .player-section,
  .movie-article,
  .intro-strip {
    padding: 20px;
    border-radius: 18px;
  }

  .movie-grid,
  .slim-grid,
  .wide-rank-list,
  .overview-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .mobile-links {
    grid-template-columns: 1fr;
  }

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

  .inline-filter,
  .search-page-form {
    flex-direction: column;
  }

  .player-box {
    border-radius: 16px;
  }

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