
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;

    font-family: Arial, Helvetica, sans-serif;

    background: linear-gradient(
        135deg,
        #2563eb,
        #0f172a
    );
}

.card {
    width: 430px;
    max-width: 100%;

    padding: 40px 35px;

    overflow: hidden;

    text-align: center;

    background: #ffffff;

    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 25px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.30);
}

.card h2 {
    margin-bottom: 30px;

    color: #1e293b;

    font-size: 28px;
    line-height: 1.4;
}

.track {
    position: relative;

    width: 100%;
    height: 65px;

    overflow: hidden;

    background: #edf2f7;

    border: 2px solid #d6e4ff;
    border-radius: 50px;

    touch-action: none;
    overscroll-behavior: contain;

    user-select: none;
    -webkit-user-select: none;
}

.fill {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;

    width: 0;
    height: 100%;

    background: linear-gradient(
        90deg,
        #60a5fa,
        #2563eb
    );

    pointer-events: none;
    will-change: width;
}

.label {
    position: absolute;
    inset: 0;
    z-index: 2;

    display: flex;
    justify-content: center;
    align-items: center;

    padding-left: 58px;

    color: #475569;

    font-size: 17px;
    font-weight: bold;
    letter-spacing: 0.3px;

    pointer-events: none;
}

.thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    z-index: 3;

    width: 57px;
    height: 57px;

    display: flex;
    justify-content: center;
    align-items: center;

    color: #ffffff;

    font-size: 26px;
    font-weight: bold;

    background: linear-gradient(
        135deg,
        #2563eb,
        #1d4ed8
    );

    border-radius: 50%;

    box-shadow:
        0 8px 20px rgba(37, 99, 235, 0.45);

    transform: translate3d(0, 0, 0);
    will-change: transform;

    cursor: grab;

    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.thumb.dragging {
    cursor: grabbing;

    box-shadow:
        0 6px 16px rgba(37, 99, 235, 0.55);

    transform-origin: center;
}

.track.success {
    border-color: #86efac;
    background: #ecfdf5;
}

.track.success .fill {
    background: linear-gradient(
        90deg,
        #4ade80,
        #16a34a
    );
}

#msg {
    min-height: 25px;

    margin-top: 22px;

    color: #16a34a;

    font-size: 18px;
    font-weight: bold;
}

@media (max-width: 480px) {
    body {
        padding: 14px;
    }

    .card {
        padding: 32px 20px;
        border-radius: 22px;
    }

    .card h2 {
        margin-bottom: 25px;

        font-size: 23px;
    }

    .label {
        font-size: 15px;
    }
}
