/* Ensure html and body take up the full height */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Make the body a flex container and add background image */
body {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background-image: url('/background.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Overlay to darken the background image for better readability */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(170, 169, 169, 0.4);
    z-index: -1;
}

h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    pointer-events: none;
    margin-top: 20px;
}

.instruction-banner {
    text-align: center;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: rgba(255, 215, 0, 0.9);
    border-radius: 8px;
    width: fit-content;
    filter: drop-shadow(1px 1px 0px rgba(30, 144, 255, 0.8)) drop-shadow(0px 0px 0px red);
    pointer-events: none;
}

.instruction-banner p {
    margin: 0;
    font-size: 18px;
    color: #000;
    font-weight: bold;
}
.title{
    filter: drop-shadow(1px 1px 0px rgba(30, 144, 255, 0.8)) drop-shadow(0px 0px 0px red);
}
.noselect {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none;   /* Safari */
    -khtml-user-select: none;    /* Konqueror HTML */
    -moz-user-select: none;      /* Old versions of Firefox */
    -ms-user-select: none;       /* Internet Explorer/Edge */
    user-select: none;           /* Non-prefixed version, supported by Chrome, Edge, Opera and Firefox */
}

main {
    flex: 1;
    position: relative;
    z-index: 1;
}

.text-container {
    display: flex;
    flex-flow: column nowrap;
    width: 90%;
    background-color: rgba(255, 255, 255, 0.5);
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 10px;
    margin: 20px auto; /* Centers the container horizontally */
    border-radius: 10px;
}

.text-container > * {
    margin: 10px;
}


.books-container{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 10px;
    align-items: flex-start;
}



.book-item {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    margin: 10px;
    padding: 10px;
    width: 180px; /* Adjusted to match image width */
    text-align: center;
    box-sizing: border-box;
    border-radius: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: none;
}

.book-item.comingSoon{
    background-color: rgba(255, 0, 0, 0.8) ;
}


.book-item img {
    width: 160px; /* Maximum image width */
    height: auto;
    border-radius: 5px;
    filter: drop-shadow(0px 2px 1px black);
}

.book-item h2 {
    margin-top: 10px;
    font-size: 16px;
    text-align: center;
}

.book-item a {
    text-decoration: none;
    color: inherit;
}

.book-item:hover {
    transform: scale(1.05);
}

.book-item:active {
    transform: scale(0.95);
}

.book-item::after {
    content: 'Tap to View';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.book-item:hover::after,
.book-item:focus::after {
    opacity: 1;
}

@media (hover: none) {
    .book-item::after {
        opacity: 1;
    }
}

/* Mobile Styles */
@media (max-width: 480px) {
    .books-container {
        justify-content: center;
    }

    .book-item {
        width: 120px; /* Match image width */
        margin: 5px;
        padding: 5px;
    }

    .book-item img {
        width: 100%; /* Image fills the container */
        height: auto;
    }

    .book-item h2 {
        font-size: 14px;
    }

    .instruction-banner p {
        font-size: 16px;
    }
}

.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 50px;
}

.loading .spinner {
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-top: 8px solid rgba(30, 144, 255, 0.8);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading p {
    color: #fff;
    font-size: 18px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.subscription-form {
    width: 100%;
    padding: 10px 20px 20px 20px;
    box-sizing: border-box;
    background-color: rgba(30, 144, 255, 0.8);
    display: flex;
    justify-content: center;
}

.subscription-form form {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.subscription-description {
    font-size: 20px;
    color: #fff;
    margin-bottom: 15px;
    margin-top: 0;
    text-align: center;
}

.subscription-form input[type="email"] {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    box-sizing: border-box;
}

.subscription-form .checkbox-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #fff;
    margin-bottom: 15px;
}

.subscription-form .checkbox-label input[type="checkbox"] {
    margin-right: 10px;
}

.subscription-form .checkbox-label a {
    color: #FFD700;
    text-decoration: underline;
}

.submit-container {
    display: flex;
    align-items: center;
    flex-direction: row;
}

.submit-container button {
    padding: 15px 30px;
    font-size: 16px;
    background-color: #FFD700;
    color: #000;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
    margin-right: 10px;
}

.submit-container button:hover {
    background-color: #FFC107;
}

.submit-logo {
    width: 100px;
    height: auto;
    border-radius: 1px;
}

@media (max-width: 600px) {
    .subscription-form input[type="email"] {
        width: 100%;
    }

    .submit-container {
        width: 100%;
        justify-content: center;
    }

    .submit-container button {
        padding: 12px 24px;
        margin-right: 10px;
    }
}

footer {
    background-color: rgba(255, 69, 0, 0.9);
    padding: 20px 0;
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin: 0 15px;
}

.footer-links a {
    text-decoration: none;
    color: #fff;
    font-size: 14px;
}

.footer-links a:hover {
    color: black;
}

@media (max-width: 480px) {
    .footer-links li {
        margin: 5px;
    }

    .footer-links a {
        font-size: 12px;
    }
}

html {
    scroll-behavior: smooth;
}

/* Product Page Styles */
.product-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    margin: 20px;
    gap: 20px;
}

.product-description,
.product-image {
    box-sizing: border-box;
    padding: 20px;
}

.product-description {
    flex: 1 1 300px;
    max-width: 600px;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent white background */
    border-radius: 10px;
}

.product-description h1,
.product-description p {
    color: white;
}

.product-description h1 {
    font-size: 32px;
    margin-bottom: 20px;
}

.product-description p {
    font-size: 18px;
    line-height: 1.6;
}

.product-actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-actions button {
    padding: 15px 30px;
    font-size: 16px;
    background-color: #FFD700;
    color: #000;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.product-actions button:hover {
    background-color: #FFC107;
}

.product-actions button:disabled {
    background-color: gray;
    cursor: not-allowed;
}

.product-image {
    flex: 1 1 300px;
    max-width: 300px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;

}

/* Adjust cover image size */
.product-image img {
    filter: drop-shadow(0px 2px 1px black);
    width: 100%;
    height: auto;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}

.purchase-button {
    max-width: 200px;
    display: block;
    margin: 20px auto 0 auto; /* Center the button under the image */
    padding: 15px 30px;
    font-size: 16px;
    background-color: #1E90FF;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    text-align: center;
}

.purchase-button:hover {
    background-color: #1C86EE;
}

.purchase-button.disabled {
    background-color: gray;
    cursor: not-allowed;
}

.purchase-button.disabled:hover {
    background-color: gray;
}

/* Go Back button styles */
.go-back-button {
    margin-bottom: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #FFA500;
    color: #000;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    transition: background-color 0.3s;
}

.go-back-button:hover {
    background-color: #FF8C00;
}

@media (max-width: 768px) {
    .product-container {
        flex-direction: column;
        align-items: center;
    }

    .product-description {
        flex: none;
        max-width: 100%;
        padding: 10px;
    }
    .product-image {
        flex: none;
        max-width: 200px;
        padding: 10px;
    }

    /* .product-description {
        margin-bottom: 20px;
    } */

    .product-description h1 {
        font-size: 28px;
    }

    .product-description p {
        font-size: 16px;
    }

    .product-image img {
        max-width: 200px;
        width: 100%;
        height: auto;
   
    }

    .product-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .product-actions button {
        width: 100%;
        margin-right: 0;
    }
}

.details{
    color: black !important;
    padding-top: 10px;
}
@media (max-width: 480px) {
    .product-description h1 {
        font-size: 24px;
    }

    .product-description p {
        font-size: 14px;
    }

    .product-actions button {
        font-size: 14px;
        padding: 12px 20px;
    }

    .product-image img {
        max-width: 100%;
        width: auto;
        height: auto;
    }

    .purchase-button {
        font-size: 14px;
        padding: 12px 20px;
    }

    .go-back-button {
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* Custom Scrollbar Styles */

/* Webkit Browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 12px; /* Width of the scrollbar */
}

::-webkit-scrollbar-track {
    background: rgba(255, 215, 0, 0.2); /* Track color (light gold) */
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(30, 144, 255, 0.8); /* Thumb color (blue) */
    border-radius: 6px;
    border: 3px solid rgba(255, 215, 0, 0.2); /* Adds padding around thumb */
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(30, 144, 255, 1); /* Thumb color on hover */
}

/* Firefox */
* {
    scrollbar-width: thin; /* "auto" or "thin" */
    scrollbar-color: rgba(30, 144, 255, 0.8) rgba(255, 215, 0, 0.2); /* thumb and track */
}

/* Optional: Smooth Scrolling for Enhanced Experience */
html {
    scroll-behavior: smooth;
}