:root {
  --brand: #f97316;
  --brand-strong: #ef4444;
  --brand-pink: #ec4899;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --dark: #111827;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

* {
  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(--ink);
  background: var(--soft);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #f97316, #ef4444, #ec4899);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.24);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo:hover {
  transform: scale(1.03);
}

.logo-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.logo-text {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link,
.mobile-link {
  font-weight: 700;
  opacity: 0.92;
  transition: color 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fef3c7;
  opacity: 1;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

.mobile-link {
  display: block;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.hero {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 42px;
  width: 100%;
  padding: 72px max(32px, calc((100vw - 1180px) / 2)) 88px;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.24), transparent 28%), linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.74));
}

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

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.hero-kicker,
.section-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 6px 12px;
  color: #fff7ed;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.section-label {
  color: var(--brand-strong);
  background: #fff7ed;
  border-color: #fed7aa;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.primary-button,
.ghost-button,
.wide-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.28);
}

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

.primary-button:hover,
.ghost-button:hover,
.wide-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(239, 68, 68, 0.24);
}

.hero-poster {
  display: block;
  min-height: 440px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.4), rgba(236, 72, 153, 0.36));
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

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

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  color: var(--brand-strong);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  box-shadow: var(--shadow);
}

.hero-poster:hover img {
  transform: scale(1.06);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 999px;
}

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

.section {
  padding: 72px 0;
}

.white-section {
  background: #ffffff;
}

.soft-section {
  background: linear-gradient(180deg, #fff7ed, #f8fafc);
}

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

.inline-heading {
  align-items: start;
}

.section-heading h2,
.panel-title h2,
.story-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.text-link {
  color: var(--brand-strong);
  font-weight: 800;
}

.text-link:hover {
  color: var(--brand);
}

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

.category-card,
.category-banner {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  padding: 24px;
  color: #ffffff;
  border-radius: 22px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.category-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.category-icon {
  display: block;
  margin-bottom: 18px;
  font-size: 34px;
}

.category-card strong,
.category-name {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 900;
}

.category-card span:last-child,
.category-desc {
  display: block;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

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

.category-banner {
  min-height: 220px;
}

.category-art {
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 210px;
  height: 210px;
  opacity: 0.22;
  background-size: cover;
  background-position: center;
  border-radius: 30px;
  transform: rotate(8deg);
}

.theme-red {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.theme-orange {
  background: linear-gradient(135deg, #f97316, #f59e0b);
}

.theme-purple {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.theme-pink,
.theme-rose {
  background: linear-gradient(135deg, #ec4899, #ef4444);
}

.theme-yellow,
.theme-amber {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.theme-blue,
.theme-cyan {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.theme-green {
  background: linear-gradient(135deg, #22c55e, #14b8a6);
}

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

.compact-grid,
.all-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 18px;
  box-shadow: 0 8px 24px 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 18px 42px rgba(15, 23, 42, 0.16);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.32), transparent 26%), linear-gradient(135deg, #fb923c, #ef4444 48%, #db2777);
}

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

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

.cover-badge,
.cover-year {
  position: absolute;
  top: 10px;
  padding: 5px 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 8px;
}

.cover-badge {
  left: 10px;
  max-width: calc(100% - 20px);
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
}

.cover-year {
  right: 10px;
  background: rgba(17, 24, 39, 0.75);
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  color: var(--brand-strong);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 14px;
}

.card-body h2 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body h2 a:hover {
  color: var(--brand-strong);
}

.card-body p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  color: #b91c1c;
  background: #fff7ed;
}

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

.ranking-panel,
.ranking-wide,
.story-card,
.filter-panel {
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.ranking-panel,
.ranking-wide,
.story-card {
  padding: 24px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.panel-title span {
  font-size: 28px;
}

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

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

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

.rank-item:hover {
  background: #fff7ed;
  transform: translateX(3px);
}

.rank-no {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-radius: 10px;
}

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

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.wide-button {
  width: 100%;
  margin-top: 18px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
}

.page-hero,
.detail-hero {
  padding: 78px 0;
  color: #ffffff;
  background: radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.22), transparent 24%), linear-gradient(135deg, #f97316, #ef4444 52%, #ec4899);
}

.page-hero h1,
.detail-info h1 {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(130px, 180px));
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink);
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

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

.detail-hero {
  padding: 54px 0;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 26px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
}

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

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

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

.one-line {
  max-width: 820px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
}

.detail-meta {
  margin-bottom: 16px;
}

.detail-meta span,
.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 24px;
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.28);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.5));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  color: var(--brand-strong);
  font-size: 30px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease;
}

.player-overlay:hover .player-start {
  transform: scale(1.08);
}

.story-card {
  margin-top: 24px;
}

.story-card h2 {
  margin-top: 6px;
  margin-bottom: 12px;
  font-size: 26px;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

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

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

.site-footer p {
  margin: 0;
  color: #d1d5db;
  font-size: 14px;
}

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

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

.footer-bottom {
  padding: 18px;
  color: #9ca3af;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

  .menu-button {
    display: flex;
  }

  .hero-track {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 52px 18px 74px;
  }

  .hero-poster {
    min-height: 300px;
  }

  .hero-poster img {
    min-height: 300px;
  }

  .split-layout,
  .detail-layout,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    width: min(290px, 78vw);
  }

  .reverse-mobile .ranking-panel {
    order: -1;
  }

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .section {
    padding: 48px 0;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-track {
    min-height: 760px;
  }

  .hero-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

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

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

  .rank-list.two-column {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .detail-hero {
    padding: 36px 0;
  }

  .player-start {
    width: 66px;
    height: 66px;
  }
}
