:root {
    --width: 100vw;
    --height: 100vh;
    --Beige: #f5f5dc;
    --Cream: #fffdd0;
    --Dark_Beige: #c2b280;
    --Soft_Brown: #a67c52;
    --Rich_Brown: #705438;
    --Soft_Gray: #d3d3d3;
    --Dark_Gray: #696969;
}

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

html {
    scroll-snap-type: y mandatory;
}

.page {
    scroll-snap-align: start;
    height: var(--height);
    width: var(--width);
}

#container {
    display: flex;
    flex-direction: column;
    height: auto;
}

#headding {
    height: var(--height);
    width: var(--width);
    display: grid;
    place-items: center;
    text-align: center;
    background-color: var(--Beige);
}

#headdingText {
    border: solid 5px var(--Rich_Brown);
    border-radius: 15px;
    padding: 50px;
    color: var(--Rich_Brown);
}

.box {
    height: auto;
    min-height: var(--height);
    width: var(--width);
    display: grid;
    place-items: center;
    background-color: var(--Cream);
}

#innerBox {
    height: auto;
    min-height: calc(var(--height)*0.90);
    width: 90%;
    border: solid 5px var(--Dark_Gray);
    border-radius: 15px;
    background: var(--Soft_Gray);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(100px, auto);
    gap: 20px;
    padding: 20px;
}


.book {
    border: solid 5px var(--Dark_Gray);
    background-color: var(--Beige);
    border-radius: 15px;
    height: calc(var(--height)*0.40);
    width: 100%;
    margin: 1%;
    display: grid;
    place-items: center;
}

#addBook {
    display: flex;
    justify-content: center;
    align-items: end;
}

#addBook button {
    height: 20%;
    width: 50%;
    margin: 10%;
    background-color: var(--Rich_Brown);
    border-radius: 8px;
    color: var(--Beige);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

#addBook button:hover {
    background-color: var(--Soft_Brown);
}

.book .name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.book .author, .book .pages {
    font-size: 1.2rem;
    color: var(--Dark_Gray);
    font-weight: 700;
}

#form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    width: 80%;
    max-width: 600px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    border: solid 5px var(--Dark_Gray);
    background-color: var(--Beige);
    border-radius: 15px;
    transition: opacity 0.3s ease;
}

#form.active {
    display: block;
}

#InputForm {
    position: relative;
}

#formHeadding {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--Dark_Gray);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

#formHeadding button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--Dark_Gray);
}

#bookForm {
    display: grid;
    gap: 10px;
}

#bookForm input[type="text"],
#bookForm input[type="number"],
#bookForm button[type="submit"] {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid var(--Dark_Gray);
    border-radius: 5px;
}

#bookForm button[type="submit"] {
    background-color: var(--Rich_Brown);
    color: var(--Beige);
    cursor: pointer;
}

#bookForm button[type="submit"]:hover {
    background-color: var(--Soft_Brown);
}

#blurOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(8px);
    pointer-events: none;
    z-index: 999;
    transition: opacity 0.3s ease;
}

#form.active ~ #blurOverlay {
    opacity: 1;
}

#form:not(.active) ~ #blurOverlay {
    opacity: 0;
}
