@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;400&display=swap'); 
:root{
    font-family: 'Roboto', sans-serif;
    --bg-color: #DB5461;
    --secondary-bg-color: #C6D8D3;
    --valid-color: #4ade80; /* tailwind 400 green */
    --invalid-color: #f87171;   
    background-color: var(--bg-color);
}
header{
    font-size: 2.8rem;
    width: 50%;
    margin:0 auto;
    height: 100px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}
img{
    border-radius: 50%;
    height: 80px;
}
hr{
    width: 55%;
    color: black;
    border-color: black;
    border-color: black; 
}

.subheading{
    box-sizing: border-box;
    padding: 25px;
    border: 2px solid black;
    background-color: var(--secondary-bg-color);
    border-radius: 25px;
    font-size:1.5rem;
    width: 32%;
    margin:0 auto;
    margin-top:20px;
    margin-bottom:20px;
    height: 100px;

    display:flex;
    gap:30px;
    justify-content: space-between;
    align-items: center;

}
.subheading > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.subheading > div:first-child{
    color:var(--valid-color)
}
.subheading > div:nth-child(2){
    color:var(--invalid-color)
}
.cards{
    height: max(300px ,calc(100vh - 290px));
    width: 60%;
    margin:0 auto;

    display: grid;
    grid-template-columns: repeat(auto-fit, 320px);
    grid-auto-rows: 300px;
    gap: 20px;
    justify-content: center;

    overflow: auto;

}

.cards > .box{
    text-align: center;
    box-sizing: border-box;
    padding: 10px;
    
    display: grid;
    grid-template-columns: 1fr 1fr ;
    grid-template-rows: 85px;
    gap: 10px;  
    align-items: center;
    justify-items: center;
    
    border: 2px solid black;
    background-color: var(--secondary-bg-color);
    border-radius: 25px;
}
.cards > .box > div:nth-child(1){
    font-size: 2rem;
    grid-column: 1 / 3;
}
.cards > .box > div:nth-child(n+2){
    font-size: 1.5rem;
    grid-column: 1 / 3;
}
button{
    height: 100%;
    width: 80%;
}
.removeBtn{
    height: 100%;
    width:250px;
}
.readBtnOutside{
    height: 100%;
    width: 150px;
}

.addBookBtn{
    position: fixed;
    bottom: 40px;
    right:10px;
    height:80px;
    border: 2px solid black;
    background-color: var(--secondary-bg-color);
}

.addBookBtn:hover{
    transform: rotate(180deg);
    transition:400ms;
    height: 90px;
}


/* Styling dialog tag(modal) */
.modal::backdrop{
    background: rgb(0 0 0 / 0.4);
}
.modal{
    width: 500px;
    border: 3px solid black;
    border-radius: 25px;
    font-size: 1.5rem;
    background-color: var(--secondary-bg-color)
}
form > div{
    margin:5px;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
}
form > div > div{
    margin:10px;
}
input{
    width: 50%;
    outline:none;
    appearance: none;
    border-radius: 10px;
    padding:5px;
    border:2px solid black;
}
input:hover,
input:focus{
    border:2px solid black;
}
.readBtn{
    margin:20px;
    width: 40%;
}
.btns{
    display:flex;
    flex-direction: row;
    justify-content: space-evenly;
}
.btns > button, 
.readBtn{
    width: 40%;
    height: 50px;
}
button{
    border: 2px solid black;
    border-radius: 10px;
}

.validColor{
    background-color: var(--valid-color);
}
.invalidColor{
    background-color:var(--invalid-color);
    opacity: 1;
}
footer{
    position: fixed;
    bottom:0px;
    left:0px;
    width: 100%;
    color:white;
    background-color: black;
    padding:4px;

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

footer img{
    background-color: white;
    height: 25px;
}

footer img:hover{
    transform: rotate(360deg);
    transition: all 800ms;
}