:root {
  --cyan: #0891b2;
  --blue: #2563eb;
  --teal: #0d9488;
  --slate: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #0f172a;
  background: linear-gradient(180deg, #ecfeff 0%, #eff6ff 45%, #f0fdfa 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--teal));
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.28);
}

.header-inner {
  width: min(1260px, calc(100% - 28px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 800;
  font-size: 22px;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 650;
  font-size: 15px;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.site-search {
  display: flex;
  align-items: center;
  width: min(320px, 32vw);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.site-search input,
.wide-search input,
.filter-search input,
.filter-search select {
  border: 0;
  outline: 0;
}

.site-search input {
  min-width: 0;
  flex: 1;
  padding: 10px 14px;
  color: #ffffff;
  background: transparent;
}

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

.site-search button,
.wide-search button {
  border: 0;
  cursor: pointer;
  color: #0f172a;
  background: #ffffff;
  font-weight: 800;
}

.site-search button {
  padding: 10px 16px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  padding: 8px 10px;
  color: #ffffff;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: #052e3d;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background-position: center;
  background-size: cover;
  transform: scale(1.05);
  filter: saturate(1.15);
}

.hero-shade {
  background:
    radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.45), transparent 28%),
    radial-gradient(circle at 82% 82%, rgba(20, 184, 166, 0.38), transparent 32%),
    linear-gradient(90deg, rgba(8, 47, 73, 0.92), rgba(30, 64, 175, 0.68), rgba(13, 148, 136, 0.68));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 390px;
  align-items: center;
  gap: 56px;
  padding: 72px 0;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  color: #dffafe;
  background: rgba(255, 255, 255, 0.14);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.eyebrow.dark {
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.12);
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2.2vw, 24px);
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(255, 255, 255, 0.22);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.btn.ghost.dark {
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.1);
  box-shadow: inset 0 0 0 1px rgba(8, 145, 178, 0.18);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 35px 90px rgba(2, 6, 23, 0.38);
  transform: rotate(2deg);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.hero-dot {
  width: 34px;
  height: 8px;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

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

.search-band {
  width: min(1180px, calc(100% - 32px));
  margin: -58px auto 0;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-band h2,
.section-head h2,
.page-hero h1,
.detail-hero h1,
.rank-copy h2,
.content-card h2 {
  margin: 0;
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.search-band p,
.page-hero p,
.rank-copy p,
.content-card p,
.category-preview p {
  color: var(--muted);
}

.wide-search {
  display: flex;
  overflow: hidden;
  min-height: 54px;
  border-radius: 999px;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px var(--line);
}

.wide-search.inside {
  width: min(680px, 100%);
  margin-top: 22px;
}

.wide-search input {
  flex: 1;
  min-width: 0;
  padding: 0 20px;
  background: transparent;
}

.wide-search button {
  padding: 0 24px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.section {
  padding: 54px 0;
}

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

.section-head h2 {
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 42px);
}

.section-head a {
  color: var(--cyan);
  font-weight: 800;
}

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

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

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

.movie-card {
  min-width: 0;
}

.movie-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-link:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.22), rgba(37, 99, 235, 0.18));
}

.poster-wrap img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-link:hover .poster-wrap img {
  transform: scale(1.05);
}

.score-pill,
.rank-no {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.score-pill {
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  background: rgba(8, 145, 178, 0.82);
  font-size: 12px;
}

.rank-no {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.movie-info {
  flex: 1;
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.35;
}

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

.tag-row span {
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.1);
}

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

.category-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 128px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(236, 254, 255, 0.86));
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.09);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 52px rgba(15, 23, 42, 0.15);
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  color: var(--muted);
}

.highlight-rank {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 26px;
  align-items: center;
  padding: 34px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(224, 242, 254, 0.92));
  box-shadow: var(--shadow);
}

.highlight-rank.wide {
  align-items: start;
}

.rank-copy h2 {
  margin-top: 10px;
  font-size: clamp(30px, 5vw, 50px);
}

.mini-rank {
  display: grid;
  gap: 10px;
}

.mini-rank a {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px var(--line);
}

.mini-rank b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.mini-rank span {
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-rank em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  padding: 78px 16px;
  color: #ffffff;
  text-align: center;
  background:
    radial-gradient(circle at 18% 10%, rgba(34, 211, 238, 0.35), transparent 28%),
    radial-gradient(circle at 82% 70%, rgba(20, 184, 166, 0.35), transparent 30%),
    linear-gradient(90deg, var(--cyan), var(--blue), var(--teal));
}

.page-hero.slim {
  padding: 54px 16px;
}

.page-hero h1 {
  max-width: 900px;
  margin: 18px auto 14px;
  font-size: clamp(36px, 6vw, 64px);
}

.page-hero p {
  max-width: 820px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.category-list {
  padding-bottom: 58px;
}

.category-preview {
  margin-bottom: 32px;
  padding: 28px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
}

.category-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 20px;
}

.category-preview h2 {
  margin: 0;
  font-size: 30px;
}

.filter-panel {
  margin-top: -28px;
  position: relative;
  z-index: 3;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.filter-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 12px;
}

.filter-search input,
.filter-search select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px var(--line);
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.filter-tags button {
  min-height: 36px;
  padding: 6px 12px;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.1);
  font-weight: 750;
}

.filter-tags button.is-active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.detail-hero {
  padding: 46px 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.2), transparent 35%),
    linear-gradient(180deg, #e0f2fe, #f8fafc);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--cyan);
  font-weight: 750;
}

.detail-hero h1 {
  margin: 14px 0;
  font-size: clamp(34px, 5vw, 58px);
}

.detail-lead {
  max-width: 860px;
  color: #334155;
  font-size: 20px;
}

.detail-meta span {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.72);
}

.detail-tags {
  margin-top: 18px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.32);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.58));
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 22px 55px rgba(37, 99, 235, 0.38);
  font-size: 34px;
}

.player-box.is-playing .play-overlay {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding-top: 34px;
}

.content-card {
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin-bottom: 14px;
  font-size: 28px;
}

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

.site-footer {
  margin-top: 40px;
  color: #e2e8f0;
  background: linear-gradient(180deg, #1e293b, #0f172a);
}

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

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

.site-footer p {
  color: #cbd5e1;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

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

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #67e8f9;
}

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

.is-hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .main-nav {
    gap: 10px;
  }

  .main-nav a:nth-last-child(-n + 4) {
    display: none;
  }

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
  }

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

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

@media (max-width: 840px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .main-nav {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 2px;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a,
  .main-nav a:nth-last-child(-n + 4) {
    display: block;
    padding: 9px 0;
  }

  .site-search {
    order: 4;
    width: 100%;
  }

  .hero-carousel,
  .hero-content {
    min-height: auto;
  }

  .hero-slide {
    position: relative;
    display: none;
  }

  .hero-slide.is-active {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 58px 0 88px;
  }

  .hero-poster {
    width: min(300px, 78vw);
    margin: 0 auto;
  }

  .search-band,
  .highlight-rank,
  .detail-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .search-band {
    margin-top: -42px;
  }

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

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

  .detail-poster {
    max-width: 280px;
  }
}

@media (max-width: 540px) {
  .brand {
    font-size: 19px;
  }

  .search-band,
  .highlight-rank,
  .category-preview,
  .content-card {
    padding: 20px;
    border-radius: 22px;
  }

  .wide-search {
    flex-direction: column;
    border-radius: 20px;
  }

  .wide-search input {
    min-height: 52px;
  }

  .wide-search button {
    min-height: 46px;
  }

  .section-head,
  .category-preview-head {
    display: block;
  }

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

  .mini-rank a {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .mini-rank em {
    grid-column: 2;
  }
}
