:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --teal: #0d9488;
  --cyan: #0891b2;
  --dark: #020617;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  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);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.header-inner {
  max-width: 1280px;
  height: 76px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, #14b8a6, #0891b2);
  box-shadow: 0 10px 24px rgba(8, 145, 178, 0.28);
}

.brand-text {
  font-size: 24px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #0f766e, #0891b2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  font-weight: 650;
  color: #334155;
  transition: color 0.2s ease;
}

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

.header-search {
  width: 260px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.header-search input,
.mobile-search input,
.category-tools input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 12px 16px;
  color: var(--text);
  background: transparent;
}

.header-search button {
  border: 0;
  padding: 12px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  cursor: pointer;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #0f172a;
}

.mobile-panel {
  display: none;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-brand {
  margin-bottom: 12px;
  font-weight: 800;
  color: var(--teal);
}

.mobile-search {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}

.mobile-nav {
  display: grid;
  gap: 10px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  color: #334155;
  background: #f8fafc;
}

.mobile-link.active {
  color: var(--teal);
  background: #ccfbf1;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

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

.hero-slide {
  opacity: 0;
  transition: opacity 0.9s ease;
  background: radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.28), transparent 32%), #020617;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
}

.hero-gradient,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 40%, rgba(2, 6, 23, 0.16) 100%);
}

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

.hero-copy {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 86px;
  color: #fff;
}

.hero-copy > * {
  max-width: 720px;
}

.hero-badge,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ccfbf1;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero p {
  margin: 0 0 20px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags,
.card-tags,
.filter-tags,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.card-tags span,
.detail-meta span,
.rank-meta span {
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  padding: 6px 11px;
  color: #ecfeff;
  background: rgba(15, 23, 42, 0.34);
}

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

.primary-button,
.ghost-button,
.section-more,
.rank-action,
.category-tools a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #14b8a6, #0891b2);
  box-shadow: 0 18px 36px rgba(20, 184, 166, 0.28);
}

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

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.rank-action:hover,
.category-tools a:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.42);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot.active {
  background: #2dd4bf;
}

.quick-panel,
.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.quick-panel {
  position: relative;
  z-index: 10;
  margin-top: -46px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 26px;
  padding: 30px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.quick-copy span {
  color: var(--teal);
  font-weight: 800;
}

.quick-copy h2 {
  margin: 8px 0 8px;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.05em;
}

.quick-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-links a,
.filter-tags button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #0f766e;
  font-weight: 800;
  background: #f8fafc;
}

.content-section {
  padding: 58px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.story-panel h2,
.info-panel h2 {
  margin: 6px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-kicker {
  color: var(--teal);
}

.section-more,
.category-tools a,
.rank-action {
  color: #0f766e;
  border: 1px solid #99f6e4;
  background: #f0fdfa;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e, #0f172a);
}

.poster-frame img,
.rank-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-frame img {
  transition: transform 0.3s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.poster-year,
.poster-play {
  position: absolute;
  z-index: 2;
}

.poster-year {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ecfeff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
}

.poster-play {
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #14b8a6, #0891b2);
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.3);
}

.card-body {
  padding: 14px;
}

.card-tags span {
  color: #0f766e;
  border-color: #ccfbf1;
  background: #f0fdfa;
  font-size: 12px;
}

.card-body h3 {
  margin: 12px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.rank-content h2 a:hover {
  color: var(--teal);
}

.card-body p {
  min-height: 44px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: #64748b;
  font-size: 13px;
}

.rank-section {
  display: block;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 86px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #0f766e;
  font-weight: 900;
  background: #ccfbf1;
}

.rank-hot .rank-number {
  color: #fff;
  background: linear-gradient(135deg, #14b8a6, #0891b2);
}

.rank-cover {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f766e, #0f172a);
}

.rank-content h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.rank-content p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.rank-meta span {
  color: #0f766e;
  border-color: #ccfbf1;
  background: #f0fdfa;
  font-size: 12px;
}

.page-hero {
  margin: 38px 0 8px;
  padding: 44px;
  border-radius: 28px;
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.34), transparent 30%), linear-gradient(135deg, #0f172a, #0f766e);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  color: #fff;
}

.page-hero p {
  max-width: 820px;
  color: #dbeafe;
  line-height: 1.85;
}

.category-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 760px;
  margin-top: 22px;
}

.category-tools input {
  flex: 1 1 320px;
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.category-tools input::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.filter-tags {
  margin-top: 18px;
}

.filter-tags button {
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.detail-page {
  background: #f8fafc;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  background: #020617;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
}

.detail-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  color: #fff;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f766e, #0f172a);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.breadcrumb {
  display: flex;
  gap: 8px;
  color: #99f6e4;
  font-weight: 700;
}

.detail-copy h1 {
  margin: 18px 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.detail-line {
  max-width: 840px;
  color: #e0f2fe;
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  margin: 16px 0 28px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #fff;
  font-weight: 900;
  background: radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.26), rgba(2, 6, 23, 0.78));
  cursor: pointer;
}

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

.player-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6, #0891b2);
  box-shadow: 0 18px 40px rgba(20, 184, 166, 0.34);
}

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

.story-panel,
.info-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.story-panel p {
  margin: 18px 0 0;
  color: #334155;
  font-size: 17px;
  line-height: 1.95;
}

.info-panel dl {
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px 16px;
}

.info-panel dt {
  color: var(--muted);
}

.info-panel dd {
  margin: 0;
  font-weight: 700;
}

.related-section {
  grid-column: 1 / -1;
}

.movie-card.compact .card-body p {
  display: none;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

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

.site-footer p {
  max-width: 560px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: #94a3b8;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 28px;
  color: #64748b;
}

.is-hidden {
  display: none !important;
}

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

  .header-search {
    margin-left: auto;
  }

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

  .home-rank {
    grid-template-columns: 1fr;
  }
}

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

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

  .header-search {
    display: none;
  }

  .menu-button {
    display: block;
    margin-left: auto;
  }

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

  .hero {
    min-height: 620px;
  }

  .hero-copy {
    padding-bottom: 78px;
  }

  .hero-control {
    display: none;
  }

  .quick-panel {
    grid-template-columns: 1fr;
    margin: -28px 16px 0;
    padding: 22px;
  }

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

  .page-shell,
  .quick-panel {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .rank-row {
    grid-template-columns: 44px 70px 1fr;
  }

  .rank-action {
    grid-column: 2 / -1;
    justify-self: start;
    min-height: 38px;
  }

  .page-hero {
    padding: 28px;
  }

  .detail-inner {
    grid-template-columns: 1fr;
    padding: 46px 16px 92px;
  }

  .detail-poster {
    width: 190px;
  }

  .player-section {
    margin-top: -48px;
    padding: 0 16px;
  }

  .detail-content {
    grid-template-columns: 1fr;
    padding-top: 34px;
  }

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

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

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

  .card-body p {
    min-height: auto;
  }
}
