:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --panel: #ffffff;
  --line: rgba(15, 23, 42, 0.1);
  --dark: #020617;
  --dark-soft: #0f172a;
  --emerald: #10b981;
  --emerald-dark: #047857;
  --cyan: #06b6d4;
  --amber: #f59e0b;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
}

.logo::before,
.footer-logo::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.45);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.desktop-nav a,
.mobile-nav a {
  color: rgba(255, 255, 255, 0.78);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  transition: color 0.25s ease, background 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: #fff;
  background: rgba(16, 185, 129, 0.18);
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px auto;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-carousel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.35), transparent 35%), linear-gradient(135deg, #020617 0%, #0f172a 54%, #064e3b 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.35));
  pointer-events: none;
}

.hero-carousel__inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.72fr);
  gap: 48px;
  align-items: center;
  opacity: 0;
  transform: translateX(40px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide__media {
  order: 2;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.45);
  transform: perspective(900px) rotateY(-8deg) rotateX(3deg);
}

.hero-slide__media img {
  aspect-ratio: 4 / 5;
  height: min(560px, 72vh);
  object-fit: cover;
}

.hero-slide__content {
  order: 1;
  max-width: 700px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--emerald);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-slide h1 {
  margin: 14px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-slide p {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
}

.hero-tags,
.movie-card__tags,
.detail-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.movie-card__tags span,
.detail-tag,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  padding: 8px 12px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.22);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.button-primary {
  color: #001b13;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  box-shadow: 0 14px 30px rgba(34, 211, 238, 0.24);
}

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

.button-light {
  color: #ecfeff;
}

.button-plain {
  color: #a7f3d0;
}

.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 38px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 46px;
  height: 46px;
  color: #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: var(--emerald);
}

.quick-search {
  position: relative;
  z-index: 2;
  margin-top: -46px;
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 0.95fr);
  gap: 24px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.quick-search--page {
  margin-top: 0;
}

.quick-search h2 {
  margin: 4px 0 0;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.1;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.search-box--full {
  width: 100%;
}

.search-box span {
  color: var(--emerald-dark);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.section-block {
  padding: 72px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-main h1 {
  margin: 4px 0 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-heading a {
  color: var(--emerald-dark);
  font-weight: 800;
}

.section-heading--compact h2 {
  font-size: 30px;
}

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

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

.movie-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.movie-card.is-hidden {
  display: none;
}

.movie-card__cover {
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.movie-card__cover img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.movie-card:hover .movie-card__cover img {
  transform: scale(1.08);
  opacity: 0.88;
}

.movie-card__year,
.movie-card__play {
  position: absolute;
  z-index: 2;
}

.movie-card__year {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  color: #001b13;
  background: #6ee7b7;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.movie-card__play {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.28);
}

.movie-card__body {
  padding: 16px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.movie-card__tags span {
  padding: 4px 8px;
  color: var(--emerald-dark);
  background: #ecfdf5;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

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

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

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

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

.category-tile {
  position: relative;
  min-height: 210px;
  padding: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: end;
  border-radius: var(--radius-lg);
  color: #fff;
  background: #0f172a;
  box-shadow: var(--shadow-soft);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.26));
}

.category-tile img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.45s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span,
.category-tile em {
  position: relative;
  z-index: 1;
}

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

.category-tile em {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-style: normal;
}

.home-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
}

.ranking-panel,
.latest-panel,
.detail-main,
.detail-side {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.rank-list,
.latest-list,
.mini-list {
  display: grid;
  gap: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, background 0.25s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: #ecfdf5;
}

.rank-item__num {
  color: var(--emerald-dark);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 74px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-item__text strong,
.rank-item__text em {
  display: block;
}

.rank-item__text strong {
  line-height: 1.3;
}

.rank-item__text em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.page-hero {
  padding: 78px 0 28px;
}

.page-hero p {
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
}

.page-hero--category {
  width: 100%;
  max-width: none;
  padding: 86px max(16px, calc((100% - 1180px) / 2)) 76px;
  color: #fff;
  background: radial-gradient(circle at 12% 12%, rgba(16, 185, 129, 0.32), transparent 35%), linear-gradient(135deg, #020617, #0f172a 56%, #064e3b);
}

.page-hero--category p {
  color: rgba(255, 255, 255, 0.74);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  color: #9ca3af;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #6ee7b7;
}

.detail-hero {
  padding: 34px 0 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: stretch;
}

.player-panel,
.detail-card {
  padding: 18px;
  background: #020617;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

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

.movie-player,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player {
  z-index: 1;
  background: #000;
}

.player-cover {
  z-index: 2;
  padding: 0;
  border: 0;
  cursor: pointer;
  overflow: hidden;
  background: #020617;
}

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

.player-cover img {
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.play-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.94);
  box-shadow: 0 0 0 16px rgba(16, 185, 129, 0.18);
  transform: translate(-50%, -50%);
  font-size: 32px;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 20px;
}

.detail-meta {
  margin-top: 14px;
}

.detail-meta span,
.detail-tag {
  padding: 6px 10px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding-top: 28px;
}

.detail-main h1 {
  margin-bottom: 14px;
}

.detail-main h2,
.detail-side h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-one-line {
  color: var(--muted);
  font-size: 18px;
}

.detail-tags {
  margin: 18px 0 4px;
}

.detail-tag {
  color: var(--emerald-dark);
  background: #ecfdf5;
}

.site-footer {
  margin-top: 90px;
  padding: 42px 0;
  color: rgba(255, 255, 255, 0.72);
  background: #020617;
}

.site-footer__inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 16px;
}

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

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

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

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

  .detail-card {
    display: none;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel,
  .hero-carousel__inner {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 42px 0 104px;
  }

  .hero-slide__media {
    order: 1;
    transform: none;
  }

  .hero-slide__media img {
    height: 320px;
    aspect-ratio: 16 / 10;
  }

  .hero-slide__content {
    order: 2;
  }

  .quick-search {
    grid-template-columns: 1fr;
  }

  .latest-list {
    grid-template-columns: 1fr;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .shell,
  .site-header__inner,
  .mobile-nav,
  .site-footer__inner {
    width: min(100% - 24px, 1180px);
  }

  .movie-grid,
  .movie-grid--featured,
  .movie-grid--catalog,
  .category-grid,
  .category-grid--large,
  .rank-list--page {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .page-actions,
  .footer-links {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .rank-item {
    grid-template-columns: 34px 64px 1fr;
  }

  .rank-item img {
    width: 64px;
    height: 84px;
  }

  .play-orb {
    width: 70px;
    height: 70px;
    font-size: 26px;
  }
}
