:root {
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --blue: #3b82f6;
  --teal: #14b8a6;
  --green: #22c55e;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--gray-900);
  background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 42%, #f0fdfa 100%);
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(209, 213, 219, 0.72);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 26px rgba(6, 182, 212, 0.28);
  font-size: 16px;
}

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

.site-nav a {
  position: relative;
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--gray-700);
  font-weight: 600;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--cyan-dark);
  background: rgba(6, 182, 212, 0.1);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 999px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  padding: 72px 0 54px;
  background: linear-gradient(135deg, rgba(236, 254, 255, 0.98), rgba(239, 246, 255, 0.98), rgba(240, 253, 250, 0.98));
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.58;
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0.04) 1px, transparent 1px), linear-gradient(to bottom, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.07em;
}

.hero-copy h1 {
  max-width: 780px;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p:not(.eyebrow) {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--gray-600);
  font-size: 19px;
}

.hero-search {
  max-width: 620px;
  margin: 30px 0 0;
  padding: 8px;
  display: flex;
  gap: 8px;
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.hero-search input,
.filter-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gray-900);
}

.hero-search input {
  padding: 12px 14px;
}

.hero-search button,
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 13px;
  border: 0;
  padding: 12px 20px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.hero-search button,
.btn-primary {
  color: var(--white);
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.24);
}

.btn-secondary {
  color: var(--gray-700);
  background: var(--white);
  border: 2px solid var(--gray-200);
}

.hero-search button:hover,
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-secondary:hover {
  color: var(--cyan-dark);
  border-color: rgba(6, 182, 212, 0.42);
}

.hero-actions,
.detail-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-category-links {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-category-links a,
.tag-row span,
.hero-tags span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(6, 182, 212, 0.22);
  color: var(--cyan-dark);
  font-weight: 700;
}

.hero-category-links a {
  padding: 8px 12px;
}

.hero-carousel {
  position: relative;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-slides {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-poster {
  position: relative;
  height: 450px;
  overflow: hidden;
  background: linear-gradient(135deg, #cffafe, #dbeafe, #ccfbf1);
}

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

.hero-slide:hover .hero-poster img,
.movie-card:hover img,
.category-card:hover img {
  transform: scale(1.08);
}

.hero-movie-copy {
  padding: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82));
}

.hero-movie-copy p {
  margin: 0 0 8px;
  color: var(--cyan-dark);
  font-weight: 800;
}

.hero-movie-copy h2 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.16;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  padding: 5px 9px;
  font-size: 12px;
}

.hero-movie-copy .btn-primary {
  margin-top: 16px;
}

.hero-controls {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  color: var(--cyan-dark);
  font-size: 26px;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 10px !important;
  height: 10px !important;
  padding: 0;
  border-radius: 999px !important;
  background: rgba(8, 145, 178, 0.28) !important;
  box-shadow: none !important;
}

.hero-dot.active {
  width: 26px !important;
  background: var(--cyan-dark) !important;
}

.stats-section {
  padding: 34px 0;
  background: var(--white);
}

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

.feature-stat,
.movie-card,
.category-card,
.category-overview-card,
.text-card,
.rank-aside,
.detail-poster {
  border: 1px solid rgba(209, 213, 219, 0.7);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.feature-stat {
  padding: 20px;
  border-radius: 22px;
}

.feature-stat strong {
  display: block;
  font-size: 22px;
  color: var(--gray-900);
}

.feature-stat span {
  color: var(--gray-600);
}

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

.soft-bg {
  background: rgba(255, 255, 255, 0.62);
}

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

.section-head h2,
.category-overview-head h2,
.text-card h2,
.rank-aside h2 {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-head a,
.category-overview-head a {
  color: var(--cyan-dark);
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.card-hover:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.36);
  box-shadow: var(--shadow);
}

.poster-frame {
  position: relative;
  height: 270px;
  overflow: hidden;
  background: linear-gradient(135deg, #cffafe, #dbeafe, #ccfbf1);
}

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

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
  color: var(--white);
  background: rgba(8, 145, 178, 0.9);
  backdrop-filter: blur(10px);
}

.type-badge {
  left: 12px;
}

.rank-badge {
  right: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.movie-info {
  flex: 1;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.movie-info h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-info p,
.category-card p,
.category-overview-head p,
.page-hero p,
.text-card p,
.rank-item p,
.site-footer p {
  margin: 0;
  color: var(--gray-600);
}

.movie-info p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--gray-500);
  font-size: 13px;
}

.tag-row span {
  background: rgba(236, 254, 255, 0.9);
}

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

.category-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.category-thumbs img {
  height: 105px;
  object-fit: cover;
  border-radius: 16px;
  background: linear-gradient(135deg, #cffafe, #dbeafe, #ccfbf1);
}

.category-card h3 {
  margin: 0;
  font-size: 22px;
}

.category-card span {
  color: var(--cyan-dark);
  font-weight: 800;
}

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

.compact-head {
  margin-bottom: 20px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(209, 213, 219, 0.68);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(6, 182, 212, 0.36);
}

.rank-item > span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-item img {
  height: 86px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #cffafe, #dbeafe, #ccfbf1);
}

.rank-item strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.mini-grid .movie-card .poster-frame,
.compact-grid .movie-card .poster-frame {
  height: 210px;
}

.page-hero {
  padding: 74px 0 48px;
  background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 50%, #f0fdfa 100%);
  border-bottom: 1px solid rgba(209, 213, 219, 0.7);
}

.page-hero h1 {
  font-size: clamp(34px, 5.2vw, 58px);
}

.page-hero p {
  max-width: 840px;
  margin-top: 16px;
  font-size: 18px;
}

.overview-list {
  padding: 46px 0 72px;
  display: grid;
  gap: 24px;
}

.category-overview-card {
  padding: 24px;
  border-radius: 28px;
}

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

.compact .movie-info p,
.compact .tag-row {
  display: none;
}

.filter-panel {
  margin-top: 28px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-radius: 22px;
  border: 1px solid rgba(6, 182, 212, 0.24);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.wide-panel {
  max-width: 980px;
}

.filter-input {
  padding: 13px 14px;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-actions button {
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-weight: 800;
}

.filter-actions button.active,
.filter-actions button:hover {
  color: var(--white);
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.no-results {
  width: min(640px, calc(100% - 32px));
  margin: 36px auto 0;
  padding: 28px;
  border-radius: 22px;
  text-align: center;
  color: var(--gray-600);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.ranking-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

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

.rank-aside {
  position: sticky;
  top: 96px;
  padding: 20px;
  border-radius: 24px;
}

.breadcrumb {
  padding: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--cyan-dark);
  font-weight: 700;
}

.detail-hero {
  padding: 32px 0 48px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
}

.detail-poster img {
  min-height: 520px;
  object-fit: cover;
  background: linear-gradient(135deg, #cffafe, #dbeafe, #ccfbf1);
}

.detail-copy h1 {
  font-size: clamp(34px, 5.8vw, 68px);
}

.detail-one-line {
  margin: 20px 0 0;
  color: var(--gray-600);
  font-size: 20px;
}

.detail-meta {
  margin-top: 20px;
}

.large-tags {
  margin-top: 16px;
}

.player-section {
  padding-top: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.18), rgba(2, 6, 23, 0.68));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 42px rgba(6, 182, 212, 0.34);
  font-size: 32px;
}

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

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  margin: 0;
  color: var(--white);
  text-align: center;
}

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

.text-card {
  padding: 26px;
  border-radius: 26px;
}

.text-card h2 {
  margin-bottom: 14px;
  font-size: 28px;
}

.site-footer {
  margin-top: 24px;
  padding: 48px 0 0;
  color: var(--gray-600);
  background: linear-gradient(180deg, rgba(249, 250, 251, 0.96), rgba(243, 244, 246, 0.96));
  border-top: 1px solid rgba(209, 213, 219, 0.72);
}

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

.footer-logo {
  margin-bottom: 12px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--gray-900);
  font-size: 18px;
}

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

.site-footer a:hover {
  color: var(--cyan-dark);
}

.footer-bottom {
  margin-top: 38px;
  padding: 18px;
  text-align: center;
  border-top: 1px solid rgba(209, 213, 219, 0.72);
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.animate-fade-in {
  animation: fadeIn 0.7s ease both;
}

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

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

@media (max-width: 1180px) {
  .hero-layout,
  .two-column,
  .ranking-layout {
    grid-template-columns: 1fr;
  }

  .hero-carousel {
    max-width: 720px;
  }

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

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

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

  .rank-aside {
    position: static;
  }
}

@media (max-width: 820px) {
  .mobile-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(209, 213, 219, 0.74);
    box-shadow: var(--shadow);
  }

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

  .hero-section {
    padding-top: 48px;
  }

  .hero-layout,
  .detail-grid,
  .detail-text-grid,
  .filter-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-search {
    flex-direction: column;
  }

  .hero-slides {
    min-height: 560px;
  }

  .movie-grid,
  .mini-grid,
  .category-grid,
  .compact-grid,
  .ranking-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-poster img {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .container-custom {
    width: min(100% - 22px, 1280px);
  }

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

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    letter-spacing: -0.05em;
  }

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

  .hero-poster {
    height: 330px;
  }

  .movie-grid,
  .mini-grid,
  .category-grid,
  .compact-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .poster-frame {
    height: 360px;
  }

  .category-overview-head,
  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .rank-item {
    grid-template-columns: 38px 68px minmax(0, 1fr);
  }
}
