:root {
  --bg: #0b0f18;
  --bg-soft: #111827;
  --bg-card: rgba(17, 24, 39, 0.82);
  --bg-card-solid: #151d2b;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(245, 158, 11, 0.36);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --muted-strong: #d1d5db;
  --sunset: #f59e0b;
  --sunset-deep: #d97706;
  --twilight: #f97316;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 20px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(217, 119, 6, 0.16), transparent 32rem),
    radial-gradient(circle at 85% 20%, rgba(249, 115, 22, 0.14), transparent 28rem),
    linear-gradient(180deg, #030712 0%, #0b0f18 42%, #111827 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(16px);
}

.site-header-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--sunset), var(--twilight));
  color: #fff;
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.34);
}

.brand-text {
  font-size: 1.06rem;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--muted-strong);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.14);
}

.header-search {
  display: flex;
  align-items: center;
  width: 310px;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(17, 24, 39, 0.78);
}

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

.header-search button,
.big-search button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--sunset-deep), var(--twilight));
  padding: 10px 16px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: #fff;
  background: rgba(17, 24, 39, 0.9);
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.96);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.hero-wrap {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #030712;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.52), rgba(3, 7, 18, 0.12)),
    linear-gradient(0deg, #0b0f18 0%, rgba(11, 15, 24, 0.2) 48%, rgba(11, 15, 24, 0.7) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1200px) / 2));
  bottom: 88px;
  width: min(640px, calc(100% - 48px));
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  color: var(--sunset);
  font-weight: 700;
}

.hero-kicker b,
.hero-kicker a {
  color: var(--muted-strong);
  font-weight: 600;
}

.hero-content h1 {
  margin: 0 0 8px;
  color: var(--sunset);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 800;
}

.hero-content h2 {
  margin: 0 0 20px;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow: 0 16px 50px rgba(0, 0, 0, 0.72);
}

.hero-content p {
  margin: 0 0 28px;
  max-width: 620px;
  color: var(--muted-strong);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--sunset-deep), var(--twilight));
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.32);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  font-size: 2.4rem;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.active {
  background: linear-gradient(135deg, var(--sunset), var(--twilight));
}

.quick-search-section,
.content-section,
.detail-layout {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search-section {
  padding: 48px 0 16px;
}

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

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

.section-head.centered {
  display: block;
  text-align: center;
  max-width: 820px;
  margin: 0 auto 24px;
}

.section-head.inline-head {
  display: block;
}

.section-head span,
.page-hero span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--sunset);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-head h2,
.page-hero h1,
.article-section h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  font-weight: 900;
}

.section-head p,
.page-hero p {
  margin: 12px 0 0;
  color: var(--muted);
}

.section-head a {
  color: var(--sunset);
  font-weight: 800;
  white-space: nowrap;
}

.big-search {
  display: flex;
  width: min(760px, 100%);
  margin: 0 auto;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(17, 24, 39, 0.82);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.26);
}

.big-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 16px 22px;
}

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

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card-solid);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.1));
}

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

.category-tile span {
  bottom: 58px;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile em {
  bottom: 20px;
  color: var(--muted-strong);
  font-style: normal;
  font-size: 0.9rem;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 22px;
}

.filter-bar input,
.filter-bar select,
.search-page-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: #fff;
  outline: 0;
  background: rgba(17, 24, 39, 0.86);
  padding: 13px 14px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 16px 54px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: var(--border-strong);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), transparent 52%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--sunset-deep), var(--twilight));
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.84rem;
}

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

.meta-row span + span::before {
  content: "•";
  color: rgba(255, 255, 255, 0.28);
}

.movie-card h3 {
  margin: 8px 0 8px;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.28;
}

.movie-card h3 a:hover {
  color: var(--sunset);
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.2em;
  overflow: hidden;
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.08);
  padding: 2px 9px;
  font-size: 0.78rem;
}

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

.ranking-panel,
.ranking-list-page {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.8);
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel-title {
  margin-bottom: 12px;
  font-size: 1.2rem;
  font-weight: 900;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rank-item:first-of-type {
  border-top: 0;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.rank-item.top .rank-number {
  color: #fff;
  background: linear-gradient(135deg, var(--sunset-deep), var(--twilight));
}

.rank-item img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info strong {
  color: #fff;
}

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

.ranking-list-page {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 26px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: end;
  padding: 96px max(24px, calc((100vw - 1200px) / 2)) 54px;
  background:
    linear-gradient(135deg, rgba(217, 119, 6, 0.28), rgba(249, 115, 22, 0.08)),
    radial-gradient(circle at 72% 28%, rgba(249, 115, 22, 0.28), transparent 24rem),
    #0b0f18;
}

.page-hero div {
  width: min(760px, 100%);
}

.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.slim-hero {
  min-height: 300px;
}

.category-hero,
.ranking-hero {
  min-height: 320px;
}

.empty-state {
  display: none;
  margin-top: 26px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  color: var(--muted-strong);
  text-align: center;
  padding: 32px;
}

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

.detail-layout {
  padding: 32px 0 64px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.94rem;
}

.breadcrumb a:hover {
  color: var(--sunset);
}

.player-card,
.movie-detail-card,
.article-section {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(17, 24, 39, 0.8);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.62));
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sunset-deep), var(--twilight));
  box-shadow: 0 22px 60px rgba(249, 115, 22, 0.35);
  font-size: 2.2rem;
}

.play-overlay.hidden {
  display: none;
}

.movie-detail-card {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 26px;
  margin-top: 26px;
  padding: 22px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  border-radius: 20px;
  background: #0f172a;
}

.detail-info h1 {
  margin: 12px 0 16px;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.lead-text {
  margin: 0;
  color: var(--muted-strong);
  font-size: 1.12rem;
}

.large-tags span {
  min-height: 30px;
  padding: 4px 12px;
  font-size: 0.86rem;
}

.article-section {
  margin-top: 26px;
  padding: 28px;
}

.article-section h2 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.article-section h2 + p {
  margin-top: 0;
}

.article-section p {
  color: var(--muted-strong);
  font-size: 1.04rem;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 7, 18, 0.72);
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  color: var(--muted);
}

.footer-inner strong {
  color: #fff;
  font-size: 1.1rem;
}

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

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

.footer-links a {
  color: var(--muted-strong);
}

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

.copyright {
  font-size: 0.9rem;
}

.search-page-form {
  margin-bottom: 28px;
}

@media (max-width: 1180px) {
  .all-grid,
  .home-categories {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .hero-content {
    bottom: 76px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .all-grid,
  .compact-grid,
  .category-grid,
  .home-categories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split-section {
    grid-template-columns: 1fr;
  }

  .ranking-list-page {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 740px) {
  .site-header-inner {
    height: 64px;
  }

  .hero-wrap {
    min-height: 560px;
    height: 76vh;
  }

  .hero-content {
    left: 18px;
    right: 18px;
    width: auto;
  }

  .hero-content h2 {
    font-size: clamp(2.3rem, 14vw, 4rem);
  }

  .quick-search-section,
  .content-section,
  .detail-layout,
  .footer-inner {
    width: min(100% - 24px, 1200px);
  }

  .section-head {
    display: block;
  }

  .section-head a {
    display: inline-flex;
    margin-top: 10px;
  }

  .big-search,
  .filter-bar {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .big-search button {
    border-radius: 0;
  }

  .filter-bar {
    gap: 10px;
  }

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

  .card-body {
    padding: 12px;
  }

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

  .detail-poster {
    max-width: 260px;
  }
}

@media (max-width: 460px) {
  .brand-text {
    font-size: 0.96rem;
  }

  .movie-grid,
  .all-grid,
  .compact-grid,
  .category-grid,
  .home-categories {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 34px 52px minmax(0, 1fr);
  }
}
