:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #06b6d4;
  --accent-deep: #0891b2;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(8, 145, 178, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.nav-inner {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.brand:hover {
  color: var(--accent);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(6, 182, 212, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a,
.mobile-menu a {
  color: var(--muted-strong);
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover {
  color: var(--accent);
}

.nav-search,
.mobile-search,
.hero-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.hero-search input,
.filter-controls input,
.filter-controls select {
  min-width: 0;
  color: var(--text);
  background: #0f172a;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  padding: 10px 12px;
}

.nav-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(6, 182, 212, 0.75);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
}

.nav-search button,
.mobile-search button,
.hero-search button,
.filter-controls button {
  color: #ffffff;
  background: var(--accent-deep);
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.filter-controls button:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  color: var(--text);
  background: transparent;
  border: 0;
  font-size: 26px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  gap: 12px;
  flex-direction: column;
}

.mobile-menu.is-open {
  display: flex;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  z-index: -3;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.26) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.24) 45%, rgba(2, 6, 23, 0.48) 100%);
}

.hero-inner {
  min-height: 70vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 390px;
  align-items: end;
  gap: 38px;
  padding: 72px 0;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 5px 12px;
  color: var(--accent);
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.18);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p {
  max-width: 760px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-meta span,
.hero-meta a,
.detail-meta span {
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid var(--line);
  border-radius: 999px;
}

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

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

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

.btn.primary {
  color: #ffffff;
  background: var(--accent-deep);
}

.btn.primary:hover {
  background: var(--accent);
}

.btn.ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.52);
}

.btn.small {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
}

.hero-panel,
.side-card,
.filter-panel,
.text-panel,
.category-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-panel {
  padding: 18px;
}

.hero-panel h2,
.side-card h2,
.filter-panel h2,
.section-heading h2,
.text-panel h2,
.category-copy h2 {
  margin: 0;
  color: var(--text);
}

.compact-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, background 0.2s ease;
}

.compact-card:hover {
  transform: translateX(4px);
  background: #1e293b;
}

.compact-card img {
  width: 96px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

.compact-card em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.section {
  padding: 70px 0;
}

.band {
  background: rgba(15, 23, 42, 0.42);
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

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

.section-heading h2 {
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: -0.02em;
}

.section-heading a {
  color: var(--accent);
  font-weight: 700;
}

.card-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 14px;
  scrollbar-color: var(--accent) rgba(15, 23, 42, 0.8);
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-strong);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.42);
  background: #111c31;
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card.mini .movie-cover {
  aspect-ratio: 2 / 3;
}

.movie-card.mosaic:nth-child(1),
.movie-card.mosaic:nth-child(5),
.movie-card.mosaic:nth-child(9) {
  grid-column: span 2;
  grid-row: span 2;
}

.movie-card.mosaic .movie-cover {
  height: 100%;
  aspect-ratio: 1 / 1;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.55s ease;
}

.movie-card:hover .movie-cover img,
.compact-card:hover img,
.rank-item:hover img {
  transform: scale(1.08);
  filter: brightness(1.08);
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 58%);
  opacity: 0.9;
}

.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(8, 145, 178, 0.92);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.45;
}

.movie-info h3 a:hover {
  color: var(--accent);
}

.movie-info p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  justify-content: space-between;
  font-size: 12px;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: var(--muted-strong);
  background: rgba(30, 41, 59, 0.82);
  border-radius: 999px;
  font-size: 12px;
}

.tag:hover {
  color: var(--accent);
  background: rgba(6, 182, 212, 0.12);
}

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.22), transparent 55%),
    rgba(15, 23, 42, 0.82);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.45);
}

.category-tile span,
.category-tile em {
  display: block;
}

.category-tile span {
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 800;
}

.category-tile em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.65;
}

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

.rank-item {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.76);
}

.rank-link {
  display: grid;
  grid-template-columns: 64px 118px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
}

.rank-no {
  color: rgba(148, 163, 184, 0.45);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.rank-link img {
  width: 118px;
  height: 74px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.3s ease;
}

.rank-copy strong,
.rank-copy em,
.rank-copy span {
  display: block;
}

.rank-copy strong {
  margin-bottom: 6px;
  font-size: 18px;
}

.rank-copy em {
  color: var(--muted-strong);
  font-style: normal;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-copy span,
.rank-time {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  padding: 70px 0;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.16), transparent 28rem),
    rgba(15, 23, 42, 0.56);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

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

.hero-search {
  max-width: 620px;
  margin-top: 24px;
}

.hero-search input {
  flex: 1;
  min-height: 48px;
}

.category-panels {
  display: grid;
  gap: 24px;
}

.category-panel {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 24px;
  padding: 20px;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.category-preview img {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

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

.category-copy ul,
.site-footer ul {
  padding: 0;
  margin: 18px 0;
  list-style: none;
}

.category-copy li,
.site-footer li {
  margin: 8px 0;
}

.category-copy a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  margin-bottom: 28px;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 22px;
}

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

.detail-shell {
  padding: 32px 0 0;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow);
}

.site-video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.site-video {
  z-index: 1;
  background: #000000;
}

.player-cover {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover img {
  object-fit: cover;
  filter: brightness(0.62);
}

.player-card.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(8, 145, 178, 0.95);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.35);
}

.detail-content {
  padding: 28px 0;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.detail-title-row h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.14;
}

.detail-meta {
  margin-bottom: 24px;
}

.text-panel {
  padding: 22px;
  margin-bottom: 18px;
}

.text-panel h2 {
  margin-bottom: 12px;
  font-size: 21px;
}

.text-panel p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
}

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

.info-grid div {
  display: grid;
  gap: 6px;
}

.info-grid strong {
  color: var(--muted);
  font-size: 13px;
}

.info-grid span {
  color: var(--text);
}

.detail-tags {
  margin-top: 4px;
}

.detail-side {
  position: relative;
}

.side-card {
  position: sticky;
  top: 88px;
  padding: 18px;
}

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

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

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

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

.footer-bottom {
  padding: 18px 16px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

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

  .hero-inner,
  .detail-layout,
  .category-panel {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 620px;
  }

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

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

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

  .nav-links,
  .nav-search {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .brand {
    font-size: 18px;
  }

  .hero-inner {
    min-height: 78vh;
    padding: 42px 0;
  }

  .hero-panel {
    display: none;
  }

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

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

  .section {
    padding: 46px 0;
  }

  .section-heading,
  .filter-panel,
  .detail-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .poster-grid,
  .large-grid,
  .category-grid,
  .mosaic-grid,
  .footer-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.mosaic:nth-child(1),
  .movie-card.mosaic:nth-child(5),
  .movie-card.mosaic:nth-child(9) {
    grid-column: auto;
    grid-row: auto;
  }

  .rank-link {
    grid-template-columns: 42px 82px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .rank-link img {
    width: 82px;
    height: 58px;
  }

  .rank-time {
    display: none;
  }

  .rank-copy em {
    -webkit-line-clamp: 2;
  }

  .filter-controls {
    width: 100%;
    justify-content: stretch;
  }

  .filter-controls input,
  .filter-controls select,
  .filter-controls button {
    width: 100%;
  }

  .player-button {
    width: 62px;
    height: 62px;
  }
}
