:root {
  color-scheme: light;
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-300: #7dd3fc;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --sky-900: #0c4a6e;
  --blue-50: #eff6ff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
  --radius: 24px;
}

* {
  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;
  background: linear-gradient(180deg, var(--sky-50), var(--white) 38%, var(--slate-50));
  color: var(--slate-800);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--sky-600), var(--sky-700));
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.24);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.logo-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.24);
}

.navbar {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--white);
  font-weight: 700;
}

.navbar a {
  opacity: 0.95;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.navbar a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.search-form {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.search-form input {
  width: 210px;
  height: 36px;
  border: 0;
  outline: 0;
  border-radius: 999px 0 0 999px;
  padding: 0 14px;
  color: var(--slate-800);
}

.search-form button {
  height: 36px;
  border: 0;
  color: var(--white);
  cursor: pointer;
  border-radius: 0 999px 999px 0;
  padding: 0 16px;
  background: var(--sky-900);
  transition: background 0.2s ease;
}

.search-form button:hover {
  background: #075985;
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--slate-900);
}

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

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

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

.hero-media {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(14, 165, 233, 0.45), transparent 32%), linear-gradient(120deg, #0f172a, #0369a1);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.42) 55%, rgba(0, 0, 0, 0.18));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 0 0 74px;
  color: var(--white);
}

.hero-panel {
  max-width: 760px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--sky-500);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
}

.badge-soft {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.75;
}

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

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
  color: var(--white);
  background: var(--sky-500);
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.34);
}

.button-primary:hover,
.button-secondary:hover {
  transform: translateY(-2px);
}

.button-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  cursor: pointer;
  transition: background 0.2s ease;
}

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

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  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: var(--white);
}

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

.section {
  margin-bottom: 58px;
}

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

.section-title {
  margin: 0;
  color: var(--slate-800);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-more {
  color: var(--sky-600);
  font-weight: 850;
}

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

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

.movie-card,
.feature-card,
.wide-card,
.category-card,
.rank-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.feature-card:hover,
.wide-card:hover,
.category-card:hover,
.rank-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.poster,
.feature-visual,
.wide-visual,
.detail-poster {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 70% 25%, rgba(125, 211, 252, 0.64), transparent 30%), linear-gradient(135deg, #0f172a, #0369a1 56%, #7dd3fc);
}

.poster {
  aspect-ratio: 16 / 10;
}

.feature-visual {
  height: 320px;
}

.wide-visual {
  width: 270px;
  flex: 0 0 270px;
  aspect-ratio: 16 / 10;
}

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

.movie-card:hover .poster img,
.feature-card:hover .feature-visual img,
.wide-card:hover .wide-visual img,
.detail-hero:hover .detail-poster img {
  transform: scale(1.08);
}

.poster-shade,
.feature-shade {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.1) 62%, transparent);
  color: var(--white);
  padding: 16px;
}

.play-bubble {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: rgba(14, 165, 233, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-bubble,
.feature-card:hover .play-bubble,
.wide-card:hover .play-bubble {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 8px;
  color: var(--slate-800);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.card-text {
  margin: 0;
  color: var(--slate-500);
  font-size: 14px;
  line-height: 1.7;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--slate-500);
  font-size: 12px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--sky-100);
  color: var(--sky-700);
  font-weight: 800;
}

.ribbon {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--white);
  background: var(--sky-500);
  font-size: 12px;
  font-weight: 850;
}

.carousel-panel {
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(90deg, var(--sky-100), var(--blue-50));
}

.horizontal-scroll {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-scroll .movie-card {
  width: 300px;
  min-width: 300px;
  scroll-snap-align: start;
}

.wide-list {
  display: grid;
  gap: 18px;
}

.wide-card a {
  display: flex;
  min-height: 170px;
}

.wide-body {
  flex: 1;
  padding: 24px;
}

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

.rank-card a {
  display: grid;
  grid-template-columns: 70px 120px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
  font-size: 22px;
  font-weight: 950;
}

.rank-thumb {
  height: 76px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sky-700), var(--sky-300));
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.category-card {
  display: block;
  padding: 24px;
  min-height: 142px;
  background: linear-gradient(135deg, var(--white), var(--sky-50));
}

.category-card h3 {
  margin: 0 0 12px;
  color: var(--sky-700);
  font-size: 22px;
  font-weight: 950;
}

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

.page-hero {
  padding: 64px 0 38px;
  color: var(--white);
  background: radial-gradient(circle at 75% 20%, rgba(125, 211, 252, 0.38), transparent 28%), linear-gradient(135deg, #0f172a, #0369a1);
}

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

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

.page-title {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-description {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.filter-input {
  width: min(100%, 380px);
  height: 44px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  outline: 0;
  padding: 0 16px;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-tag {
  border: 0;
  border-radius: 999px;
  color: var(--sky-700);
  background: var(--sky-100);
  padding: 9px 13px;
  cursor: pointer;
  font-weight: 800;
}

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

.pagination a,
.pagination span {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  color: var(--slate-700);
  font-weight: 850;
}

.pagination .is-current {
  color: var(--white);
  background: var(--sky-600);
}

.detail-hero {
  color: var(--white);
  background: radial-gradient(circle at 75% 18%, rgba(125, 211, 252, 0.32), transparent 30%), linear-gradient(135deg, #0f172a, #075985 72%, #0ea5e9);
}

.detail-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 42px;
  align-items: end;
  padding: 56px 0;
}

.detail-poster {
  min-height: 480px;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-lead {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
  line-height: 1.85;
}

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

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.content-card {
  border-radius: 24px;
  background: var(--white);
  padding: 28px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 18px;
  color: var(--slate-800);
  font-size: 26px;
  font-weight: 950;
}

.content-card p {
  margin: 0 0 18px;
  color: var(--slate-700);
  line-height: 1.95;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 20px 56px rgba(15, 23, 42, 0.24);
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.22), rgba(2, 6, 23, 0.86));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-button {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--sky-500);
  padding: 16px 28px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(14, 165, 233, 0.34);
}

.player-message {
  min-height: 24px;
  margin-top: 12px;
  color: var(--sky-700);
  font-weight: 800;
}

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

.side-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  border-radius: 16px;
  padding: 10px;
  background: var(--slate-50);
  transition: background 0.2s ease;
}

.side-item:hover {
  background: var(--sky-50);
}

.side-thumb {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--sky-700), var(--sky-300));
}

.side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 900;
}

.side-meta {
  color: var(--slate-500);
  font-size: 12px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.footer {
  padding: 34px 16px;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  background: var(--slate-900);
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-1 {
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

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

@media (max-width: 980px) {
  .navbar,
  .search-form {
    display: none;
  }

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

  .header-inner {
    min-height: 62px;
  }

  .site-header.is-open .navbar,
  .site-header.is-open .search-form {
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
    background: var(--sky-600);
  }

  .site-header.is-open .navbar {
    top: 62px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 14px 16px;
  }

  .site-header.is-open .navbar a {
    width: 100%;
    padding: 12px 0;
  }

  .site-header.is-open .search-form {
    top: 244px;
    padding: 0 16px 16px;
  }

  .site-header.is-open .search-form input {
    width: 100%;
  }

  .hero {
    height: 540px;
  }

  .feature-grid,
  .movie-grid,
  .category-grid,
  .content-layout,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    min-height: auto;
    aspect-ratio: 16 / 12;
  }

  .rank-card a {
    grid-template-columns: 52px 88px 1fr;
  }

  .rank-card .button-primary {
    grid-column: 1 / -1;
  }

  .wide-card a {
    display: block;
  }

  .wide-visual {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .hero {
    height: 520px;
  }

  .hero-content {
    padding-bottom: 64px;
  }

  .hero-arrow {
    display: none;
  }

  .main-wrap {
    padding-top: 38px;
  }

  .section-head,
  .filter-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .horizontal-scroll .movie-card {
    width: 260px;
    min-width: 260px;
  }

  .content-card {
    padding: 22px;
  }
}
