:root {
  --primary-50: #eef6ff;
  --primary-100: #d8ebff;
  --primary-600: #0059c0;
  --primary-700: #004a9f;
  --accent-500: #ff6b00;
  --neutral-50: #f8fafc;
  --neutral-100: #f1f3f5;
  --neutral-200: #dee2e6;
  --neutral-300: #ced4da;
  --neutral-400: #adb5bd;
  --neutral-500: #6c757d;
  --neutral-600: #495057;
  --neutral-700: #343a40;
  --neutral-800: #212529;
  --neutral-900: #0d1117;
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, .07), 0 10px 20px -2px rgba(0, 0, 0, .04);
  --shadow-soft-lg: 0 10px 40px -10px rgba(0, 0, 0, .1), 0 20px 25px -5px rgba(0, 0, 0, .04);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--neutral-900);
  background: var(--neutral-50);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  backdrop-filter: blur(16px);
}

.nav-shell {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-600);
  font-weight: 800;
  font-size: 22px;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  font-size: 14px;
}

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

.nav-link {
  color: var(--neutral-700);
  font-weight: 600;
  transition: color .2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary-600);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form input,
.search-page-form input {
  width: 210px;
  border: 1px solid var(--neutral-300);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
  background: #ffffff;
}

.search-form input:focus,
.search-page-form input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(0, 89, 192, .12);
}

.search-form button,
.search-page-form button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  color: #ffffff;
  background: var(--primary-600);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

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

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--neutral-700);
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  height: 620px;
  background: var(--neutral-900);
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 1s ease;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .86), rgba(0, 0, 0, .62), rgba(0, 0, 0, .16));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(680px, calc(100% - 48px));
  margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  padding-top: 150px;
  color: #ffffff;
}

.hero-label,
.detail-category,
.card-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent-500);
  font-weight: 800;
}

.hero-label {
  padding: 8px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.hero-content h2 + h2 {
  margin-top: -8px;
  font-size: clamp(28px, 4vw, 48px);
  color: var(--primary-100);
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #dce5ef;
  font-size: 18px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  padding: 12px 22px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: var(--primary-600);
  box-shadow: 0 12px 32px rgba(0, 89, 192, .28);
}

.btn-primary:hover {
  background: var(--primary-700);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, .48);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background .2s ease, transform .2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, .72);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.content-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.page-main {
  padding-top: 40px;
}

.section-block {
  margin-top: 64px;
}

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

.section-heading h2 {
  margin: 0;
  color: var(--neutral-900);
  font-size: 30px;
  line-height: 1.2;
}

.section-heading h2::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 28px;
  margin-right: 12px;
  border-radius: 999px;
  vertical-align: -5px;
  background: var(--accent-500);
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--neutral-500);
  line-height: 1.7;
}

.section-link {
  color: var(--primary-600);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform .25s ease, box-shadow .25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-100), #fff3ea);
}

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

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

.card-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 6px 10px;
  font-size: 12px;
}

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

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

.movie-card h3 a:hover,
.list-card h3 a:hover,
.rank-title:hover {
  color: var(--primary-600);
}

.movie-card p {
  min-height: 52px;
  margin: 0 0 14px;
  color: var(--neutral-600);
  line-height: 1.65;
  font-size: 14px;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--neutral-500);
  font-size: 13px;
}

.movie-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--neutral-100);
  padding: 5px 9px;
}

.feature-panel {
  border-radius: 32px;
  padding: 34px;
  background: linear-gradient(135deg, var(--primary-50), #fff4ea);
  box-shadow: var(--shadow-soft);
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-soft);
  transition: transform .35s ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .76));
}

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

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

.category-tile strong {
  margin-top: 8px;
  color: var(--primary-100);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  align-items: start;
}

.rank-list-home,
.ranking-list {
  display: grid;
  gap: 16px;
}

.list-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border-radius: 18px;
  padding: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.ranking-list .list-card {
  grid-template-columns: auto 120px minmax(0, 1fr);
}

.rank-no {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: var(--accent-500);
  font-weight: 900;
}

.list-cover {
  width: 96px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: var(--neutral-100);
}

.ranking-list .list-cover {
  width: 120px;
}

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

.list-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.list-card p {
  margin: 0 0 10px;
  color: var(--neutral-600);
  line-height: 1.7;
}

.side-panel {
  position: sticky;
  top: 96px;
  border-radius: 24px;
  padding: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--neutral-900), #123a70);
  box-shadow: var(--shadow-soft-lg);
}

.side-panel h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.side-panel p {
  margin: 0 0 20px;
  color: #d7e4f2;
  line-height: 1.8;
}

.side-links {
  display: grid;
  gap: 10px;
}

.side-links a {
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .12);
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 48px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(255, 107, 0, .42), transparent 34%), linear-gradient(135deg, var(--neutral-900), #06488f);
  box-shadow: var(--shadow-soft-lg);
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 16px;
  border-radius: 999px;
  padding: 7px 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, .16);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -.03em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dce8f6;
  line-height: 1.8;
  font-size: 17px;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  border-radius: 32px;
  padding: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--neutral-900), #0b4a8c);
  box-shadow: var(--shadow-soft-lg);
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  background: var(--neutral-100);
  box-shadow: 0 22px 46px rgba(0, 0, 0, .32);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-category {
  padding: 7px 12px;
  font-size: 13px;
}

.detail-info h1 {
  margin: 16px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.detail-one-line {
  max-width: 860px;
  margin: 0 0 22px;
  color: #e5edf6;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta span {
  color: #e9f0f7;
  background: rgba(255, 255, 255, .14);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 26px;
}

.tag-list span {
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, .1);
}

.player-panel {
  border-radius: 28px;
  overflow: hidden;
  background: var(--neutral-900);
  box-shadow: var(--shadow-soft-lg);
}

.video-wrap {
  position: relative;
  background: #000000;
}

.video-wrap video {
  width: 100%;
  min-height: 460px;
  max-height: 78vh;
  display: block;
  background: #000000;
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  padding: 16px 24px;
  color: #ffffff;
  background: rgba(0, 89, 192, .92);
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .36);
  transform: translate(-50%, -50%);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.player-start:hover {
  background: var(--accent-500);
  transform: translate(-50%, -50%) scale(1.04);
}

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

.play-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--primary-600);
  background: #ffffff;
}

.player-message {
  min-height: 0;
  color: #ffffff;
  background: var(--neutral-800);
}

.player-message:not(:empty) {
  padding: 12px 18px;
}

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

.detail-content article {
  border-radius: 24px;
  padding: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-content p {
  margin: 0;
  color: var(--neutral-700);
  line-height: 1.9;
}

.search-panel {
  border-radius: 26px;
  padding: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.search-page-form {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.search-page-form input {
  width: min(100%, 520px);
}

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

.rank-card {
  border-radius: 18px;
  padding: 18px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
}

.rank-title {
  display: inline-flex;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 900;
}

.rank-card p {
  margin: 0 0 10px;
  color: var(--neutral-600);
  line-height: 1.7;
}

.rank-meta {
  color: var(--neutral-500);
  font-size: 13px;
}

.site-footer {
  margin-top: 76px;
  color: var(--neutral-300);
  background: var(--neutral-800);
}

.footer-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 2fr;
  gap: 42px;
}

.footer-logo {
  color: #ffffff;
}

.footer-brand p {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--neutral-400);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.footer-links h2 {
  grid-column: 1 / -1;
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 18px;
}

.footer-links a {
  color: var(--neutral-400);
  font-size: 14px;
  transition: color .2s ease;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 20px 24px;
  color: var(--neutral-500);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1080px) {
  .nav-shell {
    flex-wrap: wrap;
    height: auto;
    min-height: 72px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    order: 4;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--neutral-200);
    padding-top: 12px;
  }

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

  .nav-link {
    padding: 11px 0;
  }

  .search-form {
    width: 100%;
    order: 5;
  }

  .search-form input {
    flex: 1;
    width: auto;
  }

  .movie-grid-3,
  .movie-grid-4,
  .category-grid,
  .detail-content,
  .search-results,
  .split-layout,
  .footer-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-panel {
    position: static;
  }

  .detail-hero {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .nav-shell,
  .content-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand {
    font-size: 19px;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin-left: 16px;
    padding-top: 122px;
  }

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

  .hero-control {
    width: 42px;
    height: 42px;
    font-size: 28px;
  }

  .hero-prev {
    left: 10px;
  }

  .hero-next {
    right: 10px;
  }

  .section-block {
    margin-top: 44px;
  }

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

  .movie-grid-3,
  .movie-grid-4,
  .category-grid,
  .split-layout,
  .footer-shell,
  .footer-category-links,
  .detail-hero,
  .detail-content,
  .search-results {
    grid-template-columns: 1fr;
  }

  .feature-panel,
  .page-hero,
  .detail-hero {
    border-radius: 24px;
    padding: 22px;
  }

  .detail-cover {
    max-width: 260px;
  }

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

  .list-cover,
  .ranking-list .list-cover {
    width: 84px;
  }

  .list-card > div:last-child {
    grid-column: 1 / -1;
  }

  .video-wrap video {
    min-height: 260px;
  }

  .search-page-form {
    flex-direction: column;
  }

  .search-page-form input {
    width: 100%;
  }
}
