:root {
  --cyan: #0891b2;
  --cyan-dark: #0e7490;
  --blue: #2563eb;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.10);
  --radius-lg: 26px;
  --radius-md: 18px;
}

* {
  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(--gray-900);
  background: linear-gradient(180deg, var(--gray-50), var(--white));
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-logo span:last-child {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 24px rgba(8, 145, 178, 0.28);
  font-size: 14px;
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--gray-700);
  font-size: 15px;
  font-weight: 600;
  transition: 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--cyan);
  background: #ecfeff;
}

.header-search {
  position: relative;
  width: 260px;
}

.header-search input,
.mobile-nav input,
.search-panel input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--gray-900);
  outline: none;
  background: var(--white);
  transition: 0.2s ease;
}

.header-search input:focus,
.mobile-nav input:focus,
.search-panel input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

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

.mobile-nav form {
  margin-top: 8px;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--gray-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.90), rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.10));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 74px;
  transform: translateX(-50%);
  color: var(--white);
}

.hero-content h1,
.hero-content h2 {
  width: min(720px, 100%);
  margin: 14px 0 16px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.hero-content p {
  width: min(680px, 100%);
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: 19px;
  line-height: 1.75;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--white);
  background: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn-primary {
  color: var(--white);
  background: var(--cyan);
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.34);
}

.btn-primary:hover {
  background: var(--cyan-dark);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 34px;
  transition: 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dots button.is-active {
  width: 34px;
  background: var(--white);
}

.main-stack {
  display: grid;
  gap: 78px;
  padding: 72px 0;
}

.section-block {
  position: relative;
}

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

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 10px 0 10px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.detail-copy p {
  margin: 0;
  max-width: 760px;
  color: var(--gray-500);
  line-height: 1.75;
}

.section-kicker {
  color: var(--cyan);
  background: #cffafe;
}

.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--cyan);
  background: #ecfeff;
  font-weight: 800;
  transition: 0.2s ease;
}

.section-more:hover {
  color: var(--white);
  background: var(--cyan);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
  transition: 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #0e7490);
}

.poster-link img,
.rank-poster img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-meta {
  color: var(--gray-500);
  font-size: 13px;
  line-height: 1.5;
}

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.movie-card h3 a:hover,
.ranking-item h2 a:hover {
  color: var(--cyan);
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--gray-500);
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

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

.movie-card-small .movie-card-body {
  padding: 14px;
}

.movie-card-small h3 {
  font-size: 17px;
}

.highlight-section {
  margin-inline: -28px;
  padding: 46px 28px;
  border-radius: 32px;
  background: linear-gradient(90deg, #ecfeff, #eff6ff);
}

.dark-showcase {
  margin-inline: -28px;
  padding: 46px 28px;
  border-radius: 32px;
  background: var(--gray-900);
}

.dark-showcase .movie-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.dark-showcase .movie-card h3,
.light-heading h2 {
  color: var(--white);
}

.dark-showcase .movie-card p,
.light-heading p,
.dark-showcase .movie-meta {
  color: #d1d5db;
}

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

.category-card a {
  display: grid;
  min-height: 210px;
  padding: 24px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--white), #f0f9ff);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
  transition: 0.24s ease;
}

.category-card a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.category-card span {
  color: var(--cyan);
  font-weight: 900;
}

.category-card h2 {
  margin: 8px 0;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: var(--gray-500);
  line-height: 1.65;
}

.category-card strong {
  margin-top: 16px;
  color: var(--gray-900);
}

.category-card em {
  margin-top: 8px;
  color: var(--gray-500);
  font-style: normal;
  font-size: 13px;
  line-height: 1.5;
}

.page-hero,
.detail-hero {
  padding: 76px 0;
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

.gradient-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.gradient-hero .section-kicker {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
}

.gradient-hero p {
  color: #e0f2fe;
}

.category-hero {
  background: linear-gradient(135deg, #f0fdfa, #eff6ff);
}

.page-count {
  display: inline-flex;
  margin-top: 22px;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--cyan-dark);
  background: #cffafe;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--cyan);
}

.detail-hero {
  color: var(--white);
  background: radial-gradient(circle at top right, rgba(8, 145, 178, 0.55), transparent 34%), linear-gradient(135deg, #0f172a, #111827 58%, #083344);
}

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

.detail-copy p {
  color: #d1d5db;
  font-size: 18px;
}

.detail-copy .breadcrumb {
  color: #cbd5e1;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.12);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  background: linear-gradient(135deg, #111827, #0e7490);
}

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

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9;
}

.player-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #020617;
  object-fit: contain;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.78));
  cursor: pointer;
  z-index: 2;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 18px 40px rgba(8, 145, 178, 0.38);
  font-size: 30px;
}

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

.player-start.is-hidden {
  display: none;
}

.detail-article {
  display: grid;
  gap: 28px;
  padding: 48px 0 10px;
}

.detail-article section {
  padding: 28px;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.detail-article h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-article p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
  line-height: 1.9;
}

.large-tags span {
  padding: 8px 12px;
  font-size: 14px;
}

.related-section {
  padding: 52px 0 76px;
}

.ranking-section {
  padding: 54px 0 72px;
}

.ranking-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-item {
  display: grid;
  grid-template-columns: 58px 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.rank-number {
  color: var(--cyan);
  font-size: 26px;
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: linear-gradient(135deg, #111827, #0e7490);
}

.ranking-item h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-item p {
  margin: 0 0 8px;
  color: var(--gray-500);
  line-height: 1.65;
}

.rank-action {
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--white);
  background: var(--cyan);
  font-weight: 800;
}

.search-hero {
  background: linear-gradient(135deg, #f0fdfa, #eff6ff);
}

.search-panel {
  display: flex;
  gap: 12px;
  max-width: 680px;
  margin-top: 24px;
}

.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: var(--white);
  background: var(--cyan);
  font-weight: 900;
  cursor: pointer;
}

.search-status {
  margin-bottom: 22px;
  color: var(--gray-500);
  font-weight: 800;
}

.site-footer {
  color: #d1d5db;
  background: var(--gray-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
  padding: 48px 0;
}

.footer-logo {
  color: var(--white);
}

.footer-brand p {
  max-width: 520px;
  color: #d1d5db;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 18px;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #9ca3af;
  font-size: 14px;
}

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

  .header-search {
    width: 210px;
  }
}

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

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .detail-layout {
    align-items: start;
  }

  .ranking-item {
    grid-template-columns: 42px 72px minmax(0, 1fr);
  }

  .rank-action {
    grid-column: 3;
    width: fit-content;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .site-logo,
  .footer-logo {
    font-size: 19px;
  }

  .hero-carousel {
    min-height: 560px;
  }

  .hero-content {
    bottom: 76px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 40px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .main-stack {
    gap: 54px;
    padding: 48px 0;
  }

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

  .highlight-section,
  .dark-showcase {
    margin-inline: 0;
    padding: 30px 18px;
  }

  .page-hero,
  .detail-hero {
    padding: 54px 0;
  }

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

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

  .detail-article section {
    padding: 22px;
  }

  .ranking-item {
    grid-template-columns: 36px 68px minmax(0, 1fr);
    gap: 12px;
  }

  .ranking-item p {
    display: none;
  }

  .search-panel {
    flex-direction: column;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}
