:root {
  --rose: #f43f5e;
  --rose-dark: #e11d48;
  --orange: #f97316;
  --pink-50: #fdf2f8;
  --rose-50: #fff1f2;
  --orange-50: #fff7ed;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow: 0 18px 45px rgba(244, 63, 94, 0.14);
  --shadow-soft: 0 12px 35px rgba(17, 24, 39, 0.10);
  --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;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--rose-50), var(--orange-50), var(--pink-50));
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(244, 63, 94, 0.12);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--gray-900);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 10px 22px rgba(244, 63, 94, 0.28);
}

.brand-text {
  font-size: 20px;
  white-space: nowrap;
}

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

.nav-link,
.mobile-link {
  color: var(--gray-700);
  font-weight: 700;
  transition: color 0.2s ease;
}

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

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

.nav-search input,
.mobile-search input,
.hero-search input,
.page-search input,
.filter-box input {
  width: 100%;
  border: 1px solid rgba(244, 63, 94, 0.18);
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--gray-800);
  background: #ffffff;
  outline: none;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.nav-search input {
  width: 260px;
  padding: 10px 16px;
}

.nav-search button,
.mobile-search button,
.hero-search button,
.page-search button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  cursor: pointer;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: none;
  background: transparent;
  padding: 8px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--gray-800);
}

.mobile-panel {
  display: none;
  padding: 0 24px 18px;
  border-top: 1px solid var(--gray-100);
}

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

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.56), rgba(17, 24, 39, 0.12)), linear-gradient(0deg, rgba(17, 24, 39, 0.82), rgba(17, 24, 39, 0));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 92px;
  width: min(660px, calc(100% - 48px));
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  padding: 7px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 0 0 12px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  margin: 0 0 12px;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
}

.hero-desc {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags a,
.detail-tags a,
.tag-row span,
.chip,
.mini-link-row a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--rose-dark);
  background: rgba(255, 241, 242, 0.92);
  font-size: 13px;
  font-weight: 700;
}

.hero-tags a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 14px 30px rgba(244, 63, 94, 0.28);
}

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

.btn.slim {
  padding: 10px 18px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.wide-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
}

.intro-band {
  padding-top: 56px;
}

.intro-card,
.page-hero > div,
.detail-card,
.side-card,
.rank-panel,
.category-card-large,
.filter-box {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.intro-card {
  padding: clamp(28px, 5vw, 52px);
}

.intro-card h2,
.section-heading h2,
.rank-panel h2,
.detail-card h1,
.side-card h2,
.category-card-large h2,
.rank-info h2 {
  margin: 0;
  color: var(--gray-900);
}

.intro-card p,
.section-heading p,
.rank-panel p,
.detail-card p,
.category-card-large p,
.rank-info p,
.page-hero p {
  color: var(--gray-500);
  line-height: 1.8;
}

.hero-search,
.page-search {
  margin-top: 24px;
  max-width: 720px;
}

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

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.22);
}

.text-link {
  color: var(--rose-dark);
  font-weight: 900;
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 22px;
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.82), rgba(17, 24, 39, 0.14));
}

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

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

.category-tile span,
.category-tile small {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
}

.category-tile span {
  bottom: 44px;
  font-size: 20px;
  font-weight: 900;
}

.category-tile small {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 20px;
}

.featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.dense-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

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

.movie-card > a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card > a:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 55px rgba(244, 63, 94, 0.20);
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--gray-200);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card > a:hover img {
  transform: scale(1.08);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.54), transparent 56%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card > a:hover .card-cover::after {
  opacity: 1;
}

.card-badge,
.card-score {
  position: absolute;
  z-index: 1;
  top: 10px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.card-badge {
  left: 10px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
}

.card-score {
  right: 10px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
}

.card-content {
  padding: 16px;
}

.card-content h3 {
  margin: 0 0 8px;
  color: var(--gray-900);
  font-size: 17px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-content p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  color: var(--gray-500);
  font-size: 12px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 24px;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--gray-50);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  background: var(--rose-50);
}

.rank-row strong {
  color: var(--rose-dark);
}

.rank-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-row em {
  color: var(--gray-500);
  font-style: normal;
  font-size: 12px;
}

.page-hero {
  padding: 56px 24px 0;
}

.page-hero > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 70px);
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), transparent 28%), linear-gradient(135deg, var(--rose), var(--orange));
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 900;
}

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

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.category-list-large {
  display: grid;
  gap: 22px;
}

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

.category-cover {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 16 / 10;
}

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

.category-card-large h2 {
  margin-bottom: 10px;
}

.mini-link-row {
  margin: 18px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--rose-dark);
  font-weight: 800;
}

.filter-box {
  display: grid;
  gap: 16px;
  margin-bottom: 26px;
  padding: 20px;
}

.chip.active,
.chip:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
}

.rank-stack {
  display: grid;
  gap: 18px;
}

.rank-card {
  display: grid;
  grid-template-columns: 150px 72px 1fr 130px;
  gap: 20px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-cover {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 10;
}

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

.rank-index {
  color: var(--rose-dark);
  font-size: 26px;
  font-weight: 900;
}

.rank-info p {
  margin: 8px 0 12px;
}

.rank-score {
  text-align: right;
}

.rank-score strong {
  display: block;
  color: var(--rose-dark);
  font-size: 32px;
}

.rank-score span {
  color: var(--gray-500);
  font-size: 13px;
}

.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px 0;
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

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

.video-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: none;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.55), rgba(17, 24, 39, 0.12));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 18px 45px rgba(244, 63, 94, 0.38);
  font-size: 34px;
}

.play-overlay strong {
  font-size: 18px;
}

.player-card.playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-card {
  padding: clamp(24px, 4vw, 42px);
}

.detail-card h1 {
  margin: 18px 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
}

.detail-one-line {
  color: var(--gray-700) !important;
  font-size: 19px;
  font-weight: 700;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0;
}

.detail-meta-grid div {
  padding: 16px;
  border-radius: 18px;
  background: var(--gray-50);
}

.detail-meta-grid span {
  display: block;
  color: var(--gray-500);
  font-size: 13px;
}

.detail-meta-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--gray-900);
  font-size: 17px;
}

.detail-card h2 {
  margin: 30px 0 10px;
  color: var(--gray-900);
}

.detail-card p {
  margin: 0;
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 20px;
}

.side-card {
  padding: 20px;
}

.poster-card img {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 16px;
}

.poster-card .btn {
  width: 100%;
}

.side-links {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.side-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--gray-50);
}

.side-links span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.side-links em {
  color: var(--rose-dark);
  font-style: normal;
  font-weight: 900;
}

.search-status {
  margin-bottom: 20px;
  color: var(--gray-700);
  font-weight: 900;
}

.site-footer {
  margin-top: 56px;
  padding: 42px 24px 24px;
  background: #ffffff;
  border-top: 1px solid rgba(244, 63, 94, 0.12);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.footer-inner p {
  color: var(--gray-500);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-50);
  font-weight: 700;
}

.footer-bottom {
  max-width: 1280px;
  margin: 26px auto 0;
  color: var(--gray-500);
  font-size: 14px;
}

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

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

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

  .two-column,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .rank-panel,
  .detail-side {
    position: static;
  }

  .rank-card {
    grid-template-columns: 120px 56px 1fr;
  }

  .rank-score {
    grid-column: 3;
    text-align: left;
  }
}

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

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-shell {
    gap: 14px;
    padding: 12px 18px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    bottom: 74px;
  }

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

  .hero-actions,
  .hero-search,
  .page-search {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-arrow {
    display: none;
  }

  .wide-section,
  .detail-shell,
  .page-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .movie-grid,
  .dense-grid,
  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .category-card-large {
    grid-template-columns: 1fr;
  }

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

  .rank-index {
    position: absolute;
    margin: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--rose), var(--orange));
    font-size: 14px;
  }

  .rank-info,
  .rank-score {
    grid-column: 2;
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  .category-grid,
  .movie-grid,
  .dense-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-info,
  .rank-score {
    grid-column: auto;
  }

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