:root {
  --bg-900: #0f172a;
  --bg-850: #111827;
  --bg-800: #1e293b;
  --bg-700: #334155;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #10b981;
  --accent-2: #14b8a6;
  --yellow: #fbbf24;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --container: 1240px;
}

* {
  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 15% 10%, rgba(16, 185, 129, 0.13), transparent 30%),
    radial-gradient(circle at 85% 0%, rgba(20, 184, 166, 0.11), transparent 28%),
    linear-gradient(135deg, #0f172a 0%, #1e293b 46%, #0f172a 100%);
  min-height: 100vh;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

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

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.26);
  transform: translateZ(0);
  transition: transform 0.25s ease;
}

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

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 20px;
  line-height: 1;
  background: linear-gradient(90deg, #34d399, #2dd4bf);
  -webkit-background-clip: text;
  color: transparent;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #cbd5e1;
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
  color: #34d399;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.76);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  background: rgba(30, 41, 59, 0.97);
  border-top: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: #cbd5e1;
}

.mobile-nav.open {
  display: block;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #1e293b 48%, #064e3b);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.54) 46%, transparent 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.44), transparent 40%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  max-width: 720px;
  animation: fadeInUp 0.8s ease both;
}

.eyebrow {
  margin: 0 0 12px;
  color: #34d399;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.06;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.hero-desc {
  display: -webkit-box;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.hero-meta,
.card-meta,
.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-meta {
  margin-top: 24px;
}

.hero-meta span,
.detail-stats span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  background: rgba(16, 185, 129, 0.13);
  color: #a7f3d0;
  padding: 7px 12px;
  font-size: 14px;
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-button {
  color: white;
  background: var(--accent);
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.22);
}

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

.primary-button:hover {
  background: #059669;
}

.ghost-button,
.section-more {
  border: 1px solid var(--line);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.52);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.48);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

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

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--accent);
}

.home-search-wrap {
  margin-top: -42px;
  position: relative;
  z-index: 4;
}

.home-search-note {
  margin: 12px 0 0;
  text-align: right;
}

.home-search-note a {
  color: #34d399;
  font-weight: 700;
}

.main-sections {
  padding: 64px 0;
}

.main-sections > section + section {
  margin-top: 76px;
}

.section-heading,
.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.section-heading-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading-title span {
  color: #34d399;
  font-size: 24px;
}

.section-heading h2,
.category-overview-head h2,
.sidebar-panel h2,
.text-section h2,
.detail-panel h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
}

.panel-section,
.category-overview-card,
.detail-panel,
.sidebar-panel,
.player-card,
.filter-panel,
.static-page .detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(30, 41, 59, 0.48);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.panel-section,
.category-overview-card {
  padding: 30px;
}

.movie-grid {
  display: grid;
  gap: 24px;
}

.six-cols {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

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

.movie-card {
  min-width: 0;
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(16, 185, 129, 0.24), rgba(15, 23, 42, 0.95)),
    #111827;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.32);
}

.large-card .poster-frame {
  aspect-ratio: 16 / 9;
}

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

.poster-frame.is-missing::after {
  content: "";
}

.movie-card:hover .poster-frame img {
  transform: scale(1.1);
}

.poster-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 42px;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: var(--yellow);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding-top: 13px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h3 a,
.horizontal-body h3 a {
  transition: color 0.2s ease;
}

.card-body h3 a:hover,
.horizontal-body h3 a:hover {
  color: #34d399;
}

.card-body p,
.horizontal-body p {
  display: -webkit-box;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  color: #94a3b8;
  font-size: 12px;
}

.card-meta span + span::before {
  content: "•";
  margin-right: 10px;
  color: #64748b;
}

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

.category-tile {
  min-height: 190px;
  border: 1px solid rgba(52, 211, 153, 0.15);
  border-radius: 20px;
  padding: 22px;
  background: linear-gradient(145deg, rgba(51, 65, 85, 0.62), rgba(15, 23, 42, 0.44));
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.42);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.18), rgba(15, 23, 42, 0.68));
}

.category-icon {
  color: #34d399;
  font-size: 24px;
}

.category-tile strong {
  display: block;
  margin-top: 14px;
  font-size: 21px;
}

.category-tile small {
  display: block;
  margin-top: 8px;
  color: #a7f3d0;
}

.category-tile p {
  color: var(--muted);
  line-height: 1.65;
}

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

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

.horizontal-card {
  display: grid;
  grid-template-columns: auto 112px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(30, 41, 59, 0.42);
  transition: background 0.2s ease, transform 0.2s ease;
}

.horizontal-card:hover {
  background: rgba(30, 41, 59, 0.78);
  transform: translateY(-2px);
}

.rank-number {
  width: 42px;
  color: #34d399;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.horizontal-poster {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  background: #0f172a;
}

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

.horizontal-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0;
  background:
    linear-gradient(90deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at 90% 20%, rgba(16, 185, 129, 0.22), transparent 36%);
  border-bottom: 1px solid var(--line);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.7;
}

.compact-page-hero {
  padding: 56px 0;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 20px;
}

.compact-filter {
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
}

.filter-field {
  display: grid;
  gap: 8px;
}

.filter-field label {
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.filter-field input,
.filter-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: white;
  background: rgba(15, 23, 42, 0.62);
  padding: 0 13px;
  outline: none;
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: rgba(52, 211, 153, 0.65);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.13);
}

.filter-result {
  margin: 0;
  color: var(--muted);
  white-space: nowrap;
}

.filter-result strong {
  color: #34d399;
}

.category-overview-list,
.static-page {
  padding: 48px 0;
}

.category-overview-card + .category-overview-card {
  margin-top: 36px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #34d399;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
  gap: 30px;
}

.detail-content {
  min-width: 0;
}

.detail-content > * + * {
  margin-top: 24px;
}

.player-card,
.detail-panel,
.sidebar-panel {
  padding: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.28), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.player-overlay[hidden] {
  display: none;
}

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  margin: 0 auto 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 20px 55px rgba(16, 185, 129, 0.35);
  font-size: 30px;
}

.player-overlay strong {
  font-size: 22px;
}

.player-overlay small,
.player-message {
  color: #cbd5e1;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  margin: 0;
  border-radius: 10px;
  background: rgba(127, 29, 29, 0.82);
  padding: 10px 12px;
  font-size: 14px;
}

.detail-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 48px);
}

.detail-one-line {
  color: #34d399;
  font-size: 18px;
  font-style: italic;
  line-height: 1.75;
}

.detail-stats {
  margin: 22px 0;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 22px;
}

.detail-meta-grid div {
  border-radius: 14px;
  background: rgba(51, 65, 85, 0.38);
  padding: 14px;
}

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

.detail-meta-grid dd {
  margin: 6px 0 0;
  color: white;
  font-weight: 700;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.text-section + .text-section {
  margin-top: 28px;
}

.text-section p,
.static-page p {
  color: var(--soft);
  line-height: 1.9;
}

.detail-sidebar {
  position: relative;
}

.sidebar-panel {
  position: sticky;
  top: 88px;
}

.sidebar-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.sidebar-list .horizontal-card {
  grid-template-columns: auto 96px minmax(0, 1fr);
}

.sidebar-list .horizontal-body p {
  display: none;
}

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

.feature-grid div {
  border-radius: 16px;
  background: rgba(51, 65, 85, 0.38);
  padding: 18px;
}

.feature-grid strong {
  color: #34d399;
}

.hidden-by-filter {
  display: none !important;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.95);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 38px;
  padding: 42px 0;
}

.footer-brand-row {
  margin-bottom: 18px;
}

.site-footer p,
.site-footer li,
.site-footer a {
  color: var(--muted);
}

.site-footer h3 {
  margin: 0 0 16px;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 22px 0;
  font-size: 14px;
}

.footer-bottom p {
  margin: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .six-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .sidebar-panel {
    position: static;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .hero-slider {
    height: 68vh;
    min-height: 560px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.25));
  }

  .hero-arrow {
    display: none;
  }

  .ranking-list,
  .footer-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

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

  .brand-text small {
    display: none;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .six-cols,
  .four-cols,
  .three-cols,
  .category-grid,
  .filter-panel,
  .compact-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-search,
  .filter-result {
    grid-column: 1 / -1;
  }

  .panel-section,
  .category-overview-card,
  .detail-panel,
  .player-card,
  .sidebar-panel {
    padding: 18px;
  }

  .section-heading,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .horizontal-card {
    grid-template-columns: auto 84px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-number {
    width: 30px;
    font-size: 18px;
  }

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