.gradient-editor {
    max-width: 820px;
    margin: 32px auto;
}

.track-wrap {
    position: relative;
    margin-bottom: 80px;
}

.gradient-track {
    position: relative;
    height: 200px;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}

.stop-swatch {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 214px;
    border-radius: 5px;
    transform: translate(-50%, -50%);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .2);
    cursor: ew-resize;
    z-index: 3;
}

.stop-swatch.active,
.stop-swatch:hover {
    box-shadow:
        0 0 0 6px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 0, 0, .35),
        0 2px 6px rgba(0, 0, 0, .25);
}

.stop-percent {
    position: absolute;
    top: calc(100% + 15px);
    transform: translateX(-50%);
    width: 40px;
    text-align: center;
    z-index: 2;
}

.stop-percent input {
    padding: .2rem .4rem;
}

.stop-delete {
    display: none;
    position: absolute;
    top: -16px;
    right: -15px;
    width: 22px;
    height: 22px;
    background: #dc3545;
    border: 2px solid #fff;
    color: #fff;
    font-size: 18px;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .7);
}

.stop-color-btn {
    display: none;
    position: absolute;
    top: 7px;
    left: 18px;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .7);
    -webkit-appearance: none;
    appearance: none;
}

.stop-color-btn::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 50%;
}

.stop-color-btn::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.stop-swatch:hover .stop-color-btn {
    display: block;
}


.stop-swatch:hover .stop-delete {
    display: block;
}

fieldset.color-stops {
    margin-top: 22px;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: .5rem;
    padding: .75rem 1rem 1rem;
}

fieldset.color-stops legend {
    font-size: 1rem;
    width: auto;
    padding: 0 .4rem;
    margin-bottom: .5rem;
}

.stop-item {
    display: flex;
    align-items: center;
    padding: .5rem .75rem;
    border-radius: .5rem;
    border: 1px solid rgba(0, 0, 0, .06);
    margin-bottom: .5rem;
    cursor: pointer;
    height: 40px;
}

.stop-item.active {
    background: rgba(0, 123, 255, .08);
    border-color: rgba(0, 123, 255, .35);
}

.stop-item input[type=color] {
    width: 36px;
    height: 28px;
    border: none;
    background: transparent;
    padding: 0;
}

.stop-item .pos {
    width: 52px;
    text-align: right;
    margin-left: .5rem;
    font-variant-numeric: tabular-nums;
}

.gradient-track::after {
    content: "";
    position: absolute;
    inset: 0;
    cursor: crosshair;
    z-index: 1;
}

.hint {
    font-size: .9rem;
    color: #6c757d;
}

.stop-swatch {
    top: 50% !important;
    transform: translate(-50%, -50%);
}

.preset-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preset-item {
    width: 100%;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ccc;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preset-item:hover {
    transform: scale(1.03);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}


@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

@keyframes gradientRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes gradientPulse {

    0%,
    100% {
        filter: brightness(100%);
    }

    50% {
        filter: brightness(120%);
    }
}


#cssOutput {
    font-family: monospace;
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 4px;
    width: 100%;
    min-height: 200px;
}

#animation-speed {
    width: 155px;
    text-align: center;
}

.content-table-gradient-type-col {
    width: 135px;
    white-space: nowrap;
}