* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f4f5f7;
    color: #252525;
    font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
    font: inherit;
}

.tool {
    width: calc(100% - 30px);
    max-width: 850px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 3px 18px rgba(0,0,0,.08);
}

h1 {
    margin: 0 0 12px;
    text-align: center;
    font-size: 30px;
}

.intro {
    max-width: 680px;
    margin: 0 auto 28px;
    color: #555;
    text-align: center;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}


/* FILE */

.drop-zone {
    min-height: 210px;
    padding: 25px;
    border: 3px dashed #bbb;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 13px;
    text-align: center;
}

.drop-zone.drag {
    border-color: #1769e0;
    background: #f2f6fc;
}

.drop-zone strong {
    font-size: 19px;
}

.drop-zone span,
.drop-zone small {
    color: #777;
}

.file-button {
    display: inline-block;
    padding: 13px 25px;
    background: #222;
    color: #fff;
    border-radius: 7px;
    cursor: pointer;
    font-weight: bold;
}


/* EDITOR */

.editor {
    margin-top: 28px;
}

.file-info {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 14px;
}

.file-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-info span {
    flex-shrink: 0;
    color: #777;
}


/* WAVE */

.wave-box {
    padding: 15px 10px;
    background: #f5f6f8;
    border-radius: 10px;
    overflow: hidden;
}

#waveform {
    min-height: 140px;
}

.player-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 13px;
}

.play-button {
    padding: 10px 17px;
    border: 0;
    border-radius: 6px;
    background: #333;
    color: #fff;
    cursor: pointer;
}

.time-display {
    color: #666;
    font-variant-numeric: tabular-nums;
}

.wave-help {
    margin: 12px 0 0;
    color: #777;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}


/* TIMES */

.cut-times {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

.time-box,
.duration-box {
    padding: 13px;
    background: #f5f6f8;
    border-radius: 8px;
}

.time-box label,
.duration-box span {
    display: block;
    margin-bottom: 7px;
    color: #666;
    font-size: 12px;
}

.time-box input {
    width: calc(100% - 40px);
    padding: 9px;
    border: 1px solid #bbb;
    border-radius: 5px;
}

.time-box > span {
    font-size: 12px;
    color: #777;
}

.duration-box strong {
    font-size: 20px;
    color: #1769e0;
}


/* QUICK */

.quick-length {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.quick-length > span {
    margin-right: 4px;
    color: #666;
    font-size: 13px;
}

.quick-length button {
    padding: 7px 11px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.quick-length button:hover {
    border-color: #1769e0;
    color: #1769e0;
}


/* PREVIEW */

.preview-row {
    margin-top: 17px;
}

.preview-button {
    width: 100%;
    padding: 12px;
    border: 1px solid #1769e0;
    border-radius: 7px;
    background: #fff;
    color: #1769e0;
    cursor: pointer;
    font-weight: bold;
}


/* OPTIONS */

.editor h2 {
    margin: 28px 0 14px;
    text-align: center;
    font-size: 20px;
}

.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.check-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
}

.check-option input {
    width: 19px;
    height: 19px;
}

.check-option strong,
.check-option small {
    display: block;
}

.check-option small {
    margin-top: 4px;
    color: #777;
}


/* QUALITY */

.quality-box {
    margin-top: 13px;
    padding: 15px;
    background: #f5f6f8;
    border-radius: 8px;
}

.quality-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.quality-box select {
    width: 100%;
    padding: 11px;
    border: 1px solid #bbb;
    border-radius: 6px;
    background: #fff;
}


/* ACTION */

.action-button {
    width: 100%;
    margin-top: 20px;
    padding: 16px;
    border: 0;
    border-radius: 8px;
    background: #1769e0;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.action-button:disabled {
    opacity: .5;
    cursor: wait;
}


/* PROCESS */

.processing {
    margin-top: 22px;
    padding: 20px;
    background: #f5f6f8;
    border-radius: 8px;
    text-align: center;
}

.spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto 13px;
    border: 4px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.progress-wrap {
    height: 10px;
    margin: 14px 0 7px;
    background: #ddd;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    width: 0;
    height: 100%;
    background: #1769e0;
}


/* RESULT */

.result {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.result audio {
    width: 100%;
    margin: 5px 0 18px;
}

.result-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.result-info div {
    padding: 12px;
    background: #f5f6f8;
    border-radius: 7px;
}

.result-info span {
    display: block;
    margin-bottom: 5px;
    color: #777;
    font-size: 12px;
}

.download-button {
    display: inline-block;
    padding: 13px 25px;
    background: #16813b;
    color: #fff;
    border-radius: 7px;
    text-decoration: none;
    font-weight: bold;
}


/* TEXT */

.privacy {
    margin-top: 28px;
    padding: 17px;
    background: #eef7f0;
    border-radius: 8px;
    text-align: center;
}

.privacy p {
    margin: 7px 0 0;
    color: #555;
}

.description {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid #ddd;
}

.description p,
.description li {
    color: #555;
    line-height: 1.65;
}


/* MOBILE */

@media (max-width: 650px) {

    body {
        background: #fff;
    }

    .tool {
        width: 100%;
        margin: 0;
        padding: 18px 14px 30px;
        border-radius: 0;
        box-shadow: none;
    }

    h1 {
        font-size: 25px;
    }

    .intro {
        font-size: 14px;
    }

    .drop-zone {
        min-height: 180px;
    }

    #waveform {
        min-height: 120px;
    }

    .file-info {
        flex-direction: column;
        gap: 4px;
    }

    .player-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .play-button {
        width: 100%;
    }

    .time-display {
        text-align: center;
    }

    .cut-times {
        grid-template-columns: 1fr 1fr;
    }

    .duration-box {
        grid-column: 1 / -1;
        text-align: center;
    }

    .options {
        grid-template-columns: 1fr;
    }

    .result-info {
        grid-template-columns: 1fr;
    }

    .quick-length {
        justify-content: center;
    }
}