:root {
  --primary: 41 128 185;
  --primary-dark: 30 97 140;
  --primary-light: 93 173 226;
  --accent: 46 204 113;
  --neutral-50: 249 250 251;
  --neutral-100: 243 244 246;
  --neutral-200: 229 231 235;
  --neutral-300: 209 213 219;
  --neutral-500: 107 114 128;
  --neutral-600: 75 85 99;
  --neutral-700: 55 65 81;
  --neutral-800: 31 41 55;
  --neutral-900: 17 24 39;
  --shadow-card: 0 18px 45px rgb(17 24 39 / 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.96);
  border-bottom: 1px solid rgb(var(--neutral-200));
  box-shadow: 0 8px 26px rgb(17 24 39 / 0.08);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: rgb(var(--primary));
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-logo {
  font-size: 22px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--primary-light)));
  box-shadow: 0 10px 24px rgb(var(--primary) / 0.35);
}

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

.desktop-nav > a,
.nav-dropdown > a {
  color: rgb(var(--neutral-700));
  font-weight: 700;
  padding: 23px 0;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-dropdown:hover > a {
  color: rgb(var(--primary));
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 66px;
  left: 0;
  min-width: 188px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: #ffffff;
  border: 1px solid rgb(var(--neutral-200));
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  padding: 10px 12px;
  border-radius: 10px;
  color: rgb(var(--neutral-700));
  font-size: 14px;
}

.nav-dropdown-menu a:hover {
  background: rgb(var(--neutral-100));
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 300px;
}

.header-search input,
.mobile-panel input,
.search-panel input,
.filter-bar input {
  width: 100%;
  border: 1px solid rgb(var(--neutral-300));
  border-radius: 999px;
  outline: none;
  background: #ffffff;
  color: rgb(var(--neutral-900));
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.header-search input:focus,
.mobile-panel input:focus,
.search-panel input:focus,
.filter-bar input:focus {
  border-color: rgb(var(--primary));
  box-shadow: 0 0 0 4px rgb(var(--primary) / 0.12);
}

.header-search button,
.mobile-panel button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgb(var(--primary));
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button {
  height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.header-search button:hover,
.mobile-panel button:hover,
.search-panel button:hover {
  background: rgb(var(--primary-dark));
  transform: translateY(-1px);
}

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

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: rgb(var(--neutral-800));
}

.mobile-panel {
  display: none;
  padding: 16px;
  border-top: 1px solid rgb(var(--neutral-200));
  background: #ffffff;
}

.mobile-panel.open {
  display: grid;
  gap: 14px;
}

.mobile-panel a {
  font-weight: 700;
  color: rgb(var(--neutral-700));
}

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  height: 42px;
  padding: 0 14px;
}

.mobile-panel button {
  padding: 0 16px;
}

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

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.76), rgb(0 0 0 / 0.38), rgb(0 0 0 / 0.08)), linear-gradient(0deg, rgb(0 0 0 / 0.72), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-bottom: 92px;
  color: #ffffff;
}

.hero-badge {
  display: inline-flex;
  padding: 7px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgb(var(--primary));
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgb(243 244 246 / 0.94);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

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

.btn-primary,
.btn-ghost,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  padding: 0 24px;
  color: #ffffff;
  background: rgb(var(--primary));
}

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

.btn-ghost {
  padding: 0 24px;
  color: #ffffff;
  background: rgb(255 255 255 / 0.18);
  border: 1px solid rgb(255 255 255 / 0.36);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgb(255 255 255 / 0.26);
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgb(0 0 0 / 0.46);
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgb(0 0 0 / 0.72);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 24px;
  transform: translateY(-50%);
}

.hero-next {
  right: 24px;
  transform: translateY(-50%);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.44);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #ffffff;
}

.section-spacing {
  padding: 72px 0;
}

.bg-white {
  background: #ffffff;
}

.bg-neutral {
  background: rgb(var(--neutral-100));
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  color: rgb(var(--neutral-900));
}

.section-heading p {
  margin: 8px 0 0;
  color: rgb(var(--neutral-600));
  font-size: 16px;
}

.section-more {
  min-width: 108px;
  padding: 0 18px;
  color: rgb(var(--primary));
  background: rgb(var(--primary) / 0.09);
}

.section-more:hover {
  color: #ffffff;
  background: rgb(var(--primary));
}

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

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

.card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgb(17 24 39 / 0.16);
}

.movie-card-horizontal {
  flex-direction: row;
  min-height: 206px;
}

.movie-card-horizontal .movie-poster {
  width: 220px;
  flex: 0 0 220px;
  aspect-ratio: auto;
}

.movie-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgb(var(--neutral-200));
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgb(0 0 0 / 0.58));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #ffffff;
  background: rgb(var(--primary) / 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: all 0.25s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .poster-play {
  opacity: 1;
}

.movie-card:hover .poster-play {
  transform: translate(-50%, -50%) scale(1);
}

.rank-mark {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--accent)));
  font-weight: 800;
}

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

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

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: rgb(var(--neutral-300));
}

.movie-body h3 {
  margin: 0;
  color: rgb(var(--neutral-900));
  font-size: 18px;
  line-height: 1.35;
}

.movie-body h3 a:hover {
  color: rgb(var(--primary));
}

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

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.movie-tags span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: rgb(var(--neutral-700));
  background: rgb(var(--neutral-100));
  font-size: 12px;
}

.movie-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
  font-size: 14px;
}

.score {
  color: rgb(var(--primary));
  font-weight: 800;
}

.movie-foot a {
  color: rgb(var(--primary));
  font-weight: 800;
}

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

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  color: #ffffff;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgb(17 24 39 / 0.18);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.04), rgb(0 0 0 / 0.78));
}

.category-card-content {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
}

.category-card strong {
  font-size: 24px;
}

.category-card em {
  color: rgb(243 244 246 / 0.92);
  font-style: normal;
  line-height: 1.6;
}

.page-hero {
  padding: 78px 0;
  color: #ffffff;
  background: linear-gradient(135deg, rgb(var(--primary-dark)), rgb(var(--primary)), rgb(var(--primary-light)));
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 52px);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgb(255 255 255 / 0.9);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.filter-title {
  color: rgb(var(--neutral-900));
  font-weight: 800;
  white-space: nowrap;
}

.filter-bar input {
  height: 44px;
  padding: 0 16px;
}

.filter-buttons {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.filter-buttons button {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: rgb(var(--neutral-700));
  background: rgb(var(--neutral-100));
  cursor: pointer;
}

.filter-buttons button.active,
.filter-buttons button:hover {
  color: #ffffff;
  background: rgb(var(--primary));
}

.search-panel {
  display: flex;
  gap: 12px;
  max-width: 780px;
  margin: 0 auto 26px;
}

.search-panel input {
  height: 56px;
  padding: 0 22px;
  font-size: 18px;
}

.search-panel button {
  min-width: 112px;
  border: 0;
}

.search-status {
  margin-bottom: 24px;
  color: rgb(var(--neutral-600));
  text-align: center;
  font-weight: 700;
}

.detail-wrap {
  padding: 32px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: rgb(var(--neutral-600));
  font-size: 14px;
}

.breadcrumb a {
  color: rgb(var(--primary));
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.detail-main {
  min-width: 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  box-shadow: var(--shadow-card);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgb(var(--primary) / 0.92);
  box-shadow: 0 18px 45px rgb(0 0 0 / 0.36);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

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

.player-start span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.22);
}

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

.detail-card {
  margin-top: 22px;
  padding: 26px;
}

.detail-card h1,
.detail-card h2 {
  margin: 0 0 16px;
  color: rgb(var(--neutral-900));
}

.detail-card h1 {
  font-size: clamp(28px, 4vw, 40px);
}

.detail-card h2 {
  font-size: 24px;
}

.detail-card p {
  margin: 0;
  color: rgb(var(--neutral-700));
  font-size: 16px;
  line-height: 1.9;
}

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

.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: rgb(var(--primary));
  background: rgb(var(--primary) / 0.09);
  font-size: 14px;
  font-weight: 800;
}

.detail-one-line {
  font-weight: 800;
}

.detail-side {
  min-width: 0;
}

.side-card {
  position: sticky;
  top: 92px;
  padding: 18px;
}

.side-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  object-fit: cover;
}

.side-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid rgb(var(--neutral-200));
}

.side-score strong {
  color: rgb(var(--primary));
  font-size: 42px;
}

.side-score span {
  color: #f59e0b;
  letter-spacing: 2px;
}

.side-list {
  display: grid;
  gap: 10px;
  padding: 18px 0;
}

.side-list p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: rgb(var(--neutral-600));
}

.side-list b {
  color: rgb(var(--neutral-900));
}

.side-list a {
  color: rgb(var(--primary));
  font-weight: 800;
}

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

.related-section {
  padding-bottom: 0;
}

.site-footer {
  color: rgb(var(--neutral-300));
  background: rgb(var(--neutral-800));
}

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

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

.site-footer p {
  max-width: 440px;
  margin: 0;
  color: rgb(209 213 219 / 0.84);
  line-height: 1.8;
}

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

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

.site-footer a:hover {
  color: rgb(var(--primary-light));
}

.footer-bottom {
  padding: 20px 16px;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  color: rgb(209 213 219 / 0.76);
  text-align: center;
  font-size: 14px;
}

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

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

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

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

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .container-custom {
    width: min(100% - 24px, 1280px);
  }

  .header-inner {
    height: 62px;
  }

  .site-logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .hero-carousel {
    height: 540px;
  }

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

  .hero-control {
    display: none;
  }

  .section-spacing {
    padding: 46px 0;
  }

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

  .movie-grid,
  .category-grid,
  .category-grid-large {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

  .movie-card-horizontal .movie-poster {
    width: 100%;
    flex-basis: auto;
    aspect-ratio: 16 / 10;
  }

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

  .filter-buttons {
    flex-wrap: wrap;
  }

  .detail-wrap {
    padding-top: 20px;
  }

  .detail-card,
  .side-card {
    padding: 18px;
  }

  .player-start {
    min-height: 50px;
    padding: 0 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 38px 0;
  }
}

@media (max-width: 520px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 34px;
  }

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