*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins';
}
:root{
    --color: #f50;
}
body{
    min-height: 100vh;
    width: 100vw;
    min-width: max-content;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.clock{
    min-width: 300px;
    max-width: 1080px;
    height: 250px;
    background: linear-gradient(#000,#111,#222);
    border-radius: 10px;
    border: 3px solid var(--color);
    display: grid;
    grid-template-rows: 70px auto;
    user-select: none;
}
.clock:hover .change-color, .clock:hover .reset-default-colors{
    opacity: 1;
    transition: all .3s ease;
}
.clock .date-info{
    position: relative;
    border-bottom: 3px solid var(--color);
    display: grid;
    place-content: center;
    color: var(--color);
}
.clock .date-info .info-text {
    font-size: 1em;
}
.change-color, .reset-default-colors{
    opacity: 0;
    position: absolute;
    margin: .5rem;
    cursor: pointer;
    font-size: clamp(2em, 2vw, 2.5em);
    color: #474747;
    z-index: 10;
}
.change-color input[type="color"] {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 20;
}
.reset-default-colors{
    right: 0;
}

.clock .time{
    display: grid;
    place-content: center;
    font-size: clamp(3em, 10vw, 6em);
    color: var(--color);
}

@media screen and (min-width : 350px){
    .clock{
        width: 90%;
    }
}

@media screen and (min-width : 480px){
    .clock{
        border-radius: 20px;
        border: 5px solid var(--color);
    }
    .clock .date-info{
        border-bottom: 5px solid var(--color);
    }
    .clock .date-info .info-text {
        font-size: clamp(1.5em, 2vw, 3em);
    }
}

@media screen and (min-width : 720px){
    .clock{
        height: 300px;
    }
}

@media screen and (min-width : 1024px){
    .clock{
        height: 400px;
    }
}