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

html {
  font-size: 62.5%; 
}

body{
  font-family: monospace;
  height: 100vh;
  display: grid;
  grid-template-rows: 1fr 6.5fr;
  overflow-x: hidden;
  font-size: 1.6rem;
  
}

.header{

  background-color: black;
  color: white;
  font-size: 2.5rem;
  min-height: 9rem;
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.header .add-book{
  border: none;
  outline: none;
  appearance: none;

  height: 5.5rem;
  width: auto;
  font-size: 0.5em;
  background-color: rgb(135, 36, 228);
  padding: 3rem 1rem;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;

    transition: 0.2s ease-in-out;
  cursor: pointer;
}
.header .add-book svg{
  vertical-align: middle;
  height: 3.5rem
}


.header .add-book .add-text{
  visibility: hidden;
  position: absolute;
  width: 9rem;
  font-size:1rem;
  top: 105%;
  color: rgb(255, 255, 255);
  left: 0%;
  background-color: rgb(70, 70, 70);

}
.header .add-book:hover{
  background-color: rgb(152, 43, 253);
  padding: 3rem 1.2rem;

}

.header .add-book:hover .add-text{
  visibility: visible;
  opacity: 90%;
  border-radius: 5px;
  padding: 0.2rem;
}

.form-container{
  display: none;
  width: 100%;
  height: 100%;
  background-color: rgb(0, 0, 0,0.7);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 800;
}
.add-form{
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: start;
  gap: 2rem;
  background-color: rgba(0, 0, 0, 0.95);

  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: auto;
  max-height: 80%;
  width: 90%;
  max-width: 700px;
  overflow-y: auto;
  z-index : 900;


  border: solid 1px rgb(137, 11, 254);
  border-radius: 1.2rem;
  
  font-size: 2.6rem;
  color: white;

  padding: 2rem;
  
  box-shadow: 0 10px 40px rgba(51, 0, 170, 0.5);

}

.add{
  display: flex;
  gap: 2rem;

  width: 100%;
}
.add input {
  height: 2.4rem;   
  width: 90%;    
  padding: 0.4rem 0.8rem;
  font-size: 1.4rem;    
  line-height: 1.2; 
}

.add .page-label{
  font-size: 1.8rem;
}

.add.pages input{
  width: 25%;
  margin-left: -1rem;
}

.add-form .submit{
  border-radius: 5px;
  background-color: blueviolet;
  font-size: 2rem;
  padding: 0.8rem;
  
  border: 1px solid blueviolet;
}

.add-form .close-btn{
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2.5rem;
  padding: 0.3em 0.6rem;
  background: transparent;
  border: none;
  color: #fff;
}

.submit:hover , .close-btn:hover , .read input:hover{
  cursor: pointer;
  opacity: 80%;
}
.add-form .read{
 display: flex;
 gap: 2rem;
 justify-content: center;
 align-items: end;
}

.read input[type = 'checkbox']{
  width: 3rem;
  height: 3rem;
  background-color: #ffffff;    
}
.cards{
  padding:5rem;

  display: grid;
  gap: 4.5rem;
  grid-template-rows: repeat(3,1fr);
  grid-template-columns: repeat(auto-fill,minmax(250px,1fr));

  background-color: #151515;
}

.card{
  background-color: #1e1e1e;
  border: 2px solid rgb(138,43,226);
  border-left: 8px solid rgb(255, 252, 231);
  border-radius: 10px;
  padding: 2rem;

  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
    color: #e0e0e0;
  accent-color: #49adff;
}

.card .name{
  font-size: 2.4rem;
}

.card .pages{
  font-size: 1.5rem;
}

.card .seen{
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 1.8rem;
}

.card .seen input{
  width: 2rem;
  height: 2rem;
}

.card .remove-btn{
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.6rem;
}
.card .remove-btn:hover{
  font-size: 1.9rem;
  cursor: pointer; 
  opacity: 80%;
}
