* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100%;
    font-family: Rubik, sans-serif;
}
.wrapper, .pre-wrapper {
    display: grid;
    width: 60%;
    max-width: 1500px;
    margin: 0 auto;
    align-items: center;
    justify-items: center;
    height: 100%;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: 200px;
}
.wrapper {
    margin-bottom: 80px;
}
#value-add {
    all: unset;
    width: 65%;
    max-width: 1500px;
    height: 30px;
    display: block;
    padding: 10px;
    font-size: 22px;
    margin: 20px auto 0 auto;
    border: 1px solid #444444;
    transition: .5s ease;
}
#value-add:focus {
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.1);
}
.add {
    font-size: 50px;
    border: 2px solid #444444;
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: #fff;
    background: #444444;
}

.color {
    background-color: black;
    width: 150px;
    height: 150px;
    border: 2px solid #444444;
    position: relative;
    overflow: hidden;
    transition: all .2s ease;
}

.color .inner {
    width: 100%;
    height: 100%;
    display: flex;
    transform: translateY(100%);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-size: 27px;
    transition: .4s ease;
    background-color: rgba(0, 0, 0, .8);
    color: white;
    top: 100%;
    position: relative;
}
.color .inner:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: -100%;
    background-color: #fff;
}
.color .inner ion-icon {
    color: #f33f3f;
    font-size: 25px;
    cursor: pointer;
    bottom: 15px;
    position: absolute;
}
.delete-icon {
    bottom: 15px;
    left: unset;
}
.create-icon {
    bottom: 15px;
    right: 40px;
    display: none;
}

.color:hover .inner {
    transform: translateY(0);
    top: 0;
}
.separation-line {
    width: 65%;
    max-width: 1500px;
    margin: 50px auto;
    height: 2px;
    background-color: #444444;
}
.hidden-value {
    display: block;
    transform: translateX(-100%);
/*    width: 1px;*/
    height: 1px;
    z-index: -1;
    outline: none;
}
.tooltip {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.copied {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .85);
    font-size: 1.2rem;
    font-weight: 600;
    z-index: 999;
    user-select: none;
    -webkit-user-select: none;

    display: flex;
    justify-content: center;
    align-items: center;

    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(.28, .01, 0, 1);;
}
.tooltip.active ~ .copied {
    transform: translateX(0%);
}
.not-valid {
    transition: all .4s ease;
}
.not-valid span {
    width: 100%;
}
.footer {
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    left: 0;
    bottom: 0;
    height: 55px;
    width: 100%;
    background-color: #4b4b4b;
    color: white;
    text-align: center;

    user-select: none;
    -webkit-user-select: none;
}
#open-library {
    cursor: pointer;
    text-transform: uppercase;
}
.library {
    background-color: #4b4b4b;
    position: absolute;
    border-radius: 10px;
    top: 200px;
    left: -600px;
    max-width: 400px;
    color: white;
    max-height: 500px;
    overflow: auto;
    padding: 30px;

    display: block;
    opacity: 0;
    transition: .1s linear;

}
.l-active {
    left: 10px;
    opacity: 1;
}
#color-wrapper {
    display: grid;
    margin: 0 auto;
    align-items: center;
    justify-items: center;
    height: 100%;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
    gap: 0 20px;
}
@media (max-width: 1450px) {
    #value-add {
        width: 75%;
    }
    .wrapper, .pre-wrapper {
        width: 75%;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 750px) {
    .color {
        width: 120px;
        height: 120px;
    }
    .wrapper, .pre-wrapper {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 170px;
    }
    .copied, .tooltip {
        user-select: all;
        -webkit-user-select: all;
    }
    .copied {
        display: none;
    }
    .tooltip {
        font-size: 1.35rem;
    }
}