:root {
  --color-primary: 14 165 233;
  --color-secondary: 249 115 22;
  --color-accent: 34 197 94;
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --emerald-50: #ecfdf5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--neutral-900);
  background: var(--neutral-50);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.container-custom {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.97);
  border-bottom: 1px solid var(--neutral-200);
  backdrop-filter: blur(14px);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  gap: 1rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: inline-flex;
  width: 2.05rem;
  height: 2.05rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--sky-500), var(--emerald-500));
  color: #fff;
  box-shadow: 0 10px 30px rgb(14 165 233 / 0.24);
  font-size: 0.85rem;
}

.brand-text {
  font-size: 1.3rem;
  background: linear-gradient(90deg, var(--sky-600), var(--emerald-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
}

.desktop-nav a,
.mobile-nav a {
  padding: 0.55rem 0.8rem;
  border-radius: 0.65rem;
  color: var(--neutral-700);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-form input,
.filter-panel input,
.filter-panel select,
.search-box input,
.search-box select {
  min-height: 2.45rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--neutral-100);
  color: var(--neutral-900);
  padding: 0 0.95rem;
  outline: none;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-box input:focus,
.search-box select:focus {
  background: #fff;
  box-shadow: 0 0 0 2px var(--sky-500);
}

.search-form button,
.btn,
.hero-search button,
.player-start {
  border: 0;
  border-radius: 0.75rem;
  background: var(--sky-500);
  color: #fff;
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-form button:hover,
.btn:hover,
.hero-search button:hover,
.player-start:hover {
  background: var(--sky-600);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgb(255 255 255 / 0.16);
  border: 1px solid rgb(255 255 255 / 0.28);
  color: #fff;
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: rgb(255 255 255 / 0.24);
}

.desktop-search {
  display: none;
}

.menu-toggle {
  width: 2.45rem;
  height: 2.45rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--neutral-100);
  color: var(--neutral-700);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 1rem;
  right: 1rem;
  padding: 1rem;
  border: 1px solid var(--neutral-200);
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--shadow-xl);
}

.mobile-panel.is-open {
  display: block;
  animation: fadeIn 0.25s ease;
}

.mobile-panel .search-form {
  align-items: stretch;
  margin-bottom: 0.75rem;
}

.mobile-panel .search-form input {
  flex: 1;
}

.mobile-nav {
  display: grid;
  gap: 0.15rem;
}

.section-spacing {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.card {
  overflow: hidden;
  border-radius: 0.95rem;
  background: #fff;
  border: 1px solid var(--neutral-200);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-hover:hover,
.movie-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-xl);
  border-color: rgb(14 165 233 / 0.22);
}

.hero-section {
  padding: 2rem 0 3rem;
  background: linear-gradient(180deg, #fff 0%, var(--neutral-50) 100%);
}

.hero-slider {
  position: relative;
  min-height: 500px;
  border-radius: 1.35rem;
  overflow: hidden;
  background: var(--neutral-900);
  box-shadow: var(--shadow-xl);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.7s ease;
}

.hero-slide.is-active img {
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.86) 0%, rgb(0 0 0 / 0.52) 46%, rgb(0 0 0 / 0.12) 100%);
}

.hero-content {
  max-width: 60rem;
  padding: 2rem;
  color: #fff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.18);
  color: #fff;
  padding: 0.35rem 0.8rem;
  font-size: 0.88rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero-content h1,
.hero-content h2 {
  max-width: 52rem;
  margin: 1rem 0 0.75rem;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 45rem;
  margin: 0 0 1.3rem;
  color: rgb(245 245 245 / 0.9);
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-search {
  display: flex;
  width: min(100%, 31rem);
  margin-top: 1rem;
  gap: 0.65rem;
}

.hero-search input {
  flex: 1;
  min-height: 3rem;
  border: 1px solid rgb(255 255 255 / 0.28);
  border-radius: 0.85rem;
  background: rgb(255 255 255 / 0.88);
  color: var(--neutral-900);
  padding: 0 1rem;
  outline: none;
}

.hero-controls {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-controls button {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.16);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-dots {
  position: absolute;
  left: 2rem;
  bottom: 1.35rem;
  display: flex;
  gap: 0.5rem;
}

.hero-dots button {
  width: 0.7rem;
  height: 0.7rem;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.45);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 1.8rem;
  background: #fff;
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.section-title h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-title p,
.page-title p {
  margin: 0.45rem 0 0;
  color: var(--neutral-600);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--sky-600);
  font-weight: 800;
}

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

.movie-card {
  display: block;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 0.95rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--neutral-200);
}

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

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

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.92);
  color: var(--sky-600);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
  font-size: 1.2rem;
  box-shadow: var(--shadow-lg);
}

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

.duration-badge,
.rank-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border-radius: 0.5rem;
  background: rgb(0 0 0 / 0.7);
  color: #fff;
  padding: 0.25rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 0.75rem;
  right: auto;
  background: linear-gradient(135deg, var(--amber-500), var(--sky-500));
}

.movie-card-body {
  padding: 1rem;
}

.card-topline,
.movie-meta,
.detail-meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.category-pill,
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--sky-50);
  color: var(--sky-700);
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.rating {
  color: var(--amber-500);
  font-size: 0.85rem;
  font-weight: 800;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 3rem;
  margin: 0.65rem 0 0.45rem;
  overflow: hidden;
  color: var(--neutral-900);
  font-size: 1.05rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card p {
  display: -webkit-box;
  min-height: 2.9rem;
  margin: 0 0 0.8rem;
  overflow: hidden;
  color: var(--neutral-600);
  font-size: 0.92rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta,
.detail-meta {
  color: var(--neutral-500);
  font-size: 0.83rem;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 1fr;
}

.feature-band {
  background: linear-gradient(135deg, var(--sky-50), var(--emerald-50));
}

.dark-band {
  background: var(--neutral-900);
  color: #fff;
}

.dark-band .movie-card {
  border-color: rgb(255 255 255 / 0.1);
}

.dark-band .section-title p {
  color: var(--neutral-300);
}

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

.category-card {
  display: block;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 9.5rem;
  overflow: hidden;
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card-body {
  padding: 1.2rem;
}

.category-card-body h2 {
  margin: 0 0 0.45rem;
  font-size: 1.25rem;
}

.category-card-body p {
  margin: 0 0 1rem;
  color: var(--neutral-600);
}

.category-card-body span {
  color: var(--sky-600);
  font-weight: 800;
}

.page-hero {
  padding: 3rem 0;
  background: linear-gradient(135deg, #fff, var(--sky-50));
}

.page-title {
  max-width: 52rem;
}

.filter-panel,
.search-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--neutral-200);
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.breadcrumb {
  margin-bottom: 1rem;
  color: var(--neutral-500);
  font-size: 0.9rem;
}

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

.detail-shell {
  padding: 2rem 0 4rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #000;
  box-shadow: var(--shadow-xl);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.62), rgb(0 0 0 / 0.24));
  color: #fff;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1rem;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.95);
  color: var(--sky-600);
}

.detail-card {
  border: 1px solid var(--neutral-200);
  border-radius: 1.15rem;
  background: #fff;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.detail-card h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.detail-card h2,
.article-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.45rem;
}

.detail-card p,
.article-card p {
  color: var(--neutral-700);
}

.detail-cover {
  overflow: hidden;
  border-radius: 1.1rem;
  background: var(--neutral-200);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.info-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--neutral-200);
  padding-bottom: 0.75rem;
}

.info-list dt {
  color: var(--neutral-500);
}

.info-list dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.article-card {
  border: 1px solid var(--neutral-200);
  border-radius: 1rem;
  background: #fff;
  padding: 1.25rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.rank-list {
  display: grid;
  gap: 1rem;
}

.site-footer {
  background: var(--neutral-900);
  color: var(--neutral-300);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.footer-main p {
  max-width: 32rem;
  color: var(--neutral-400);
}

.footer-brand {
  color: #fff;
  font-size: 1.25rem;
}

.site-footer h2 {
  margin: 0 0 0.85rem;
  color: #fff;
  font-size: 1.05rem;
}

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

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

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  color: var(--neutral-500);
  font-size: 0.9rem;
}

.footer-bottom p {
  margin: 0;
}

.empty-state {
  border: 1px solid var(--neutral-200);
  border-radius: 1rem;
  background: #fff;
  padding: 2rem;
  color: var(--neutral-600);
  text-align: center;
}

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

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

@media (min-width: 640px) {
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .horizontal-card {
    grid-template-columns: 18rem 1fr;
  }

  .horizontal-card .poster-wrap {
    aspect-ratio: auto;
    min-height: 12rem;
  }

  .filter-panel,
  .search-box {
    grid-template-columns: 1fr 12rem 12rem;
  }
}

@media (min-width: 768px) {
  .container-custom {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .header-inner {
    min-height: 5rem;
  }

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

  .hero-content {
    padding: 3rem;
  }

  .section-spacing {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

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

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

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

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

@media (min-width: 1024px) {
  .container-custom {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .desktop-nav,
  .desktop-search {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

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

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

  .detail-layout {
    grid-template-columns: minmax(0, 2fr) minmax(20rem, 0.9fr);
    align-items: start;
  }

  .detail-side {
    position: sticky;
    top: 6.5rem;
  }
}

@media (max-width: 639px) {
  .hero-search {
    flex-direction: column;
  }

  .hero-dots {
    left: 1rem;
  }

  .hero-controls {
    display: none;
  }

  .hero-content {
    padding: 1.25rem;
  }

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