:root {
  --mist-50: #f8f9fa;
  --mist-100: #f1f3f5;
  --mist-200: #e9ecef;
  --mist-300: #dee2e6;
  --mist-600: #868e96;
  --mist-700: #495057;
  --mist-800: #343a40;
  --mist-900: #212529;
  --fog-50: #f0f9ff;
  --fog-100: #e0f2fe;
  --fog-400: #38bdf8;
  --fog-600: #0284c7;
  --fog-700: #0369a1;
  --cocoon-50: #f0fdf4;
  --cocoon-100: #dcfce7;
  --cocoon-600: #16a34a;
  --amber-50: #fffbeb;
  --amber-800: #92400e;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --soft-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--mist-900);
  background: linear-gradient(180deg, var(--mist-50), #ffffff 42%, #ffffff);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

img,
video {
  display: block;
  width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(222, 226, 230, 0.8);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: 1280px;
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--mist-900);
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--fog-600), var(--cocoon-600));
  box-shadow: 0 12px 26px rgba(2, 132, 199, 0.24);
  font-size: 14px;
}

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

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--mist-700);
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--fog-700);
  background: var(--fog-50);
}

.header-search,
.mobile-search,
.big-search,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--mist-300);
  border-radius: 12px;
  background: #ffffff;
  color: var(--mist-800);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 12px;
}

.header-search button,
.mobile-search button,
.big-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button,
.big-search button,
.primary-btn {
  color: #ffffff;
  background: var(--fog-600);
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.24);
}

.header-search button {
  padding: 10px 14px;
}

.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.primary-btn:hover {
  background: var(--fog-700);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--mist-300);
  border-radius: 12px;
  background: #ffffff;
  color: var(--mist-800);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--mist-200);
  padding: 14px 24px 18px;
  background: #ffffff;
}

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-search input {
  flex: 1;
  padding: 12px;
}

.mobile-search button {
  padding: 12px 16px;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.46) 45%, rgba(0, 0, 0, 0.15));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 10%;
  width: min(1180px, calc(100% - 48px));
  transform: translateX(-50%);
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  color: var(--fog-400);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  max-width: 820px;
  margin: 10px 0 14px;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.05;
  font-weight: 900;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 6px 10px;
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.hero-dots {
  position: absolute;
  right: 36px;
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.quick-search-panel,
.content-section,
.page-main,
.site-footer .footer-inner {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.quick-search-panel {
  transform: translateY(-50%);
  margin-bottom: -34px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) 1.2fr;
  gap: 22px;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--mist-200);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.quick-search-panel h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.story-card h2 {
  margin: 0;
  color: var(--mist-900);
  line-height: 1.2;
}

.quick-search-panel h2 {
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.big-search input {
  flex: 1;
  padding: 15px 16px;
}

.big-search button {
  padding: 15px 22px;
}

.content-section {
  padding: 58px 0;
}

.muted-section {
  width: 100%;
  padding: 64px max(24px, calc((100vw - 1280px) / 2));
  background: linear-gradient(135deg, var(--fog-50), var(--cocoon-50));
}

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

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 900;
}

.text-link {
  color: var(--fog-700);
  font-weight: 800;
}

.text-link:hover {
  text-decoration: underline;
}

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

.latest-grid,
.category-movies,
.search-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  background: var(--mist-200);
  box-shadow: var(--soft-shadow);
}

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.52));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.play-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.92);
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card:hover .poster-link::after,
.movie-card:hover .play-badge {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding: 14px 2px 0;
}

.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--mist-600);
  font-size: 0.8rem;
  font-weight: 700;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 7px;
  color: var(--mist-300);
}

.movie-card h2 {
  margin: 7px 0 6px;
  font-size: 1.02rem;
  line-height: 1.35;
  font-weight: 850;
}

.movie-card h2 a:hover,
.rank-item h2 a:hover,
.link-cloud a:hover {
  color: var(--fog-700);
}

.movie-card p,
.overview-card p,
.rank-item p,
.story-card p,
.page-hero p,
.footer-brand p,
.category-card p {
  margin: 0;
  color: var(--mist-700);
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.2em;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.92rem;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: var(--fog-700);
  background: var(--fog-50);
  padding: 4px 8px;
}

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

.category-card,
.overview-card,
.story-card,
.filter-panel {
  background: #ffffff;
  border: 1px solid var(--mist-200);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.category-card {
  display: block;
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.overview-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.category-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 12px;
}

.category-card span {
  display: block;
  color: var(--mist-900);
  font-weight: 900;
  margin-bottom: 5px;
}

.category-card p {
  font-size: 0.9rem;
}

.horizontal-section {
  overflow: hidden;
}

.movie-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 210px;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

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

.rail-actions button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--mist-300);
  border-radius: 50%;
  background: #ffffff;
  color: var(--mist-900);
  cursor: pointer;
  font-size: 1.4rem;
}

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

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--mist-200);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.rank-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
}

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

.rank-poster span {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--fog-600);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
}

.rank-item h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.rank-item p:not(.rank-meta) {
  font-size: 0.92rem;
}

.page-main {
  padding: 34px 0 72px;
}

.page-hero {
  padding: 52px;
  margin: 28px 0;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--fog-50), #ffffff 58%, var(--cocoon-50));
  border: 1px solid var(--mist-200);
  box-shadow: var(--soft-shadow);
}

.page-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 950;
}

.page-hero p {
  max-width: 760px;
  font-size: 1.05rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--mist-600);
  font-size: 0.92rem;
}

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

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

.overview-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.overview-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.overview-images img {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
}

.overview-card h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.filter-panel {
  padding: 16px;
  margin-bottom: 28px;
}

.sticky-filter {
  position: sticky;
  top: calc(var(--header-height) + 12px);
  z-index: 15;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
}

.filter-panel input {
  flex: 1;
}

.filter-panel select {
  min-width: 150px;
}

.movie-card.is-hidden {
  display: none;
}

.ranking-page {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sitemap-wrap {
  display: grid;
  gap: 20px;
}

.link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--mist-200);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.link-cloud a {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--mist-100);
  color: var(--mist-700);
  font-weight: 700;
  font-size: 0.9rem;
}

.detail-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  padding: 32px;
  margin: 24px 0 34px;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--mist-900), #12384d 50%, #0f5132);
  box-shadow: var(--shadow);
  color: #ffffff;
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

.detail-info h1 {
  color: #ffffff;
  margin: 8px 0 12px;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 950;
}

.detail-one-line {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

.detail-meta {
  margin: 18px 0;
  color: rgba(255, 255, 255, 0.76);
}

.detail-tags {
  margin-bottom: 24px;
}

.watch-section {
  margin: 32px 0;
}

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

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

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.64));
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  border-radius: 50%;
  background: var(--fog-600);
  box-shadow: 0 18px 40px rgba(2, 132, 199, 0.35);
  font-size: 2rem;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.story-card {
  padding: 26px;
}

.story-card h2 {
  margin-bottom: 14px;
  font-size: 1.4rem;
}

.site-footer {
  background: var(--mist-900);
  color: var(--mist-300);
  margin-top: 40px;
}

.site-footer .footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-logo {
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--mist-300);
}

.footer-block h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1.02rem;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a:hover {
  color: var(--fog-400);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 24px;
  text-align: center;
  color: var(--mist-300);
  font-size: 0.9rem;
}

@media (max-width: 1180px) {
  .movie-grid,
  .latest-grid,
  .category-movies,
  .search-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .mobile-panel.is-open {
    display: block;
  }

  .quick-search-panel {
    transform: none;
    margin: 24px auto 0;
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .latest-grid,
  .category-movies,
  .search-grid,
  .related-grid,
  .category-grid,
  .overview-grid,
  .ranking-page,
  .two-column,
  .detail-content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-card,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

  .site-footer .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .quick-search-panel,
  .content-section,
  .page-main,
  .site-footer .footer-inner {
    width: calc(100% - 28px);
    padding-left: 0;
    padding-right: 0;
  }

  .header-inner {
    padding: 0 14px;
  }

  .hero-carousel {
    min-height: 72vh;
  }

  .hero-content {
    width: calc(100% - 28px);
    bottom: 8%;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-dots {
    left: 14px;
    right: auto;
    bottom: 20px;
  }

  .movie-grid,
  .latest-grid,
  .category-movies,
  .search-grid,
  .related-grid,
  .category-grid,
  .overview-grid,
  .ranking-page,
  .two-column {
    grid-template-columns: 1fr;
  }

  .movie-rail {
    grid-auto-columns: 74%;
  }

  .rank-item {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .page-hero,
  .detail-hero,
  .story-card {
    padding: 24px;
  }

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

  .big-search {
    flex-direction: column;
    align-items: stretch;
  }
}
