:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #f8fafc;
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.16);
  --blue: #2563eb;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body::selection {
  background: rgba(6, 182, 212, 0.45);
}

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

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

button,
input {
  font: inherit;
}

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

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

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

.site-logo,
.footer-logo {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #22d3ee, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #cbd5e1;
  font-size: 15px;
  flex: 1;
}

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

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-grid a:hover {
  color: #22d3ee;
}

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

.header-search input,
.mobile-search input,
.search-panel input {
  width: 220px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.74);
  padding: 10px 13px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus {
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.header-search button,
.mobile-search button,
.search-panel button,
.sort-actions button,
.btn {
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #0891b2, #2563eb);
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover,
.sort-actions button:hover,
.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.74);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid var(--line);
}

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

.hero-slider {
  position: relative;
  height: min(72vh, 760px);
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, #020617 0%, transparent 45%);
}

.hero-content {
  position: absolute;
  inset: auto 0 76px 0;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-kicker {
  padding: 7px 14px;
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.22);
  backdrop-filter: blur(8px);
}

.hero-content h1 {
  max-width: 820px;
  margin: 18px 0 16px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: clamp(16px, 2.2vw, 20px);
}

.hero-actions,
.detail-title-row,
.section-heading,
.sort-shell,
.prev-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
}

.btn-primary {
  box-shadow: 0 18px 35px rgba(6, 182, 212, 0.18);
}

.btn-ghost {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.72);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.54);
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(8, 145, 178, 0.72);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: #22d3ee;
}

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

.section-heading {
  margin-bottom: 24px;
}

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

.section-heading h2,
.page-banner h1,
.detail-card h1 {
  margin: 6px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading a {
  color: #22d3ee;
  font-weight: 800;
}

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.66);
  box-shadow: 0 22px 50px rgba(8, 145, 178, 0.16);
}

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(6, 182, 212, 0.28), transparent 36%),
    #0f172a;
}

.poster-img,
.hero-image,
.side-img,
.category-thumb-img,
.cover-large-img {
  color: transparent;
}

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

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent 58%);
  opacity: 0.78;
}

.badge,
.poster-year,
.rank-mark,
.poster-play {
  position: absolute;
  z-index: 2;
}

.badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge-cyan {
  color: #ecfeff;
  background: rgba(8, 145, 178, 0.86);
}

.poster-year {
  right: 12px;
  bottom: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.65);
}

.poster-play {
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%) scale(0.82);
  border-radius: 999px;
  color: white;
  background: rgba(6, 182, 212, 0.86);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.rank-mark {
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

.movie-card-body {
  padding: 16px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card h3 a:hover {
  color: #22d3ee;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: 12px;
}

.movie-meta span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  padding: 4px 9px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #67e8f9;
  font-size: 12px;
}

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

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

.category-tile {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 18px;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(8, 47, 73, 0.34));
  padding: 18px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.6);
}

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

.category-thumbs span {
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

.category-thumb-img {
  width: 100%;
  height: 70px;
  object-fit: cover;
}

.category-tile h3 {
  margin: 4px 0 8px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
}

.two-column-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.ranking-panel,
.side-card,
.detail-card,
.player-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

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

.side-link {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
}

.side-link:hover strong {
  color: #22d3ee;
}

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

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

.side-link strong {
  display: block;
  color: #f8fafc;
  line-height: 1.35;
}

.side-link span {
  color: var(--muted);
  font-size: 13px;
}

.page-banner {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 0%, rgba(6, 182, 212, 0.2), transparent 32%),
    linear-gradient(135deg, rgba(8, 47, 73, 0.32), rgba(2, 6, 23, 0.7));
  padding: 58px 0;
}

.page-banner p {
  max-width: 760px;
  margin: 14px 0 0;
  color: #cbd5e1;
}

.sort-shell {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.58);
}

.sort-label {
  color: #cbd5e1;
  font-weight: 800;
}

.sort-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sort-actions button {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.sort-actions button.active {
  background: linear-gradient(135deg, #0891b2, #2563eb);
  border-color: transparent;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.7);
}

.pagination a.active,
.pagination a:hover {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, #0891b2, #2563eb);
}

.search-panel {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.search-panel input {
  width: min(680px, 100%);
  padding: 15px 16px;
}

.search-status {
  margin-bottom: 18px;
  color: #cbd5e1;
  font-weight: 800;
}

.detail-hero {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.42);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #22d3ee;
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card {
  overflow: hidden;
  background: #000;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at 50% 45%, rgba(6, 182, 212, 0.2), rgba(0, 0, 0, 0.54));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.88);
  box-shadow: 0 20px 60px rgba(6, 182, 212, 0.22);
  font-size: 32px;
}

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

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-card {
  padding: 26px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 8px;
  color: #cbd5e1;
}

.detail-tags {
  margin-bottom: 22px;
}

.article-section {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.article-section h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.article-section p,
.cover-card p {
  margin: 0;
  color: #cbd5e1;
  white-space: pre-line;
}

.detail-side {
  display: grid;
  gap: 20px;
}

.cover-large {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  background: #0f172a;
  margin-bottom: 16px;
}

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

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

.prev-next {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.54);
}

.prev-next a {
  color: #cbd5e1;
}

.prev-next a:hover {
  color: #22d3ee;
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: #94a3b8;
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: #f8fafc;
}

.footer-grid a {
  display: block;
  margin: 7px 0;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  text-align: center;
  font-size: 13px;
}

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

  .two-column-block,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .sticky-card {
    position: static;
  }

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

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

  .mobile-menu-button {
    display: grid;
    place-items: center;
  }

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

  .hero-content {
    bottom: 72px;
  }

  .hero-arrow {
    display: none;
  }

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

  .category-grid,
  .category-grid.big,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-tile {
    grid-template-columns: 128px 1fr;
  }

  .detail-title-row,
  .section-heading,
  .sort-shell,
  .prev-next,
  .search-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .search-panel button {
    width: 100%;
  }
}

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

  .site-logo,
  .footer-logo {
    font-size: 20px;
  }

  .hero-slider {
    min-height: 500px;
  }

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

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .category-tile {
    grid-template-columns: 1fr;
  }

  .category-thumbs {
    grid-template-columns: repeat(4, 1fr);
  }

  .category-thumb-img {
    height: 62px;
  }

  .side-link {
    grid-template-columns: 96px 1fr;
  }

  .detail-card,
  .side-card,
  .ranking-panel {
    padding: 18px;
  }
}
