:root {
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 24px 55px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--gray-50), #ffffff 48%, var(--gray-50));
  line-height: 1.5;
}

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

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

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gray-200);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(5, 150, 105, 0.28);
}

.brand-title {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.1;
  white-space: nowrap;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--gray-500);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 600;
  color: var(--gray-700);
}

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

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--gray-700);
  background: transparent;
}

.menu-button:hover {
  background: var(--gray-100);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--gray-200);
  padding: 14px 16px 18px;
  background: #ffffff;
}

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--gray-700);
  font-weight: 600;
}

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

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 500px;
  max-height: 780px;
  overflow: hidden;
  background: #000000;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.52) 42%, rgba(0, 0, 0, 0.12));
}

.hero-content-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 720px;
  color: #ffffff;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--emerald-500);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.badge.soft {
  background: var(--emerald-100);
  color: var(--emerald-700);
}

.hero-title {
  margin: 18px 0 14px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.hero-text {
  margin: 0 0 30px;
  max-width: 660px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2vw, 22px);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #ffffff;
  background: var(--emerald-600);
  box-shadow: 0 18px 30px rgba(5, 150, 105, 0.28);
}

.btn-primary:hover {
  background: var(--emerald-700);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.04);
}

.slider-arrow.prev {
  left: 18px;
  transform: translateY(-50%);
}

.slider-arrow.next {
  right: 18px;
  transform: translateY(-50%);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: #ffffff;
}

.main-shell {
  padding: 64px 0 80px;
}

.section {
  margin-bottom: 76px;
}

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

.heading-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.heading-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--emerald-600);
  background: var(--emerald-50);
  font-weight: 900;
}

.section h2,
.page-hero h1,
.detail-title {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--gray-900);
}

.section-lead,
.page-lead {
  margin: 10px 0 0;
  color: var(--gray-600);
  font-size: 16px;
}

.scroll-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 3px 2px 18px;
  scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
  flex: 0 0 292px;
  scroll-snap-align: start;
}

.scroll-row::-webkit-scrollbar {
  height: 8px;
}

.scroll-row::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 999px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-card-link {
  display: block;
  height: 100%;
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-100);
}

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

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

.card-year {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.card-body {
  padding: 18px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--gray-500);
  font-size: 12px;
}

.card-title {
  margin: 0 0 8px;
  color: var(--gray-900);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: var(--emerald-600);
}

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

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

.movie-card.large .card-body {
  padding: 22px;
}

.movie-card.large .card-title {
  font-size: 23px;
}

.movie-card.horizontal .movie-card-link {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.movie-card.horizontal .card-cover {
  aspect-ratio: auto;
  height: 118px;
}

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

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

.category-card {
  min-height: 180px;
  padding: 24px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--emerald-100);
  box-shadow: var(--shadow-md);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 900;
  color: var(--gray-900);
}

.category-card p {
  margin: 0 0 18px;
  color: var(--gray-600);
  line-height: 1.65;
}

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

.page-hero {
  padding: 52px 0 26px;
}

.page-hero-card {
  padding: 38px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, var(--emerald-50));
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.catalog-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 24px 0 32px;
}

.search-box {
  flex: 1 1 280px;
  position: relative;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: #ffffff;
  color: var(--gray-900);
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--gray-700);
  background: #ffffff;
  border: 1px solid var(--gray-200);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.filter-button:hover,
.filter-button.is-active {
  color: #ffffff;
  background: var(--emerald-600);
  border-color: var(--emerald-600);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 68px 148px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.rank-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--emerald-700);
  background: var(--emerald-50);
  font-size: 20px;
  font-weight: 900;
}

.ranking-cover {
  height: 84px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--gray-100);
}

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

.ranking-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 900;
  color: var(--gray-900);
}

.ranking-text {
  margin: 0;
  color: var(--gray-600);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-player-wrap {
  background: #000000;
}

.detail-player-inner {
  width: min(100%, 1280px);
  margin: 0 auto;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
  overflow: hidden;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 26px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.72));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-panel {
  text-align: center;
  color: #ffffff;
}

.player-start {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  color: #ffffff;
  background: var(--emerald-600);
  box-shadow: 0 18px 45px rgba(5, 150, 105, 0.42);
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-start:hover {
  transform: scale(1.05);
  background: var(--emerald-700);
}

.player-panel h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
}

.player-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
}

.detail-shell {
  padding: 34px 0 76px;
}

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

.breadcrumb a:hover {
  color: var(--emerald-600);
}

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

.detail-card,
.side-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.detail-card {
  padding: 32px;
}

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

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--gray-600);
  background: var(--gray-50);
  font-size: 14px;
  font-weight: 700;
}

.meta-pill.primary {
  color: var(--emerald-700);
  background: var(--emerald-100);
}

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

.detail-section {
  margin-top: 28px;
}

.detail-section h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 900;
}

.detail-section p {
  margin: 0 0 14px;
  color: var(--gray-700);
  font-size: 16px;
  line-height: 1.85;
}

.review-box {
  padding: 22px;
  border-left: 5px solid var(--emerald-500);
  border-radius: 14px;
  background: var(--gray-50);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tag-list span {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-size: 13px;
  font-weight: 700;
}

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

.side-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 900;
}

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

.site-footer {
  background: var(--gray-900);
  color: #d1d5db;
}

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

.footer-title {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.footer-text {
  margin: 0;
  max-width: 560px;
  color: #9ca3af;
  line-height: 1.75;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 16px;
}

.footer-links a {
  color: #9ca3af;
  font-size: 14px;
}

.footer-links a:hover {
  color: #34d399;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding: 18px 0;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}

.empty-state {
  display: none;
  padding: 48px;
  text-align: center;
  color: var(--gray-500);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.empty-state.is-visible {
  display: block;
}

.hidden-by-filter {
  display: none !important;
}

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

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

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

  .side-card {
    position: static;
  }
}

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

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

  .hero-slider {
    height: 62vh;
    min-height: 460px;
  }

  .slider-arrow {
    display: none;
  }

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

  .ranking-item {
    grid-template-columns: 48px 110px minmax(0, 1fr);
  }

  .ranking-item .btn {
    display: none;
  }

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

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .brand-subtitle {
    display: none;
  }

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

  .hero-content {
    padding-right: 10px;
  }

  .hero-title {
    font-size: 38px;
  }

  .hero-text {
    font-size: 16px;
  }

  .main-shell {
    padding: 42px 0 60px;
  }

  .section {
    margin-bottom: 54px;
  }

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

  .movie-grid,
  .movie-grid.two-up,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.horizontal .movie-card-link {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .movie-card.horizontal .card-cover {
    height: 110px;
  }

  .movie-card.horizontal .card-body {
    padding: 12px 12px 12px 0;
  }

  .page-hero-card,
  .detail-card {
    padding: 24px;
  }

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

  .ranking-cover {
    display: none;
  }

  .rank-number {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}
