:root {
  --brand-red: #dc2626;
  --brand-orange: #ea580c;
  --brand-blue: #2563eb;
  --ink: #111827;
  --muted: #6b7280;
  --paper: #ffffff;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --dark: #0f172a;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f3f4f6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.24);
}

.brand-text {
  color: transparent;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-orange));
  -webkit-background-clip: text;
  background-clip: text;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 600;
  color: #374151;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--brand-red);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > button {
  border: 0;
  background: transparent;
  color: #374151;
  cursor: pointer;
  font-weight: 600;
  padding: 6px 0;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  display: grid;
  min-width: 180px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px;
}

.dropdown-panel a:hover {
  background: #fef2f2;
}

.top-search,
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.top-search input,
.search-box input {
  width: 260px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  padding: 10px 84px 10px 18px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.search-box input:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.top-search button,
.search-box button {
  position: absolute;
  right: 4px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-orange));
  padding: 7px 16px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  padding: 9px 11px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.mobile-nav.is-open {
  display: grid;
  gap: 10px;
}

.mobile-nav a {
  padding: 10px 4px;
  color: #374151;
  font-weight: 600;
}

.hero-carousel {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.12)), var(--hero-image);
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-content {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  color: #ffffff;
}

.hero-copy {
  max-width: 680px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-orange));
  padding: 8px 16px;
  font-weight: 800;
  box-shadow: 0 14px 35px rgba(220, 38, 38, 0.26);
}

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

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.84);
}

.hero-meta span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  backdrop-filter: blur(10px);
}

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

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

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

.btn-primary {
  color: #ffffff;
  background: var(--brand-blue);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.46);
  transform: translateY(-50%);
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.68);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.page-hero {
  padding: 70px 0 56px;
  color: #ffffff;
  background: radial-gradient(circle at 15% 20%, rgba(239, 68, 68, 0.42), transparent 30%), linear-gradient(135deg, #111827, #1f2937);
}

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

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

.section {
  padding: 56px 0;
}

.section.alt {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.section.dark {
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #1f2937);
}

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

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

.title-bar {
  width: 5px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand-red), var(--brand-orange));
}

.section h2,
.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.section-note {
  margin: 8px 0 0;
  color: var(--muted);
}

.dark .section-note {
  color: rgba(255, 255, 255, 0.72);
}

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

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

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.card-link {
  display: grid;
  height: 100%;
}

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

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

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

.card-badge,
.card-duration,
.rank-pill {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.card-badge {
  left: 10px;
  top: 10px;
  background: var(--brand-blue);
  padding: 7px 10px;
}

.card-duration {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.72);
  padding: 7px 9px;
}

.rank-pill {
  left: 10px;
  bottom: 10px;
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  padding: 7px 10px;
}

.card-body {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.card-title {
  margin: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 0;
  overflow: hidden;
  color: #4b5563;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #6b7280;
  font-size: 13px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tags span,
.info-chip {
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-card {
  min-height: 170px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #dc2626, #ea580c);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #2563eb, #0891b2);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #9333ea, #db2777);
}

.category-card:nth-child(4n) {
  background: linear-gradient(135deg, #16a34a, #059669);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.22);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
}

.category-card span {
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-radius: 18px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.rank-no {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  font-size: 20px;
  font-weight: 900;
}

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

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

.rank-info h2,
.rank-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-info p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #4b5563;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rank-score {
  color: var(--brand-orange);
  font-weight: 900;
  white-space: nowrap;
}

.filter-panel {
  display: grid;
  gap: 18px;
  border-radius: 24px;
  background: #ffffff;
  padding: 22px;
  box-shadow: var(--shadow);
}

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

.filter-button {
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #374151;
  padding: 9px 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-button.is-active,
.filter-button:hover {
  border-color: var(--brand-red);
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-orange));
}

.search-results {
  margin-top: 30px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.58)), var(--detail-image);
  background-position: center;
  background-size: cover;
  filter: blur(1px);
  transform: scale(1.04);
}

.detail-hero .container {
  position: relative;
  padding: 72px 0 54px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

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

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

.detail-lead {
  max-width: 860px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

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

.detail-meta span {
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  padding: 7px 12px;
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 40px 0 58px;
}

.player-card,
.content-card,
.side-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.6));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.play-triangle {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 26px solid #ffffff;
}

.player-overlay strong {
  font-size: 19px;
}

.content-card {
  margin-top: 24px;
  padding: 28px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0 0 16px;
  color: #374151;
  font-size: 16px;
}

.side-card {
  padding: 18px;
}

.side-cover {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 3 / 4;
  background: #111827;
}

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

.side-card h2 {
  margin: 18px 0 12px;
  font-size: 22px;
}

.info-grid {
  display: grid;
  gap: 10px;
  color: #4b5563;
  font-size: 14px;
}

.info-grid div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 8px;
}

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

.footer {
  color: #d1d5db;
  background: linear-gradient(180deg, #111827, #000000);
  padding: 46px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 28px;
}

.footer h2,
.footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer p,
.footer a {
  color: #9ca3af;
}

.footer a:hover {
  color: #f87171;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 34px;
  border-top: 1px solid #1f2937;
  padding-top: 22px;
  color: #6b7280;
  font-size: 14px;
}

.empty-state {
  display: none;
  border-radius: 18px;
  background: #ffffff;
  padding: 32px;
  text-align: center;
  color: #6b7280;
}

.empty-state.is-visible {
  display: block;
}

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

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

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

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

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .navbar {
    height: 62px;
  }

  .brand {
    font-size: 19px;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 76px;
  }

  .hero-control {
    display: none;
  }

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

  .section-head {
    display: grid;
  }

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

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

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

  .rank-score {
    grid-column: 3;
  }

  .rank-no {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 16px;
  }

  .footer-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
    display: grid;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-copy h1,
  .detail-hero h1 {
    letter-spacing: -0.02em;
  }

  .top-search input,
  .search-box input {
    width: 100%;
  }

  .filter-panel {
    padding: 16px;
  }
}
