:root {
  --primary: #0284c7;
  --primary-dark: #075985;
  --primary-soft: #e0f2fe;
  --accent: #059669;
  --accent-soft: #d1fae5;
  --secondary: #b45309;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --light: #f8fafc;
  --dark: #111827;
  --card: #ffffff;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.10);
  --shadow-strong: 0 25px 50px rgba(15, 23, 42, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 45%, #f8fafc 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 12px rgba(15, 23, 42, 0.08);
}

.nav-wrap {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.25);
  font-size: 16px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}

.desktop-nav a,
.mobile-panel a {
  color: #374151;
  font-weight: 650;
  transition: color 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: var(--primary);
}

.nav-search {
  width: 320px;
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #ffffff;
}

.nav-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  background: transparent;
}

.nav-search button {
  border: 0;
  padding: 0 18px;
  color: #ffffff;
  background: var(--primary);
  cursor: pointer;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 9px;
}

.menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #374151;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 14px 24px 18px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.mobile-panel form {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.mobile-panel input {
  width: 100%;
  border: 0;
  padding: 11px 12px;
  outline: 0;
}

.mobile-panel button {
  border: 0;
  padding: 0 16px;
  color: #ffffff;
  background: var(--primary);
}

.page-main {
  padding-top: 64px;
}

.home-main {
  overflow: hidden;
}

.main-visual {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.visual-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.08));
}

.visual-content {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: min(1180px, calc(100% - 48px));
  transform: translate(-50%, -45%);
  color: #ffffff;
  max-width: 1180px;
}

.visual-content h1,
.visual-content h2 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.visual-content .visual-movie {
  font-size: clamp(26px, 3.6vw, 42px);
  letter-spacing: -0.02em;
  color: #bae6fd;
  margin-top: -4px;
}

.visual-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.visual-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.visual-meta span {
  padding: 6px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.85);
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.18);
}

.visual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 750;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 16px 32px rgba(2, 132, 199, 0.28);
}

.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px) scale(1.02);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.30);
  transform: translateY(-2px);
}

.visual-controls {
  position: absolute;
  z-index: 6;
  right: 40px;
  bottom: 36px;
  display: flex;
  gap: 12px;
}

.visual-controls button {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(10px);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.visual-controls button:hover {
  background: rgba(255, 255, 255, 0.32);
}

.section-block,
.inner-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px 0;
}

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

.section-title-row h2,
.page-head h1,
.detail-info h1 {
  margin: 0 0 8px;
  color: var(--ink);
  line-height: 1.16;
}

.section-title-row h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-title-row p,
.page-head p {
  margin: 0;
  color: var(--muted);
}

.section-title-row > a {
  color: var(--primary);
  font-weight: 750;
  white-space: nowrap;
}

.light-row h2,
.light-row p,
.light-row a {
  color: #ffffff;
}

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

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

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

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

.standard-card,
.compact-card,
.rank-item,
.category-card {
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.standard-card:hover,
.compact-card:hover,
.poster-card:hover,
.rank-item:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.thumb-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.thumb-link img,
.poster-link img,
.compact-cover img,
.rank-cover img,
.category-posters img,
.detail-cover img,
.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.standard-card:hover .thumb-link img,
.poster-card:hover img,
.compact-card:hover .compact-cover img {
  transform: scale(1.08);
}

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 34px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.28);
  transition: opacity 0.25s ease;
}

.standard-card:hover .play-mark {
  opacity: 1;
}

.type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
}

.card-body {
  padding: 18px;
}

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

.card-body h3 a:hover,
.compact-title:hover,
.rank-body h2 a:hover {
  color: var(--primary);
}

.card-body p,
.compact-body p,
.rank-body p {
  margin: 0 0 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  -webkit-line-clamp: 2;
}

.compact-body p,
.rank-body p {
  -webkit-line-clamp: 3;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 12px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-tags span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
}

.soft-panel {
  max-width: 1232px;
  margin-top: 72px;
  padding: 48px;
  border-radius: 28px;
  background: linear-gradient(135deg, #eff6ff, #ecfdf5);
}

.dark-panel {
  max-width: 1232px;
  margin-top: 72px;
  padding: 48px;
  border-radius: 28px;
  background: #111827;
}

.poster-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.poster-link figure {
  position: relative;
  margin: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.poster-link figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 48px 14px 14px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0));
}

.poster-link strong {
  display: block;
  line-height: 1.28;
  margin-bottom: 4px;
}

.poster-link span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.compact-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  min-height: 190px;
}

.compact-cover {
  min-height: 190px;
  overflow: hidden;
  background: #0f172a;
}

.compact-body {
  padding: 20px;
}

.compact-title {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

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

.category-tile {
  display: block;
  min-height: 132px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.25s ease, transform 0.25s ease;
}

.category-tile:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-3px);
}

.category-tile strong {
  display: block;
  color: #ffffff;
  font-size: 20px;
  margin-bottom: 10px;
}

.category-tile span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.inner-page {
  padding-bottom: 80px;
}

.page-head {
  max-width: 860px;
  padding: 56px 0 30px;
}

.page-head h1 {
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.eyebrow {
  margin: 0 0 10px !important;
  color: var(--primary) !important;
  font-weight: 800;
  letter-spacing: 0.12em;
}

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

.category-card a {
  display: block;
  height: 100%;
}

.category-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 180px;
  background: #0f172a;
}

.category-card-body {
  padding: 22px;
}

.category-card-body h2 {
  margin: 0 0 8px;
}

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

.filter-bar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.page-filter-input,
.page-filter-year {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  outline: 0;
  padding: 0 14px;
}

.page-filter-input {
  width: min(520px, 100%);
}

.page-filter-input:focus,
.page-filter-year:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

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

.rank-item {
  position: relative;
  display: grid;
  grid-template-columns: 120px 58px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px 22px 16px 16px;
}

.rank-cover {
  width: 120px;
  height: 82px;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}

.rank-number {
  color: var(--primary);
  font-size: 30px;
  font-weight: 900;
  text-align: center;
}

.rank-body h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 750;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 34px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 650;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 36px;
  align-items: center;
  padding: 40px;
  margin-top: 22px;
  border-radius: 30px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1f2937 48%, #075985);
  box-shadow: var(--shadow-strong);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.35);
}

.detail-info h1 {
  color: #ffffff;
  font-size: clamp(36px, 5vw, 60px);
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 18px;
}

.detail-meta span {
  padding: 6px 11px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.detail-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
}

.detail-info .primary-button {
  margin-top: 26px;
}

.player-panel {
  margin-top: 40px;
}

.video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow-strong);
}

.video-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: #020617;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.22));
}

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

.player-start {
  position: relative;
  z-index: 2;
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  padding: 0 30px;
  color: #ffffff;
  background: var(--primary);
  font-size: 18px;
  font-weight: 850;
  box-shadow: 0 18px 36px rgba(2, 132, 199, 0.32);
  cursor: pointer;
}

.player-start:hover {
  background: var(--primary-dark);
}

.detail-section {
  margin-top: 44px;
  padding: 34px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-section h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.detail-section p {
  margin: 0 0 14px;
  color: #334155;
  font-size: 17px;
}

.related-grid {
  margin-top: 10px;
}

.site-footer {
  margin-top: 90px;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
}

.footer-brand {
  color: #ffffff;
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 560px;
  margin: 0;
  color: #9ca3af;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

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

.site-footer a:hover {
  color: #7dd3fc;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 30px;
  border-top: 1px solid #1f2937;
  color: #6b7280;
  font-size: 14px;
}

.movie-card.filtered-out {
  display: none;
}

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

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

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

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

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

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

  .nav-wrap {
    padding: 0 18px;
  }

  .main-visual {
    height: 78vh;
    min-height: 620px;
  }

  .visual-content {
    width: calc(100% - 36px);
  }

  .visual-meta {
    gap: 9px;
  }

  .visual-controls {
    right: 18px;
    bottom: 18px;
  }

  .section-block,
  .inner-page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-title-row {
    display: block;
  }

  .section-title-row > a {
    display: inline-flex;
    margin-top: 12px;
  }

  .card-grid,
  .all-grid,
  .wide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .soft-panel,
  .dark-panel {
    padding: 28px;
  }

  .compact-card {
    grid-template-columns: 120px 1fr;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .detail-cover {
    width: min(280px, 100%);
  }

  .rank-item {
    grid-template-columns: 92px 42px 1fr;
    padding: 14px;
  }

  .rank-cover {
    width: 92px;
    height: 72px;
  }

  .rank-action {
    grid-column: 3;
    justify-self: start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 560px) {
  .visual-content h1,
  .visual-content h2 {
    font-size: 38px;
  }

  .visual-content p {
    font-size: 16px;
  }

  .visual-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .card-grid,
  .all-grid,
  .wide-grid,
  .poster-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

  .compact-card {
    grid-template-columns: 108px 1fr;
  }

  .compact-cover {
    min-height: 156px;
  }

  .filter-bar {
    flex-direction: column;
  }

  .page-filter-input,
  .page-filter-year {
    width: 100%;
  }

  .rank-item {
    grid-template-columns: 86px 1fr;
  }

  .rank-number {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--primary);
    font-size: 17px;
  }

  .rank-body,
  .rank-action {
    grid-column: 2;
  }

  .detail-section {
    padding: 24px;
  }
}
