:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --red: #ef4444;
  --orange: #f97316;
  --green: #16a34a;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 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(--text);
  background: linear-gradient(180deg, #fff7ed 0, #f8fafc 360px, #f8fafc 100%);
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.28);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  background: linear-gradient(90deg, #dc2626, #ea580c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-panel a {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 300px;
}

.nav-search input,
.hero-search input,
.filter-bar input,
.filter-bar select,
.page-search input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.hero-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.page-search input:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

.nav-search button,
.hero-search button,
.filter-bar button,
.page-search button,
.primary-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.22);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  padding: 10px 12px;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px 24px;
  border-top: 1px solid #e5e7eb;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

main {
  min-height: 60vh;
}

.hero-shell {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 24px;
  position: relative;
}

.hero-slide {
  min-height: 560px;
  border-radius: 34px;
  overflow: hidden;
  position: relative;
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.6fr);
  gap: 48px;
  padding: 64px;
  background: radial-gradient(circle at 18% 20%, rgba(248, 113, 113, 0.34), transparent 30%), linear-gradient(135deg, #111827, #3f0f11 46%, #7c2d12);
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-slide.is-active {
  display: grid;
  animation: fadeIn 0.5s ease both;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.30)), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 10%, rgba(249, 115, 22, 0.36), transparent 32%), radial-gradient(circle at 85% 80%, rgba(34, 197, 94, 0.20), transparent 28%);
}

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

.hero-kicker,
.eyebrow {
  margin: 0 0 14px;
  color: #fbbf24;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-desc {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.hero-tags,
.card-tags,
.detail-tags,
.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.card-tags span,
.detail-tags a,
.footer-tags a {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

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

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
}

.hero-poster {
  width: min(360px, 100%);
  justify-self: center;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
  transform: rotate(2deg);
  background: linear-gradient(135deg, #fed7aa, #fecaca);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-bottom {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: -38px auto 0;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
}

.hero-dot.is-active {
  width: 38px;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.hero-search,
.page-search {
  display: flex;
  gap: 10px;
}

.stats-strip {
  max-width: 1180px;
  margin: 26px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stats-strip a {
  border-radius: 22px;
  padding: 20px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.stats-strip strong {
  display: block;
  color: #dc2626;
  font-size: 28px;
  line-height: 1.1;
}

.stats-strip span {
  color: var(--muted);
  font-size: 14px;
}

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

.soft-section {
  padding-top: 36px;
  padding-bottom: 36px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(226, 232, 240, 0.82);
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.view-more {
  color: #dc2626;
  font-weight: 900;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
}

.poster-link {
  display: block;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge,
.poster-play {
  position: absolute;
  left: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.poster-badge {
  top: 12px;
}

.poster-play {
  bottom: 12px;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.movie-card-body {
  padding: 16px;
}

.card-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.card-meta-line a {
  color: #16a34a;
  font-weight: 900;
}

.movie-card h3 {
  min-height: 2.7em;
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-tags span {
  background: #f1f5f9;
  color: #475569;
}

.movie-card-compact h3 {
  font-size: 16px;
}

.rank-preview,
.rank-list {
  display: grid;
  gap: 12px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 66px minmax(0, 1fr) 64px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.rank-num {
  color: #ef4444;
  font-size: 24px;
  font-weight: 950;
}

.rank-row img {
  width: 66px;
  height: 92px;
  border-radius: 14px;
  object-fit: cover;
  background: #fee2e2;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  font-size: 17px;
}

.rank-info em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  margin-top: 3px;
}

.rank-score {
  color: #16a34a;
  font-size: 20px;
  font-weight: 950;
  text-align: right;
}

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

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

.category-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--cat-color) 18%, white), #fff 64%);
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.category-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.category-card-top span {
  font-size: 20px;
  font-weight: 950;
}

.category-card-top strong {
  color: var(--cat-color);
}

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

.category-thumbs {
  display: flex;
  margin: 10px 0;
}

.category-thumbs img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  margin-right: -12px;
  border: 3px solid #fff;
  background: #fee2e2;
}

.page-hero,
.breadcrumb {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.mini-hero,
.category-hero {
  margin-top: 30px;
  padding-top: 56px;
  padding-bottom: 56px;
  border-radius: 34px;
  color: #fff;
  background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.22), transparent 25%), linear-gradient(135deg, #111827, #991b1b 50%, #ea580c);
  box-shadow: var(--shadow);
}

.category-hero {
  background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.24), transparent 25%), linear-gradient(135deg, #111827, var(--cat-color));
}

.mini-hero h1,
.category-hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.mini-hero p,
.category-hero p {
  max-width: 860px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.sticky-filter {
  position: sticky;
  top: 92px;
  z-index: 10;
  padding: 12px;
  border-radius: 24px;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.86);
}

.count-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.count-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.breadcrumb {
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #16a34a;
  font-weight: 800;
}

.breadcrumb i {
  margin: 0 8px;
  color: #cbd5e1;
  font-style: normal;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  max-width: 1280px;
  margin: 22px auto 0;
  border-radius: 34px;
  color: #fff;
  background: #111827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.42)), var(--detail-image);
  background-size: cover;
  background-position: center;
  filter: blur(1px) saturate(1.05);
  transform: scale(1.04);
}

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  padding: 48px;
}

.detail-poster img {
  width: 280px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
  background: #fee2e2;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-line {
  max-width: 880px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
}

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

.detail-meta span {
  border-radius: 14px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.90);
  font-weight: 800;
}

.player-section .section-head {
  align-items: center;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-element {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.video-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.30), rgba(2, 6, 23, 0.52)), rgba(2, 6, 23, 0.24);
}

.video-start span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 20px 50px rgba(239, 68, 68, 0.40);
  font-size: 30px;
}

.video-start strong {
  font-size: 20px;
}

.video-shell.is-playing .video-start {
  display: none;
}

.video-tip {
  position: absolute;
  right: 16px;
  bottom: 14px;
  margin: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(15, 23, 42, 0.66);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.detail-text-grid article {
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.detail-text-grid h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-text-grid p {
  margin: 0;
  color: #334155;
  white-space: pre-line;
}

.site-footer {
  margin-top: 70px;
  padding: 48px 24px 24px;
  background: #0f172a;
  color: rgba(255, 255, 255, 0.82);
}

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

.footer-logo {
  display: inline-block;
  color: #fff;
  font-size: 24px;
  font-weight: 950;
  margin-bottom: 10px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer a {
  display: block;
  margin: 7px 0;
  color: rgba(255, 255, 255, 0.78);
}

.footer-tags a {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
  max-width: 1280px;
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .nav-search {
    margin-left: auto;
  }

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

  .hero-poster {
    display: none;
  }

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

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

@media (max-width: 760px) {
  .nav-wrap {
    height: auto;
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  .brand-text small {
    display: none;
  }

  .nav-search {
    order: 3;
    width: 100%;
    min-width: 0;
  }

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

  .hero-slide {
    min-height: 520px;
    padding: 34px 24px 90px;
    border-radius: 26px;
  }

  .hero-bottom {
    margin-top: -64px;
    grid-template-columns: 1fr;
  }

  .hero-search,
  .page-search,
  .filter-bar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-head {
    display: block;
  }

  .movie-grid,
  .small-grid,
  .dense-grid,
  .rank-preview,
  .category-grid,
  .large-category-grid,
  .detail-text-grid,
  .footer-grid,
  .count-list {
    grid-template-columns: 1fr;
  }

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

  .rank-score {
    display: none;
  }

  .detail-hero {
    margin-left: 16px;
    margin-right: 16px;
  }

  .detail-layout {
    padding: 26px;
  }

  .detail-poster img {
    width: 190px;
  }
}
