:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --primary-soft: #ccfbf1;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f9fafb;
  --card: #ffffff;
  --dark: #111827;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 10px rgba(15, 23, 42, 0.08);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand {
  font-size: 21px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  font-size: 15px;
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
  font-weight: 650;
  color: #374151;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 9px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: #374151;
  border-radius: 999px;
}

main {
  padding-top: 80px;
}

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

.hero-slider {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: min(720px, 72vh);
  min-height: 520px;
  margin: 16px auto 56px;
  border-radius: 24px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(620px, calc(100% - 48px));
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: clamp(24px, 7vw, 90px);
  color: #ffffff;
}

.hero-kicker {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.92);
  font-size: 14px;
  font-weight: 750;
  margin-bottom: 18px;
}

.hero-content h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-content p {
  margin: 0 0 22px;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2.2vw, 22px);
}

.hero-tags,
.tag-cloud,
.detail-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.tag-cloud span,
.detail-meta-line span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: inherit;
  font-size: 13px;
  font-weight: 650;
}

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

.primary-button,
.ghost-button,
.hero-search button,
.search-page-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.primary-button,
.hero-search button,
.search-page-form button {
  background: var(--primary);
  color: #ffffff;
}

.primary-button:hover,
.hero-search button:hover,
.search-page-form button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hero-control.prev {
  left: 20px;
}

.hero-control.next {
  right: 20px;
}

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

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

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

.hero-search {
  position: absolute;
  z-index: 4;
  right: 24px;
  bottom: 24px;
  width: min(380px, calc(100% - 48px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.hero-search input,
.search-page-form input {
  width: 100%;
  border: 0;
  outline: none;
  border-radius: 12px;
  padding: 0 16px;
  min-height: 46px;
  background: #ffffff;
  color: var(--text);
}

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

.page-main .content-section {
  width: 100%;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title-row h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-title-row a {
  color: var(--primary);
  font-weight: 800;
}

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

.category-tile {
  min-height: 160px;
  padding: 22px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.category-tile span {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 14px;
}

.category-tile strong {
  display: block;
  font-size: 22px;
  margin-bottom: 8px;
}

.category-tile em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
}

.feature-main,
.small-card,
.rank-row,
.rank-card,
.side-related {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.feature-main {
  position: relative;
  min-height: 430px;
  color: #ffffff;
}

.feature-main img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.feature-main:hover img,
.movie-card:hover img,
.small-card:hover img,
.rank-card:hover img {
  transform: scale(1.06);
}

.feature-main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.10));
}

.feature-main div {
  position: absolute;
  z-index: 2;
  left: 28px;
  right: 28px;
  bottom: 28px;
}

.feature-main span {
  display: inline-flex;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--primary);
  font-weight: 800;
  margin-bottom: 12px;
}

.feature-main h3 {
  margin: 0 0 10px;
  font-size: 32px;
}

.feature-main p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.feature-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.small-card {
  position: relative;
  min-height: 207px;
  color: #ffffff;
}

.small-card img {
  width: 100%;
  height: 207px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.small-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 60%);
}

.small-card span {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  bottom: 14px;
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-frame {
  position: relative;
  height: 260px;
  margin: 0;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.compact .poster-frame {
  height: 220px;
}

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.movie-card:hover .poster-frame::after {
  opacity: 1;
}

.poster-frame figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  color: #ffffff;
  font-size: 14px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

.movie-card-body {
  padding: 16px;
}

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--primary);
}

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

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #6b7280;
  font-size: 13px;
}

.horizontal-section {
  overflow: hidden;
}

.horizontal-cards {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.horizontal-cards::-webkit-scrollbar {
  display: none;
}

.horizontal-cards .movie-card {
  width: 280px;
  flex: 0 0 280px;
}

.scroll-actions {
  display: flex;
  gap: 8px;
}

.scroll-actions button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: #e5e7eb;
  color: #111827;
  font-size: 24px;
  cursor: pointer;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  transition: transform 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
}

.rank-row span,
.rank-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 900;
}

.rank-row strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.page-heading {
  padding: 42px 0 30px;
}

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

.breadcrumbs a:hover {
  color: var(--primary);
}

.page-heading h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4.5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.pagination a {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.08);
  font-weight: 800;
}

.pagination a.is-active,
.pagination a:hover {
  background: var(--primary);
  color: #ffffff;
}

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

.rank-card-list.two-columns {
  grid-template-columns: repeat(2, 1fr);
}

.rank-card {
  display: grid;
  grid-template-columns: 54px 96px 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px;
  transition: transform 0.2s ease;
}

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

.rank-card img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.rank-card strong {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}

.rank-card p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-card em {
  color: var(--primary-dark);
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
}

.search-page-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: min(680px, 100%);
  margin-top: 24px;
}

.search-page-form input {
  box-shadow: 0 1px 10px rgba(15, 23, 42, 0.08);
}

.detail-main {
  padding-top: 96px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-info-card,
.aside-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-card {
  margin-bottom: 24px;
  background: #000000;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  cursor: pointer;
}

.player-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #ffffff;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.35), rgba(0, 0, 0, 0.58));
  cursor: pointer;
  z-index: 3;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-layer span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: var(--primary);
  font-size: 28px;
  box-shadow: 0 18px 42px rgba(13, 148, 136, 0.38);
}

.player-layer strong {
  font-size: 20px;
}

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

.detail-info-card {
  padding: 28px;
}

.detail-info-card h1 {
  margin: 16px 0 10px;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.lead-text {
  margin: 0 0 18px;
  color: #374151;
  font-size: 18px;
  font-weight: 650;
}

.detail-meta-line span,
.tag-cloud span {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.tag-cloud {
  margin: 20px 0 28px;
}

.detail-info-card h2,
.aside-card h2 {
  margin: 26px 0 12px;
  font-size: 24px;
  line-height: 1.2;
}

.detail-info-card p {
  color: #374151;
  font-size: 16px;
  margin: 0 0 12px;
}

.aside-card {
  padding: 20px;
  margin-bottom: 22px;
}

.aside-card h2 {
  margin-top: 0;
}

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

.side-related {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  box-shadow: none;
  background: #f9fafb;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.side-related:hover {
  background: #ecfeff;
}

.side-related img {
  width: 92px;
  height: 68px;
  object-fit: cover;
  border-radius: 10px;
}

.side-related strong {
  display: block;
  margin-bottom: 4px;
  line-height: 1.35;
}

.side-related span,
.info-aside p {
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  background: #111827;
  color: #d1d5db;
  padding: 46px 0 26px;
}

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

.footer-brand {
  color: #ffffff;
  font-size: 20px;
  margin-bottom: 14px;
}

.site-footer p {
  margin: 0;
  color: #9ca3af;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 14px;
}

.footer-links a:hover {
  color: #2dd4bf;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

@media (max-width: 980px) {
  .category-grid,
  .grid-four,
  .rank-card-list.two-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    order: 2;
  }
}

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

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 20px 18px;
    background: #ffffff;
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
  }

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

  .nav-links a {
    width: 100%;
    padding: 11px 0;
  }

  .hero-slider {
    min-height: 620px;
    height: auto;
    border-radius: 0;
    width: 100%;
    margin-top: -16px;
  }

  .hero-content {
    width: calc(100% - 44px);
    margin-left: 22px;
    padding-top: 60px;
    padding-bottom: 150px;
  }

  .hero-control {
    display: none;
  }

  .hero-search {
    left: 20px;
    right: 20px;
    width: auto;
    grid-template-columns: 1fr;
  }

  .category-grid,
  .grid-four,
  .grid-three,
  .feature-side,
  .rank-list,
  .rank-card-list.two-columns {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 48px 1fr;
  }

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

  .rank-card {
    grid-template-columns: 44px 82px 1fr;
  }

  .rank-card img {
    width: 82px;
    height: 64px;
  }

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

  .detail-info-card {
    padding: 22px;
  }

  .content-section,
  .page-main,
  .site-nav,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }
}
