:root {
  --amber: #f59e0b;
  --orange: #f97316;
  --slate: #0f172a;
  --dark: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #111827;
  background: linear-gradient(135deg, #f8fafc 0%, #f3f4f6 45%, #fff7ed 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

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

.site-nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.35);
}

.logo-text strong {
  display: block;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 800;
  background: linear-gradient(90deg, #d97706, #ea580c);
  -webkit-background-clip: text;
  color: transparent;
}

.logo-text em {
  display: block;
  margin-top: 3px;
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 15px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  font-size: 22px;
}

.hero-slider {
  position: relative;
  min-height: 720px;
  color: #ffffff;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #111827 48%, #1f2937);
}

.hero-slider::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.24;
  background-image: radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.35), transparent 28%), radial-gradient(circle at 80% 28%, rgba(249, 115, 22, 0.28), transparent 26%);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.05) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62) 48%, rgba(15, 23, 42, 0.25)), linear-gradient(0deg, rgba(15, 23, 42, 0.86), transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 145px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(253, 230, 138, 0.22);
  font-weight: 800;
}

.hero-content h1,
.compact-hero h1,
.detail-hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  max-width: 900px;
  letter-spacing: -0.04em;
}

.hero-content p,
.compact-hero p,
.detail-hero p {
  max-width: 740px;
  color: #d1d5db;
  font-size: clamp(17px, 2.1vw, 24px);
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 13px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.32);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.btn-outline {
  color: #d97706;
  background: #fff7ed;
  border-color: #fed7aa;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 136px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 28px;
  line-height: 1;
}

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

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

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

.hero-search {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 32px));
  display: flex;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.25);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 16px;
  color: #111827;
  background: transparent;
  font-size: 16px;
}

.hero-search button {
  border: 0;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  padding: 0 24px;
  font-weight: 800;
}

.hero-category-links {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(980px, calc(100% - 32px));
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-category-links a {
  padding: 7px 13px;
  border-radius: 999px;
  color: #f9fafb;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
}

.section {
  padding: 70px 0;
}

.section-alt {
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.94), rgba(255, 247, 237, 0.86));
}

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

.section-head.compact {
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.section-head a {
  color: #d97706;
  font-weight: 800;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  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(-6px);
  box-shadow: var(--shadow);
}

.movie-cover-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #111827;
}

.movie-card-compact .movie-cover-wrap {
  aspect-ratio: 3 / 4;
}

.movie-card-wide {
  flex-direction: row;
}

.movie-card-wide .movie-cover-wrap {
  width: min(360px, 38%);
  min-height: 210px;
  flex: none;
  aspect-ratio: auto;
}

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

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

.movie-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 48%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-cover-shade {
  opacity: 1;
}

.movie-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.28);
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #6b7280;
  font-size: 13px;
}

.wide-list {
  display: grid;
  gap: 22px;
}

.masonry-grid {
  columns: 3 280px;
  column-gap: 24px;
}

.masonry-grid .movie-card {
  display: inline-flex;
  width: 100%;
  margin: 0 0 24px;
  break-inside: avoid;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border-radius: var(--radius);
  color: #ffffff;
  background: #111827;
  box-shadow: var(--shadow);
}

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

.category-tile > img {
  position: absolute;
  inset: 0;
  opacity: 0.62;
}

.category-tile::after,
.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.15));
}

.category-tile span,
.category-body {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.category-tile strong,
.category-body strong {
  display: block;
  margin-bottom: 8px;
  font-size: 21px;
}

.category-tile em,
.category-body em {
  display: block;
  color: #e5e7eb;
  font-size: 14px;
  font-style: normal;
  line-height: 1.6;
}

.category-thumbs {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  opacity: 0.72;
}

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

.compact-hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0;
  color: #ffffff;
  background: radial-gradient(circle at 12% 20%, rgba(245, 158, 11, 0.35), transparent 30%), linear-gradient(135deg, #0f172a, #111827 52%, #1f2937);
}

.movie-filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 12px;
  padding: 14px;
  margin-bottom: 28px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.movie-filter-input,
.movie-filter-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0 14px;
  color: #111827;
  background: #f9fafb;
  outline: 0;
}

.movie-filter-input:focus,
.movie-filter-select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

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

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.ranking-side {
  display: grid;
  gap: 24px;
}

.ranking-panel {
  padding: 22px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.ranking-panel h2 {
  margin: 0 0 18px;
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 46px 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 15px;
  background: #f8fafc;
  transition: 0.22s ease;
}

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

.ranking-num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 900;
}

.ranking-item img {
  width: 74px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-text strong,
.ranking-text em {
  display: block;
}

.ranking-text strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
}

.ranking-text em {
  margin-top: 4px;
  overflow: hidden;
  color: #6b7280;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  font-style: normal;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  color: #ffffff;
  background: #0f172a;
}

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.08);
  transform: scale(1.05);
  opacity: 0.45;
}

.detail-shade {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.55));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 48px 0 60px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  color: #d1d5db;
  font-size: 14px;
}

.breadcrumb a {
  color: #fde68a;
}

.detail-hero-content {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  width: 260px;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

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

.detail-meta-pills span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.detail-meta-pills span {
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.28);
}

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

.player-cover-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.35));
  transition: opacity 0.22s ease;
}

.player-cover-play span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 22px 46px rgba(249, 115, 22, 0.36);
  font-size: 32px;
  transform: translateX(3px);
}

.player-shell.is-playing .player-cover-play {
  opacity: 0;
  pointer-events: none;
}

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

.detail-article,
.detail-side,
.text-card {
  padding: 28px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.detail-article h2,
.detail-side h2,
.text-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-article p,
.text-card p {
  margin: 0 0 24px;
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
}

.info-list div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.info-list dt {
  color: #6b7280;
}

.info-list dd {
  margin: 0;
  color: #111827;
  font-weight: 800;
}

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

.tag {
  color: #92400e;
  background: #fffbeb;
}

.side-list .ranking-item {
  grid-template-columns: 42px 68px minmax(0, 1fr);
}

.text-card {
  max-width: 860px;
}

.site-footer {
  margin-top: 60px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #0f172a 52%, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px;
  padding: 54px 0;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
  color: #fbbf24;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  max-width: 480px;
  color: #9ca3af;
  line-height: 1.8;
}

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

.site-footer a {
  display: block;
  margin: 9px 0;
  color: #9ca3af;
}

.site-footer a:hover {
  color: #fbbf24;
}

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

@media (max-width: 1024px) {
  .four-grid,
  .category-grid,
  .category-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 760px) {
  .site-nav {
    min-height: 68px;
  }

  .mobile-menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: grid;
    gap: 4px;
  }

  .hero-slider {
    min-height: 690px;
  }

  .hero-content {
    padding-top: 100px;
  }

  .hero-controls {
    bottom: 156px;
  }

  .hero-search {
    bottom: 78px;
  }

  .hero-category-links {
    bottom: 16px;
  }

  .section {
    padding: 50px 0;
  }

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

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

  .movie-card-wide {
    flex-direction: column;
  }

  .movie-card-wide .movie-cover-wrap {
    width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

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

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

  .detail-poster {
    width: min(240px, 68vw);
  }

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

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

  .logo-text em {
    display: none;
  }

  .hero-search {
    flex-direction: column;
    gap: 8px;
  }

  .hero-search input,
  .hero-search button {
    min-height: 44px;
  }

  .movie-grid,
  .four-grid,
  .category-grid,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 40px 64px minmax(0, 1fr);
  }
}
