:root {
    --bg: #f8fbff;
    --card: #ffffff;
    --accent: #0ea5e9;
    --accent-600: #0284c7;
    --text: #0b1220;
    --glass: rgba(2, 6, 23, 0.03);
    --region: rgba(34, 197, 94, 0.18);
    --region-stroke: rgba(34, 197, 94, 0.95)
}

#waveform ::part(region-handle-left)::after,
#waveform ::part(region-handle-right)::after {
    content: ".\A.\A.";
    white-space: pre;
    width: 9px;
    height: 35px;
    background: #fff8f8;
    position: absolute;
    top: calc(50% - 18px);
    transform: translateX(-8px);
    border-radius: 23px;
    color: #16a7e6;
    line-height: 9px;
    text-align: center;
}

#waveform ::part(region-handle-right)::after {
    transform: translateX(-1px);
}



#waveform ::part(region-handle-left) {
    border-left: 7px solid #4CAF50;
    width: 0;
}

#waveform ::part(region-handle-right) {
    border-right: 7px solid #4CAF50;
    width: 0;
}

#waveform.remove ::part(region-handle-left),
#waveform.remove ::part(region-handle-right) {
    border-color: #ff835c !important;
}

#waveform.remove .fade-layer,
#waveform[fmode='nofade'] .fade-layer {
    display: none;
}

.waveformcontanr * {
    box-sizing: border-box;
}

.wrap {
    padding: 20px;
    padding-top: 0px;
}

h1 {
    font-size: 20px!important;
}
.top-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    align-items: center
}

.file-input {
    flex: 1;
    display: flex;
    gap: 8px
}

input[type=file] {
    display: none
}

.btn {
    background: #267ba1;
    border: none;
    color: white;
    padding: 9px 12px;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 6px 18px rgb(180 197 205 / 12%)
}

.btn.secondary {
    background: transparent;
    border: 1px solid rgba(11, 22, 32, 0.06);
    color: var(--muted);
    font-weight: 600
}

.controls {
    display: flex;
    gap: 8px;
    align-items: center
}

#waveform {
    height: 150px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.02), rgba(2, 6, 23, 0.02));
    padding: 8px;
    position: relative
}

.meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 35px
}

.card {
    background: var(--card);
    padding: 9px 12px;
    border-radius: 2px;
    flex: 1;
    border: 1px solid rgba(11, 22, 32, 0.04)
}

.small {
    font-size: 13px;
    color: var(--muted)
}

.progress {
    height: 6px;
    border-radius: 2px;
    overflow: hidden
}

.progress>i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-600))
}

.cutterfooter {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.download-list {
    display: flex;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap
}

.pill {
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 13px;
    color: #267ba1
}
.input-file-label img{
    cursor: pointer;
}
.input-file-label {
    padding: 5px 8px;
    border-radius: 3px;
    background: linear-gradient(180deg, #fff, #f6fbff);
    border: 1px dashed rgba(14, 165, 233, 0.12);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.center {
    display: flex;
    align-items: center;
    justify-content: center
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed
}

/* Region visuals: green fill, strong green stroke */
.wavesurfer-region {
    fill: var(--region) !important;
    stroke: var(--region-stroke) !important;
    stroke-width: 2px !important;
}

/* Base overlay */
.fade-layer {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.fade-mask {
    position: absolute;
    top: 0;
}

.fade-in-mask {
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0.95),
            rgba(255, 255, 255, 0));
    transform: translateX(7px);
}

.fade-out-mask {
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0.95));
    transform: translateX(-7px);
}


.region-remove:hover {
    color: #FF5722;
}

.region-play:hover {
    color: rgb(135, 135, 236);
}

.region-label.active {
    border-top: 2px solid rgb(135, 135, 236);
}

.region-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 1px;
    border-top: 2px solid transparent;
    z-index: 8;
    position: absolute;
    transform: translateX(-50%);
    background: #ffffff;
    padding: 1px 6px;
    user-select: none;
    border-radius: 2px;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.region-play,
.region-remove {
    min-width: 16px;
    font-size: 14px;
    background: transparent;
    border: none;
    font-weight: 700;
    cursor: pointer;
    padding: 0px 1px 2px 1px;
    font-size: 17px;
}

/* Fade overlay visuals */
.fade-overlay {
    position: absolute;
    top: 0;
    height: 100%;
    pointer-events: none
}

.fade-left {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.35), rgba(34, 197, 94, 0.12), transparent)
}

.fade-right {
    background: linear-gradient(270deg, rgba(34, 197, 94, 0.35), rgba(34, 197, 94, 0.12), transparent)
}

.wavesurfer-handle {
    width: 5px !important;
    background-color: #4CAF50 !important;
}

#fadecont {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px
}

.hide {
    display: none !important;
}

.meta {
    user-select: none;
}

.card label {
    display: flex;
    gap: 6px;
    align-items: center;
    cursor: pointer;
}

input[type='checkbox'] {
    margin: 0;
    cursor: pointer;
}

#fadeIn, #fadeOut {
    width: 100%;
    padding: 5px 8px;
    border-radius: 2px;
    border: 1px solid rgb(114 138 149 / 17%);
    margin-top: 3px;
    outline: none;
}

.flxbtw {
    display: flex;
    justify-content: space-between;
}

#btn-play {
    font-size: 14px;
    color: var(--accent-600);
    line-height: 16px;
    cursor: pointer;
}

.download-list>div {
    border: 1px solid #e7e7e7;
    border-radius: 2px;
    padding: 6px;
    width: calc(50% - 5px);
    justify-content: space-between;
}

audio {
    height: 36px;
}

.download-list:only-child {
    justify-content: end;
}

.xdisable {
    pointer-events: none;
    opacity: .2;
    cursor: not-allowed;
}

.xdisable #fadecont {
    display: none;
}

@media (max-width:650px) {
    .top-row {
        flex-direction: column
    }

    .meta {
        flex-direction: column;
        gap: 6px;
    }

    .controls {
        flex-wrap: wrap
    }

    #waveform ::part(region-handle-left) {
        border-left: 10px solid #4CAF50 !important;
    }

    #waveform ::part(region-handle-right) {
        border-right: 10px solid #4CAF50 !important;
    }
    .card{
        padding: 5px;
        border: none;
    }
    #btncontol{
        justify-content: end;
        margin-top: 22px;
    }
    .download-list>div{
        width: 100%;
    }
}
