* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(93, 119, 255, 0.55) rgba(10, 13, 36, 0.55);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #f3f4f6;
  background: linear-gradient(180deg, #0a0d24 0%, #171739 52%, #0a0d24 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 13, 36, 0.55);
}

::-webkit-scrollbar-thumb {
  background: rgba(93, 119, 255, 0.55);
  border-radius: 999px;
}

.site-body {
  overflow-x: hidden;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 13, 36, 0.72);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #9d8df9, #7d9aff);
  box-shadow: 0 0 28px rgba(93, 119, 255, 0.45);
}

.logo-text {
  background: linear-gradient(90deg, #9d8df9, #7d9aff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 12px rgba(93, 119, 255, 0.5);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #d1d5db;
  font-size: 15px;
}

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

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: #9d8df9;
}

.header-search {
  position: relative;
  width: min(260px, 26vw);
}

.header-search input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 11px 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.header-search input:focus {
  border-color: #9d8df9;
  background: rgba(255, 255, 255, 0.12);
}

.menu-toggle {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 0 0 18px;
  color: #d1d5db;
}

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

.page-main {
  padding: 34px 0 64px;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  margin-bottom: 54px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.34);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 22%, rgba(125, 154, 255, 0.28), transparent 32%),
    linear-gradient(90deg, rgba(10, 13, 36, 0.96) 0%, rgba(10, 13, 36, 0.72) 43%, rgba(10, 13, 36, 0.18) 100%),
    linear-gradient(0deg, rgba(10, 13, 36, 0.92) 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, 88%);
  padding: 72px 0 0 58px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #c4b5fd;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.hero-content h1 {
  max-width: 780px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
  text-shadow: 0 0 26px rgba(93, 119, 255, 0.32);
}

.hero-content h2 {
  margin-top: 18px;
  font-size: clamp(26px, 3.5vw, 46px);
  color: #ffffff;
}

.hero-desc {
  max-width: 640px;
  margin: 18px 0 0;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.82;
}

.hero-meta,
.card-meta,
.detail-meta,
.tag-list,
.filter-bar,
.quick-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin-top: 22px;
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.1);
}

.pill {
  padding: 7px 12px;
  font-size: 13px;
}

.tag {
  padding: 6px 10px;
  font-size: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #9d8df9, #6d3eed);
  box-shadow: 0 14px 38px rgba(109, 62, 237, 0.35);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
}

.hero-thumbs {
  position: absolute;
  right: 26px;
  bottom: 26px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(5, minmax(74px, 94px));
  gap: 12px;
}

.hero-thumb {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  overflow: hidden;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  opacity: 0.62;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.hero-thumb:hover,
.hero-thumb.is-active {
  opacity: 1;
  border-color: #9d8df9;
  transform: translateY(-3px);
}

.hero-thumb img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  left: 58px;
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.circle-btn {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.section {
  margin-top: 48px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-subtitle {
  margin: 8px 0 0;
  color: #9ca3af;
  line-height: 1.75;
}

.link-more {
  color: #c4b5fd;
  font-weight: 700;
  white-space: nowrap;
}

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

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

.movie-card,
.category-card,
.info-panel,
.player-shell,
.search-panel {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(157, 141, 249, 0.62);
  transform: translateY(-6px) scale(1.012);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.36);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(10, 13, 36, 0.92), transparent);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  min-width: 38px;
  border-radius: 999px;
  padding: 7px 10px;
  text-align: center;
  font-weight: 900;
  color: #fff;
  background: rgba(109, 62, 237, 0.9);
}

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

.movie-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-desc {
  min-height: 48px;
  margin: 10px 0 14px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.7;
}

.card-meta {
  color: #9ca3af;
  font-size: 12px;
}

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

.category-card {
  min-height: 178px;
  border-radius: 22px;
  padding: 22px;
  overflow: hidden;
  position: relative;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -44px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(157, 141, 249, 0.35), transparent 68%);
}

.category-card:hover {
  border-color: rgba(157, 141, 249, 0.62);
  transform: translateY(-5px);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin: 24px 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
}

.filter-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 13px 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.filter-input:focus {
  border-color: #9d8df9;
}

.filter-chip {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 8px 13px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
  border-color: rgba(157, 141, 249, 0.82);
  background: rgba(109, 62, 237, 0.32);
}

.hidden-card {
  display: none !important;
}

.empty-state {
  display: none;
  margin-top: 20px;
  color: #cbd5e1;
  text-align: center;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #a5b4fc;
  font-size: 14px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.3);
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.48) saturate(1.1);
}

.play-button {
  position: relative;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 30px;
  background: linear-gradient(135deg, #9d8df9, #6d3eed);
  box-shadow: 0 18px 48px rgba(109, 62, 237, 0.45);
  cursor: pointer;
}

.detail-panel {
  border-radius: 26px;
  padding: 24px;
}

.detail-panel h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12;
}

.detail-meta {
  margin: 18px 0;
}

.detail-lead {
  color: #d1d5db;
  font-size: 17px;
  line-height: 1.86;
}

.content-section {
  margin-top: 28px;
  border-radius: 24px;
  padding: 26px;
}

.content-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-section p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.92;
}

.quick-links {
  margin-top: 22px;
}

.search-panel {
  border-radius: 26px;
  padding: 24px;
}

.search-results {
  margin-top: 24px;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 13, 36, 0.62);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
  padding: 40px 0;
  color: #cbd5e1;
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-inner p,
.footer-inner a {
  color: #9ca3af;
  line-height: 1.8;
}

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

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

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

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

  .hero-thumbs {
    grid-template-columns: repeat(5, 68px);
  }

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

@media (max-width: 820px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

  .page-main {
    padding-top: 22px;
  }

  .hero-carousel {
    min-height: 660px;
    border-radius: 22px;
  }

  .hero-content {
    width: 100%;
    padding: 42px 22px 0;
  }

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

  .hero-thumbs {
    left: 18px;
    right: 18px;
    bottom: 20px;
    grid-template-columns: repeat(5, 1fr);
  }

  .hero-controls {
    left: 22px;
    bottom: 112px;
  }

  .section-head {
    display: block;
  }

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

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

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

@media (max-width: 520px) {
  .site-shell {
    width: min(100% - 22px, 1180px);
  }

  .logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
  }

  .hero-carousel {
    min-height: 620px;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-content h2 {
    font-size: 26px;
  }

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

  .hero-thumbs {
    grid-template-columns: repeat(5, 54px);
  }
}
