:root {
  --bg: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --teal: #0f766e;
  --teal-2: #0891b2;
  --teal-3: #14b8a6;
  --dark: #0f172a;
  --card: #ffffff;
  --shadow: 0 20px 55px rgba(15, 23, 42, .12);
}

* {
  box-sizing: border-box;
}

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

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

img {
  max-width: 100%;
  height: auto;
}

.image-missing {
  opacity: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  box-shadow: 0 12px 30px rgba(8, 145, 178, .28);
}

.brand-text {
  font-size: 24px;
  background: linear-gradient(90deg, var(--teal), var(--teal-2));
  -webkit-background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  color: #334155;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition: color .2s ease;
}

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

.header-search {
  width: 300px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 5px;
}

.header-search input,
.home-search-band input,
.filter-panel input,
.filter-panel select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.header-search input {
  width: 100%;
  padding: 8px 8px 8px 14px;
}

.header-search button,
.home-search-band button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  color: #fff;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #0f172a;
  border-radius: 3px;
}

.mobile-nav {
  display: none;
  padding: 10px 24px 18px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.mobile-nav a {
  display: block;
  padding: 12px 10px;
  border-radius: 12px;
  color: #334155;
  font-weight: 700;
}

.mobile-nav a:hover {
  background: #f1f5f9;
  color: var(--teal);
}

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

.hero-carousel {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  background: radial-gradient(circle at 25% 20%, rgba(20, 184, 166, .52), transparent 30%), linear-gradient(135deg, #0f172a 0%, #0f766e 48%, #0891b2 100%);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s ease;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  align-items: center;
  gap: 48px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  max-width: none;
  z-index: 0;
  opacity: .24;
  filter: blur(24px) saturate(120%);
  transform: scale(1.08);
}

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

.hero-bg::after,
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, .96), rgba(15, 23, 42, .52), rgba(15, 23, 42, .86));
}

.hero-content,
.hero-poster,
.detail-inner {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ccfbf1;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 22px 0 0;
  color: #fff;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -.06em;
  font-weight: 950;
}

.hero-content h2 {
  margin: 18px 0 0;
  color: #99f6e4;
  font-size: clamp(24px, 4vw, 46px);
  line-height: 1.1;
  font-weight: 900;
}

.hero-content p,
.page-hero p,
.detail-info p {
  margin: 20px 0 0;
  max-width: 720px;
  color: rgba(255, 255, 255, .86);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(20, 184, 166, .12);
  color: #0f766e;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  background: rgba(255, 255, 255, .13);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
}

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

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

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

.btn-primary {
  background: #fff;
  color: #0f766e;
  box-shadow: 0 16px 35px rgba(255, 255, 255, .18);
}

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

.hero-poster {
  border-radius: 34px;
  padding: 14px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .23);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .35);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(20, 184, 166, .35), rgba(8, 145, 178, .32));
}

.hero-poster span {
  display: block;
  margin-top: 12px;
  color: #fff;
  font-weight: 800;
  text-align: center;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

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

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

.home-search-band {
  max-width: 1160px;
  margin: -42px auto 0;
  position: relative;
  z-index: 8;
  padding: 18px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}

.home-search-band form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-search-band label {
  color: var(--teal);
  font-weight: 950;
  white-space: nowrap;
}

.home-search-band input {
  flex: 1;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: #f1f5f9;
}

.home-search-band a {
  color: var(--teal);
  font-weight: 900;
}

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 24px 0;
}

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

.section-heading p {
  color: var(--teal);
  font-weight: 900;
  margin: 0 0 6px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -.04em;
  font-weight: 950;
}

.section-more {
  color: var(--teal);
  font-weight: 900;
  white-space: nowrap;
}

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

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

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

.movie-card {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, .8);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(15, 23, 42, .06);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(20, 184, 166, .35);
}

.poster-link,
.poster-wrap {
  display: block;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(20, 184, 166, .18), rgba(8, 145, 178, .20));
}

.home-grid .poster-wrap {
  aspect-ratio: 2.9 / 4;
}

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

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

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, .82), rgba(15, 23, 42, 0) 55%);
  opacity: 0;
  transition: opacity .25s ease;
}

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

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.85);
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(20, 184, 166, .88);
  border-radius: 999px;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-year {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #fff;
  background: rgba(15, 23, 42, .72);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

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

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.28;
  font-weight: 950;
}

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

.movie-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-grid .movie-card p {
  -webkit-line-clamp: 2;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

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

.category-tile,
.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 26px;
  padding: 22px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #0891b2);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .12);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .3;
}

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, .72), rgba(15, 118, 110, .72));
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile strong,
.category-card strong {
  font-size: 24px;
  font-weight: 950;
}

.category-tile em,
.category-card em {
  margin-top: 10px;
  display: block;
  font-style: normal;
  line-height: 1.7;
  opacity: .88;
}

.rank-aside {
  position: sticky;
  top: 96px;
}

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

.rank-card a {
  display: grid;
  grid-template-columns: 44px 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  transition: transform .2s ease, border-color .2s ease;
}

.rank-card a:hover {
  transform: translateX(4px);
  border-color: rgba(20, 184, 166, .5);
}

.rank-num {
  color: var(--teal);
  font-size: 18px;
  font-weight: 950;
  text-align: center;
}

.rank-thumb {
  width: 72px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(20, 184, 166, .18), rgba(8, 145, 178, .18));
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info {
  min-width: 0;
}

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

.rank-info strong {
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 24px;
  text-align: center;
  color: #fff;
  background: radial-gradient(circle at 50% 0%, rgba(20, 184, 166, .6), transparent 34%), linear-gradient(135deg, #0f172a, #0f766e 52%, #0891b2);
}

.page-hero p {
  margin-left: auto;
  margin-right: auto;
}

.slim-hero,
.search-hero,
.category-hero,
.ranking-hero {
  min-height: 310px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, .05);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  border-radius: 16px;
  background: #f8fafc;
  padding: 0 14px;
}

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

.empty-state {
  display: none;
  margin-top: 28px;
  padding: 28px;
  text-align: center;
  border-radius: 20px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

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

.category-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  color: var(--text);
  background: #fff;
  border: 1px solid #e2e8f0;
}

.category-card-poster {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(20, 184, 166, .18), rgba(8, 145, 178, .2));
}

.category-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: #fff;
  background: #0f172a;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: .5;
  filter: blur(18px) saturate(120%);
  transform: scale(1.08);
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 24px 72px;
}

.breadcrumb {
  display: inline-flex;
  margin-bottom: 28px;
  color: #ccfbf1;
  font-weight: 900;
}

.detail-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-poster {
  border-radius: 30px;
  padding: 12px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .35);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(20, 184, 166, .25), rgba(8, 145, 178, .28));
}

.player-section {
  max-width: 1120px;
  margin: -86px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 5;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 40px 100px rgba(15, 23, 42, .35);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, .08), rgba(15, 23, 42, .68));
  transition: opacity .25s ease, visibility .25s ease;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-2));
  box-shadow: 0 18px 42px rgba(8, 145, 178, .35);
  font-size: 34px;
  padding-left: 6px;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content {
  max-width: 930px;
  margin: 0 auto;
  padding: 64px 24px 0;
}

.detail-article {
  display: grid;
  gap: 24px;
}

.detail-text-block {
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
}

.detail-text-block h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 950;
}

.detail-text-block p {
  margin: 0;
  color: #334155;
  line-height: 1.95;
}

.detail-text-block p + p {
  margin-top: 14px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
}

.info-list dt {
  color: var(--muted);
  font-weight: 900;
}

.info-list dd {
  margin: 0;
  color: var(--text);
}

.site-footer {
  margin-top: 88px;
  background: linear-gradient(135deg, #0f172a, #111827);
  color: #cbd5e1;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 24px 28px;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 1fr 1fr;
  gap: 38px;
}

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

.site-footer p {
  max-width: 520px;
  margin: 16px 0 0;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.footer-bottom {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, .2);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .header-search {
    display: none;
  }

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

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    min-height: 720px;
    padding-top: 46px;
    gap: 24px;
  }

  .hero-poster {
    max-width: 320px;
    margin: 0 auto;
  }

  .home-search-band,
  .home-search-band form,
  .section-heading,
  .split-layout,
  .detail-layout,
  .footer-main {
    display: grid;
    grid-template-columns: 1fr;
  }

  .rank-aside {
    position: static;
  }

  .movie-grid,
  .home-grid,
  .feature-grid,
  .catalog-grid,
  .category-grid,
  .category-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
  }

  .brand-text {
    font-size: 19px;
  }

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

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

  .hero-content p,
  .page-hero p,
  .detail-info p {
    font-size: 16px;
  }

  .content-section {
    padding: 50px 16px 0;
  }

  .movie-grid,
  .home-grid,
  .feature-grid,
  .catalog-grid,
  .category-grid,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .detail-inner,
  .player-section,
  .detail-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .player-shell,
  .detail-text-block {
    border-radius: 20px;
  }

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