:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.68);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --accent: #14b8a6;
  --accent-strong: #0d9488;
  --accent-soft: rgba(20, 184, 166, 0.16);
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(20, 184, 166, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 16%, rgba(16, 185, 129, 0.12), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #22c55e);
  color: #031a19;
  box-shadow: 0 14px 30px rgba(20, 184, 166, 0.28);
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  color: var(--muted-2);
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  background: var(--accent-soft);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
}

.header-search input {
  width: 230px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 6px 8px 6px 12px;
}

.header-search button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  color: #042f2e;
  background: var(--accent);
  padding: 8px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.search-panel button:hover {
  background: #2dd4bf;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
}

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #000;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 38%, rgba(0, 0, 0, 0.24) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0) 45%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1180px) / 2));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5eead4;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  font-weight: 800;
}

.hero-copy h1,
.page-hero h1 {
  margin: 14px 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.hero-meta,
.hero-desc,
.page-hero p {
  color: var(--muted-2);
  font-size: 18px;
}

.hero-desc {
  max-width: 620px;
  margin: 0 0 24px;
}

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

.hero-tags span,
.tag-list span {
  display: inline-flex;
  border: 1px solid rgba(94, 234, 212, 0.32);
  border-radius: 999px;
  color: #d9fffb;
  background: rgba(15, 23, 42, 0.58);
  padding: 5px 11px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

.btn-primary {
  color: #03201e;
  background: var(--accent);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

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

.btn-primary:hover {
  background: #2dd4bf;
}

.btn-ghost:hover {
  border-color: rgba(94, 234, 212, 0.46);
  background: rgba(20, 184, 166, 0.18);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
  font-size: 32px;
  line-height: 1;
}

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

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dots button {
  width: 44px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 64px;
  background: var(--accent);
}

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

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

.section-head h2,
.panel-head h2,
.side-card h2,
.detail-section h2 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  line-height: 1.2;
}

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

.section-more,
.panel-head a {
  color: #5eead4;
  font-weight: 700;
}

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

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

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 16px 48px rgba(2, 6, 23, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 184, 166, 0.58);
  box-shadow: 0 24px 68px rgba(2, 6, 23, 0.36);
}

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #020617;
}

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

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

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: #fff;
  background: rgba(20, 184, 166, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-year,
.card-rank {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.card-rank {
  left: 10px;
  right: auto;
  background: rgba(20, 184, 166, 0.92);
  color: #03201e;
}

.card-body {
  display: block;
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: var(--text);
  font-weight: 750;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: #5eead4;
}

.card-meta,
.card-desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.card-desc {
  margin-top: 8px;
  -webkit-line-clamp: 2;
}

.movie-card-large {
  min-height: 270px;
}

.movie-card-large .card-media {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
}

.movie-card-large .card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent 72%);
}

.movie-card-large .card-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px;
}

.movie-card-large .card-title {
  min-height: 0;
  font-size: 24px;
}

.movie-card-horizontal {
  display: flex;
  min-height: 140px;
}

.movie-card-horizontal .card-media {
  width: 42%;
  flex: 0 0 42%;
  aspect-ratio: auto;
}

.movie-card-horizontal .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

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

.category-panel,
.rank-card,
.side-card,
.player-card,
.detail-section {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  box-shadow: var(--shadow);
}

.category-panel,
.rank-card,
.side-card {
  padding: 22px;
}

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

.rank-list {
  display: grid;
  gap: 8px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(20, 184, 166, 0.12);
  transform: translateX(4px);
}

.rank-index {
  grid-row: span 2;
  color: #5eead4;
  font-size: 20px;
  font-weight: 900;
}

.rank-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #fff;
  font-weight: 750;
}

.rank-meta {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 13px;
}

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

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.category-tile img,
.category-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-tile:hover img,
.category-card:hover img {
  transform: scale(1.06);
}

.category-tile-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.08));
}

.category-tile-text {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: 8px;
  padding: 18px;
}

.category-tile strong,
.category-card strong {
  color: #fff;
  font-size: 20px;
}

.category-tile em,
.category-card em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted-2);
  font-style: normal;
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-card {
  display: grid;
  min-height: 0;
}

.category-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.category-card-body {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.page-shell {
  padding: 34px 0 72px;
}

.page-hero {
  padding: 54px 0 28px;
}

.compact-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
}

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

.breadcrumb a:hover {
  color: #5eead4;
}

.page-filter,
.search-panel {
  margin-top: 24px;
  display: flex;
  width: min(560px, 100%);
  gap: 10px;
}

.page-filter input,
.search-panel input {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  padding: 13px 16px;
}

.search-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--muted);
}

.detail-shell {
  padding: 34px 0 72px;
}

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

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

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.15));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-frame.is-playing .video-overlay,
.video-frame.is-ready .video-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #03201e;
  background: var(--accent);
  font-size: 30px;
  box-shadow: 0 20px 48px rgba(20, 184, 166, 0.35);
}

.player-card {
  padding: 12px;
}

.player-status {
  min-height: 24px;
  margin: 10px 4px 0;
  color: #fca5a5;
}

.detail-title-block {
  padding: 28px 0 12px;
}

.detail-title-block h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted-2);
}

.detail-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
}

.detail-section {
  margin-top: 18px;
  padding: 24px;
}

.detail-section p {
  color: var(--muted-2);
  margin: 12px 0 0;
}

.detail-side {
  position: sticky;
  top: 96px;
}

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

.side-list .movie-card-horizontal {
  min-height: 112px;
}

.side-list .card-desc {
  display: none;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.92);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 32px 0;
  color: var(--muted);
}

.footer-brand {
  display: inline-block;
  color: #fff;
  font-size: 20px;
  font-weight: 850;
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-links a:hover {
  color: #5eead4;
}

.is-hidden {
  display: none !important;
}

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    order: 3;
    flex-wrap: wrap;
    padding-top: 8px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .header-search {
    order: 4;
    width: 100%;
    margin-left: 0;
  }

  .header-search input {
    width: 100%;
  }

  .hero-carousel {
    min-height: 620px;
  }

  .hero-copy {
    margin: 0 auto;
  }

  .hero-arrow {
    display: none;
  }

  .large-grid,
  .horizontal-grid,
  .split-main,
  .full-rank-list {
    grid-template-columns: 1fr;
  }

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

  .section-head,
  .panel-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .container,
  .header-inner,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

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

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

  .hero-meta,
  .hero-desc,
  .page-hero p {
    font-size: 16px;
  }

  .movie-grid,
  .six-grid,
  .category-grid,
  .category-card-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    flex-direction: column;
  }

  .movie-card-horizontal .card-media {
    width: 100%;
    flex-basis: auto;
    aspect-ratio: 16 / 9;
  }

  .page-filter,
  .search-panel {
    flex-direction: column;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}
