/* CSS Playground suite */
.pg-hero {
  padding: 48px 0 20px;
  background: linear-gradient(135deg, #fff 0%, #f3e8ff 100%);
}
.pg-hero-inner { max-width: 820px; margin: 0 auto; text-align: center; }
.pg-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  color: #10172f;
  letter-spacing: -0.02em;
}
.pg-hero p {
  margin: 0 auto;
  max-width: 720px;
  color: #5c6478;
  font-size: 17px;
  line-height: 1.7;
}
.pg-wrap { padding: 24px 0 64px; background: #f7f8fc; }
.pg-card {
  background: #fff;
  border: 1px solid #e8ebf5;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 14px 36px rgba(17, 24, 47, 0.06);
  box-sizing: border-box;
}
.pg-privacy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f3e5f5;
  border: 1px solid #e1bee7;
  color: #6a1b9a;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
}
.pg-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 18px;
  align-items: start;
}
.pg-controls {
  border: 1px solid #e8ebf5;
  border-radius: 14px;
  background: #fbfcff;
  padding: 16px;
  max-height: 720px;
  overflow: auto;
}
.pg-preview-col { min-width: 0; }
.pg-section { margin-bottom: 16px; }
.pg-section h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  color: #10172f;
}
.pg-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.pg-preview-head h3 { margin: 0; }
.pg-preview-stage {
  min-height: 260px;
  border-radius: 14px;
  border: 1px solid #e8ebf5;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
  position: relative;
  transition: background 0.2s;
}
.pg-preview-stage.is-light {
  background:
    linear-gradient(45deg, #eef1f8 25%, transparent 25%),
    linear-gradient(-45deg, #eef1f8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef1f8 75%),
    linear-gradient(-45deg, transparent 75%, #eef1f8 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-color: #f7f8fc;
}
.pg-preview-stage.is-dark {
  background: #1a1f2e;
  border-color: #2c3348;
}
.pg-preview { width: 100%; display: grid; place-items: center; min-height: 180px; }
.pg-field { margin-bottom: 12px; }
.pg-field label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #5c6478;
}
.pg-field label em {
  font-style: normal;
  color: #7b1fa2;
  font-variant-numeric: tabular-nums;
}
.pg-field input[type="range"] { width: 100%; }
.pg-field input[type="color"],
.pg-field input[type="text"],
.pg-field input[type="number"],
.pg-field select {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #dde2ef;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  color: #18213a;
  background: #fff;
  outline: none;
  font-family: inherit;
}
.pg-field input[type="color"] { height: 40px; padding: 4px; }
.pg-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: #384057;
}
.pg-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.pg-btn {
  appearance: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 14px;
  color: #fff !important;
  line-height: 1.2;
  text-decoration: none !important;
  display: inline-block;
}
.pg-btn:hover { opacity: .92; }
.pg-btn-primary { background: linear-gradient(135deg, #ef5350, #c62828); }
.pg-btn-blue { background: #7b1fa2; }
.pg-btn-gray { background: #455a64; }
.pg-btn-dark { background: #10172f; }
.pg-btn-outline {
  background: #fff;
  color: #7b1fa2 !important;
  border: 1.5px solid #ce93d8;
}
.pg-code {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e8ebf5;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.pg-code-html { margin-top: 10px; background: #111827; }
.pg-status {
  margin-top: 12px;
  min-height: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #7b1fa2;
}
.pg-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: #fff5f5;
  border: 1px solid #f0c7c6;
}
.pg-cta strong { display: block; color: #10172f; font-size: 14px; }
.pg-cta span { display: block; color: #5c6478; font-size: 12px; font-weight: 600; margin-top: 4px; }

/* Demo elements used inside previews */
.pg-demo-box {
  width: min(280px, 90%);
  min-height: 120px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #10172f;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}
.pg-demo-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-weight: 800;
  padding: 12px 22px;
  font-size: 14px;
}
.pg-loader {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(123, 31, 162, 0.2);
  border-top-color: #7b1fa2;
  animation: pg-spin 0.8s linear infinite;
}
@keyframes pg-spin { to { transform: rotate(360deg); } }
.pg-skeleton {
  width: min(320px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pg-skeleton-line {
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e8ebf5 25%, #f5f7fb 50%, #e8ebf5 75%);
  background-size: 200% 100%;
  animation: pg-shimmer 1.2s ease-in-out infinite;
}
@keyframes pg-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.pg-scroll-demo {
  width: min(280px, 100%);
  height: 160px;
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  color: #384057;
  font-size: 13px;
  line-height: 1.6;
}
.pg-wave-wrap, .pg-blob-wrap, .pg-shape-wrap {
  width: min(420px, 100%);
}
.pg-wave-wrap svg, .pg-blob-wrap svg, .pg-shape-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}
.pg-tooltip-wrap { position: relative; display: inline-block; }
.pg-ribbon-wrap { position: relative; width: min(260px, 90%); height: 160px; background: #fff; border-radius: 12px; overflow: hidden; }
.pg-ribbon {
  position: absolute;
  top: 18px;
  right: -36px;
  transform: rotate(45deg);
  padding: 6px 40px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

@media (max-width: 991px) {
  .pg-layout { grid-template-columns: 1fr; }
  .pg-controls { max-height: none; }
}
