:root {
  --amber: #f59e0b;
  --orange: #ea580c;
  --red: #dc2626;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --card: #ffffff;
  --bg: #f8fafc;
  --shadow: 0 18px 48px rgba(15, 23, 42, .16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 12px 30px rgba(234, 88, 12, .32);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .02em;
}

.brand {
  font-size: 23px;
  flex: 0 0 auto;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--orange);
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .16);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav-link {
  padding: 8px 0;
  font-weight: 700;
  opacity: .94;
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
  border-bottom-color: rgba(255, 255, 255, .85);
}

.top-search,
.mobile-search,
.hero-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.hero-search input,
.list-filter {
  border: 0;
  outline: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  padding: 11px 16px;
  min-width: 230px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08);
}

.top-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.list-filter:focus {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .24), inset 0 0 0 1px rgba(245, 158, 11, .55);
}

.top-search button,
.mobile-search button,
.hero-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--orange);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, .26);
  padding: 14px 20px 18px;
}

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
}

.hero-slider {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  border-radius: 30px;
  background: var(--slate);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  background-size: cover;
  background-position: center;
  transition: opacity .55s ease, transform .75s ease;
  display: flex;
  align-items: center;
}

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

.hero-content {
  width: min(640px, 88%);
  padding: 64px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, .22);
  color: #fde68a;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 16px;
  line-height: 1.05;
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 950;
  letter-spacing: -.05em;
}

.hero p {
  max-width: 600px;
  font-size: 18px;
  color: rgba(255, 255, 255, .88);
}

.hero-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 800;
}

.hero .tag-pill,
.detail-hero .tag-pill {
  color: #fff7ed;
  background: rgba(255, 255, 255, .16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.section-more,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.primary-btn {
  padding: 13px 22px;
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 14px 26px rgba(234, 88, 12, .34);
}

.ghost-btn {
  padding: 12px 20px;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 28px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-controls button {
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  font-size: 30px;
  backdrop-filter: blur(8px);
}

.hero-dots {
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 28px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .36);
}

.hero-dot.is-active {
  width: 46px;
  background: #fff;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-radius: 30px;
  padding: 22px;
  background: linear-gradient(180deg, #fff, #fff7ed);
  box-shadow: var(--shadow);
}

.hero-side h2 {
  margin: 0;
  color: var(--slate);
  font-size: 24px;
}

.hero-thumbs {
  display: grid;
  gap: 12px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 18px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, .08);
}

.hero-thumb:hover {
  color: var(--orange);
}

.hero-thumb img {
  width: 76px;
  height: 94px;
  border-radius: 14px;
  object-fit: cover;
}

.hero-thumb span {
  font-weight: 900;
}

.hero-search {
  margin-top: auto;
  padding-top: 10px;
}

.hero-search input {
  min-width: 0;
  width: 100%;
  background: #fff;
}

.intro-bar,
.content-section,
.page-hero,
.detail-hero,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.intro-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 28px;
  padding: 26px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(90deg, var(--slate), var(--slate-soft));
  box-shadow: var(--shadow);
}

.intro-bar h2,
.intro-bar p {
  margin: 0;
}

.intro-bar h2 {
  font-size: 25px;
  font-weight: 950;
}

.intro-bar p {
  color: #cbd5e1;
  margin-top: 6px;
}

.content-section {
  margin-top: 42px;
}

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

.section-heading h2 {
  margin: 0;
  color: var(--slate);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -.03em;
}

.section-heading p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--muted);
}

.section-more,
.text-link {
  color: var(--orange);
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fde68a, #fed7aa);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .72));
  transition: opacity .22s ease;
}

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 44px;
  opacity: 0;
  transform: scale(.82);
  transition: opacity .22s ease, transform .22s ease;
}

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(220, 38, 38, .3);
}

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

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 3px 8px;
  background: #f1f5f9;
}

.movie-card h3 {
  min-height: 52px;
  margin: 10px 0 8px;
  color: var(--slate);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 950;
}

.movie-card h3 a:hover {
  color: var(--orange);
}

.movie-card p {
  min-height: 66px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.category-tile {
  min-height: 190px;
  border-radius: 26px;
  padding: 24px;
  color: #fff;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow);
  transition: transform .18s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
}

.category-tile span {
  font-size: 24px;
  font-weight: 950;
}

.category-tile p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, .88);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rank-list a {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}

.rank-list a:hover {
  color: var(--orange);
}

.rank-list span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--orange);
  font-weight: 950;
}

.rank-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-hero,
.detail-hero {
  margin-top: 28px;
  border-radius: 30px;
  color: #fff;
  background: linear-gradient(135deg, var(--slate), var(--slate-soft));
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 58px;
}

.page-hero.slim {
  padding: 52px;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, .84);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, .72);
  font-weight: 800;
}

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

.with-filter {
  align-items: center;
}

.list-filter {
  min-width: min(360px, 100%);
  background: #fff;
}

.empty-state {
  display: none;
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}

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

.category-overview-grid {
  display: grid;
  gap: 20px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: center;
  border-radius: 26px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

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

.category-covers img {
  height: 134px;
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 0 0 8px;
  color: var(--slate);
  font-size: 26px;
  font-weight: 950;
}

.category-overview-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.detail-hero {
  padding: 28px 36px 36px;
}

.detail-head {
  display: grid;
  grid-template-columns: 255px 1fr;
  gap: 34px;
  align-items: end;
  margin-top: 20px;
}

.detail-poster img {
  width: 255px;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 22px 48px rgba(0, 0, 0, .38);
}

.detail-info h1 {
  font-size: clamp(34px, 6vw, 62px);
}

.detail-info p {
  max-width: 780px;
  color: rgba(255, 255, 255, .86);
  font-size: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 26px;
  align-items: start;
}

.detail-main,
.detail-side,
.article-block,
.player-section {
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.detail-main {
  display: grid;
  gap: 22px;
  padding: 22px;
  background: transparent;
  box-shadow: none;
}

.player-section,
.article-block,
.detail-side {
  padding: 22px;
}

.player-section h2,
.article-block h2,
.detail-side h2 {
  margin: 0 0 16px;
  color: var(--slate);
  font-size: 24px;
  font-weight: 950;
}

.article-block p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .56));
}

.play-cover span {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  color: var(--orange);
  background: #fff;
  font-size: 34px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .36);
}

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

.player-frame.is-playing .play-cover {
  opacity: 0;
  pointer-events: none;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-list a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 8px;
  background: #f8fafc;
}

.side-list a:hover {
  color: var(--orange);
  background: #fff7ed;
}

.side-list img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

.side-list span {
  font-weight: 900;
}

.site-footer {
  margin-top: 56px;
  margin-bottom: 0;
  border-radius: 30px 30px 0 0;
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate), #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 40px;
}

.footer-brand {
  color: #fff;
  font-size: 21px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fbbf24;
  font-size: 18px;
}

.site-footer p,
.site-footer ul {
  margin: 12px 0 0;
  padding: 0;
}

.site-footer li {
  list-style: none;
  margin: 8px 0;
}

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

.copyright {
  border-top: 1px solid rgba(148, 163, 184, .18);
  padding: 20px 40px;
  text-align: center;
  color: #94a3b8;
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .mobile-panel.is-open {
    display: block;
  }

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

  .rank-list,
  .detail-layout,
  .footer-grid,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .detail-head {
    grid-template-columns: 180px 1fr;
  }

  .detail-poster img {
    width: 180px;
  }

  .section-heading,
  .intro-bar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .hero,
  .intro-bar,
  .content-section,
  .page-hero,
  .detail-hero,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 19px;
  }

  .hero-slider {
    min-height: 620px;
    border-radius: 24px;
  }

  .hero-content {
    width: 100%;
    padding: 36px 24px 92px;
  }

  .hero-side {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-controls {
    left: 20px;
    right: 20px;
  }

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

  .category-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-card p {
    min-height: 58px;
    font-size: 13px;
  }

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

  .detail-poster img {
    width: 190px;
  }

  .detail-hero,
  .page-hero {
    padding: 28px 22px;
    border-radius: 24px;
  }

  .detail-layout {
    gap: 18px;
  }

  .footer-grid,
  .copyright {
    padding: 26px;
  }
}
