.shader-playground-shell {
    padding-top: 1rem;
    padding-bottom: 3rem;
}

.shader-playground-header {
    margin: 0 auto 1rem;
    max-width: 60rem;
    text-align: center;
}

.shader-playground-header h1 {
    margin-bottom: 0.35rem;
}

.shader-playground-header p {
    margin-bottom: 0.75rem;
}

.shader-playground-back {
    background-color: rgba(98, 251, 67, 0.16);
    border: 1px solid rgba(98, 251, 67, 0.4);
    border-radius: 0.35rem;
    color: #d2ffd2;
    font-size: 0.65em;
    letter-spacing: 0.06em;
    padding: 0.4rem 0.55rem;
    text-transform: uppercase;
}

.shader-playground-layout {
    align-items: flex-start;
    gap: 1rem;
}

.shader-sidebar,
.shader-stage-panel {
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
}

.shader-control-group {
    margin-bottom: 0.6rem;
}

.shader-control-group label,
.shader-editor-label {
    display: block;
    font-size: 0.56em;
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.shader-control-group select {
    background: rgba(19, 23, 32, 0.9);
    border: 1px solid rgba(67, 229, 251, 0.35);
    border-radius: 0.32rem;
    color: #ecfbff;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 0.62em;
    padding: 0.45rem;
    width: 100%;
}

.shader-actions {
    display: grid;
    gap: 0.4rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 0.7rem;
}

.shader-actions button {
    background: linear-gradient(120deg, rgba(67, 229, 251, 0.22), rgba(251, 199, 67, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 0.32rem;
    color: #f4fdff;
    cursor: pointer;
    font-size: 0.54em;
    font-weight: bold;
    letter-spacing: 0.04em;
    padding: 0.42rem 0.2rem;
    text-transform: uppercase;
}

.shader-actions button:hover {
    border-color: rgba(98, 251, 67, 0.7);
    transform: translateY(-1px);
}

.shader-info {
    background: rgba(17, 21, 28, 0.72);
    border-radius: 0.35rem;
    margin-bottom: 0.7rem;
    padding: 0.55rem;
}

.shader-info h3 {
    font-size: 0.95em;
    margin-bottom: 0.3rem;
}

.shader-info p,
.shader-status {
    font-size: 0.57em;
    line-height: 1.35;
    margin-bottom: 0.35rem;
}

.shader-status {
    border-left: 3px solid rgba(67, 229, 251, 0.75);
    margin-top: 0.45rem;
    padding-left: 0.45rem;
}

.shader-preset-list {
    display: grid;
    gap: 0.35rem;
    max-height: 48vh;
    overflow-y: auto;
    padding-right: 0.1rem;
}

.shader-preset-card {
    background: rgba(11, 14, 19, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.35rem;
    cursor: pointer;
    display: block;
    font-size: 0.55em;
    padding: 0.45rem;
    text-align: left;
    width: 100%;
}

.shader-preset-card strong {
    color: #dbf8ff;
    display: block;
    font-size: 1em;
    margin-bottom: 0.15rem;
}

.shader-preset-card span {
    color: #b3d4dd;
    font-size: 0.86em;
    text-transform: uppercase;
}

.shader-preset-card.is-active {
    border-color: rgba(98, 251, 67, 0.76);
    box-shadow: 0 0 0 1px rgba(98, 251, 67, 0.35);
}

.shader-canvas-wrap {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.4rem;
    margin-bottom: 0.7rem;
    overflow: hidden;
}

.shader-telemetry-hud {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    display: flex;
    gap: 0.65rem;
    background: rgba(8, 12, 18, 0.82);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(67, 229, 251, 0.4);
    border-radius: 0.35rem;
    padding: 0.25rem 0.6rem;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    font-family: Consolas, Menlo, Monaco, monospace;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.shader-telemetry-hud.is-hidden {
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
}

.hud-item {
    display: flex;
    align-items: baseline;
    gap: 0.28rem;
}

.hud-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.hud-val {
    font-size: 0.76rem;
    color: #43e5fb;
    font-weight: 600;
}

#hud-fps {
    color: #62fb43;
}

#shader-canvas,
#shader-canvas-webgpu {
    background: #000;
    display: block;
    height: 47vh;
    width: 100%;
}

#shader-editor {
    background: rgba(13, 16, 24, 0.92);
    border: 1px solid rgba(67, 229, 251, 0.45);
    border-radius: 0.4rem;
    color: #f4f8ff;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 0.56em;
    line-height: 1.45;
    min-height: 23rem;
    padding: 0.7rem;
    resize: vertical;
    width: 100%;
}

.shader-errors {
    background: rgba(45, 8, 14, 0.85);
    border: 1px solid rgba(255, 117, 132, 0.45);
    border-radius: 0.4rem;
    color: #ffe5ea;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 0.5em;
    line-height: 1.35;
    margin-top: 0.55rem;
    min-height: 2.1rem;
    padding: 0.45rem;
    white-space: pre-wrap;
}

.shader-template-actions {
    display: grid;
    gap: 0.4rem;
    grid-template-columns: 1fr 1fr;
    margin-top: 0.4rem;
}

.shader-template-btn {
    background: rgba(14, 24, 35, 0.85);
    border: 1px solid rgba(67, 229, 251, 0.35);
    border-radius: 0.32rem;
    color: #bbf0ff;
    cursor: pointer;
    font-size: 0.52em;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.38rem 0.2rem;
    text-transform: uppercase;
    transition: all 0.15s ease;
}

.shader-template-btn:hover {
    background: rgba(67, 229, 251, 0.22);
    border-color: rgba(67, 229, 251, 0.7);
    color: #ffffff;
    transform: translateY(-1px);
}

.shader-transport-bar {
    align-items: center;
    background: rgba(13, 17, 24, 0.95);
    border: 1px solid rgba(67, 229, 251, 0.28);
    border-radius: 0.38rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    padding: 0.38rem 0.65rem;
}

.transport-left,
.transport-center,
.transport-right {
    align-items: center;
    display: flex;
    gap: 0.45rem;
}

.transport-btn {
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.3rem;
    color: #e5f5ff;
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 0.58em;
    font-weight: 600;
    gap: 0.3rem;
    letter-spacing: 0.03em;
    padding: 0.32rem 0.55rem;
    transition: all 0.15s ease;
}

.transport-btn:hover {
    background: rgba(67, 229, 251, 0.2);
    border-color: rgba(67, 229, 251, 0.6);
    color: #ffffff;
}

.transport-btn.is-playing {
    border-color: rgba(98, 251, 67, 0.5);
    color: #62fb43;
}

.transport-time {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(67, 229, 251, 0.2);
    border-radius: 0.25rem;
    color: #43e5fb;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 0.68em;
    font-weight: 700;
    min-width: 4.2rem;
    padding: 0.22rem 0.45rem;
    text-align: center;
}

.transport-group {
    align-items: center;
    display: flex;
    gap: 0.25rem;
}

.transport-group label {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.52em;
    letter-spacing: 0.06em;
    margin: 0;
    text-transform: uppercase;
}

.transport-select {
    background: rgba(8, 11, 16, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.28rem;
    color: #dbf8ff;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 0.56em;
    padding: 0.25rem 0.4rem;
}

.shader-share-toast {
    align-items: center;
    background: rgba(14, 28, 22, 0.94);
    border: 1px solid rgba(98, 251, 67, 0.65);
    border-radius: 0.35rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    color: #d2ffd2;
    display: flex;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 0.58em;
    font-weight: 600;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    padding: 0.45rem 0.75rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.shader-share-toast[hidden] {
    display: none;
}

.transport-btn.is-copied {
    background: rgba(98, 251, 67, 0.22);
    border-color: rgba(98, 251, 67, 0.75);
    color: #62fb43;
}

.shader-editor-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: space-between;
    margin-bottom: 0.3rem;
}

.editor-header-left {
    align-items: center;
    display: flex;
    gap: 0.55rem;
}

.shader-format-badge {
    background: rgba(98, 251, 67, 0.15);
    border: 1px solid rgba(98, 251, 67, 0.5);
    border-radius: 0.25rem;
    color: #62fb43;
    display: inline-block;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 0.52em;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    text-transform: uppercase;
}

.shader-format-badge.is-webgl2 {
    background: rgba(67, 229, 251, 0.15);
    border-color: rgba(67, 229, 251, 0.5);
    color: #43e5fb;
}

.shader-format-badge.is-webgpu {
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(192, 132, 252, 0.6);
    color: #c084fc;
}

.editor-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.52em;
}

.editor-hint kbd {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 0.2rem;
    color: #fff;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 0.9em;
    padding: 0.1rem 0.28rem;
}

#shader-canvas-wrap:fullscreen,
#shader-canvas-wrap:-webkit-full-screen {
    border: none;
    border-radius: 0;
    height: 100vh;
    margin: 0;
    width: 100vw;
}

#shader-canvas-wrap:fullscreen #shader-canvas,
#shader-canvas-wrap:fullscreen #shader-canvas-webgpu,
#shader-canvas-wrap:-webkit-full-screen #shader-canvas,
#shader-canvas-wrap:-webkit-full-screen #shader-canvas-webgpu {
    height: 100vh;
    width: 100vw;
}

@media (max-width: 1024px) {
    #shader-canvas,
    #shader-canvas-webgpu {
        height: 36vh;
    }

    #shader-editor {
        min-height: 18rem;
    }

    .shader-actions {
        grid-template-columns: 1fr;
    }

    .shader-preset-list {
        max-height: 24vh;
    }
}

@media (max-width: 719px) {
    .shader-sidebar {
        border-radius: 0;
        border: none;
        box-shadow: none;
        min-height: 100dvh;
        padding: 1rem;
    }

    #shader-canvas,
    #shader-canvas-webgpu {
        height: 50vh;
    }

    #shader-editor {
        min-height: 14rem;
    }

    .shader-preset-list {
        max-height: 30vh;
    }
}
