:root {
  --primary-50: #e6f7f7;
  --primary-100: #b3e6e6;
  --primary-400: #1ab0b0;
  --primary-500: #009999;
  --primary-600: #007a7a;
  --primary-700: #005b5b;
  --secondary-50: #f0f4f8;
  --secondary-100: #d9e2ec;
  --secondary-200: #bcccdc;
  --secondary-300: #9fb3c8;
  --secondary-400: #829ab1;
  --secondary-500: #627d98;
  --secondary-600: #486581;
  --secondary-700: #334e68;
  --secondary-900: #102a43;
  --accent-500: #f97316;
  --white: #ffffff;
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px 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;
  min-height: 100vh;
  background: var(--secondary-50);
  color: var(--secondary-900);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.625;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.96);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  width: 2.65rem;
  height: 2.65rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  color: var(--white);
  font-weight: 800;
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08);
}

.brand-text {
  display: grid;
  gap: 0.05rem;
}

.brand-name {
  color: var(--secondary-900);
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-subtitle {
  color: var(--secondary-600);
  font-size: 0.76rem;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

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

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--primary-600);
}

.nav-search {
  display: inline-flex;
  width: 2.35rem;
  height: 2.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: var(--secondary-50);
}

.menu-button {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.75rem;
  background: var(--secondary-50);
  color: var(--secondary-900);
  cursor: pointer;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 32rem;
  overflow: hidden;
  background: var(--secondary-900);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--secondary-900), var(--primary-700));
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.88), rgb(0 0 0 / 0.5), rgb(0 0 0 / 0.08));
}

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

.hero-content {
  max-width: 48rem;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgb(0 153 153 / 0.9);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 7vw, 4.3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 42rem;
  margin: 0 0 1.35rem;
  color: var(--secondary-100);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
}

.hero-meta span,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
  color: var(--white);
  padding: 0.38rem 0.8rem;
  font-size: 0.88rem;
  backdrop-filter: blur(12px);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.7rem;
  padding: 0.78rem 1.45rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

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

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--primary-500);
  color: var(--white);
}

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

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

.btn-glass {
  background: rgb(255 255 255 / 0.14);
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.24);
  backdrop-filter: blur(16px);
}

.hero-dots {
  position: absolute;
  right: 2rem;
  bottom: 2rem;
  display: flex;
  gap: 0.55rem;
  z-index: 4;
}

.hero-dot {
  width: 0.78rem;
  height: 0.78rem;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.55);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}

.hero-dot.is-active {
  width: 2rem;
  background: var(--primary-500);
}

.section {
  padding: 4rem 0;
}

.section-white {
  background: var(--white);
}

.section-soft {
  background: linear-gradient(135deg, var(--primary-50), var(--secondary-100));
}

.section-dark {
  background: var(--secondary-900);
  color: var(--secondary-100);
}

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

.section-title {
  margin: 0 0 0.35rem;
  color: var(--secondary-900);
  font-size: clamp(1.65rem, 4vw, 2.3rem);
  line-height: 1.15;
}

.section-dark .section-title {
  color: var(--white);
}

.section-subtitle {
  margin: 0;
  color: var(--secondary-600);
}

.section-dark .section-subtitle {
  color: var(--secondary-300);
}

.more-link {
  color: var(--primary-600);
  font-weight: 800;
  white-space: nowrap;
}

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

.card {
  overflow: hidden;
  border-radius: 0.85rem;
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-xl);
}

.movie-card {
  display: grid;
  min-width: 0;
  color: inherit;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--secondary-900), var(--primary-700));
}

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 0.42);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.movie-card:hover .poster-mask {
  opacity: 1;
}

.play-mini {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.92);
  color: var(--primary-600);
  font-weight: 900;
  transform: scale(0.88);
  transition: transform 0.3s ease;
}

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

.badge {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 2;
  border-radius: 999px;
  background: rgb(0 153 153 / 0.92);
  color: var(--white);
  padding: 0.28rem 0.68rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.score {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  border-radius: 0.65rem;
  background: rgb(0 0 0 / 0.72);
  color: #fff7ed;
  padding: 0.28rem 0.62rem;
  font-size: 0.88rem;
  font-weight: 900;
}

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

.movie-card h3 {
  margin: 0 0 0.5rem;
  color: var(--secondary-900);
  font-size: 1.08rem;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--primary-600);
}

.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.card-desc {
  min-height: 3.1rem;
  margin: 0 0 0.85rem;
  color: var(--secondary-600);
  font-size: 0.93rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--secondary-500);
  font-size: 0.83rem;
}

.card-meta span {
  border-radius: 999px;
  background: var(--secondary-50);
  padding: 0.18rem 0.52rem;
}

.horizontal-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0.2rem 0 1rem;
  scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.horizontal-scroll .movie-card {
  flex: 0 0 20rem;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 12rem;
  border-radius: 1rem;
  padding: 1.2rem;
  background: linear-gradient(135deg, var(--secondary-900), var(--primary-700));
  color: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-xl);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
}

.category-card p {
  margin: 0 0 1rem;
  color: var(--secondary-100);
}

.category-card .category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.category-card .category-samples span {
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
  padding: 0.25rem 0.6rem;
  color: var(--white);
  font-size: 0.82rem;
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  border-radius: 0.9rem;
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: 0.8rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-row:hover {
  transform: translateY(-0.15rem);
  box-shadow: var(--shadow-xl);
}

.rank-number {
  display: inline-flex;
  width: 2.8rem;
  height: 2.8rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: var(--secondary-900);
  color: var(--white);
  font-weight: 900;
}

.rank-main {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  min-width: 0;
  align-items: center;
}

.rank-main img {
  width: 6.5rem;
  aspect-ratio: 16 / 9;
  border-radius: 0.65rem;
  object-fit: cover;
  background: linear-gradient(135deg, var(--secondary-900), var(--primary-700));
}

.rank-main h2,
.rank-main h3 {
  margin: 0 0 0.2rem;
  color: var(--secondary-900);
  font-size: 1.05rem;
  line-height: 1.35;
}

.rank-main p {
  margin: 0;
  color: var(--secondary-600);
  font-size: 0.9rem;
}

.rank-score {
  color: var(--primary-600);
  font-size: 1.25rem;
  font-weight: 900;
  white-space: nowrap;
}

.page-hero {
  padding: 4.5rem 0;
  background: linear-gradient(135deg, var(--secondary-900), var(--primary-700));
  color: var(--white);
}

.page-hero h1 {
  max-width: 55rem;
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 48rem;
  margin: 0;
  color: var(--secondary-100);
  font-size: 1.05rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: var(--secondary-200);
  font-size: 0.9rem;
}

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

.filter-bar,
.search-panel {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
  border-radius: 1rem;
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: 1rem;
}

.search-input {
  width: 100%;
  border: 1px solid var(--secondary-200);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  color: var(--secondary-900);
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgb(0 153 153 / 0.14);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-chip {
  border: 1px solid var(--secondary-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--secondary-700);
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  border-color: var(--primary-500);
  background: var(--primary-50);
  color: var(--primary-700);
}

.empty-message {
  display: none;
  border-radius: 1rem;
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  color: var(--secondary-600);
  text-align: center;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.player-section {
  background: var(--secondary-900);
  padding: 2.5rem 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: #000;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.35);
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: #000;
  color: var(--white);
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 3;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.72), rgb(0 0 0 / 0.2));
}

.play-button-large {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: 5.2rem;
  height: 5.2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.92);
  color: var(--primary-600);
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 20px 45px rgb(0 0 0 / 0.35);
}

.detail-main {
  background: var(--white);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  padding: 1.35rem;
}

.detail-main h1 {
  margin: 0 0 0.65rem;
  color: var(--secondary-900);
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.15;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0 1.2rem;
}

.detail-meta span,
.tag {
  display: inline-flex;
  border-radius: 999px;
  background: var(--secondary-50);
  color: var(--secondary-700);
  padding: 0.3rem 0.68rem;
  font-size: 0.86rem;
  font-weight: 700;
}

.detail-section {
  margin-top: 1.4rem;
}

.detail-section h2 {
  margin: 0 0 0.7rem;
  color: var(--secondary-900);
  font-size: 1.35rem;
}

.detail-section p {
  margin: 0;
  color: var(--secondary-700);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-footer {
  margin-top: 5rem;
  background: var(--secondary-900);
  color: var(--secondary-100);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  padding: 3rem 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo .brand-mark {
  flex: 0 0 auto;
}

.footer-logo strong {
  display: block;
  color: var(--white);
  font-size: 1.1rem;
}

.footer-logo span:last-child {
  color: var(--secondary-400);
  font-size: 0.85rem;
}

.footer-col p,
.footer-col a {
  color: var(--secondary-400);
  font-size: 0.92rem;
}

.footer-col h3 {
  margin: 0 0 1rem;
  color: var(--white);
  font-size: 1rem;
}

.footer-links {
  display: grid;
  gap: 0.5rem;
}

.footer-links a:hover {
  color: var(--primary-400);
}

.footer-bottom {
  border-top: 1px solid rgb(255 255 255 / 0.12);
  padding: 1rem 0;
  color: var(--secondary-400);
  font-size: 0.88rem;
}

@media (min-width: 640px) {
  .container-custom {
    padding: 0 1.5rem;
  }

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

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

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

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

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

  .detail-layout {
    grid-template-columns: minmax(0, 2fr) minmax(19rem, 0.85fr);
  }
}

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

@media (max-width: 840px) {
  .menu-button {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.4rem);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    border-radius: 1rem;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    padding: 0.8rem;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    border-radius: 0.75rem;
    padding: 0.7rem 0.85rem;
  }

  .nav-links a:hover {
    background: var(--secondary-50);
  }

  .hero {
    height: 78vh;
    min-height: 34rem;
  }

  .hero-dots {
    right: auto;
    left: 1rem;
    bottom: 1.2rem;
  }

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

  .rank-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 2;
  }

  .rank-main {
    grid-template-columns: 5.2rem minmax(0, 1fr);
  }

  .rank-main img {
    width: 5.2rem;
  }

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

@media (max-width: 520px) {
  .brand-name {
    font-size: 1rem;
  }

  .brand-subtitle {
    display: none;
  }

  .hero h1,
  .hero h2 {
    font-size: 2.25rem;
  }

  .btn-row {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-row .btn {
    width: 100%;
  }

  .horizontal-scroll .movie-card {
    flex-basis: 82vw;
  }
}
