/* shader-overview — Shader Execution Playground */

#shader-execution-playground {
  scroll-margin-top: 5rem;
}

.doc-shader-exec {
  margin: 1.15rem 0 0;
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(94, 180, 255, 0.26);
  background: linear-gradient(168deg,
      rgba(16, 22, 42, 0.82) 0%,
      rgba(10, 14, 28, 0.72) 48%,
      rgba(18, 14, 36, 0.78) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.42) inset,
    0 12px 38px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.doc-shader-exec__layout {
  display: flex;
  flex-direction: column;
}

.doc-shader-exec__canvas-stage {
  padding: 0.65rem 1rem 0.5rem;
  background: radial-gradient(110% 85% at 50% 12%,
      rgba(46, 231, 242, 0.06) 0%,
      transparent 52%),
    rgba(5, 8, 18, 0.52);
  border-bottom: 1px solid rgba(110, 150, 210, 0.14);
}

.doc-shader-exec__canvas-wrap {
  position: relative;
  margin: 0 auto;
  max-width: min(100%, 920px);
  height: clamp(260px, 44vmin, 480px);
  min-height: 260px;
}

.doc-shader-exec__canvas-wrap canvas[data-sep-canvas] {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.doc-shader-exec__vertex-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.doc-shader-exec__vtx-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 2px solid rgba(46, 231, 242, 0.95);
  background: rgba(12, 22, 38, 0.65);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.35),
    0 0 14px rgba(46, 231, 242, 0.55);
  opacity: 0.35;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.doc-shader-exec__vtx-dot.is-hot {
  opacity: 1;
  transform: scale(1.25);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.35),
    0 0 22px rgba(46, 231, 242, 0.85);
}

.doc-shader-exec__canvas-wrap.doc-shader-exec__canvas-wrap--vertex-focus .doc-shader-exec__vtx-dot {
  opacity: 1;
}

/* Interpolasyon probu — üçgen içi */
.doc-shader-exec__probe {
  position: absolute;
  z-index: 4;
  left: 0;
  top: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.doc-shader-exec__probe-ring {
  width: 26px;
  height: 26px;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(94, 200, 255, 0.45);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.12), transparent 55%);
}

.doc-shader-exec__probe-chip {
  margin-top: 0.35rem;
  padding: 0.28rem 0.42rem;
  border-radius: 8px;
  border: 1px solid rgba(130, 190, 255, 0.35);
  background: rgba(8, 12, 26, 0.88);
  backdrop-filter: blur(8px);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(210, 228, 255, 0.96);
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.doc-shader-exec__hud--glass {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 3;
  padding: 0.38rem 0.5rem 0.42rem;
  border-radius: 11px;
  border: 1px solid rgba(120, 190, 255, 0.22);
  background: linear-gradient(165deg,
      rgba(18, 28, 48, 0.55) 0%,
      rgba(10, 14, 28, 0.72) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 8px 24px rgba(0, 0, 0, 0.35);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  pointer-events: none;
  min-width: 7.2rem;
}

.doc-shader-exec__hud-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  line-height: 1.35;
}

.doc-shader-exec__hud-row+.doc-shader-exec__hud-row {
  margin-top: 0.18rem;
  padding-top: 0.18rem;
  border-top: 1px solid rgba(110, 150, 210, 0.14);
}

.doc-shader-exec__hud-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(150, 185, 230, 0.65);
}

.doc-shader-exec__hud-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(130, 235, 255, 0.95);
  letter-spacing: 0.02em;
}

.doc-shader-exec__hint {
  margin: 0.45rem auto 0;
  max-width: min(100%, 920px);
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(150, 185, 235, 0.72);
}

.doc-shader-exec__panels {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(110, 150, 210, 0.12);
}

/* Üst satır: kod blokları — sütunlar arası boşluk (alt satır ile aynı gap) */
.doc-shader-exec__code-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 0.75rem;
  padding: 0.75rem 0.85rem 0.55rem;
  align-items: stretch;
}

.doc-shader-exec__code-cell {
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 0;
  align-self: stretch;
}

/* Kısa olan sütunda <pre> aynı satır yüksekliğine uzar */
.doc-shader-exec__code-cell .doc-shader-exec__shader-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.doc-shader-exec__code-cell .doc-shader-exec__shader-summary {
  flex-shrink: 0;
}

/* Alt satır: canlı kutular — eşit yükseklik + üstteki ile aynı sütun aralığı */
.doc-shader-exec__live-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  column-gap: 0.75rem;
  padding: 0.45rem 0.85rem 0.85rem;
  border-top: 1px solid rgba(110, 150, 210, 0.12);
}

.doc-shader-exec__live-cols .doc-shader-exec__live {
  margin-top: 0;
  min-height: 4.75rem;
  align-self: stretch;
  box-sizing: border-box;
}

@media (max-width: 860px) {

  .doc-shader-exec__code-cols,
  .doc-shader-exec__live-cols {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 0.65rem;
  }

  .doc-shader-exec__code-cell--vs {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(110, 150, 210, 0.12);
  }

  .doc-shader-exec__live--vs {
    padding-bottom: 0.15rem;
    border-bottom: 1px solid rgba(110, 150, 210, 0.12);
  }
}

.doc-shader-exec__shader-details {
  margin: 0;
  border-radius: 0;
}

.doc-shader-exec__shader-summary {
  list-style: none;
  cursor: default;
  padding: 0.35rem 0.15rem 0.5rem 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(210, 195, 255, 0.9);
}

.doc-shader-exec__code-cell--fs .doc-shader-exec__shader-summary {
  color: rgba(180, 230, 255, 0.9);
}

.doc-shader-exec__shader-body {
  padding-bottom: 0.15rem;
}

.doc-shader-exec__code-cell .doc-shader-exec__shader-body {
  padding-bottom: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.doc-shader-exec__code {
  margin: 0;
  padding: 0.55rem 0.58rem;
  border-radius: 8px;
  border: 1px solid rgba(110, 150, 210, 0.18);
  background: rgba(5, 10, 22, 0.72);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  line-height: 1.48;
  color: rgba(175, 205, 248, 0.9);
  overflow-x: auto;
  white-space: pre;
}

.doc-shader-exec__code-cell .doc-shader-exec__code {
  flex: 1;
  min-height: 0;
  flex: 1;
  min-height: 0;
  box-sizing: border-box;
}

.doc-shader-exec__live {
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(94, 200, 255, 0.14);
  background: rgba(8, 14, 28, 0.55);
  font-size: 0.78rem;
  line-height: 1.48;
  color: rgba(190, 208, 240, 0.94);
}

.doc-shader-exec__live strong {
  color: rgba(230, 238, 255, 0.98);
}

.doc-shader-exec__live .sep-live-muted {
  font-size: 0.72rem;
  color: rgba(150, 175, 215, 0.75);
}

.doc-shader-exec__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.1rem;
  padding: 0.65rem 0.9rem 0.75rem;
  border-bottom: 1px solid rgba(110, 150, 210, 0.1);
  font-size: 0.82rem;
  color: rgba(188, 208, 240, 0.92);
}

.doc-shader-exec__tools-legend {
  flex-basis: 100%;
  margin-bottom: -0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(180, 200, 240, 0.65);
}

@media (min-width: 520px) {
  .doc-shader-exec__tools-legend {
    flex-basis: auto;
    margin-bottom: 0;
    margin-right: 0.35rem;
  }
}

.doc-shader-exec__tools label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.doc-shader-exec__tools input {
  accent-color: #5ec8ff;
}

.doc-shader-exec__pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  padding: 0.75rem 0.85rem 0.65rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(140, 170, 215, 0.55);
}

.doc-shader-exec__pipe-step {
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(110, 150, 210, 0.15);
  background: rgba(8, 12, 24, 0.45);
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.doc-shader-exec__pipe-step.is-active {
  color: rgba(210, 235, 255, 0.96);
  border-color: rgba(94, 200, 255, 0.45);
  box-shadow: 0 0 18px rgba(46, 231, 242, 0.18);
}

.doc-shader-exec__pipe-arrow {
  color: rgba(110, 150, 210, 0.35);
  user-select: none;
}

.doc-shader-exec__explain {
  margin: 0;
  padding: 0.65rem 1rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.52;
  color: rgba(165, 188, 228, 0.82);
}

.doc-shader-exec figcaption {
  margin: 0;
  padding: 0.65rem 1rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.52;
  color: rgba(165, 188, 228, 0.82);
  border-top: 1px solid rgba(110, 150, 210, 0.1);
}