/* Demo listing + player */

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

.demo-tile {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.demo-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(77, 163, 255, 0.35);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.55);
}
.demo-tile:focus-visible {
  outline: 2px solid var(--blue-400, #4da3ff);
  outline-offset: 3px;
}

.demo-tile-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0d4280, #1a7fe8);
  overflow: hidden;
}
.demo-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.demo-tile-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 42px;
}
.demo-tile-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 8, 20, 0.28);
  transition: background 0.2s ease;
}
.demo-tile:hover .demo-tile-play {
  background: rgba(2, 8, 20, 0.4);
}
.demo-tile-play span {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  color: #0d4280;
  font-size: 28px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}
.demo-tile:hover .demo-tile-play span {
  transform: scale(1.06);
}
.demo-tile-duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.4px;
  color: #fff;
  background: rgba(2, 8, 20, 0.72);
  border-radius: 999px;
  padding: 4px 9px;
}

.demo-tile-body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.demo-tile-cat {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--blue-300, #7db8ff);
  margin-bottom: 0.45rem;
}
.demo-tile-body h3 {
  font-family: var(--syne);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white, #fff);
  margin: 0 0 0.45rem;
  line-height: 1.3;
}
.demo-tile-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--blue-200, rgba(200, 220, 255, 0.75));
  flex: 1;
}
.demo-tile-cta {
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--blue-300, #7db8ff);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Modal player */
.demo-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 20, 0.85);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.demo-modal.show { display: flex; }
.demo-modal-box {
  background: var(--blue-900, #041225);
  border: 1px solid rgba(77, 163, 255, 0.2);
  border-radius: var(--r16, 16px);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
}
.demo-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.demo-modal-head h3 {
  color: var(--white, #fff);
  font-family: var(--syne);
  font-size: 18px;
  margin: 0;
}
.demo-modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.demo-modal-close:hover { color: var(--white, #fff); }
.demo-modal-video {
  aspect-ratio: 16 / 9;
  background: #000;
}
.demo-modal-video video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.demo-modal-video .demo-modal-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  padding: 1.5rem;
  text-align: center;
}
.demo-modal-body {
  padding: 18px 20px 22px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  line-height: 1.7;
}
.demo-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}
