* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}
@media screen and (min-width: 300px) {
    .container {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .label {
        padding: 5px;
        font-size: 12px;
        color: #111;
    }
    
    .copy-text {
        position: relative;
        padding: 5px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 10px;
        display: flex;
    }
    
    .copy-text input.text {
        width: 400px;
        padding: 5px;
        font-size: 12px;
        color: #555;
        border: none;
        outline: none;
    }
    
    .copy-text button {
        padding: 5px;
        background: #5784f5;
        color: #fff;
        font-size: 12px;
        border: none;
        outline: none;
        border-radius: 10px;
        cursor: pointer;
    }
    .lone>img{
        width: 20px;
        height: 20px;
        cursor: pointer;
    }
    
    .copy-text button:active {
        background: #809ce2;
    }
    
    .copy-text button:before {
        content: "Copied";
        position: absolute;
        top: -45px;
        right: 0px;
        background: #5c81dc;
        padding: 4px 5px;
        border-radius: 20px;
        font-size: 15px;
        display: none;
    }
    
    .copy-text button:after {
        content: "";
        position: absolute;
        top: -20px;
        right: 25px;
        width: 10px;
        height: 10px;
        background: #5c81dc;
        transform: rotate(45deg);
        display: none;
    }
    
    .copy-text.active button:before,
    .copy-text.active button:after {
        display: block;
    }    
}
body {
    font-family: "Roboto", Sans-Serif;
    background: #f0f2f7;
}

.container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.label {
    padding: 10px;
    font-size: 12px;
    color: #111;
}

.copy-text {
    position: relative;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    display: flex;
}

.copy-text input.text {
    width: 400px;
    padding: 10px;
    font-size: 12px;
    color: #555;
    border: none;
    outline: none;
}

.copy-text button {
    padding: 10px;
    background: #5784f5;
    color: #fff;
    font-size: 12px;
    border: none;
    outline: none;
    border-radius: 10px;
    cursor: pointer;
}
.lone>img{
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.copy-text button:active {
    background: #809ce2;
}

.copy-text button:before {
    content: "Copied";
    position: absolute;
    top: -45px;
    right: 0px;
    background: #5c81dc;
    padding: 8px 10px;
    border-radius: 20px;
    font-size: 15px;
    display: none;
}

.copy-text button:after {
    content: "";
    position: absolute;
    top: -20px;
    right: 25px;
    width: 10px;
    height: 10px;
    background: #5c81dc;
    transform: rotate(45deg);
    display: none;
}

.copy-text.active button:before,
.copy-text.active button:after {
    display: block;
}