.hero-gallery {
  position: absolute;
  inset: 0;
}

.hero-gallery .hero-media {
  opacity: 0;
  transform: scale(1.018);
  transition: opacity 900ms ease, transform 5.8s ease;
}

.hero-gallery .hero-media.active {
  opacity: 1;
  transform: scale(1);
}

.hero-views {
  display: flex;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #505861;
  border-radius: 6px;
  background: rgba(17, 20, 24, 0.84);
}

.hero-views button {
  min-width: 78px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid #434a53;
  background: transparent;
  color: #aeb6bf;
  font-size: 10px;
  cursor: pointer;
}

.hero-views button:last-child {
  border-right: 0;
}

.hero-views button[aria-selected="true"] {
  background: #ef5b60;
  color: #fff;
}

.menu-gallery {
  max-width: 1240px;
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.menu-gallery figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.menu-gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  background: #eef0f2;
}

.menu-gallery figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.menu-gallery strong {
  font-size: 13px;
}

.menu-gallery span {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.obs-console {
  max-width: 1240px;
  margin: 28px auto 0;
}

.obs-console > img {
  width: 100%;
  aspect-ratio: 16 / 8.9;
  object-fit: cover;
  object-position: top left;
  border: 1px solid #353b43;
  border-radius: 7px;
  background: #20242a;
}

.obs-capabilities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
  border-top: 1px solid #373d45;
}

.obs-capabilities > div {
  padding: 20px 20px 0 0;
}

.obs-capabilities > div + div {
  padding-left: 20px;
  border-left: 1px solid #373d45;
}

.obs-capabilities strong,
.obs-capabilities span {
  display: block;
}

.plugin-lab {
  max-width: 1240px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #353b43;
  border-radius: 7px;
  background: #20242a;
  color: #fff;
}

.plugin-demo-toolbar {
  min-height: 64px;
  padding: 12px 14px 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #353b43;
}

.plugin-demo-toolbar > div:first-child {
  display: grid;
  gap: 4px;
}

.plugin-demo-toolbar > div:first-child span {
  color: #6fd0be;
  font-size: 9px;
  font-weight: 700;
}

.plugin-demo-toolbar > div:first-child strong {
  font-size: 15px;
}

.plugin-demo-tabs {
  display: grid;
  grid-template-columns: repeat(4, 68px);
  border: 1px solid #444b54;
  border-radius: 6px;
  overflow: hidden;
}

.plugin-demo-tabs button {
  height: 34px;
  padding: 0 8px;
  border: 0;
  border-right: 1px solid #444b54;
  background: #292e35;
  color: #aeb6c0;
  font-size: 11px;
  cursor: pointer;
}

.plugin-demo-tabs button:last-child {
  border-right: 0;
}

.plugin-demo-tabs button[aria-selected="true"] {
  background: #fff;
  color: #20242a;
  font-weight: 700;
}

.plugin-demo-stage {
  height: 390px;
  position: relative;
  overflow: hidden;
  background-color: #c4c7ca;
  background-image:
    linear-gradient(45deg, #d7d9db 25%, transparent 25%),
    linear-gradient(-45deg, #d7d9db 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d7d9db 75%),
    linear-gradient(-45deg, transparent 75%, #d7d9db 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

.plugin-scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 320ms ease, transform 320ms ease;
}

.plugin-scene.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.plugin-demo-status {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(25, 29, 34, 0.82);
  color: #d9dde2;
  font-size: 9px;
}

.plugin-demo-status span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4fd2b3;
  box-shadow: 0 0 0 3px rgba(79, 210, 179, 0.16);
  animation: demoPulse 1.4s ease-in-out infinite;
}

.demo-music-player {
  width: min(540px, calc(100% - 30px));
  min-height: 158px;
  padding: 16px 20px 15px 14px;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 3px solid #ef6268;
  border-radius: 7px;
  background: rgba(24, 27, 32, 0.97);
  box-shadow: 0 14px 32px rgba(17, 19, 22, 0.32);
}

.demo-disc-wrap {
  width: 96px;
  height: 96px;
  position: relative;
  display: grid;
  place-items: center;
}

.demo-disc {
  width: 86px;
  height: 86px;
  position: relative;
  border: 5px solid #2b3037;
  border-radius: 50%;
  background: conic-gradient(#ef5b60, #e4b247, #3db29e, #5575bd, #ef5b60);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.42);
  animation: demoSpin 3s linear infinite;
}

.demo-disc::before {
  content: "";
  position: absolute;
  inset: 25px;
  border: 4px solid #24282e;
  border-radius: 50%;
  background: #eef0f2;
}

.demo-disc::after {
  content: "";
  position: absolute;
  inset: 37px;
  border-radius: 50%;
  background: #ef5b60;
}

.demo-disc span {
  width: 9px;
  height: 22px;
  position: absolute;
  left: 9px;
  top: 7px;
  border-radius: 5px;
  background: #fff;
  transform: rotate(-35deg);
  box-shadow: 0 0 9px rgba(255, 255, 255, 0.6);
}

.demo-tonearm {
  width: 5px;
  height: 66px;
  position: absolute;
  z-index: 3;
  right: 1px;
  top: -1px;
  border-radius: 4px;
  background: #d8dde3;
  transform: rotate(24deg);
  transform-origin: top center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.demo-music-copy {
  min-width: 0;
}

.demo-player-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b9c0ca;
  font-size: 10px;
}

.demo-player-state b {
  font-weight: 500;
}

.demo-player-state small {
  margin-left: auto;
  padding: 3px 6px;
  border-radius: 4px;
  background: #333840;
}

.demo-equalizer {
  height: 11px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.demo-equalizer i {
  width: 3px;
  background: #4fd2c1;
  animation: demoMeter 650ms ease-in-out infinite alternate;
}

.demo-equalizer i:nth-child(1) { height: 5px; }
.demo-equalizer i:nth-child(2) { height: 10px; animation-delay: 180ms; }
.demo-equalizer i:nth-child(3) { height: 7px; animation-delay: 320ms; }

.demo-music-copy > strong {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: #fff;
  font-size: 22px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.demo-music-copy p {
  margin: 4px 0 13px;
  overflow: hidden;
  color: #aeb6c0;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.demo-progress {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: #494e55;
}

.demo-progress i {
  display: block;
  width: 36%;
  height: 100%;
  border-radius: 4px;
  background: #ef676d;
  animation: demoProgress 12s linear infinite;
}

.demo-times {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: #a9b1bc;
  font-size: 9px;
}

.demo-chat-stack {
  width: min(560px, calc(100% - 24px));
  display: grid;
  gap: 13px;
}

.demo-chat-message {
  min-height: 74px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  opacity: 0;
}

.plugin-scene.active .demo-chat-message {
  animation: demoMessage 6.4s ease both;
}

.plugin-scene.active .demo-chat-message:nth-child(2) { animation-delay: 300ms; }
.plugin-scene.active .demo-chat-message:nth-child(3) { animation-delay: 600ms; }

.demo-chat-message > span {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 3px solid #2c3036;
  border-radius: 50%;
  background: #363b43;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 0 0 2px #d6c485;
}

.demo-chat-message > div {
  min-width: 0;
}

.demo-chat-message strong {
  display: block;
  margin-bottom: 5px;
  color: #463f2d;
  font-size: 13px;
}

.demo-chat-message small {
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 3px;
  background: #805ac2;
  color: #fff;
  font-size: 8px;
}

.demo-chat-message p {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 9px 14px;
  overflow-wrap: anywhere;
  border: 2px solid #1b1e23;
  border-radius: 3px;
  outline: 1px solid rgba(101, 91, 61, 0.55);
  background: rgba(62, 66, 72, 0.96);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 4px 4px 0 rgba(17, 19, 22, 0.28);
}

.demo-chat-message.gift > span { box-shadow: 0 0 0 2px #d8a83f; }
.demo-chat-message.sc > span { box-shadow: 0 0 0 2px #ef676f; }

.demo-alert-card {
  width: min(520px, calc(100% - 28px));
  min-height: 92px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 4px solid #e9b84f;
  border-radius: 7px;
  background: rgba(15, 18, 22, 0.94);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.plugin-scene.active .demo-alert-card {
  animation: demoPop 2.8s ease-in-out infinite;
}

.demo-alert-card > span {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid #e9b84f;
  border-radius: 7px;
  color: #e9b84f;
  font-size: 16px;
  font-weight: 800;
}

.demo-alert-card small,
.demo-alert-card strong {
  display: block;
}

.demo-alert-card small {
  color: #b8c0c9;
  font-size: 10px;
}

.demo-alert-card strong {
  margin-top: 5px;
  overflow: hidden;
  color: #fff;
  font-size: 19px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.demo-welcome-card {
  width: min(480px, calc(100% - 28px));
  min-height: 122px;
  padding: 16px 22px 16px 18px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(232, 196, 112, 0.74);
  border-left: 5px solid #e8c470;
  border-radius: 7px;
  background: rgba(31, 30, 36, 0.97);
  box-shadow: 0 13px 34px rgba(0, 0, 0, 0.34);
}

.plugin-scene.active .demo-welcome-card {
  animation: demoWelcome 3.2s ease-in-out infinite;
}

.demo-welcome-avatar {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 4px solid #393b42;
  border-radius: 50%;
  background: #e6b95d;
  color: #26282d;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 0 0 2px #e8c470;
}

.demo-welcome-card small,
.demo-welcome-card strong,
.demo-welcome-card p {
  display: block;
}

.demo-welcome-card small {
  color: #e6c77c;
  font-size: 10px;
}

.demo-welcome-card small b {
  margin-left: 7px;
  padding: 2px 5px;
  border-radius: 3px;
  background: #805ac2;
  color: #fff;
}

.demo-welcome-card strong {
  margin-top: 5px;
  overflow: hidden;
  font-size: 22px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.demo-welcome-card p {
  margin: 5px 0 0;
  color: #c3c8cf;
  font-size: 11px;
}

@keyframes demoSpin { to { transform: rotate(360deg); } }
@keyframes demoMeter { to { height: 3px; } }
@keyframes demoProgress { from { width: 35%; } to { width: 88%; } }
@keyframes demoPulse { 50% { opacity: 0.45; } }
@keyframes demoMessage {
  0% { opacity: 0; transform: translateY(12px); }
  10%, 78% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-8px); }
}
@keyframes demoPop {
  0%, 100% { opacity: 0; transform: translateY(14px) scale(0.96); }
  14%, 82% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes demoWelcome {
  0%, 100% { opacity: 0; transform: translateY(18px) scale(0.95); }
  18%, 80% { opacity: 1; transform: translateY(0) scale(1); }
}

.obs-capabilities strong {
  font-size: 13px;
}

.obs-capabilities span {
  margin-top: 7px;
  color: #aab2bc;
  font-size: 10px;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .menu-gallery {
    grid-template-columns: 1fr;
  }

  .menu-gallery figcaption {
    display: block;
  }

  .menu-gallery span {
    display: block;
    margin-top: 5px;
    text-align: left;
  }

  .obs-console > img {
    aspect-ratio: 4 / 3;
  }

  .plugin-demo-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .plugin-demo-tabs {
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
  }

  .plugin-demo-stage {
    height: 380px;
  }

  .obs-capabilities {
    grid-template-columns: 1fr 1fr;
  }

  .obs-capabilities > div,
  .obs-capabilities > div + div {
    padding: 18px 12px;
    border-left: 0;
    border-bottom: 1px solid #373d45;
  }
}

@media (max-width: 430px) {
  .menu-gallery img,
  .obs-console > img {
    aspect-ratio: 1 / 1;
  }

  .obs-capabilities {
    grid-template-columns: 1fr;
  }

  .hero-views {
    width: 100%;
  }

  .hero-views button {
    min-width: 0;
    flex: 1;
  }

  .plugin-scene {
    padding: 12px;
  }

  .demo-music-player {
    width: 100%;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 14px 13px 9px;
  }

  .demo-disc-wrap {
    width: 80px;
    height: 80px;
  }

  .demo-disc {
    width: 72px;
    height: 72px;
  }

  .demo-disc::before { inset: 20px; }
  .demo-disc::after { inset: 30px; }
  .demo-tonearm { height: 54px; }
  .demo-music-copy > strong { font-size: 18px; }

  .demo-chat-stack {
    width: 100%;
  }

  .demo-chat-message {
    grid-template-columns: 45px minmax(0, 1fr);
    gap: 9px;
  }

  .demo-chat-message > span {
    width: 42px;
    height: 42px;
  }

  .demo-chat-message p {
    font-size: 13px;
  }

  .demo-welcome-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .demo-welcome-avatar {
    width: 58px;
    height: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-gallery .hero-media,
  .plugin-scene {
    transition: none;
  }

  .demo-disc,
  .demo-equalizer i,
  .demo-progress i,
  .plugin-demo-status span,
  .plugin-scene.active .demo-chat-message,
  .plugin-scene.active .demo-alert-card,
  .plugin-scene.active .demo-welcome-card {
    animation: none;
  }

  .plugin-scene.active .demo-chat-message {
    opacity: 1;
  }
}
