body {
    font-family: Arial, sans-serif;
    transition: background 1s;
}

header {
    text-align: center;
    margin-top: 20px;
    transition: opacity 0.5s;
}

.intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
    background: transparent; /* Remove background color */
}

.search-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 10px;
}

#searchInput {
    padding: 15px;
    font-size: 18px;
    border: 2px solid #ff7b00;
    border-radius: 5px;
    outline: none;
    width: 400px;
    background: white; /* Set background color to white */
    color: black; /* Set text color to black */
}

#searchButton {
    padding: 15px 30px;
    font-size: 24px; /* Increased font size */
    margin-left: 10px;
    border: none;
    border-radius: 5px;
    background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff);
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}

#searchButton:hover {
    background: linear-gradient(45deg, #ff0000, #ff5500, #ffaa00, #55ff00, #00aaff, #5500aa, #aa00ff);
}

#searchButton:active {
    background: linear-gradient(45deg, #ff0000, #ff2a00, #ffaa00, #2aff00, #00aaff, #2a00aa, #aa00ff);
}

.browse-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
}

.browse-links a {
    color: #007bff;
    text-decoration: none;
    font-size: 16px;
}

.browse-links a:hover {
    text-decoration: underline;
}

.splash {
    position: fixed;
    border-radius: 50%;
    background: rgba(255, 123, 0, 0.5);
    pointer-events: none;
    transform: scale(0);
    animation: splash 0.6s ease-out;
    z-index: 9999;
}

@keyframes splash {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.move-to-top {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.rainbow-wash {
    background: black;
}

#searchResults {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 150px;
}

.result-item {
    flex: 0 0 30%;
    box-sizing: border-box;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
}

.result-item img {
    display: block;
    margin: 0 auto 10px;
}

.result-item h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.result-item p {
    margin-bottom: 10px;
}

.link-container {
    display: flex;
    justify-content: center;
    gap: 10px;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    opacity: 0.8;
}

.amazon-button {
    background-color: #FF9900;
    color: white;
}

.pdf-button {
    background-color: #4CAF50;
    color: white;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    header {
        display: none;
    }

    .intro {
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        position: fixed;
        flex-direction: column;
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
        background: transparent;
        z-index: 1000;
    }

    .search-container {
        flex-direction: column;
    }

    #searchInput {
        width: calc(100% - 40px);
        margin-bottom: 10px;
    }

    #searchButton {
        width: calc(100% - 40px);
        margin-left: 0;
    }

    .browse-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    #searchResults {
        flex-direction: column;
        align-items: center;
        margin-bottom: 60px; /* Space for fixed search bar */
    }

    .result-item {
        flex: 0 0 90%;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    header {
        display: none;
    }

    .intro {
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        position: fixed;
        flex-direction: column;
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
        background: transparent;
        z-index: 1000;
    }

    .search-container {
        flex-direction: column;
    }

    #searchInput {
        width: calc(100% - 20px);
        margin-bottom: 10px;
    }

    #searchButton {
        width: calc(100% - 20px);
        margin-left: 0;
    }

    .browse-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    #searchResults {
        flex-direction: column;
        align-items: center;
        margin-bottom: 60px; /* Space for fixed search bar */
    }

    .result-item {
        flex: 0 0 90%;
        margin-bottom: 20px;
    }
}
