:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-400: #a8a29e;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --bluestone-50: #f8fafc;
  --bluestone-100: #f1f5f9;
  --bluestone-600: #475569;
  --bluestone-700: #334155;
  --bluestone-800: #1e293b;
  --bluestone-900: #0f172a;
  --accent-50: #fef3c7;
  --accent-100: #fde68a;
  --accent-400: #f59e0b;
  --accent-500: #d97706;
  --accent-600: #b45309;
  --earth-50: #fdf8f6;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, .18), 0 10px 10px -5px rgba(15, 23, 42, .08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--stone-50);
  color: var(--stone-700);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 8px rgba(15, 23, 42, .08);
}

.site-header-inner,
.footer-inner,
.page-container,
.hero-content-inner {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--bluestone-900);
  font-size: 1.24rem;
  font-weight: 800;
  white-space: nowrap;
}

.site-logo:hover {
  color: var(--accent-600);
}

.site-logo-mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: .65rem;
  background: linear-gradient(135deg, var(--accent-500), var(--accent-400));
  color: #fff;
  font-size: .85rem;
  box-shadow: 0 10px 18px rgba(217, 119, 6, .25);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.55rem;
  color: var(--bluestone-700);
  font-weight: 650;
}

.site-nav a,
.mobile-menu a,
.site-footer a {
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.site-nav a:hover,
.mobile-menu a:hover {
  color: var(--accent-600);
}

.site-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

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

.site-search-form input,
.filter-input,
.filter-select {
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  background: var(--stone-100);
  color: var(--bluestone-900);
  outline: none;
  transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.site-search-form input {
  width: 15rem;
  padding: .62rem 1rem;
}

.site-search-form button,
.primary-button,
.secondary-button,
.filter-chip,
.player-start {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
}

.site-search-form button,
.primary-button,
.player-start {
  background: var(--accent-500);
  color: #fff;
  box-shadow: 0 10px 20px rgba(217, 119, 6, .22);
}

.site-search-form button {
  padding: .62rem 1rem;
}

.site-search-form input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--accent-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, .14);
}

.site-search-form button:hover,
.primary-button:hover,
.player-start:hover {
  background: var(--accent-600);
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  border: 0;
  background: transparent;
  color: var(--bluestone-700);
  font-size: 1.55rem;
}

.mobile-menu {
  border-top: 1px solid var(--stone-200);
  padding: 1rem;
  background: #fff;
}

.mobile-menu nav {
  display: grid;
  gap: .55rem;
  margin-top: 1rem;
}

.mobile-menu a {
  display: block;
  padding: .65rem .25rem;
  color: var(--bluestone-700);
  font-weight: 700;
}

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

.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-bg,
.hero-bg img,
.hero-bg::after {
  position: absolute;
  inset: 0;
}

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

.hero-bg::after {
  content: "";
  background: linear-gradient(90deg, rgba(0, 0, 0, .82), rgba(0, 0, 0, .54) 48%, rgba(0, 0, 0, .12));
}

.hero-content-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 44rem;
  color: #fff;
}

.hero-eyebrow,
.section-kicker,
.detail-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--accent-400);
  font-weight: 800;
  letter-spacing: .02em;
}

.hero-copy h1,
.hero-copy h2 {
  margin: .85rem 0 1rem;
  color: #fff;
  font-size: clamp(2.45rem, 6vw, 4.9rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -.05em;
}

.hero-copy p {
  max-width: 42rem;
  color: rgba(245, 245, 244, .9);
  font-size: 1.1rem;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem 1rem;
}

.hero-meta {
  margin: 1.35rem 0;
  color: rgba(245, 245, 244, .82);
}

.hero-dot-text {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.hero-dot-text::before {
  content: "";
  width: .5rem;
  height: .5rem;
  border-radius: 999px;
  background: var(--accent-400);
}

.hero-tags,
.movie-genres,
.detail-tags,
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.hero-tags {
  margin: 1.55rem 0 2rem;
}

.hero-tags span {
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  padding: .45rem .8rem;
  backdrop-filter: blur(12px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .85rem 1.35rem;
}

.secondary-button {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  backdrop-filter: blur(12px);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 1.35rem;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-control:hover {
  background: rgba(255, 255, 255, .22);
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  bottom: 2rem;
  left: 50%;
  display: flex;
  gap: .5rem;
  transform: translateX(-50%);
}

.hero-dot {
  width: .55rem;
  height: .55rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .52);
  transition: width .25s ease, background .25s ease;
}

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

.page-container {
  padding: 4rem 0;
}

.page-stack {
  display: grid;
  gap: 5rem;
}

.section-header,
.list-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-title {
  margin: .25rem 0 0;
  color: var(--bluestone-900);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -.03em;
}

.section-subtitle,
.page-lede {
  margin: .65rem 0 0;
  color: var(--stone-600);
  line-height: 1.75;
}

.section-link {
  display: inline-flex;
  align-items: center;
  color: var(--accent-600);
  font-weight: 800;
  white-space: nowrap;
}

.section-link:hover {
  color: var(--bluestone-900);
}

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

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

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
}

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

.movie-cover {
  position: relative;
  height: 17rem;
  overflow: hidden;
  background: var(--stone-200);
}

.movie-cover.large {
  height: 20rem;
}

.movie-cover.compact {
  height: 13rem;
}

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

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

.movie-cover-shade {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, .06), rgba(0, 0, 0, .68));
  opacity: 0;
  transition: opacity .25s ease;
}

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

.play-pill {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  background: rgba(217, 119, 6, .9);
  color: #fff;
  font-size: 1.4rem;
  transform: scale(.85);
  transition: transform .25s ease;
}

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

.movie-rating,
.movie-duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: .55rem;
  background: rgba(0, 0, 0, .68);
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.movie-rating {
  top: .65rem;
  right: .65rem;
  padding: .28rem .55rem;
  color: var(--accent-400);
}

.movie-duration {
  right: .65rem;
  bottom: .65rem;
  padding: .28rem .55rem;
}

.rank-badge {
  left: .65rem;
  top: .65rem;
  min-width: 2rem;
  padding: .28rem .5rem;
  text-align: center;
  background: linear-gradient(135deg, var(--accent-500), var(--accent-400));
}

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

.movie-card-body h2,
.movie-card-body h3 {
  margin: 0 0 .55rem;
  overflow: hidden;
  color: var(--bluestone-900);
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color .2s ease;
}

.movie-card-link:hover .movie-card-body h2,
.movie-card-link:hover .movie-card-body h3 {
  color: var(--accent-600);
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 3rem;
  margin: 0 0 .9rem;
  overflow: hidden;
  color: var(--stone-600);
  font-size: .92rem;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card-meta {
  justify-content: space-between;
  color: var(--stone-500);
  font-size: .78rem;
}

.movie-card-meta span:first-child {
  border-radius: .4rem;
  background: var(--stone-100);
  padding: .22rem .45rem;
}

.movie-genres {
  margin-top: .85rem;
}

.movie-genres span,
.detail-tags span,
.category-tags span,
.filter-chip {
  border-radius: 999px;
  background: var(--accent-50);
  color: var(--accent-600);
  padding: .24rem .55rem;
  font-size: .78rem;
  font-weight: 750;
}

.feature-panel {
  border-radius: 1.5rem;
  background: linear-gradient(135deg, var(--accent-50), var(--earth-50));
  padding: clamp(1.5rem, 4vw, 3rem);
}

.bluestone-panel {
  border-radius: 1.5rem;
  background: var(--bluestone-50);
  padding: clamp(1.5rem, 4vw, 3rem);
}

.latest-list,
.ranking-list,
.related-list {
  display: grid;
  gap: 1rem;
}

.latest-item,
.ranking-item {
  display: grid;
  grid-template-columns: 14rem 1fr;
  overflow: hidden;
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
}

.latest-item:hover,
.ranking-item:hover {
  transform: translateY(-.2rem);
  box-shadow: var(--shadow-xl);
}

.latest-item img,
.ranking-item img {
  width: 100%;
  height: 100%;
  min-height: 10.5rem;
  object-fit: cover;
}

.latest-body,
.ranking-body {
  padding: 1.4rem;
}

.latest-body h2,
.ranking-body h2 {
  margin: 0 0 .45rem;
  color: var(--bluestone-900);
  font-size: 1.2rem;
  font-weight: 900;
}

.latest-body p,
.ranking-body p {
  display: -webkit-box;
  margin: 0 0 1rem;
  overflow: hidden;
  color: var(--stone-600);
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ranking-number {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-right: .7rem;
  border-radius: .7rem;
  background: linear-gradient(135deg, var(--accent-500), var(--accent-400));
  color: #fff;
  font-weight: 900;
}

.page-hero {
  background: linear-gradient(135deg, var(--bluestone-700), var(--bluestone-900));
  color: #fff;
  padding: 4rem 0;
}

.page-hero h1 {
  margin: 0 0 .75rem;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -.04em;
}

.page-hero p {
  max-width: 48rem;
  margin: 0;
  color: rgba(226, 232, 240, .9);
  font-size: 1.08rem;
  line-height: 1.8;
}

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

.category-card {
  display: block;
  border-radius: 1.2rem;
  background: #fff;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
}

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

.category-card h2 {
  margin: 0 0 .65rem;
  color: var(--bluestone-900);
  font-size: 1.45rem;
  font-weight: 900;
}

.category-card p {
  margin: 0 0 1rem;
  color: var(--stone-600);
  line-height: 1.75;
}

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

.category-preview img {
  width: 100%;
  height: 5.4rem;
  border-radius: .65rem;
  object-fit: cover;
}

.filter-panel {
  margin-bottom: 2rem;
  border-radius: 1rem;
  background: #fff;
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.filter-input {
  min-width: min(22rem, 100%);
  padding: .8rem 1rem;
}

.filter-select {
  padding: .8rem 1rem;
}

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

.filter-chip {
  border: 0;
}

.filter-chip.is-active,
.filter-chip:hover {
  background: var(--accent-500);
  color: #fff;
}

.empty-state {
  display: none;
  border-radius: 1rem;
  background: #fff;
  padding: 4rem 1rem;
  text-align: center;
  color: var(--stone-600);
  box-shadow: var(--shadow-card);
}

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

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

.detail-main,
.detail-side {
  display: grid;
  align-content: start;
  gap: 1.5rem;
}

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

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.hls-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, .18), rgba(15, 23, 42, .72));
}

.player-overlay.is-hidden {
  display: none;
}

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

.content-card {
  border-radius: 1rem;
  background: #fff;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow-card);
}

.content-card h1 {
  margin: 0 0 1rem;
  color: var(--bluestone-900);
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -.04em;
}

.content-card h2 {
  margin: 0 0 .85rem;
  color: var(--bluestone-900);
  font-size: 1.35rem;
  font-weight: 900;
}

.content-card p {
  margin: 0;
  color: var(--stone-700);
  line-height: 1.9;
}

.detail-meta {
  margin: 1rem 0 1.2rem;
  color: var(--stone-600);
}

.detail-meta span {
  border-radius: .5rem;
  background: var(--stone-100);
  padding: .38rem .62rem;
}

.detail-tags {
  margin-top: 1.1rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1rem;
  color: var(--stone-500);
  font-size: .9rem;
}

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

.related-card {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: .8rem;
  align-items: center;
}

.related-card img {
  width: 8rem;
  height: 5.4rem;
  border-radius: .65rem;
  object-fit: cover;
}

.related-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--bluestone-900);
  font-size: .98rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-card span {
  display: block;
  margin-top: .35rem;
  color: var(--stone-500);
  font-size: .8rem;
}

.compact-movie {
  display: grid;
  grid-template-columns: auto 5.5rem 1fr;
  gap: .8rem;
  align-items: center;
  border-radius: .9rem;
  background: #fff;
  padding: .75rem;
  box-shadow: var(--shadow-card);
}

.compact-movie:hover strong {
  color: var(--accent-600);
}

.compact-movie img {
  width: 5.5rem;
  height: 4rem;
  border-radius: .55rem;
  object-fit: cover;
}

.compact-rank {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: .65rem;
  background: var(--accent-50);
  color: var(--accent-600);
  font-weight: 900;
}

.compact-info strong,
.compact-info em {
  display: block;
}

.compact-info strong {
  overflow: hidden;
  color: var(--bluestone-900);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-info em {
  margin-top: .25rem;
  color: var(--stone-500);
  font-size: .8rem;
  font-style: normal;
}

.site-footer {
  margin-top: 5rem;
  background: var(--bluestone-900);
  color: var(--stone-200);
}

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

.footer-logo {
  color: #fff;
  margin-bottom: 1rem;
}

.site-footer p {
  max-width: 30rem;
  color: var(--stone-400);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 1rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}

.site-footer a:not(.site-logo) {
  display: block;
  margin: .55rem 0;
  color: var(--stone-400);
  font-size: .95rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding: 1rem;
  color: var(--stone-400);
  text-align: center;
  font-size: .9rem;
}

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

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

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

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

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

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

@media (max-width: 760px) {
  .site-search-form:not(.mobile-search) {
    display: none;
  }

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

  .hero-control {
    display: none;
  }

  .section-header,
  .list-header,
  .filter-row {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .movie-cover {
    height: 13.5rem;
  }

  .movie-cover.large {
    height: 15rem;
  }

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

  .latest-item img,
  .ranking-item img {
    height: 14rem;
  }

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

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

@media (max-width: 480px) {
  .site-header-inner,
  .footer-inner,
  .page-container,
  .hero-content-inner {
    width: min(100% - 1.25rem, 1280px);
  }

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

  .related-card {
    grid-template-columns: 6.5rem 1fr;
  }

  .related-card img {
    width: 6.5rem;
  }
}
