* {
  box-sizing: border-box;
}

:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-200: #bae6fd;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --blue-100: #dbeafe;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 45px rgba(14, 116, 144, 0.16);
  --shadow-xl: 0 28px 70px rgba(15, 23, 42, 0.24);
  --radius-lg: 16px;
  --radius-xl: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-800);
  background: linear-gradient(180deg, var(--sky-50) 0%, #ffffff 42%, var(--gray-50) 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(240, 249, 255, 0.96), rgba(239, 246, 255, 0.96));
  border-bottom: 1px solid var(--sky-200);
  box-shadow: 0 2px 18px rgba(2, 132, 199, 0.08);
  backdrop-filter: blur(12px);
}

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

.nav-shell {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
  box-shadow: 0 10px 22px rgba(2, 132, 199, 0.28);
  font-size: 15px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 21px;
  color: var(--gray-800);
  letter-spacing: 0.02em;
}

.brand-text em {
  margin-top: 3px;
  font-size: 12px;
  color: var(--gray-500);
  font-style: normal;
}

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

.desktop-nav a,
.mobile-nav a {
  color: var(--gray-700);
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 300px;
}

.top-search input {
  width: 100%;
  border: 1px solid var(--sky-200);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 15px;
  color: var(--gray-700);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.top-search input:focus {
  border-color: var(--sky-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.top-search button,
.btn-primary,
.btn-secondary,
.btn-light,
.search-panel button,
.pager a,
.play-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.btn-primary,
.search-panel button,
.play-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.24);
}

.top-search button {
  padding: 10px 16px;
}

.btn-primary,
.btn-secondary,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  gap: 8px;
}

.btn-secondary {
  color: var(--sky-700);
  background: var(--sky-100);
}

.btn-light {
  color: var(--sky-700);
  background: rgba(255, 255, 255, 0.94);
}

.top-search button:hover,
.btn-primary:hover,
.search-panel button:hover,
.play-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(2, 132, 199, 0.32);
}

.mobile-toggle {
  display: none;
  border: 0;
  background: var(--sky-100);
  color: var(--gray-700);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 22px;
}

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

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
  animation: fadeIn 0.24s ease both;
}

.mobile-nav a {
  padding: 11px 14px;
  border-radius: 12px;
}

.mobile-nav a:hover {
  background: var(--sky-100);
}

.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.main-shell {
  min-height: 64vh;
}

.page-section {
  padding: 34px 0;
}

.hero {
  position: relative;
  height: 500px;
  margin: 32px 0 50px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  background: #0f172a;
}

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

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 5vw, 56px);
  right: clamp(24px, 5vw, 56px);
  bottom: clamp(28px, 6vw, 58px);
  color: #ffffff;
  max-width: 760px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--sky-500);
  color: #ffffff;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  border-radius: 999px;
  background: var(--sky-100);
  color: var(--sky-700);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
}

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

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-heading h2 {
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(24px, 3vw, 34px);
}

.section-heading h2 span {
  display: inline-block;
  width: 5px;
  height: 34px;
  margin-right: 14px;
  border-radius: 999px;
  background: var(--sky-600);
}

.section-more {
  color: var(--sky-600);
  font-weight: 700;
  white-space: nowrap;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transform: translateY(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #f0f9ff);
}

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

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

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

.play-mark,
.mini-play {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--sky-600);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.play-mark {
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin-left: -28px;
  margin-top: -28px;
  font-size: 22px;
}

.movie-card:hover .play-mark,
.mini-card:hover .mini-play {
  opacity: 1;
  transform: scale(1);
}

.rank-badge,
.mini-rank {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.28);
}

.card-body {
  padding: 17px;
}

.card-body h3,
.mini-card h3 {
  margin: 0 0 10px;
  color: var(--gray-800);
  line-height: 1.42;
  transition: color 0.2s ease;
}

.card-body h3 {
  font-size: 17px;
  min-height: 48px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  margin: 0 0 14px;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.65;
  min-height: 46px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover h3,
.mini-card:hover h3 {
  color: var(--sky-600);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--gray-500);
  font-size: 12px;
}

.card-meta strong {
  color: var(--sky-700);
  background: var(--sky-100);
  border-radius: 999px;
  padding: 4px 9px;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.ribbon-section {
  padding: clamp(22px, 4vw, 36px);
  border-radius: 24px;
  background: linear-gradient(90deg, var(--sky-100), var(--blue-100));
  box-shadow: var(--shadow-lg);
  margin: 16px 0 50px;
}

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

.category-tile {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 20px;
  padding: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
  font-size: 22px;
  color: var(--gray-800);
}

.category-tile p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.7;
}

.category-count {
  margin-top: 18px;
  color: var(--sky-700);
  font-weight: 800;
}

.page-hero {
  padding: 46px 0 22px;
}

.page-hero-box {
  border-radius: 24px;
  padding: clamp(26px, 5vw, 46px);
  background: linear-gradient(135deg, #e0f2fe, #ffffff 58%, #dbeafe);
  box-shadow: var(--shadow-lg);
}

.page-hero-box h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4.6vw, 48px);
  letter-spacing: -0.035em;
}

.page-hero-box p {
  margin: 0;
  color: var(--gray-600);
  font-size: 17px;
  line-height: 1.8;
  max-width: 820px;
}

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

.rank-item,
.mini-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-item {
  padding: 14px;
}

.rank-item:hover,
.mini-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.rank-item img,
.mini-card img {
  width: 170px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #dbeafe, #f0f9ff);
  transition: transform 0.35s ease;
}

.rank-number {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
  font-size: 18px;
  font-weight: 900;
}

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

.rank-content p {
  margin: 0 0 12px;
  color: var(--gray-600);
  line-height: 1.7;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--gray-500);
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 30px;
  align-items: start;
  padding: 34px 0;
}

.player-card,
.detail-card,
.sidebar-card,
.search-panel,
.search-results-shell {
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

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

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

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.32), rgba(3, 7, 18, 0.78));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  padding-left: 4px;
}

.player-status {
  min-height: 22px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
}

.detail-card {
  margin-top: 24px;
  padding: clamp(22px, 4vw, 30px);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--sky-700);
  font-weight: 700;
}

.detail-card h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-600);
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--gray-100);
}

.detail-card h2,
.sidebar-card h2,
.search-results-shell h2 {
  margin: 0 0 12px;
  color: var(--gray-800);
  font-size: 20px;
}

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

.detail-text p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.95;
  white-space: pre-line;
}

.review-box {
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(90deg, var(--sky-50), var(--blue-100));
}

.sidebar-card {
  position: sticky;
  top: 92px;
  padding: 20px;
}

.sidebar-list {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 160px);
  overflow: auto;
  padding-right: 6px;
}

.mini-card {
  padding: 10px;
}

.mini-card img {
  width: 128px;
  border-radius: 12px;
}

.mini-card h3 {
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-card p {
  margin: 0;
  color: var(--gray-500);
  font-size: 13px;
}

.mini-play {
  left: 56px;
  top: 50%;
  width: 38px;
  height: 38px;
  margin-top: -19px;
  z-index: 2;
}

.mini-rank {
  min-width: 26px;
  height: 26px;
  left: 16px;
  top: 16px;
  font-size: 12px;
}

.search-panel {
  padding: 22px;
  margin-bottom: 24px;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px auto;
  gap: 12px;
}

.search-controls input,
.search-controls select {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
}

.search-controls input:focus,
.search-controls select:focus {
  border-color: var(--sky-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.search-panel button {
  padding: 0 24px;
}

.search-results-shell {
  padding: 22px;
}

.empty-state {
  color: var(--gray-500);
  padding: 36px 0;
  text-align: center;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--gray-200);
  background: linear-gradient(180deg, var(--gray-50), var(--gray-100));
}

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

.site-footer p {
  color: var(--gray-600);
  line-height: 1.8;
  max-width: 680px;
}

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

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

.site-footer a:hover {
  color: var(--sky-600);
}

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid var(--gray-200);
  color: var(--gray-500);
  text-align: center;
  font-size: 14px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

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

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

  .sidebar-card {
    position: static;
  }

  .search-controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .nav-shell,
  .footer-grid,
  .container,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

  .hero {
    height: 430px;
    margin-top: 20px;
    border-radius: 18px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 24px;
  }

  .grid-3,
  .grid-4,
  .grid-6,
  .category-overview,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ribbon-section {
    padding: 20px;
  }

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

  .rank-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-item img {
    width: 100%;
  }

  .search-controls {
    grid-template-columns: 1fr;
  }

  .mini-card img {
    width: 120px;
  }
}
