:root {
  --brand: #d97706;
  --brand-dark: #b45309;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #fff7ed;
  --line: #e5e7eb;
}

body {
  min-width: 320px;
}

.site-header {
  backdrop-filter: blur(12px);
}

.brand {
  min-width: 0;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #f97316);
  box-shadow: 0 10px 28px rgba(217, 119, 6, .24);
  font-size: .8rem;
  padding-left: 2px;
}

.brand-name {
  white-space: nowrap;
}

.nav-link {
  color: #374151;
  font-weight: 600;
  transition: color .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: .75rem 1rem 1rem;
}

.mobile-nav.open {
  display: grid;
  gap: .65rem;
}

.mobile-nav .nav-link {
  display: block;
  padding: .65rem .4rem;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: #78350f;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .55fr);
  gap: 3rem;
  align-items: center;
  max-width: 80rem;
  margin: 0 auto;
  padding: 5rem 2rem 6rem;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .65s ease, transform .65s ease;
}

.hero-slide.active {
  position: relative;
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-content {
  max-width: 48rem;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #ffedd5;
  padding: .45rem .8rem;
  font-size: .92rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -.04em;
  margin-bottom: 1rem;
}

.hero-content p {
  color: rgba(255, 255, 255, .9);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.9;
  margin-bottom: 2rem;
}

.hero-actions,
.search-banner-form,
.filter-row,
.filter-chips,
.detail-meta,
.detail-tags,
.card-tags,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  align-items: center;
}

.btn-primary,
.btn-ghost,
.search-banner button,
.category-block-head a,
.section-heading a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.btn-primary {
  min-height: 3rem;
  padding: .75rem 1.3rem;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 14px 34px rgba(217, 119, 6, .32);
}

.btn-primary:hover,
.search-banner button:hover,
.category-block-head a:hover,
.section-heading a:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(217, 119, 6, .28);
}

.btn-ghost {
  min-height: 3rem;
  padding: .75rem 1.3rem;
  color: #fff7ed;
  border: 1px solid rgba(255, 255, 255, .36);
  background: rgba(255, 255, 255, .1);
}

.hero-poster {
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(15, 23, 42, .45);
  transform: rotate(2deg);
  background: rgba(255, 255, 255, .12);
  padding: .5rem;
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 1rem;
}

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

.hero-dots button {
  width: .8rem;
  height: .8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .46);
}

.hero-dots button.active {
  width: 2.2rem;
  background: #ffffff;
}

.home-search {
  margin-top: -2.5rem;
  position: relative;
  z-index: 5;
}

.search-banner,
.filter-panel,
.category-block,
.ranking-panel,
.watch-section,
.article-section {
  padding: 1.5rem;
}

.search-banner {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(280px, .7fr);
  gap: 1rem;
  align-items: center;
  border-radius: 1.5rem;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .16);
}

.search-banner h2,
.section-heading h2,
.category-block h2,
.ranking-panel h2,
.watch-section h2,
.article-section h2 {
  color: var(--ink);
  font-weight: 900;
}

.search-banner h2 {
  font-size: clamp(1.3rem, 3vw, 2rem);
  margin-bottom: .35rem;
}

.search-banner p,
.category-block p,
.article-section p,
.footer-grid p {
  color: var(--muted);
  line-height: 1.85;
}

.search-banner-form {
  justify-content: flex-end;
}

.search-banner input,
.filter-row input,
.filter-row select {
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .7rem 1rem;
  outline: none;
  background: #ffffff;
  color: var(--ink);
}

.search-banner input {
  flex: 1 1 220px;
}

.search-banner input:focus,
.filter-row input:focus,
.filter-row select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .18);
}

.search-banner button {
  min-height: 3rem;
  padding: .75rem 1.2rem;
  color: #ffffff;
  background: var(--brand);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
}

.section-heading a {
  margin-left: auto;
  color: var(--brand-dark);
  background: #ffedd5;
  padding: .55rem .9rem;
  font-size: .92rem;
}

.section-icon {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .85rem;
  background: #ffedd5;
  color: var(--brand);
}

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

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

.list-grid {
  margin-top: 2rem;
}

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

.poster-box {
  position: relative;
  height: 16rem;
  overflow: hidden;
  background: #f3f4f6;
}

.card-large .poster-box {
  height: 20rem;
}

.card-small .poster-box {
  height: 12rem;
}

.poster-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

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

.poster-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, .16), transparent);
  opacity: 0;
  transition: opacity .25s ease;
}

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

.poster-play {
  width: 3.5rem;
  height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand);
  padding-left: .18rem;
  transform: scale(.8);
  transition: transform .25s ease;
}

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

.badge {
  position: absolute;
  top: .65rem;
  padding: .28rem .55rem;
  border-radius: .45rem;
  color: #ffffff;
  font-size: .78rem;
  font-weight: 800;
  background: rgba(0, 0, 0, .68);
}

.badge-year {
  right: .65rem;
}

.badge-type {
  left: .65rem;
  background: var(--brand);
}

.card-body h2 {
  color: var(--ink);
  font-weight: 900;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: .45rem;
}

.card-body p {
  color: #4b5563;
  font-size: .92rem;
  line-height: 1.7;
  min-height: 3.1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: .75rem;
}

.card-meta {
  gap: .45rem;
  color: #6b7280;
  font-size: .78rem;
  margin-bottom: .65rem;
}

.card-meta span + span::before {
  content: "·";
  margin-right: .45rem;
}

.card-tags span,
.detail-tags a {
  color: #92400e;
  background: #ffedd5;
  border-radius: 999px;
  padding: .22rem .55rem;
  font-size: .75rem;
  font-weight: 700;
}

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

.category-tile {
  display: block;
  min-height: 11rem;
  padding: 1.3rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  border: 1px solid #fed7aa;
  box-shadow: 0 14px 32px rgba(217, 119, 6, .09);
  transition: transform .2s ease, box-shadow .2s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(217, 119, 6, .16);
}

.category-tile span {
  display: block;
  color: var(--ink);
  font-weight: 900;
  font-size: 1.15rem;
  margin-bottom: .6rem;
}

.category-tile p {
  color: #6b7280;
  line-height: 1.7;
  font-size: .92rem;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #ea580c);
}

.page-hero.compact {
  padding: 4rem 0;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -.03em;
  margin-bottom: 1rem;
}

.page-hero p {
  max-width: 52rem;
  color: rgba(255, 255, 255, .9);
  font-size: 1.12rem;
  line-height: 1.9;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  color: rgba(255, 255, 255, .82);
  margin-bottom: 1rem;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.filter-panel {
  margin-bottom: 1rem;
}

.filter-row input {
  flex: 1 1 320px;
}

.filter-row select {
  flex: 0 1 220px;
}

.filter-chips {
  margin-top: 1rem;
}

.filter-chips button {
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  padding: .45rem .85rem;
  font-weight: 700;
  transition: background .2s ease, color .2s ease;
}

.filter-chips button.active,
.filter-chips button:hover {
  color: #ffffff;
  background: var(--brand);
}

.no-results {
  display: none;
  margin: 1.5rem 0;
  padding: 1.2rem;
  border-radius: 1rem;
  background: #ffffff;
  color: #6b7280;
  text-align: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.no-results.show {
  display: block;
}

.category-block + .category-block {
  margin-top: 2rem;
}

.category-block-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.category-block h2 {
  font-size: 1.55rem;
  margin-bottom: .35rem;
}

.category-block-head a {
  color: #ffffff;
  background: var(--brand);
  padding: .6rem 1rem;
  flex: 0 0 auto;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: .8rem;
  align-items: center;
  padding: .6rem;
  border-radius: .9rem;
  background: #f9fafb;
}

.mini-card img {
  grid-row: 1 / 3;
  width: 4.5rem;
  height: 6rem;
  border-radius: .6rem;
  object-fit: cover;
}

.mini-card span {
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-card small {
  color: #6b7280;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr);
  gap: 1.5rem;
  align-items: start;
}

.ranking-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.ranking-list {
  display: grid;
  gap: .7rem;
}

.ranking-item {
  display: grid;
  grid-template-columns: 3.5rem 4rem minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  padding: .65rem;
  border-radius: .9rem;
  background: #f9fafb;
  transition: background .2s ease, transform .2s ease;
}

.ranking-item:hover {
  background: #fff7ed;
  transform: translateX(2px);
}

.ranking-num {
  color: var(--brand);
  font-weight: 900;
  font-size: 1.2rem;
  text-align: center;
}

.ranking-item img {
  width: 4rem;
  height: 5.2rem;
  border-radius: .55rem;
  object-fit: cover;
}

.ranking-title {
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-meta {
  color: #6b7280;
  font-size: .9rem;
}

.compact-list .ranking-item {
  grid-template-columns: 2.8rem 3.4rem minmax(0, 1fr);
}

.compact-list .ranking-meta {
  display: none;
}

.detail-hero {
  position: relative;
  color: #ffffff;
  overflow: hidden;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.05);
}

.detail-head {
  position: relative;
  z-index: 1;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 1.25rem;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .38);
}

.detail-info h1 {
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -.035em;
  margin-bottom: 1rem;
}

.detail-info p {
  max-width: 56rem;
  color: rgba(255, 255, 255, .9);
  font-size: 1.12rem;
  line-height: 1.9;
  margin-bottom: 1rem;
}

.detail-meta {
  margin-bottom: 1rem;
}

.detail-meta span {
  color: #ffedd5;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  padding: .35rem .75rem;
  font-weight: 700;
}

.detail-tags {
  margin-bottom: 1.4rem;
}

.detail-content {
  display: grid;
  gap: 2rem;
}

.watch-section h2,
.article-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.1rem;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  color: #ffffff;
  background-position: center;
  background-size: cover;
  transition: opacity .24s ease;
  z-index: 4;
}

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

.player-icon {
  width: 5rem;
  height: 5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .34);
  font-size: 2rem;
  padding-left: .28rem;
}

.player-cover strong {
  max-width: min(90%, 42rem);
  font-size: clamp(1.3rem, 4vw, 2.4rem);
  text-align: center;
  text-shadow: 0 3px 18px rgba(0, 0, 0, .55);
}

.article-section p + h2 {
  margin-top: 1.6rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-logo {
  color: #ffffff;
  font-weight: 900;
  font-size: 1.4rem;
  margin-bottom: .75rem;
}

.footer-grid h2 {
  color: #ffffff;
  font-weight: 900;
  margin-bottom: .8rem;
}

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

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

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: #9ca3af;
  text-align: center;
}

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .ranking-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-carousel {
    min-height: auto;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding: 3.2rem 1rem 5rem;
  }

  .hero-poster {
    max-width: 240px;
    transform: none;
  }

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

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

  .detail-poster {
    max-width: 230px;
  }

  .ranking-item {
    grid-template-columns: 2.8rem 3.6rem minmax(0, 1fr);
  }

  .ranking-meta {
    display: none;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .featured-grid,
  .category-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .poster-box,
  .card-large .poster-box {
    height: 18rem;
  }

  .category-block-head,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading a {
    margin-left: 0;
  }

  .filter-row input,
  .filter-row select,
  .search-banner input,
  .search-banner button {
    width: 100%;
    flex-basis: 100%;
  }
}
