:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --purple-500: #a855f7;
  --pink-500: #ec4899;
  --blue-500: #3b82f6;
  --teal-500: #14b8a6;
  --green-400: #4ade80;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .08);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, .10);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, .14);
  --radius-lg: .75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  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(--gray-50), var(--gray-100));
}

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

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

button, input, select {
  font: inherit;
}

main {
  min-height: 62vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  color: white;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 80rem;
  height: 4rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand, .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .75rem;
  background: linear-gradient(135deg, var(--orange-500), var(--red-600));
  color: white;
  font-weight: 900;
  box-shadow: 0 10px 25px rgba(249, 115, 22, .35);
  transition: transform .25s ease;
}

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

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 1.15rem;
  background: linear-gradient(90deg, var(--orange-400), var(--red-500));
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: .25rem;
  color: #cbd5e1;
  font-size: .75rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: #d1d5db;
  font-weight: 600;
  transition: color .2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--orange-400);
}

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

.header-search input, .mobile-search input, .filterbar input, .filterbar select {
  border: 0;
  outline: 0;
  border-radius: .75rem;
  padding: .72rem .9rem;
  background: rgba(51, 65, 85, .95);
  color: white;
}

.header-search input::placeholder, .mobile-search input::placeholder {
  color: #9ca3af;
}

.header-search button, .mobile-search button, .primary-btn, .ghost-btn, .player-button {
  border: 0;
  border-radius: .75rem;
  padding: .72rem 1rem;
  background: linear-gradient(90deg, var(--orange-500), var(--red-600));
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.header-search button:hover, .mobile-search button:hover, .primary-btn:hover, .player-button:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 12px 28px rgba(234, 88, 12, .32);
}

.ghost-btn {
  background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 1rem;
  background: var(--slate-800);
  border-top: 1px solid rgba(148, 163, 184, .25);
}

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

.mobile-panel nav, .mobile-cats {
  display: grid;
  gap: .7rem;
  margin-top: 1rem;
}

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

.mobile-panel a {
  color: #d1d5db;
}

.page-wrap {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, .86), rgba(0, 0, 0, .45), rgba(0, 0, 0, .12));
}

.hero-content {
  position: absolute;
  left: clamp(1.5rem, 5vw, 3rem);
  right: clamp(1.5rem, 5vw, 3rem);
  bottom: clamp(1.5rem, 5vw, 3rem);
  z-index: 2;
  max-width: 48rem;
  color: white;
}

.hero-content .eyebrow, .section-heading span, .page-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: .45rem .85rem;
  background: linear-gradient(90deg, var(--orange-500), var(--red-500));
  color: white;
  font-size: .85rem;
  font-weight: 800;
}

.hero h1, .hero h2 {
  margin: 1rem 0 .8rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.hero p {
  max-width: 43rem;
  margin: 0 0 1.4rem;
  color: #e5e7eb;
  font-size: clamp(1rem, 2vw, 1.2rem);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 2.7rem;
  height: 2.7rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, .42);
  color: white;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background .2s ease, transform .2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, .7);
  transform: translateY(-50%) scale(1.08);
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  z-index: 4;
  display: flex;
  gap: .5rem;
  transform: translateX(-50%);
}

.hero-dots button {
  width: .65rem;
  height: .65rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 1.6rem;
  background: white;
}

.section-block {
  margin-top: 3rem;
  border-radius: var(--radius-2xl);
  padding: clamp(1.2rem, 3vw, 2rem);
}

.section-white {
  background: white;
  box-shadow: var(--shadow-md);
}

.section-blue {
  background: linear-gradient(90deg, var(--blue-500), var(--teal-500));
  color: white;
}

.section-purple {
  background: linear-gradient(90deg, var(--purple-500), var(--pink-500));
  color: white;
}

.section-green {
  background: linear-gradient(135deg, var(--green-400), var(--blue-500));
  color: white;
}

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

.section-heading h2 {
  margin: .7rem 0 .3rem;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.15;
}

.section-heading p {
  margin: 0;
  color: var(--gray-600);
  max-width: 48rem;
}

.section-blue .section-heading p, .section-purple .section-heading p, .section-green .section-heading p {
  color: rgba(255, 255, 255, .82);
}

.section-more {
  flex-shrink: 0;
  color: var(--orange-600);
  font-weight: 800;
}

.section-blue .section-more, .section-purple .section-more, .section-green .section-more {
  color: white;
}

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

.movie-grid.large-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.25rem;
}

.movie-card, .movie-row, .category-card, .rank-card, .info-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}

.movie-card:hover, .movie-row:hover, .category-card:hover, .rank-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.movie-card-large .card-media {
  aspect-ratio: 16 / 9;
}

.card-media img, .row-media img, .detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

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

.card-media::after, .row-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .38);
  opacity: 0;
  transition: opacity .25s ease;
}

.movie-card:hover .card-media::after, .movie-row:hover .row-media::after {
  opacity: 1;
}

.card-play, .row-media span {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 3.4rem;
  height: 3.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--orange-500);
  color: white;
  font-weight: 900;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.82);
  transition: opacity .25s ease, transform .25s ease;
}

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

.card-year, .card-category {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: .32rem .6rem;
  color: white;
  font-size: .78rem;
  font-weight: 800;
}

.card-year {
  right: .65rem;
  bottom: .65rem;
  background: rgba(0, 0, 0, .68);
}

.card-category {
  left: .65rem;
  top: .65rem;
  background: linear-gradient(90deg, var(--orange-500), var(--red-500));
}

.card-body {
  padding: .95rem;
}

.card-body h3, .row-body h3 {
  margin: 0 0 .55rem;
  color: var(--gray-800);
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body h3 a:hover, .row-body h3 a:hover {
  color: var(--orange-500);
}

.card-body p, .row-body p {
  margin: 0 0 .85rem;
  color: var(--gray-600);
  font-size: .92rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-large .card-body h3 {
  font-size: 1.25rem;
}

.movie-card-large .card-body {
  padding: 1.25rem;
}

.card-meta, .row-meta, .detail-meta, .card-tags, .tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.card-meta a, .row-meta a, .detail-meta a, .card-tags span, .tag-list span, .card-meta span, .row-meta span {
  border-radius: .5rem;
  padding: .32rem .55rem;
  background: var(--orange-100);
  color: var(--orange-600);
  font-size: .78rem;
  font-weight: 700;
}

.card-meta span, .row-meta span {
  background: var(--gray-100);
  color: var(--gray-600);
}

.movie-row {
  display: flex;
  gap: 1rem;
}

.row-media {
  position: relative;
  flex: 0 0 12rem;
  min-height: 8rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.row-body {
  flex: 1;
  min-width: 0;
  padding: 1rem 1rem 1rem 0;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-bottom: 1.5rem;
}

.category-pills a, .category-pills button {
  border: 0;
  border-radius: 999px;
  padding: .65rem 1rem;
  background: rgba(255, 255, 255, .22);
  color: white;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.category-pills a:hover, .category-pills button:hover, .category-pills button.active {
  background: white;
  color: var(--purple-500);
  transform: scale(1.04);
}

.filterbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12rem 12rem;
  gap: .8rem;
  margin: 1.2rem 0 1.6rem;
}

.filterbar input, .filterbar select {
  width: 100%;
  background: white;
  color: var(--gray-800);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.empty-state {
  display: none;
  padding: 2rem;
  text-align: center;
  border-radius: var(--radius-xl);
  background: white;
  color: var(--gray-500);
}

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

.page-hero {
  border-radius: var(--radius-2xl);
  padding: clamp(1.6rem, 5vw, 3rem);
  color: white;
  background: radial-gradient(circle at top left, rgba(249, 115, 22, .4), transparent 36%), linear-gradient(135deg, var(--slate-900), var(--slate-800));
  box-shadow: var(--shadow-lg);
}

.page-hero h1 {
  margin: 1rem 0 .8rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.1;
}

.page-hero p {
  max-width: 58rem;
  margin: 0;
  color: #e5e7eb;
  font-size: 1.05rem;
  line-height: 1.8;
}

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

.category-card {
  display: block;
  padding: 1.4rem;
}

.category-card h2 {
  margin: 0 0 .6rem;
  color: var(--gray-800);
}

.category-card p {
  margin: 0 0 1rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.category-card strong {
  color: var(--orange-600);
}

.rank-list {
  display: grid;
  gap: .9rem;
}

.rank-card {
  display: grid;
  grid-template-columns: 4.2rem 12rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: .8rem;
  background: white;
}

.rank-num {
  width: 3.1rem;
  height: 3.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange-500), var(--red-500));
  color: white;
  font-size: 1.2rem;
  font-weight: 900;
}

.rank-thumb {
  position: relative;
  height: 6.8rem;
  overflow: hidden;
  border-radius: .8rem;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

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

.rank-info h2, .rank-info h3 {
  margin: 0 0 .5rem;
  font-size: 1.15rem;
}

.rank-info p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-score {
  color: var(--orange-600);
  font-size: 1.3rem;
  font-weight: 900;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 22rem;
  gap: 1.5rem;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background: #000;
  box-shadow: var(--shadow-lg);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, .82), rgba(0, 0, 0, .34));
  cursor: pointer;
  transition: opacity .25s ease, visibility .25s ease;
}

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

.player-button {
  min-width: 9rem;
  min-height: 3.3rem;
  font-size: 1.1rem;
}

.detail-card {
  margin-top: 1.3rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: var(--radius-2xl);
  background: white;
  box-shadow: var(--shadow-md);
}

.detail-card h1 {
  margin: .8rem 0 .8rem;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.12;
}

.detail-card h2 {
  margin: 2rem 0 .8rem;
  font-size: 1.35rem;
}

.detail-card p {
  color: var(--gray-700);
  line-height: 1.9;
}

.detail-meta {
  margin: 1rem 0;
}

.detail-side {
  display: grid;
  gap: 1rem;
}

.detail-cover {
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
  box-shadow: var(--shadow-md);
}

.detail-cover img {
  aspect-ratio: 3 / 4;
}

.info-card {
  padding: 1.2rem;
}

.info-card h2, .info-card h3 {
  margin: 0 0 .9rem;
}

.info-card dl {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: .5rem .8rem;
  margin: 0;
}

.info-card dt {
  color: var(--gray-500);
}

.info-card dd {
  margin: 0;
  color: var(--gray-800);
  font-weight: 700;
}

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

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-logo {
  color: white;
  font-weight: 900;
  font-size: 1.1rem;
}

.footer-brand p {
  margin: 1rem 0 0;
  color: #9ca3af;
  line-height: 1.7;
}

.site-footer h3 {
  margin: 0 0 1rem;
  color: white;
}

.footer-links {
  display: grid;
  gap: .55rem;
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, .18);
  padding: 1.2rem 1rem;
  text-align: center;
  color: #94a3b8;
}

@media (min-width: 640px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (min-width: 768px) {
  .hero {
    height: 500px;
  }

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

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

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

@media (min-width: 1024px) {
  .header-inner {
    padding: 0 2rem;
  }

  .hero {
    height: 600px;
  }

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

  .page-wrap {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (max-width: 980px) {
  .desktop-nav, .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

  .detail-side {
    grid-template-columns: 12rem minmax(0, 1fr);
  }

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

@media (max-width: 720px) {
  .hero-control {
    display: none;
  }

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

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

  .movie-row {
    display: grid;
    gap: 0;
  }

  .row-media {
    width: 100%;
    min-height: auto;
    aspect-ratio: 16 / 9;
  }

  .row-body {
    padding: 1rem;
  }

  .rank-card {
    grid-template-columns: 3.6rem minmax(0, 1fr);
  }

  .rank-thumb, .rank-score {
    display: none;
  }

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

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

@media (max-width: 520px) {
  .brand-copy strong {
    font-size: 1rem;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    height: 450px;
    border-radius: 1rem;
  }

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

  .section-block {
    border-radius: 1rem;
  }
}
