body {
    font-family: "Comic Sans MS", Arial, sans-serif;
    margin: 0;
    background: #fdfdfd;
    color: #333;
    text-align: center;
    min-height: 100vh;
    min-width: 100vw;
    overflow: hidden;

    #reader {
        width: 100vw;
        height: calc(100vh - 120px);
        position: fixed;
        top: 0;
        left: 0;
        /* border: 3px solid #ff9800; */
        /* border-radius: 13px; */
        overflow: hidden;
        z-index: 1000;

        video {
            width: 100vw;
            height: 100vh;
            object-fit: cover;
        }
    }

    .controls {
        margin: 15px 0;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        position: fixed;
        bottom: 0px;
        z-index: 1001;
    }


    button {
        margin-top: 10px;
        width: calc(100% - 40px);
        padding: 12px 18px;
        background: #ff9800;
        color: white;
        font-weight: bold;
        font-size: 16px;
        border: none;
        border-radius: 30px;
        cursor: pointer;
        transition: all 0.2s;
        box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
        width: fit-content;

        &:hover {
            background: #e67e22;
            transform: scale(1.05);
        }
    }

    .centredInformations {
        z-index: 1001;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        bottom: 80px;
        display: none;
        flex-direction: column;
        align-items: center;

        #centredScanningStatus {
            font-size: 18px;
            margin: 10px 0;
            color: white;
            text-shadow: 1px 1px 4px #000;
        }

        #loader {
            display: none;
            /* border: 5px solid #f3f3f3; */
            border: 7px solid #f3f3f300;
            border-top: 7px solid #3498db;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
            margin: 10px auto;
        }
    }

    #scanningStatus {
        position: fixed;
        bottom: 50px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1001;
        font-size: 16px;
        margin: 10px 0;
        color: #c8c8c8;
    }

    .previewScreen {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 3000;
        animation: fadeIn 0.3s;

        &.active {
            display: flex;
        }

        .previewContent {
            background: #fff;
            padding: 20px;
            width: calc(100% - 80px);
            border-radius: 8px;
            text-align: center;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
            margin-bottom: 10px;

            #previewImage {
                max-width: 240px;
                max-height: 340px;
                margin-bottom: 10px;
            }

            #previewDetails {
                text-align: center;

                h3 {
                    margin: 8px 0 12px 0;
                    font-size: 28px;
                    font-weight: bold;
                    letter-spacing: 1px;
                }

                p {
                    margin: 6px 0;
                    font-size: 18px;
                    color: #6e6e6e;
                }
            }
        }

        button {
            margin-top: 10px;
            width: calc(100% - 40px);

            &#previewButtonNo {
                background: #e74c3c;

                &:hover {
                    background: #c0392b;
                }
            }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }
    }

    /* .form {
            position: absolute;
            max-width: 350px;
            margin: 20px auto;
            background: white;
            padding: 20px;
            border-radius: 15px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            text-align: left;

            label {
                font-weight: bold;
                display: block;
                margin: 10px 0 5px;
            }

            input {
                width: 100%;
                padding: 12px;
                border: 2px solid #ddd;
                border-radius: 12px;
                font-size: 16px;
                margin-bottom: 15px;

                &:focus {
                    border-color: #3498db;
                    outline: none;
                }
            }
        } */

    #addBookBtn {
        display: block;
        width: 100%;
        margin-top: 10px;
        background: #2ecc71;

        &:hover {
            background: #27ae60;
        }
    }

    .preview {
        position: absolute;
        margin-top: 15px;
        padding: 10px;
        background: #f9f9f9;
        border-radius: 12px;
        display: none;

        h3 {
            margin: 5px 0;
        }
    }

    background-color: #2c2c2c;

    .completeBookScreen {
        display: none;
        flex-direction: column;
        align-items: center;
        position: fixed;
        overflow-y: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: calc(100% - 20px);
        height: calc(100vh - 120px);
        background-color: white;
        z-index: 3000;
        animation: slideUp 0.3s;
        border-radius: 30px 30px 0 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 10px;

        .miniHeader {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;

            h3 {
                margin: 0;
                font-size: 20px;
                padding: 5px;
            }

            .closeButton {
                background: none;
                border: none;
                font-size: 24px;
                cursor: pointer;
                margin: 0;
                margin-left: 15px;
                padding: 5px;

                &:hover {
                    color: #e74c3c;
                }
            }
        }

        .bookDetails {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-top: 10px;

            .bookCover {
                max-width: 120px;
                max-height: 170px;
                margin-bottom: 15px;
                border-radius: 8px;
                box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            }

            p {
                margin: 6px 0;
                font-size: 18px;
                color: #6e6e6e;

                strong {
                    color: #333;
                }
            }
        }

        .form {
            position: relative;
            margin: 20px 0;
            text-align: left;
            display: flex;
            flex-direction: column;
            align-items: stretch;

            label {
                font-weight: bold;
                display: block;
                margin: 10px 0 5px;
            }

            input,
            select {
                padding: 12px;
                border: 2px solid #ddd;
                border-radius: 12px;
                font-size: 16px;
                margin-bottom: 15px;

                &:focus {
                    border-color: #3498db;
                    outline: none;
                }
            }

            select {
                height: 45px;
            }

            #addTagButton {
                padding: 8px 10px;
            }

            #tagsContainer {
                display: flex;
                flex-direction: column;
                align-items: stretch;
                gap: 8px;
                margin-bottom: 10px;

                .tag {

                    .tagInput {
                        margin: 0;
                    }

                    .removeTagButton {
                        padding: 10px;
                        font-size: 16px;
                        cursor: pointer;
                        margin-left: 5px;
                        background-color: transparent;

                        &:hover {
                            background-color: #f0f0f0;
                        }
                    }
                }
            }
        }

        #completeAddBookBtn {
            width: 100%;
            margin-top: 25px;
        }
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}