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

.demo-admin-open {
  flex: 0 0 auto;
  border: 1px solid rgba(96, 165, 250, 0.55);
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #0759b7, #0b7bb8);
  color: #fff;
  font: 800 13px/1.1 'Space Grotesk', sans-serif;
  box-shadow: 0 12px 28px rgba(2, 93, 177, 0.24);
  cursor: pointer;
}

.demo-admin-open[hidden] { display: none !important; }

.demo-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.demo-carousel-viewport {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 28px;
  background: rgba(2, 8, 18, 0.72);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
}

.demo-carousel-prev { grid-column: 1; grid-row: 1; }
.demo-carousel-next { grid-column: 3; grid-row: 1; }

.demo-carousel-track {
  display: flex;
  transition: transform 360ms cubic-bezier(.22, .74, .21, 1);
}

.demo-video-card {
  flex: 0 0 100%;
  min-width: 0;
}

.demo-video-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 106px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.demo-video-card header p {
  margin: 0 0 7px;
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.demo-video-card h3 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(19px, 2.1vw, 27px);
  line-height: 1.2;
}

.demo-video-card header span {
  color: #a9b7c7;
  font-size: 13px;
  text-align: right;
}

.demo-video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 620px;
  background: #000;
  object-fit: contain;
}

.demo-carousel-arrow {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(125, 211, 252, 0.38);
  border-radius: 50%;
  background: rgba(5, 18, 34, 0.92);
  color: #e0f2fe;
  font: 500 34px/1 sans-serif;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
}

.demo-carousel-arrow:disabled { opacity: .3; cursor: default; }

.demo-carousel-dots {
  grid-column: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 12px;
}

.demo-carousel-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #526174;
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

.demo-carousel-dot.is-active { width: 26px; background: #38bdf8; }

.demo-carousel-empty {
  margin: 0;
  padding: 70px 24px;
  color: #b6c3d1;
  text-align: center;
}

.demo-admin-dialog {
  width: min(940px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 24px;
  background: #07111c;
  color: #eef4fb;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

.demo-admin-dialog::backdrop { background: rgba(0, 7, 16, .76); backdrop-filter: blur(6px); }
.demo-admin-dialog[open] { display: block; }

.demo-admin-panel { padding: 24px; }

.demo-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, .18);
}

.demo-admin-header p {
  margin: 0 0 4px;
  color: #7dd3fc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.demo-admin-header h2 { margin: 0; font-size: 25px; }
.demo-admin-header button {
  width: 38px;
  height: 38px;
  border: 1px solid #334155;
  border-radius: 12px;
  background: #111e2e;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.demo-admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px 0;
}

.demo-admin-form label {
  display: grid;
  gap: 7px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

.demo-admin-form input:not([type='checkbox']) {
  width: 100%;
  min-height: 42px;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 9px 12px;
  background: #111e2e;
  color: #f8fafc;
}

#demo-video-file-row,
.demo-admin-check,
.demo-admin-actions,
#demo-admin-status { grid-column: 1 / -1; }

.demo-admin-check { display: flex !important; align-items: center; gap: 9px !important; }
.demo-admin-check input { width: 18px; height: 18px; accent-color: #0ea5e9; }
.demo-admin-actions { display: flex; justify-content: flex-end; gap: 10px; }
.demo-admin-actions button,
.demo-admin-list button {
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 9px 14px;
  background: #142235;
  color: #e2e8f0;
  font-weight: 800;
  cursor: pointer;
}

#demo-video-save { border-color: #0369a1; background: #0759b7; color: #fff; }
#demo-admin-status { min-height: 18px; margin: 0; color: #7dd3fc; font-size: 12px; }
#demo-admin-status.is-error { color: #fda4af; }

.demo-admin-list { display: grid; gap: 10px; max-height: 270px; overflow: auto; }
.demo-admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #0b1725;
}
.demo-admin-item strong { display: block; color: #f8fafc; }
.demo-admin-item span { color: #94a3b8; font-size: 12px; }
.demo-admin-item-actions { display: flex; gap: 8px; }
.demo-admin-item-actions .is-danger { border-color: #7f1d1d; background: #3f1118; color: #fecdd3; }

body.light-mode .demo-carousel-viewport { background: rgba(255, 255, 255, .88); }
body.light-mode .demo-video-card h3 { color: #102030; }
body.light-mode .demo-video-card header span,
body.light-mode .demo-carousel-empty { color: #566472; }

@media (max-width: 700px) {
  .demo-section-heading { align-items: flex-start; flex-direction: column; }
  .demo-carousel { grid-template-columns: 38px minmax(0, 1fr) 38px; gap: 7px; }
  .demo-carousel-arrow { width: 38px; height: 38px; font-size: 27px; }
  .demo-video-card header { align-items: flex-start; flex-direction: column; min-height: 0; padding: 17px; }
  .demo-video-card header span { text-align: left; }
  .demo-admin-form { grid-template-columns: 1fr; }
  .demo-admin-form > * { grid-column: 1 !important; }
  .demo-admin-item { grid-template-columns: 1fr; }
}
