:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --pink: #db2777;
  --blue: #2563eb;
  --green: #16a34a;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  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(--text);
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.35);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-2deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  color: var(--text);
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #374151;
  font-weight: 650;
}

.main-nav a {
  position: relative;
  transition: color 0.2s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--red), var(--pink));
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.main-nav a:hover {
  color: var(--red);
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  border: 0;
  background: #f3f4f6;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
}

.hero {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: #030712;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12));
}

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

.hero-content h1 {
  margin: 18px 0 16px;
  max-width: 780px;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: 18px;
}

.hero-tags,
.detail-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-tags span,
.hero-tags a,
.detail-chip-group span {
  padding: 7px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero-tags span:first-child {
  background: var(--red);
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--red), var(--pink));
  box-shadow: 0 16px 35px rgba(220, 38, 38, 0.35);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  transform: translateY(-50%);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 26px;
}

.hero-next {
  right: 26px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  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-dots button.is-active {
  width: 36px;
  background: #ffffff;
}

.home-intro,
.container,
.footer-inner,
.detail-hero-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding-top: 38px;
  padding-bottom: 10px;
}

.home-intro h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 34px);
}

.home-intro p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.quick-chip,
.filter-chips button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  color: #374151;
  background: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.quick-chip:hover,
.filter-chips button:hover,
.filter-chips button.is-active {
  border-color: rgba(220, 38, 38, 0.5);
  color: var(--red);
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.12);
}

.container {
  padding-top: 36px;
  padding-bottom: 56px;
}

.search-panel {
  margin-bottom: 38px;
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.search-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0 16px;
  outline: 0;
  color: var(--text);
  background: #f9fafb;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-status {
  margin: 12px 0 0;
  color: var(--muted);
}

.content-section {
  margin-bottom: 54px;
}

.content-section:nth-of-type(even) {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-more {
  min-height: 40px;
  color: var(--red);
  background: #fff1f2;
}

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

.all-movies {
  align-items: start;
}

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

.movie-card[hidden] {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #374151);
}

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

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

.movie-badge,
.rank-number {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.rank-number {
  left: auto;
  right: 10px;
  background: rgba(17, 24, 39, 0.86);
}

.card-body {
  padding: 14px;
}

.movie-title {
  display: -webkit-box;
  min-height: 46px;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-title:hover {
  color: var(--red);
}

.movie-meta,
.movie-line {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-line {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag-row span {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 9px;
  border-radius: 999px;
  color: #991b1b;
  background: #fee2e2;
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(244, 63, 94, 0.88), transparent 32%), linear-gradient(135deg, #111827 0%, #1f2937 52%, #4c0519 100%);
}

.compact-hero {
  padding: 70px 20px;
  text-align: center;
}

.compact-hero h1 {
  margin: 0 auto 14px;
  max-width: 840px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.compact-hero p {
  max-width: 760px;
  margin: 0 auto;
  color: #e5e7eb;
  font-size: 18px;
}

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

.category-card {
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 170px;
  background: #111827;
}

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

.category-card h2,
.category-card p {
  margin-left: 22px;
  margin-right: 22px;
}

.category-card h2 {
  margin-top: 20px;
  margin-bottom: 8px;
  font-size: 24px;
}

.category-card p {
  margin-top: 0;
  margin-bottom: 22px;
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #ffffff;
  background: #030712;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.48;
  filter: blur(3px);
  transform: scale(1.02);
}

.detail-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.95), rgba(3, 7, 18, 0.76), rgba(3, 7, 18, 0.48));
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding-top: 48px;
  padding-bottom: 52px;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.42);
}

.detail-info-grid h1 {
  margin: 20px 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.1;
}

.detail-info-grid p {
  max-width: 780px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: 18px;
}

.detail-layout {
  margin-top: -80px;
  position: relative;
  z-index: 5;
}

.player-card,
.detail-panel,
.ranking-list {
  margin-bottom: 30px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
  padding: 12px;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.22));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--red);
  background: rgba(255, 255, 255, 0.92);
  font-size: 28px;
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.24);
}

.player-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 5;
  margin: 0;
  color: #ffffff;
  text-align: center;
}

.player-message:empty {
  display: none;
}

.detail-panel {
  padding: 30px;
}

.detail-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-panel p {
  margin: 0 0 24px;
  color: #374151;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 22px;
}

.info-list div {
  padding: 15px;
  border-radius: 16px;
  background: #f9fafb;
}

.info-list strong,
.info-list span {
  display: block;
}

.info-list strong {
  color: var(--muted);
  font-size: 13px;
}

.info-list span {
  margin-top: 4px;
  font-weight: 800;
}

.detail-chip-group span {
  color: #374151;
  background: #f3f4f6;
}

.related-section {
  padding: 0;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
}

.ranking-list {
  padding: 28px;
}

.ranking-list h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.rank-rows {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #f9fafb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: #fff1f2;
  transform: translateX(4px);
}

.rank-row span {
  color: var(--red);
  font-size: 20px;
  font-weight: 900;
}

.rank-row img {
  width: 54px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-row strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.site-footer {
  background: #111827;
  color: #e5e7eb;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding-top: 38px;
  padding-bottom: 38px;
}

.footer-inner p {
  max-width: 640px;
  margin: 8px 0 0;
  color: #9ca3af;
}

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

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

@media (max-width: 1100px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    padding: 12px;
    border-radius: 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .main-nav a {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .main-nav a:hover {
    background: #f9fafb;
  }

  .main-nav a::after {
    display: none;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    height: 78vh;
    min-height: 520px;
  }

  .hero-content {
    bottom: 72px;
  }

  .hero-arrow {
    display: none;
  }

  .home-intro {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  .detail-layout {
    margin-top: -42px;
  }

  .rank-row {
    grid-template-columns: 36px 48px minmax(0, 1fr);
  }

  .rank-row em {
    grid-column: 3 / -1;
  }

  .footer-inner {
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .header-inner {
    padding: 0 14px;
  }

  .brand-text strong {
    font-size: 17px;
  }

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

  .hero-content p,
  .compact-hero p,
  .detail-info-grid p {
    font-size: 16px;
  }

  .hero-tags span,
  .hero-tags a {
    padding: 6px 10px;
    font-size: 12px;
  }

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

  .content-section:nth-of-type(even),
  .search-panel,
  .detail-panel,
  .ranking-list {
    padding: 18px;
    border-radius: 20px;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    margin-top: 12px;
  }

  .card-body {
    padding: 11px;
  }

  .movie-title {
    font-size: 14px;
  }

  .movie-meta,
  .movie-line {
    font-size: 12px;
  }

  .compact-hero {
    padding: 50px 16px;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-hero-content {
    padding-top: 32px;
    padding-bottom: 68px;
  }

  .info-list {
    grid-template-columns: 1fr;
  }

  .player-card {
    padding: 7px;
  }

  .play-circle {
    width: 62px;
    height: 62px;
  }
}
