:root {
  --teal: #0d9488;
  --cyan: #0891b2;
  --blue: #2563eb;
  --slate: #0f172a;
  --ink: #1f2937;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 24px 70px rgba(15, 23, 42, 0.22);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

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

.nav-menu a {
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.25s ease, background 0.25s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 30% 20%, rgba(45, 212, 191, 0.34), transparent 34%), linear-gradient(135deg, #0f172a, #0e7490 60%, #1d4ed8);
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.42) 52%, rgba(2, 6, 23, 0.08));
}

.hero-copy {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 84px;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #5eead4;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.sub-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy p:not(.eyebrow) {
  max-width: 690px;
  margin: 18px 0 22px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.75;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span {
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

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

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  box-shadow: 0 14px 30px rgba(13, 148, 136, 0.28);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(10px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.7);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

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

.home-search h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.home-search p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.content-section {
  margin-bottom: 64px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.section-title span:first-child {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #0f766e;
  background: #ccfbf1;
  font-weight: 900;
}

.section-title h2 {
  margin: 0;
  color: #1e293b;
  font-size: 30px;
  letter-spacing: -0.02em;
}

.section-title.with-link a {
  margin-left: auto;
  color: var(--teal);
  font-weight: 800;
}

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

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

.movie-card-link,
.rank-item a,
.category-overview-card,
.category-tile {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card-link:hover,
.category-overview-card:hover,
.category-tile:hover,
.rank-item a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.poster-frame {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: radial-gradient(circle at 35% 25%, rgba(45, 212, 191, 0.34), transparent 34%), linear-gradient(135deg, #0f172a, #0e7490, #1d4ed8);
}

.movie-card-large .poster-frame {
  height: 330px;
}

.movie-card-horizontal .movie-card-link {
  flex-direction: row;
}

.movie-card-horizontal .poster-frame {
  width: 210px;
  height: auto;
  min-height: 180px;
  flex: 0 0 210px;
}

.poster-frame img,
.category-tile img,
.category-overview-head img,
.rank-item img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card-link:hover .poster-frame img,
.category-tile:hover img,
.category-overview-card:hover img {
  transform: scale(1.08);
}

.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 12px;
  right: auto;
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.movie-card-body h3 {
  margin: 0 0 10px;
  color: #1e293b;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-large .movie-card-body h3 {
  font-size: 22px;
}

.movie-card-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: auto;
  color: #64748b;
  font-size: 13px;
}

.meta-line span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tag-row {
  margin-top: 13px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #0f766e;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 700;
}

.category-section {
  padding: 34px;
  border-radius: 30px;
  background: linear-gradient(90deg, rgba(240, 253, 250, 0.95), rgba(236, 254, 255, 0.95));
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.08);
}

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

.category-tile {
  min-height: 210px;
  position: relative;
  justify-content: flex-end;
  padding: 18px;
  color: #fff;
  background: #0f172a;
}

.category-tile img {
  position: absolute;
  inset: 0;
  opacity: 0.72;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 62%);
}

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

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

.category-tile small {
  margin-top: 8px;
  color: #dbeafe;
  line-height: 1.6;
}

.sub-hero {
  color: #fff;
  background: radial-gradient(circle at 12% 20%, rgba(45, 212, 191, 0.42), transparent 28%), linear-gradient(120deg, #0f172a, #0f766e 55%, #1d4ed8);
}

.sub-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0;
}

.sub-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 18px 0 0;
  color: #e0f2fe;
  font-size: 18px;
  line-height: 1.8;
}

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

.breadcrumb a:hover {
  color: #5eead4;
}

.filter-panel {
  display: flex;
  gap: 14px;
  align-items: center;
}

.filter-panel input,
.filter-panel select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  color: #0f172a;
  background: #fff;
  outline: none;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.filter-panel input {
  flex: 1;
  min-width: 220px;
}

.category-filter,
.search-filter,
.ranking-filter {
  margin-bottom: 34px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

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

.category-overview-card {
  padding: 22px;
}

.category-overview-head {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: center;
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
}

.category-overview-head img {
  height: 90px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a, #0891b2);
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #0f766e;
  background: #ecfeff;
  font-size: 13px;
  font-weight: 700;
}

.ranking-preview {
  padding: 34px;
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow);
}

.ranking-mini,
.ranking-list {
  display: grid;
  gap: 14px;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 58px 92px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 120px;
  padding: 14px;
}

.rank-item.compact a {
  grid-template-columns: 48px 74px 1fr;
  min-height: 98px;
}

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

.rank-item img {
  height: 92px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #0891b2);
}

.rank-item.compact img {
  height: 74px;
}

.rank-info {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.rank-info strong {
  color: #1e293b;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-info em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-info small {
  color: #0f766e;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  filter: blur(3px);
  transform: scale(1.04);
}

.detail-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.64) 56%, rgba(13, 148, 136, 0.28));
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 44px;
  align-items: center;
}

.detail-poster {
  height: 450px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #0f172a, #0891b2);
  box-shadow: var(--shadow-strong);
}

.detail-lead {
  max-width: 760px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.85;
}

.player-section,
.detail-text {
  margin-bottom: 48px;
  padding: 30px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.player-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(13, 148, 136, 0.18), rgba(2, 6, 23, 0.66));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  box-shadow: 0 18px 50px rgba(13, 148, 136, 0.38);
  font-size: 34px;
  text-indent: 4px;
}

.play-label {
  font-weight: 900;
  letter-spacing: 0.16em;
}

.detail-text h2 {
  margin: 0 0 14px;
  color: #1e293b;
}

.detail-text p {
  margin: 0 0 26px;
  color: #475569;
  font-size: 17px;
  line-height: 1.9;
}

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

.movie-facts div {
  padding: 16px;
  border-radius: 18px;
  background: #f8fafc;
}

.movie-facts dt {
  color: #64748b;
  font-size: 13px;
}

.movie-facts dd {
  margin: 6px 0 0;
  color: #0f172a;
  font-weight: 900;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #1e293b, #0f172a);
}

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

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

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

  .ranking-list,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 260px 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 118, 110, 0.96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
  }

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

  .hero {
    min-height: 620px;
  }

  .hero-copy {
    left: 20px;
    right: 20px;
    bottom: 76px;
  }

  .hero-arrow {
    display: none;
  }

  .home-search {
    grid-template-columns: 1fr;
    margin-top: 18px;
    padding: 22px;
  }

  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-panel input,
  .filter-panel select,
  .filter-panel .primary-btn {
    width: 100%;
  }

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

  .category-section,
  .ranking-preview,
  .player-section,
  .detail-text {
    padding: 20px;
  }

  .poster-frame {
    height: 200px;
  }

  .movie-card-large .poster-frame {
    height: 260px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .detail-poster {
    width: min(280px, 100%);
    height: 400px;
  }

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

  .footer-shell,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .rank-item a,
  .rank-item.compact a {
    grid-template-columns: 42px 72px 1fr;
  }

  .rank-item img,
  .rank-item.compact img {
    height: 72px;
  }
}

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

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

  .category-overview-head {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal .movie-card-link {
    flex-direction: column;
  }

  .movie-card-horizontal .poster-frame {
    width: 100%;
    height: 210px;
    flex-basis: auto;
  }
}
