/* GPU displacement — CPU vs GPU karşılaştırma lab (vdef-demo ile uyumlu, gdcp- öneki) */
figure.gdcp-demo {
    margin-block: 1.15rem 0;
    margin-inline: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

figure.gdcp-demo + .doc-h3 {
    margin-top: 1.35rem;
}

.gdcp-demo {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(12, 14, 18, 0.55);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.gdcp-demo__hud {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
}

.gdcp-demo__tag {
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
}

.gdcp-demo__metrics {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.78);
}

.gdcp-demo__metric {
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.28);
    font-size: 0.74rem;
}

.gdcp-demo__viewport {
    position: relative;
    width: 100%;
    min-height: 360px;
    aspect-ratio: 16 / 10;
    max-height: min(70vh, 600px);
    touch-action: none;
}

.gdcp-demo__viewport canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    touch-action: none;
}

.gdcp-demo__labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.gdcp-demo__label {
    position: absolute;
    top: 10px;
    max-width: 46%;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.25;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.88);
}

.gdcp-demo__label--cpu {
    left: 10px;
    text-align: left;
    border-color: rgba(94, 200, 255, 0.35);
    color: #a8dcff;
}

.gdcp-demo__label--gpu {
    right: 10px;
    text-align: right;
    border-color: rgba(46, 231, 242, 0.35);
    color: #8cf0f5;
}

.gdcp-demo.gdcp-demo--cpu-hidden .gdcp-demo__label--cpu {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gdcp-demo__controls {
    padding: 14px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px 18px;
    align-items: start;
}

.gdcp-demo__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gdcp-demo__field label:first-child {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
}

.gdcp-demo__field input[type="range"] {
    width: 100%;
    accent-color: #5ec8ff;
}

.gdcp-demo__field--toggle {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}

.gdcp-demo__field--toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    font-weight: 500;
}

.gdcp-demo__field--toggle input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #5ec8ff;
}

.gdcp-demo__hint {
    grid-column: 1 / -1;
    font-size: 0.78rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}

.gdcp-demo__caption {
    padding: 12px 16px 16px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    line-height: 1.55;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 640px) {
    .gdcp-demo__viewport {
        min-height: 280px;
        aspect-ratio: 4 / 3;
    }
}
