:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: #0b1120;
  --panel-soft: rgba(17, 24, 39, 0.72);
  --line: rgba(75, 85, 99, 0.62);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --accent: #10b981;
  --accent-2: #0d9488;
  --danger: #f87171;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 38%), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(31, 41, 55, 0.95);
  background: rgba(3, 7, 18, 0.86);
  backdrop-filter: blur(18px);
}

.site-nav {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #06281f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.22);
}

.brand-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #6ee7b7, #2dd4bf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  color: #d1d5db;
  font-size: 15px;
}

.nav-link {
  transition: color 0.2s ease;
}

.nav-link:hover,
.text-link:hover,
.mobile-link:hover {
  color: #34d399;
}

.menu-button {
  display: none;
  color: #d1d5db;
  border: 0;
  background: transparent;
  font-size: 24px;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 20px 18px;
}

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

.mobile-link {
  padding: 10px 12px;
  border-radius: 10px;
  color: #d1d5db;
  background: rgba(17, 24, 39, 0.72);
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.98), rgba(3, 7, 18, 0.76) 45%, rgba(3, 7, 18, 0.18)),
    linear-gradient(0deg, rgba(3, 7, 18, 0.95), transparent 36%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 96px 0 72px;
}

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

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #6ee7b7, #2dd4bf, #f0fdfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  max-width: 720px;
  margin: 22px 0 36px;
  color: #d1d5db;
  font-size: clamp(18px, 2vw, 24px);
}

.hero-feature {
  max-width: 720px;
  padding: 26px;
  border: 1px solid rgba(16, 185, 129, 0.24);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-feature h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
}

.hero-feature p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.8;
}

.hero-meta,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

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

.hero-meta span,
.card-meta span,
.detail-meta span,
.tag-list span {
  border-radius: 999px;
  border: 1px solid rgba(75, 85, 99, 0.75);
  background: rgba(15, 23, 42, 0.72);
  padding: 6px 10px;
}

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

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.22);
}

.secondary-button {
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #a7f3d0;
  background: rgba(17, 24, 39, 0.86);
}

.primary-button:hover,
.secondary-button:hover,
.movie-card:hover,
.category-tile:hover,
.rank-row:hover,
.compact-card:hover {
  transform: translateY(-2px);
}

.small-button {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

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

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

.hero-dot.active {
  background: #34d399;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(3, 7, 18, 0.45);
  font-size: 32px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.section {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0;
}

.muted-section,
.ranking-section {
  width: 100%;
  max-width: none;
  padding-left: max(20px, calc((100vw - 1280px) / 2));
  padding-right: max(20px, calc((100vw - 1280px) / 2));
  background: rgba(17, 24, 39, 0.34);
}

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

.section-heading h2,
.detail-copy h1,
.detail-copy h2,
.related-panel h2,
.cover-panel h2,
.site-footer h2,
.category-overview-copy h2,
.page-hero h1 {
  margin: 0;
  font-weight: 850;
}

.section-heading h2 {
  font-size: clamp(28px, 3vw, 38px);
}

.text-link {
  color: #a7f3d0;
  font-weight: 700;
}

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

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

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

.movie-card {
  min-width: 0;
  border: 1px solid rgba(31, 41, 55, 0.98);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.86);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: var(--shadow);
}

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

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

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

.movie-card:hover img,
.compact-card:hover img {
  transform: scale(1.08);
}

.play-pill,
.rank-badge {
  position: absolute;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.play-pill {
  right: 10px;
  bottom: 10px;
  padding: 6px 9px;
  background: rgba(16, 185, 129, 0.92);
}

.rank-badge {
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  padding: 14px;
}

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

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

.card-body p {
  margin: 0 0 12px;
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-meta {
  gap: 6px;
  font-size: 12px;
}

.card-meta span {
  padding: 4px 7px;
}

.search-panel {
  margin: 0 0 28px;
  display: grid;
  gap: 14px;
}

.js-search {
  width: 100%;
  height: 50px;
  border: 1px solid rgba(75, 85, 99, 0.85);
  border-radius: 16px;
  outline: none;
  padding: 0 18px;
  color: #f9fafb;
  background: rgba(17, 24, 39, 0.86);
}

.js-search:focus {
  border-color: rgba(16, 185, 129, 0.75);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

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

.filter-chip {
  border: 1px solid rgba(75, 85, 99, 0.85);
  border-radius: 999px;
  padding: 8px 13px;
  color: #d1d5db;
  background: rgba(17, 24, 39, 0.8);
}

.filter-chip.active,
.filter-chip:hover {
  border-color: rgba(16, 185, 129, 0.78);
  color: #ffffff;
  background: rgba(16, 185, 129, 0.24);
}

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(31, 41, 55, 0.98);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(15, 23, 42, 0.92));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  border-color: rgba(16, 185, 129, 0.68);
}

.category-tile strong {
  font-size: 22px;
}

.category-tile span {
  color: #aeb7c5;
  font-size: 14px;
  line-height: 1.7;
}

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

.large-ranking {
  margin-top: 26px;
}

.rank-row {
  display: grid;
  grid-template-columns: 48px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid rgba(31, 41, 55, 0.98);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.86);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  border-color: rgba(16, 185, 129, 0.68);
}

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

.rank-row img {
  width: 72px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: #111827;
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.page-hero {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 92px 0 36px;
}

.slim-hero {
  padding-bottom: 14px;
}

.page-hero p:last-child {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.category-overview {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
  border: 1px solid rgba(31, 41, 55, 0.98);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
}

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

.mini-grid,
.related-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.compact-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border-radius: 14px;
  color: #f3f4f6;
}

.compact-card img {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: #111827;
}

.compact-card span {
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card small {
  color: var(--muted);
}

.detail-layout {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.82fr);
  gap: 30px;
}

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

.breadcrumb a {
  color: #a7f3d0;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(31, 41, 55, 0.98);
  border-radius: 22px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.1));
}

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

.big-play {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 20px 45px rgba(16, 185, 129, 0.28);
  font-size: 32px;
  transform: translateX(2px);
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.88);
}

.detail-copy {
  margin-top: 24px;
  padding: 26px;
  border: 1px solid rgba(31, 41, 55, 0.98);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.8);
}

.detail-copy h1 {
  font-size: clamp(30px, 4vw, 46px);
}

.detail-copy h2 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 22px;
}

.detail-copy p {
  color: #d1d5db;
  line-height: 1.95;
}

.detail-meta,
.tag-list {
  margin-top: 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #a7f3d0;
  font-size: 13px;
}

.cover-panel,
.related-panel {
  padding: 18px;
  border: 1px solid rgba(31, 41, 55, 0.98);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.84);
}

.cover-panel img {
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  background: #111827;
}

.cover-panel h2,
.related-panel h2 {
  margin-top: 16px;
  font-size: 22px;
}

.cover-panel p {
  color: var(--muted);
  line-height: 1.75;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 20px;
  position: sticky;
  top: 86px;
}

.related-list {
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.site-footer {
  border-top: 1px solid rgba(31, 41, 55, 0.98);
  background: rgba(3, 7, 18, 0.92);
}

.footer-grid {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}

.site-footer h2 {
  color: #6ee7b7;
  font-size: 18px;
}

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

.site-footer ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.copyright {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(31, 41, 55, 0.65);
  color: #6b7280;
}

[hidden] {
  display: none !important;
}

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

  .menu-button {
    display: block;
  }

  .featured-grid,
  .movie-grid,
  .full-grid,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .detail-layout,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-nav {
    padding: 0 16px;
  }

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

  .hero {
    min-height: 780px;
  }

  .hero-content {
    width: calc(100% - 32px);
    padding-top: 78px;
  }

  .hero-feature {
    padding: 20px;
  }

  .hero-arrow {
    display: none;
  }

  .section,
  .page-hero,
  .detail-layout,
  .footer-grid,
  .copyright {
    width: calc(100% - 32px);
  }

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

  .featured-grid,
  .movie-grid,
  .full-grid,
  .category-grid,
  .mini-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-overview-card,
  .detail-copy {
    padding: 16px;
  }

  .rank-row {
    grid-template-columns: 38px 64px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }

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

@media (max-width: 460px) {
  .featured-grid,
  .movie-grid,
  .full-grid,
  .category-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }
}
