:root {
  --mist-50: #f8f9fa;
  --mist-100: #f1f3f5;
  --mist-200: #e9ecef;
  --mist-400: #adb5bd;
  --mist-500: #868e96;
  --mist-600: #6c757d;
  --mist-700: #495057;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --red-50: #fef2f2;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --orange-50: #fff7ed;
  --orange-600: #ea580c;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.14);
  --shadow-xl: 0 26px 70px rgba(15, 23, 42, 0.2);
  --radius-lg: 18px;
  --radius-xl: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--mist-50);
  color: var(--slate-800);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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, 0.95);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-500), var(--orange-600));
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.25);
}

.brand-text,
.footer-brand {
  font-size: 20px;
  background: linear-gradient(90deg, var(--red-600), var(--orange-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: var(--mist-700);
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

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

.header-search input,
.mobile-search input,
.tool-search input,
.search-page-form input {
  width: 190px;
  border: 1px solid var(--mist-200);
  border-radius: 999px;
  background: var(--mist-50);
  padding: 10px 14px;
  color: var(--slate-800);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.tool-search input:focus,
.search-page-form input:focus {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.header-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--red-600);
  padding: 10px 16px;
  cursor: pointer;
}

.menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--slate-800);
  background: var(--mist-100);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.home-shell {
  padding-top: 28px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.5s ease, transform 0.7s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.05));
}

.hero-content {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(680px, 78%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px;
  color: var(--white);
}

.hero-label {
  width: fit-content;
  display: inline-flex;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.92);
  padding: 8px 18px;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero-title {
  margin: 18px 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-copy {
  max-width: 620px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.tag-list span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  padding: 6px 12px;
  color: inherit;
  font-size: 13px;
  backdrop-filter: blur(8px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(90deg, var(--red-500), var(--orange-600));
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.24);
}

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

.btn.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.35);
  font-size: 34px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 56px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--white);
}

.section {
  margin-top: 58px;
}

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

.section-head h2,
.latest-panel h2,
.detail-content h2 {
  margin: 0 0 6px;
  color: var(--slate-800);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-head p,
.latest-panel p,
.page-hero p {
  margin: 0;
  color: var(--mist-600);
}

.section-more {
  color: var(--red-600);
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.category-tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.15));
}

.category-tile strong,
.category-tile em {
  position: absolute;
  left: 18px;
  right: 18px;
}

.category-tile strong {
  bottom: 54px;
  font-size: 22px;
}

.category-tile em {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
}

.movie-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 3px 3px 20px;
  scroll-snap-type: x mandatory;
}

.row-card {
  flex: 0 0 288px;
  scroll-snap-align: start;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link,
.poster-wrap {
  display: block;
}

.poster-wrap {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: var(--mist-200);
}

.card-small .poster-wrap {
  height: 180px;
}

.card-large .poster-wrap {
  height: 320px;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.04));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--slate-800);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 10px;
  backdrop-filter: blur(10px);
}

.type-badge {
  right: 12px;
  background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
  left: 12px;
  background: rgba(239, 68, 68, 0.9);
}

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

.movie-card-body h3 {
  min-height: 48px;
  margin: 0 0 8px;
  color: var(--slate-800);
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover h3 a {
  color: var(--red-600);
}

.movie-card-body p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--mist-600);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--mist-500);
  font-size: 13px;
}

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

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

.latest-panel,
.category-overview-card,
.detail-content article,
.detail-side,
.list-tools {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.latest-panel {
  padding: 24px;
}

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

.compact-movie {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 12px;
}

.compact-movie img {
  width: 76px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.compact-movie strong {
  display: block;
  color: var(--slate-800);
  line-height: 1.35;
}

.compact-movie small {
  color: var(--mist-500);
}

.site-footer {
  background: var(--slate-900);
  color: var(--mist-400);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.site-footer p {
  max-width: 460px;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  text-align: center;
  color: var(--mist-500);
}

.page-hero {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--red-50), var(--orange-50));
  padding: 44px;
  box-shadow: var(--shadow-sm);
}

.page-hero span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  padding: 7px 14px;
  color: var(--red-600);
  font-weight: 800;
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px;
}

.category-overview-head h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.category-overview-head p {
  margin: 0 0 18px;
  color: var(--mist-600);
}

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

.breadcrumb a {
  color: var(--red-600);
  font-weight: 700;
}

.list-tools {
  margin-top: 28px;
  padding: 22px;
}

.tool-search {
  margin-bottom: 18px;
}

.tool-search input {
  width: min(100%, 460px);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-button {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--mist-700);
  background: var(--mist-100);
  cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
  color: var(--white);
  background: var(--red-600);
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 18px;
  align-items: center;
  border-radius: var(--radius-lg);
  background: var(--mist-50);
  padding: 14px;
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
}

.ranking-cover img {
  width: 120px;
  height: 90px;
  object-fit: cover;
}

.ranking-cover strong {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(239, 68, 68, 0.92);
}

.ranking-copy h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.ranking-copy p {
  margin: 0 0 8px;
  color: var(--mist-600);
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 32px;
  align-items: center;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--slate-900), #281018 58%, #451116);
  padding: 34px;
  color: var(--white);
  box-shadow: var(--shadow-xl);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.detail-poster img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}

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

.detail-one-line {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.detail-meta div {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 14px;
}

.detail-meta dt {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.detail-meta dd {
  margin: 3px 0 0;
  color: var(--white);
  font-weight: 800;
}

.detail-info .tag-list {
  margin-bottom: 26px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.play-overlay span {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red-500), var(--orange-600));
  font-size: 42px;
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.36);
}

.player-shell.is-playing .play-overlay {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 26px;
  margin-top: 34px;
}

.detail-content article,
.detail-side {
  padding: 28px;
}

.detail-content p {
  color: var(--mist-700);
  font-size: 17px;
}

.detail-side {
  height: fit-content;
}

.side-link {
  display: block;
  border-radius: 14px;
  margin-top: 12px;
  padding: 13px 14px;
  color: var(--slate-800);
  background: var(--mist-100);
  font-weight: 800;
}

.side-link:hover {
  color: var(--white);
  background: var(--red-600);
}

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

.search-page-form {
  display: flex;
  gap: 10px;
  max-width: 600px;
  margin-top: 24px;
}

.search-page-form input {
  flex: 1;
  width: auto;
  background: var(--white);
}

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

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

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

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

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

@media (max-width: 760px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .mobile-search input {
    width: 100%;
  }

  .page-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 22px;
  }

  .hero {
    height: 520px;
    border-radius: 22px;
  }

  .hero-content {
    width: 100%;
    padding: 32px 24px 76px;
    justify-content: flex-end;
  }

  .hero-copy {
    font-size: 16px;
  }

  .hero-control {
    display: none;
  }

  .hero-dots {
    left: 24px;
    bottom: 24px;
  }

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

  .category-grid,
  .movie-grid,
  .category-movie-grid,
  .rank-preview,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .poster-wrap {
    height: 220px;
  }

  .card-small .poster-wrap {
    height: 170px;
  }

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

  .movie-card-body h3 {
    font-size: 15px;
  }

  .movie-card-body p {
    font-size: 13px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .page-hero {
    padding: 30px 22px;
  }

  .ranking-item {
    grid-template-columns: 92px 1fr;
  }

  .ranking-item .btn {
    grid-column: 1 / -1;
  }

  .ranking-cover img {
    width: 92px;
    height: 76px;
  }

  .detail-hero {
    padding: 22px;
  }

  .detail-poster img {
    height: 420px;
  }

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

  .detail-content article,
  .detail-side {
    padding: 22px;
  }
}

@media (max-width: 480px) {
  .brand-text {
    font-size: 18px;
  }

  .category-grid,
  .movie-grid,
  .category-movie-grid,
  .rank-preview,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .row-card {
    flex-basis: 82vw;
  }

  .poster-wrap,
  .card-small .poster-wrap {
    height: 280px;
  }

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

  .btn,
  .search-page-form button {
    width: 100%;
  }
}
