#top-demo-games-section .demo-games-status {
  min-height: 1.5rem;
  margin: 0.8rem 0 1rem;
  color: var(--text-muted, #d6d6d6);
  text-align: center;
}

#top-demo-games-section .demo-games-grid {
  align-items: stretch;
  min-height: 18rem;
}

#top-demo-games-section .demo-game-card {
  min-width: 0;
  overflow: hidden;
  border: 2px solid var(--gold, #f4c542);
  border-radius: 14px;
  background: var(--panel, #171717);
  box-shadow: 0 8px 24px rgb(0 0 0 / 28%);
}

#top-demo-games-section .demo-game-card-button {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 0;
  flex-direction: column;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#top-demo-games-section .demo-game-card-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -4px;
}

#top-demo-games-section .demo-game-image-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0a0a0a;
}

#top-demo-games-section .demo-game-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

#top-demo-games-section .demo-game-card-button:hover .demo-game-image {
  transform: scale(1.04);
}

#top-demo-games-section .demo-game-play-badge {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  color: #111;
  background: var(--gold, #f4c542);
  font-size: 0.78rem;
  font-weight: 800;
}

#top-demo-games-section .demo-game-card-body {
  display: flex;
  width: 100%;
  padding: 0.9rem;
  flex: 1;
  flex-direction: column;
  gap: 0.35rem;
  box-sizing: border-box;
}

#top-demo-games-section .demo-game-card-title {
  color: var(--gold, #f4c542);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

#top-demo-games-section .demo-game-card-provider {
  color: var(--text-muted, #d6d6d6);
  font-size: 0.86rem;
}

#top-demo-games-section .demo-game-card-facts {
  display: flex;
  margin-top: auto;
  padding-top: 0.45rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}

#top-demo-games-section .demo-game-card-facts span {
  padding: 0.2rem 0.45rem;
  border: 1px solid rgb(244 197 66 / 45%);
  border-radius: 999px;
  font-size: 0.75rem;
}

#top-demo-games-section .demo-game-state {
  display: flex;
  min-height: 15rem;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.8rem;
  text-align: center;
}

#top-demo-games-section .demo-game-state-icon {
  font-size: 2.5rem;
}

body.demo-modal-open {
  overflow: hidden;
}

#game-demo-modal[hidden] {
  display: none;
}

#game-demo-modal.is-open {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

#game-demo-modal.is-open .game-demo-container {
  transform: scale(1);
}

#game-demo-modal .demo-frame-loader[hidden] {
  display: none;
}

#game-demo-modal .demo-modal-description {
  max-height: 7.5rem;
  margin: 0;
  padding: 0.8rem 1rem;
  overflow: auto;
  white-space: pre-line;
}

#game-demo-modal .slotslaunch-frame-toolbar {
  gap: 0.75rem;
}

#game-demo-modal .toolbar-left,
#game-demo-modal .toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

#game-demo-modal .demo-frame-notice {
  font-size: 0.8rem;
}

#game-demo-modal .demo-game-frame-host {
  display: grid;
  width: 100%;
  min-height: min(62vh, 560px);
  place-items: center;
  background: #080808;
  color: #eee;
  text-align: center;
}

#game-demo-modal .demo-game-iframe {
  display: block;
  width: 100%;
  min-height: min(62vh, 560px);
  border: 0;
}

#game-demo-modal .game-demo-container.is-expanded {
  width: min(98vw, 1500px);
  max-width: none;
}

@media (max-width: 720px) {
  #top-demo-games-section .demo-games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #game-demo-modal .slotslaunch-frame-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  #game-demo-modal .toolbar-right {
    justify-content: space-between;
  }

  #game-demo-modal .demo-game-frame-host,
  #game-demo-modal .demo-game-iframe {
    min-height: 55vh;
  }
}

@media (max-width: 420px) {
  #top-demo-games-section .demo-games-grid {
    grid-template-columns: 1fr;
  }
}
