:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-2: #1c1917;
  --amber: #f59e0b;
  --orange: #f97316;
  --rose: #f43f5e;
  --blue: #2563eb;
  --card: #ffffff;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(41, 37, 36, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(245, 158, 11, 0.22);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.35);
  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.2;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  display: block;
  margin-top: 2px;
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.main-nav a {
  padding: 10px 13px;
  border-radius: 12px;
  color: #e2e8f0;
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.26), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(244, 63, 94, 0.18), transparent 32%),
    linear-gradient(135deg, #0f172a 0%, #1c1917 54%, #020617 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 88%);
}

.hero-inner {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  padding: 70px 0 78px;
}

.hero-slider {
  position: relative;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.82fr);
  gap: 48px;
  align-items: center;
}

.hero-slide.active {
  display: grid;
  animation: fadeUp 0.55s ease both;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  margin-bottom: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fde68a;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 0 0 20px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero h1 span,
.hero h2 span {
  color: #fbbf24;
}

.hero-copy {
  max-width: 730px;
  margin: 0 0 26px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.tag-list span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.09);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 13px 20px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 35px rgba(249, 115, 22, 0.28);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.hero-poster-wrap {
  position: relative;
  padding: 9px;
  border-radius: 29px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.8), rgba(249, 115, 22, 0.2), rgba(244, 63, 94, 0.65));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.hero-poster-wrap::after {
  content: "";
  position: absolute;
  inset: -22px;
  z-index: -1;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.45), rgba(244, 63, 94, 0.2));
  filter: blur(30px);
}

.hero-poster {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: cover;
  border-radius: 22px;
  background: #111827;
}

.hero-card-info {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  padding: 18px;
  border-radius: 18px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(15px);
}

.hero-card-info strong {
  display: block;
  font-size: 18px;
}

.hero-card-info em {
  color: #fcd34d;
  font-style: normal;
}

.hero-dots {
  display: flex;
  gap: 9px;
  margin-top: 34px;
}

.hero-dots button {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.hero-search {
  display: flex;
  width: min(620px, 100%);
  padding: 8px;
  margin-top: 30px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
}

.hero-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  color: #fff;
  background: transparent;
  padding: 0 14px;
}

.hero-search input::placeholder {
  color: #cbd5e1;
}

.hero-search button {
  color: #fff;
  border: 0;
  border-radius: 13px;
  padding: 11px 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  cursor: pointer;
}

main,
.page-main {
  min-height: 50vh;
}

.section,
.content-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

.section.alt {
  width: 100%;
  max-width: none;
  background: linear-gradient(135deg, #fff7ed, #fff1f2);
}

.section.alt > .section-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.section-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.25);
  font-weight: 900;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: #1e293b;
  font-size: clamp(25px, 3.2vw, 38px);
  line-height: 1.2;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(226, 232, 240, 0.78);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(245, 158, 11, 0.36);
}

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

.poster-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.movie-card:hover .poster-shell img {
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.04);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.85);
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.86);
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.36);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(244, 63, 94, 0.24);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  color: #172033;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 850;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--orange);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 9px 0;
  color: var(--muted);
  font-size: 12px;
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 145px;
  padding: 24px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, #1e293b, #292524);
  box-shadow: var(--soft-shadow);
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 105px;
  height: 105px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.28);
}

.category-tile strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 12px;
  font-size: 23px;
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 1;
  color: #cbd5e1;
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 24% 24%, rgba(245, 158, 11, 0.24), transparent 26%),
    linear-gradient(135deg, #0f172a, #292524);
}

.page-hero-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumbs a {
  color: #fde68a;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.12;
}

.page-hero p {
  max-width: 860px;
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 17px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, minmax(130px, 0.45fr));
  gap: 12px;
  padding: 14px;
  margin-bottom: 28px;
  border-radius: 19px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
}

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

.result-count {
  margin: -12px 0 18px;
  color: var(--muted);
  font-weight: 700;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 32px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 800;
}

.pagination .current {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

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

.player-shell-large {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 25px 70px rgba(2, 6, 23, 0.25);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  border: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.82)),
    var(--poster-url, none) center / cover no-repeat;
  cursor: pointer;
}

.player-cover span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 20px 45px rgba(249, 115, 22, 0.3);
  font-size: 30px;
}

.player-cover strong {
  font-size: clamp(24px, 4vw, 42px);
  max-width: 780px;
  padding: 0 18px;
  text-align: center;
}

.player-cover em {
  color: #fde68a;
  font-style: normal;
  font-weight: 800;
}

.player-message {
  padding: 12px 16px;
  color: #fee2e2;
  background: #7f1d1d;
}

.detail-panel,
.info-panel {
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.detail-panel h2,
.info-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

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

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #e2e8f0;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  color: #172033;
  font-weight: 750;
  text-align: right;
}

.detail-text {
  color: #334155;
  font-size: 16px;
}

.detail-text p {
  margin: 0 0 16px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 64px 82px minmax(0, 1fr) 110px;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.ranking-row .number {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  font-weight: 950;
}

.ranking-row img {
  width: 82px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.ranking-row h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.ranking-row p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hot-score {
  color: var(--orange);
  font-weight: 900;
  text-align: right;
}

.search-results {
  min-height: 220px;
}

.empty-state {
  padding: 42px;
  border-radius: 22px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed #cbd5e1;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1c1917);
  border-top: 1px solid rgba(245, 158, 11, 0.2);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
}

.footer-inner strong {
  color: #fbbf24;
  font-size: 22px;
}

.footer-inner p {
  margin: 8px 0;
  max-width: 820px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

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

.copyright {
  color: #94a3b8;
  font-size: 13px;
}

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

@media (max-width: 1080px) {
  .movie-grid,
  .movie-grid.compact,
  .category-cloud,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-inner {
    min-height: auto;
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px 18px;
    background: rgba(15, 23, 42, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 14px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text em {
    display: none;
  }

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

  .ranking-row {
    grid-template-columns: 46px 72px minmax(0, 1fr);
  }

  .ranking-row .hot-score {
    grid-column: 3;
    text-align: left;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .hero-inner,
  .section,
  .section.alt > .section-inner,
  .page-hero-inner,
  .footer-inner {
    width: min(100% - 22px, 1240px);
  }

  .hero-inner {
    padding: 42px 0 52px;
  }

  .hero-poster-wrap {
    padding: 6px;
  }

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

  .card-body {
    padding: 13px;
  }

  .card-title {
    font-size: 15px;
  }

  .section,
  .content-section {
    padding: 42px 0;
  }

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

  .hero-search input {
    min-height: 46px;
  }
}
