@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

@-webkit-keyframes animatetop {
    from { opacity: 0;top: -300px}
    to { opacity: 1;top: 20%}
  }

@keyframes animatetop {
    from { opacity: 0;top: -300px}
    to { opacity: 1;top: 20%}
  }


  @-webkit-keyframes opacity {
    from {opacity: 0}
    to {opacity: 1}
  }


  @keyframes opacity {
    from {opacity: 0}
    to {opacity: 1}
  }
:root {
    --lighttext: hsl(195, 100%, 94%);
    --darktext: #09151c;
    --darkbg: #09151c;
    --lightbg: hsl(195, 100%, 94%);
    --gridBG: #09151c;
}

:root,
:root.light {
    --header-text-color: hsl(195, 100%, 94%);
    --header-bg-color: #09151c;
    --bg-color: hsl(195, 100%, 94%);
    --text-color: #09151c;
    --p-color: #1f2b32;
    --card-color: rgb(255, 255, 255);
    --modal-bg: hsl(195, 100%, 94%);
    }
:root.dark {
    --header-text-color: #09151c;
    --header-bg-color: rgb(233, 241, 244);
    --bg-color: #09151c;
    --text-color: rgb(233, 241, 244);
    --p-color: #cccccc;
    --card-color: rgb(0, 50, 90);
    --modal-bg: #09151c;
    }
* {
    box-sizing: inherit;
    transition: background 0.4s ease-out;
}
html, body {
    background: var(--bg-color);
    box-sizing: border-box;
    font-family: 'Ubuntu', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    height: 100%;
}
.maincontainer {
    display:flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    position: relative;
}
header {
    background: var(--header-bg-color);
    display:flex;
    height: 80px;
    justify-content: center;
    position: relative;
}

h1 {
    padding-top: 15px;
    color: var(--header-text-color);
    cursor:default;
    font-family: 'Space Grotesk', 'Ubuntu', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
}
.bookitem p {
    cursor:default;
    margin: 5px 0;

}
.readstatus__div {
    bottom: 6%;
    display: inline-block;
    position: absolute;
    right: 2%;
}

.readstatus_img {
    width: 20px;
}
p {
    color: var(--p-color);
    margin: 0;
    position: relative;
}
.bookitem p:first-of-type {
    font-style: italic;
    padding: 5px 0;
}

.bookitem p:nth-last-child(3) {
    font-size: 0.9rem;
    margin-top: 50px;
    opacity: 0.9;
}

h2, h3 {
    color: var(--text-color);
    cursor:default;
    font-weight: 500;
}

.bookdisplay {
    display: grid;
    gap: 50px;
    grid-template-columns: repeat( auto-fit, minmax(280px, 1fr) );
    grid-template-rows: -webkit-min-content;
    grid-template-rows: min-content;
    margin-bottom: auto;
    overflow: auto;
    padding: 6% 2%;
}

.bookitem {
    background: var(--card-color);
    border-left: 6px solid red;
    border-radius: 6px;
    box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.413);
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    padding: 3%;
    position: relative;

}

.bookitem:last-of-type {
    background: rgba(255, 255, 255, 0.603);
    border: 4px dashed grey;
    box-shadow: none;
    font-size: 6rem;
    text-align: center;
    cursor: pointer;
    color: var(--header-bg-color);
    transition: all 0.4s linear;

}

h2 {
    margin: 0;
    padding: 0 8% 0 0;
    overflow-wrap: break-word;

}
.modal {
    -webkit-animation-duration: 0.4s;
            animation-duration: 0.4s;
    -webkit-animation-name: animatetop;
            animation-name: animatetop;
    background: var(--modal-bg);
    border-radius: 6px;
    box-shadow: 0 0 5px 3px rgba(0, 0, 0, 0.306);
    left: 50%;
    position: absolute;
    top: 20%;
    transform: translate(-50%, 0);
    width: clamp(280px, 60vw, 600px);
    z-index: 3;

}
form {
    display:flex;
    flex-flow: column nowrap;
    gap: 1rem;
    padding: 3%;
}
#p__form__author label, #p__form__title label {
    border-width: 0 !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    height: 1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    white-space: nowrap !important;
    width: 1px !important;
}
.btnDelete {
    color: var(--p-color);
    cursor:pointer;
    font-size: 28px;
    opacity: 0.7;
    position: absolute;
    right: 2%;
    top: 6%;
    transition: transform 0.4s linear,
    scale 0.6s ease-in-out
}

.btn-close {
    background: none;
    border: none;
    color: var(--p-color);
    cursor: pointer;
    font-size: 28px;
    opacity: 0.7;
    padding: 0.5rem 0.7rem;
    position: absolute;
    right: 0;
    top: 0;

  }
.toggle-container {
    position: absolute;
    top: 40%;
    right: 5%;
}

.btnDelete:hover, .btn-close:hover {
    opacity: 1;
}
svg {
    scale: 2;
}
.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.4s ease-in-out;
}
.theme-btn:hover {
    scale: 1.3;
}
h3 {
    font-size: 2rem;
    text-align: center;
}
footer {
    align-items: center;
    background: var(--bg-color);
    color: var(--text-color);
    display:flex;
    height: 80px;
    justify-content: center;
    width: 100%;
}

footer a {
    color:var(--text-color);
    text-decoration: none;
}

.btnsubmit {
    background: var(--text-color);
    color: var(--bg-color);
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
    font-size: 1em;
    font-weight: 700;
    padding: 0.8rem 1.4rem;
    text-align: center;
    width: 100%;
  }

  .btnsubmit:hover {
    -webkit-filter:brightness(125%);
            filter:brightness(125%)

  }

  input[type="text"] {
    height: 3rem;
    outline:none;
    position: relative;
    width: 100%;
  }

input[type="text"]:focus{
  }
  
  .overlay {
    -webkit-animation: opacity 0.4s;
            animation: opacity 0.4s;
    -webkit-backdrop-filter: blur(5px);
            backdrop-filter: blur(5px);
    background: rgba(0, 0, 0, 0.5);
    bottom: 0;
    height: 100vh;
    left: 0;
    opacity: 1;
    position: fixed;
    right: 0;
    top: 0;
    width: 100vw;
    z-index:2;
  }

.hidden {
    -webkit-animation: opacity 0.4s;
            animation: opacity 0.4s;
    display: none;
    opacity: 0;
  }

#title__placeholder, #author__placeholder {
    color:rgb(120, 120, 120);
    height: 0;
    left: 0.5rem;
    margin: 0;
    padding: 0;
    pointer-events: none;
    position: relative;
    top: -3rem;
    transition: all 0.2s linear;
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
  }

.placeholder__moved {
    -webkit-filter: brightness(85%);
            filter: brightness(85%);
    font-size: 0.8rem;
    transform:translateY(-2rem);
  }
.theme-btn.light {
    display: none;
    }
 
.dark .theme-btn.light {
    display: block;
    fill:var(--header-text-color);
    }

.dark .theme-btn.dark {
    display: none;
    }

.theme-btn.dark {
        fill:var(--header-text-color);
    }


.tooltiptext {
    visibility: hidden;
    width: 140px;
    background-color: var(--header-bg-color);
    color: var(--header-text-color);
    text-align: center;
    padding: 5px 5px;
    border-radius: 6px;
    font-size: 1rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}
.tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--header-bg-color) transparent transparent transparent;
}
    
.btnopen:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.btnopen:hover {
    border-color: var(--header-bg-color);
}

