:root {
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --blue-50: #eff6ff;
  --blue-500: #3b82f6;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --black: #000000;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 8px 20px rgba(17, 24, 39, 0.08);
  --shadow-md: 0 16px 38px rgba(17, 24, 39, 0.12);
  --shadow-xl: 0 30px 80px rgba(17, 24, 39, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(180deg, var(--gray-50), var(--white));
  color: var(--gray-900);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald-500), var(--blue-500));
  color: var(--white);
  font-size: 13px;
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--gray-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: var(--gray-700);
}

.mobile-menu {
  display: none;
  padding: 8px 16px 16px;
  border-top: 1px solid var(--gray-200);
}

.mobile-menu.is-open {
  display: grid;
  gap: 6px;
}

.mobile-link {
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--gray-700);
  font-weight: 650;
}

.mobile-link:hover,
.mobile-link.is-active {
  background: var(--gray-100);
  color: var(--emerald-600);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--gray-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-blur {
  position: absolute;
  inset: -30px;
  background-position: center;
  background-size: cover;
  filter: blur(22px) brightness(0.42);
  transform: scale(1.12);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.52) 46%, rgba(17, 24, 39, 0.12));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  padding-right: min(40vw, 430px);
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-meta span,
.type-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  padding: 6px 13px;
}

.hero-meta em {
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
  font-size: 14px;
}

.hero h1,
.hero h2 {
  max-width: 720px;
  margin: 0;
  color: var(--white);
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

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

.primary-button,
.ghost-button,
.section-more,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  padding: 14px 24px;
  background: var(--emerald-600);
  color: var(--white);
  box-shadow: 0 18px 38px rgba(5, 150, 105, 0.32);
}

.primary-button:hover {
  transform: translateY(-2px);
  background: var(--emerald-700);
}

.ghost-button {
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(14px);
}

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

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-arrow {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.26);
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--white);
}

.quick-search {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -44px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(18px);
}

.quick-search span {
  color: var(--emerald-600);
  font-size: 14px;
  font-weight: 800;
}

.quick-search strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(20px, 3vw, 32px);
  line-height: 1.18;
}

.quick-search form {
  display: flex;
  gap: 10px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: var(--white);
  color: var(--gray-900);
  outline: none;
}

.quick-search input {
  min-height: 50px;
  padding: 0 16px;
}

.quick-search button {
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  background: var(--emerald-600);
  color: var(--white);
  cursor: pointer;
}

.page-stack {
  padding: 72px 0;
}

.content-section + .content-section {
  margin-top: 72px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-line {
  height: 4px;
  flex: 1;
  min-width: 40px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald-500), rgba(16, 185, 129, 0));
}

.section-more {
  gap: 4px;
  color: var(--emerald-600);
  font-size: 15px;
}

.section-more:hover {
  color: var(--emerald-700);
}

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

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

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

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

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

.movie-card {
  min-width: 0;
}

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

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  background: var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.compact-card .poster-wrap {
  aspect-ratio: 16 / 10;
}

.poster-wrap img,
.horizontal-link img,
.category-card img,
.detail-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap img {
  transition: transform 0.45s ease;
}

.card-link:hover .poster-wrap {
  transform: translateY(-7px);
  box-shadow: var(--shadow-md);
}

.card-link:hover img {
  transform: scale(1.07);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.1) 58%, transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card-link:hover .poster-shade {
  opacity: 1;
}

.type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  font-size: 12px;
  backdrop-filter: blur(12px);
}

.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  place-items: center;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  color: var(--white);
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.poster-copy {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  color: var(--white);
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.card-link:hover .poster-copy {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  display: block;
  padding-top: 13px;
}

.card-body strong {
  display: block;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.card-link:hover .card-body strong,
.horizontal-link:hover strong {
  color: var(--emerald-600);
}

.card-body span {
  display: block;
  margin-top: 4px;
  color: var(--gray-500);
  font-size: 14px;
}

.soft-panel {
  padding: 36px;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--emerald-50), var(--blue-50));
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.08);
}

.horizontal-link {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 16px;
  height: 100%;
  padding: 14px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.horizontal-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.horizontal-link img {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
}

.horizontal-link strong,
.horizontal-link em,
.horizontal-link small {
  display: block;
}

.horizontal-link strong {
  font-size: 17px;
  font-style: normal;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.horizontal-link em {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 8px;
  color: var(--gray-600);
  font-size: 14px;
  font-style: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.horizontal-link small {
  margin-top: 10px;
  color: var(--gray-500);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.2), transparent 34%), linear-gradient(135deg, var(--gray-900), #0f172a);
  color: var(--white);
}

.small-hero {
  min-height: 300px;
  display: grid;
  align-items: center;
}

.ranking-hero {
  min-height: 360px;
  display: grid;
  align-items: center;
}

.page-hero p {
  margin: 0 0 10px;
  color: var(--emerald-100);
  font-weight: 800;
}

.page-hero h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero span {
  display: block;
  max-width: 760px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

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

.category-card a {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 250px;
  border-radius: 26px;
  background: var(--gray-900);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.category-card img {
  position: absolute;
  inset: 0;
  opacity: 0.46;
  filter: saturate(1.08);
}

.category-card span {
  position: absolute;
  inset: auto 22px 22px;
  color: var(--white);
}

.category-card strong,
.category-card em {
  display: block;
}

.category-card strong {
  font-size: 24px;
  line-height: 1.2;
}

.category-card em {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
  font-size: 14px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 1fr));
  gap: 14px;
  padding: 20px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 13px;
}

.filter-panel input:focus,
.filter-panel select:focus,
.quick-search input:focus {
  border-color: rgba(16, 185, 129, 0.72);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.empty-state {
  display: none;
  margin-top: 28px;
  padding: 32px;
  border-radius: 22px;
  background: var(--white);
  color: var(--gray-500);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

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

.filter-list {
  margin-top: 30px;
}

.detail-hero {
  position: relative;
  min-height: 430px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  color: var(--white);
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: -30px;
  background: inherit;
  filter: blur(22px) brightness(0.45);
  transform: scale(1.14);
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.98), rgba(17, 24, 39, 0.56), rgba(17, 24, 39, 0.18));
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 92px 0 58px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.breadcrumb em {
  font-style: normal;
}

.detail-hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.detail-hero p {
  max-width: 820px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 19px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  padding: 48px 0 76px;
}

.player-section,
.detail-text,
.related-section,
.detail-card {
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.player-section {
  overflow: hidden;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.player-frame video {
  width: 100%;
  height: 100%;
  background: var(--black);
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.28));
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: var(--emerald-600);
  color: var(--white);
  font-size: 28px;
  box-shadow: 0 18px 50px rgba(16, 185, 129, 0.34);
}

.player-cover strong {
  font-size: 20px;
}

.player-status {
  min-height: 26px;
  padding: 12px 18px;
  color: var(--gray-500);
  font-size: 14px;
}

.detail-card {
  grid-row: span 2;
  overflow: hidden;
}

.detail-card img {
  aspect-ratio: 3 / 4;
}

.detail-meta-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.detail-meta-list span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-100);
  padding-bottom: 10px;
}

.detail-meta-list strong {
  color: var(--gray-900);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 20px;
}

.tag-list span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  font-size: 13px;
  font-weight: 700;
}

.detail-text {
  padding: 28px;
}

.detail-text h2 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.25;
}

.detail-text p {
  margin: 0 0 24px;
  color: var(--gray-700);
  font-size: 16px;
}

.related-section {
  grid-column: 1 / -1;
  padding: 28px;
}

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

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 36px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}

.brand-footer {
  color: var(--white);
}

.footer-brand p,
.site-footer p {
  margin: 14px 0 0;
  color: var(--gray-400);
  font-size: 14px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 16px;
}

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

.site-footer a:hover {
  color: var(--emerald-100);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--gray-400);
  font-size: 14px;
  text-align: center;
}

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

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

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

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

  .detail-card {
    grid-row: auto;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .hero-content {
    padding-right: 0;
  }

  .quick-search,
  .filter-panel,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .quick-search form {
    flex-direction: column;
  }

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

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

  .soft-panel {
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .container,
  .nav-shell,
  .footer-shell,
  .footer-bottom,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    min-height: 560px;
  }

  .hero-controls {
    bottom: 18px;
  }

  .hero-arrow {
    width: 38px;
    height: 38px;
    font-size: 24px;
  }

  .quick-search {
    margin-top: -24px;
    padding: 18px;
  }

  .poster-grid,
  .compact-grid,
  .landscape-grid,
  .search-grid,
  .ranking-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-link {
    grid-template-columns: 104px 1fr;
  }

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

  .section-line {
    width: 100%;
    flex: none;
  }

  .page-stack {
    padding: 48px 0;
  }

  .detail-text,
  .related-section {
    padding: 22px;
  }
}
