:root {
  --bg: #0f0f1a;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --text: #fff7ed;
  --muted: rgba(255, 247, 237, 0.72);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #f97316;
  --accent-2: #ec4899;
  --accent-3: #f59e0b;
  --deep: #17111f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(236, 72, 153, 0.32), transparent 34rem),
    radial-gradient(circle at 88% 8%, rgba(249, 115, 22, 0.28), transparent 30rem),
    linear-gradient(135deg, #111827 0%, #2d162f 46%, #0f0f1a 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  background: rgba(15, 15, 26, 0.76);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 36px rgba(249, 115, 22, 0.28);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  border: 0;
  background: transparent;
}

.dropdown-panel {
  position: absolute;
  top: 46px;
  right: 0;
  min-width: 160px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(23, 17, 31, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
}

.dropdown-panel a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
}

main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  margin: 28px auto 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.hero-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.55;
  z-index: 1;
}

.hero-glow.one {
  left: -120px;
  top: -120px;
  background: var(--accent-2);
}

.hero-glow.two {
  right: -110px;
  bottom: -150px;
  background: var(--accent);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.62fr);
  align-items: center;
  gap: 46px;
  padding: 72px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 15, 26, 0.96), rgba(15, 15, 26, 0.68), rgba(15, 15, 26, 0.82)),
    linear-gradient(135deg, rgba(236, 72, 153, 0.42), rgba(249, 115, 22, 0.18));
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.08);
}

.image-missing + .poster-fallback,
.image-missing ~ .poster-fallback {
  display: grid;
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 22px;
  text-align: center;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.86);
  background:
    radial-gradient(circle at 30% 20%, rgba(236, 72, 153, 0.45), transparent 45%),
    linear-gradient(135deg, rgba(249, 115, 22, 0.72), rgba(88, 28, 135, 0.7));
}

.poster-fallback.large {
  font-size: 28px;
}

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

.hero-label,
.section-kicker,
.page-hero span,
.player-copy span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.16);
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 720px;
  margin: 24px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 700px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

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

.hero-tags {
  margin: 22px 0 30px;
}

.hero-tags span,
.tag-row span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 800;
  transition: 0.25s ease;
}

.btn.primary,
.btn.full {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316 55%, #ec4899);
  border-color: transparent;
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.btn.full {
  width: 100%;
}

.btn:hover,
.movie-card:hover,
.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-4px);
}

.hero-poster {
  display: block;
  overflow: hidden;
  min-height: 440px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 34px 86px rgba(0, 0, 0, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 72px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.panel,
.movie-card,
.category-tile,
.category-card-large,
.article-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.quick-search,
.filter-panel,
.search-page {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius);
}

.quick-search h2,
.quick-search p {
  margin: 0;
}

.quick-search p,
.section-head p,
.page-hero p,
.card-desc,
.card-meta,
.article-card p,
.article-side li,
.site-footer p {
  color: var(--muted);
}

.search-inline,
.search-page {
  min-width: min(520px, 100%);
}

.search-inline,
.filter-panel,
.search-page {
  flex-wrap: wrap;
}

input,
select {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

select option {
  color: #111827;
}

.search-inline input,
.search-page input,
.filter-panel input {
  flex: 1 1 260px;
}

.search-inline button,
.search-page button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.content-section {
  margin: 52px 0;
}

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

.section-head h2 {
  margin: 12px 0 8px;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-more {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

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

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 22px;
  border-radius: 24px;
  transition: 0.25s ease;
}

.category-tile span {
  font-size: 20px;
  font-weight: 900;
}

.category-tile strong {
  color: #fed7aa;
  font-size: 34px;
}

.category-tile em,
.category-card-large em {
  color: var(--muted);
  font-style: normal;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  transition: 0.25s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.35), rgba(236, 72, 153, 0.28));
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.35s ease;
}

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

.score-pill,
.rank-badge {
  position: absolute;
  z-index: 3;
  padding: 7px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.score-pill {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.card-desc {
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.6;
}

.card-desc {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 10% 0%, rgba(249, 115, 22, 0.28), transparent 45%),
    rgba(255, 255, 255, 0.08);
}

.rank-head span {
  color: #fed7aa;
  font-weight: 800;
}

.rank-head h2 {
  margin: 8px 0;
  font-size: 32px;
}

.rank-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.rank-list li + li {
  margin-top: 10px;
}

.rank-list a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.rank-list strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-list span {
  color: #fbbf24;
  font-weight: 900;
}

.rank-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-main {
  padding-top: 28px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 58px;
  border-radius: 32px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 84% 20%, rgba(236, 72, 153, 0.32), transparent 30rem),
    linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(255, 255, 255, 0.06));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 820px;
  font-size: 18px;
  line-height: 1.85;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.category-card-large {
  border-radius: 26px;
  transition: 0.25s ease;
}

.category-card-large a {
  display: grid;
  gap: 12px;
  min-height: 230px;
  padding: 28px;
}

.category-card-large h2 {
  margin: 0;
  font-size: 32px;
}

.category-count {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-weight: 900;
}

.mini-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-title-row span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.rank-table th,
.rank-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.rank-table th {
  color: #fed7aa;
  background: rgba(255, 255, 255, 0.08);
}

.rank-table td {
  color: var(--muted);
}

.rank-table a {
  color: #ffffff;
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 15% 15%, rgba(249, 115, 22, 0.28), transparent 32rem),
    rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

.detail-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

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

.detail-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 820px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.meta-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.meta-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.meta-grid dd {
  margin: 4px 0 0;
  font-weight: 900;
}

.player-section {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  margin: 30px 0;
  padding: 24px;
  border-radius: 30px;
}

.player-copy h2 {
  margin: 14px 0 10px;
  font-size: 30px;
}

.player-copy p {
  color: var(--muted);
  line-height: 1.75;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #050508;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(249, 115, 22, 0.26), transparent 32%),
    rgba(0, 0, 0, 0.56);
}

.play-overlay strong {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 20px 56px rgba(249, 115, 22, 0.4);
}

.play-overlay span {
  color: var(--muted);
  font-weight: 800;
}

.play-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.two-column-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  margin: 32px 0;
}

.article-card,
.article-side {
  padding: 28px;
  border-radius: 28px;
}

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

.article-card p {
  margin-bottom: 26px;
  line-height: 2;
  font-size: 17px;
}

.article-side ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-side li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.7;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.16);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 28px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 32px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
}

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

  .hero-slide,
  .detail-hero,
  .player-section,
  .two-column,
  .two-column-detail,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 15, 26, 0.96);
  }

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

  .dropdown-panel {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 8px;
  }

  .hero-carousel {
    min-height: 720px;
    border-radius: 24px;
  }

  .hero-slide {
    display: block;
    padding: 34px 24px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .hero-poster {
    min-height: 280px;
    margin-top: 24px;
  }

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

  .hero-dots {
    left: 24px;
    bottom: 22px;
  }

  .quick-search,
  .filter-panel,
  .search-page,
  .section-head {
    display: grid;
    align-items: stretch;
  }

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

  .page-hero,
  .detail-hero {
    padding: 28px;
    border-radius: 24px;
  }

  .detail-cover {
    max-width: 320px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  main,
  .header-inner,
  .footer-inner {
    width: min(100% - 22px, 1280px);
  }

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

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-large-grid,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .hero-content p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }
}
