body {
    background-color: black;
    color: white;
}

input[type="text"] {
    color: black;
}

header nav a {
    transition: color 0.3s ease;
}

header nav a.underline {
    text-decoration: underline;
}

header nav a:hover {
    color: #1DA1F2;
}

form.relative {
    position: relative;
    margin-top: 2rem;
}

#autocomplete-results {
    z-index: 50;
    max-height: 439px;
    overflow-y: auto;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    background-color: white;
    color: black;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid white;
}

.search-page #autocomplete-results {
    left: 0;
    transform: none;
    margin-left: 25%;
}

.autocomplete-item {
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #f3f5f6;
}

.autocomplete-item img {
    width: 36px;
    height: 54px;
    margin-right: 8px;
    border-radius: 4px;
}

.autocomplete-item span {
    flex-grow: 1;
}

.autocomplete-item.advanced-search {
    justify-content: flex-start;
}

.autocomplete-item.advanced-search svg {
    margin-right: 8px;
}

.autocomplete-item.highlighted {
    background-color: #f3f5f6;
}

input#search-query {
    background-color: white;
    color: black;
    border: 2px solid #1c1c1c;
    padding-left: 2.5rem;
}

input[type="text"].text-gray-900 {
    color: black;
}

h1.text-center {
    font-family: 'Metro Sans', sans-serif;
    color: white;
}

.blur-content {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

.prompt-bubble-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    transition: filter 0.3s ease;
}

#refresh-prompts-container {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    z-index: 10;
    transition: filter 0.3s ease;
}

#refresh-prompts {
    border: none;
    background-color: transparent;
    outline: 0;
    cursor: pointer;
    transition: transform 0.5s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

#refresh-prompts svg {
    width: 24px;
    height: 24px;
    color: #FFFFFF;
}

.spin-animation {
    animation: spin 0.5s linear forwards;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#prompt-bubbles {
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.1rem;
    transition: filter 0.3s ease;
}

.prompt-bubble {
    background-color: #e0f7ff;
    color: #1c1c1c;
    margin: 0.5rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prompt-bubble:hover {
    background-color: #cceeff;
    transform: scale(1.05);
}

#prompt-bubbles > div {
    width: 100%;
    display: flex;
    justify-content: center;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 0 2rem;
}

.grid-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
}

.grid-item img {
    width: 100%;
    object-fit: contain;
    height: auto;
    border-radius: 8px;
    transition: width 0.3s ease, height 0.3s ease;
}

.grid-item p {
    margin-top: 8px;
    font-size: 14px;
    text-align: center;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
    word-wrap: break-word;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: left;
    padding-left: 2rem;
    padding-right: 2rem;
}

.flex.justify-center.items-start.mb-8 img {
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
    height: auto;
}

@media (max-width: 1280px) {
    .grid-container {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.2rem;
    }

    .grid-item img {
        width: 100%;
    }

    #refresh-prompts-container {
        position: static;
        transform: none;
        margin-top: 1rem;
        text-align: center;
        display: flex;
        justify-content: center;
    }

    .text-container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 1152px) {
    .grid-container {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.2rem;
    }
}

@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        padding: 0 1.2rem;
    }

    .grid-item img {
        width: 90%;
    }

    .grid-item p {
        text-align: center;
    }

    #refresh-prompts-container {
        margin-top: 1rem;
        text-align: center;
        display: flex;
        justify-content: center;
    }

    .text-container {
        padding: 0 1.2rem;
    }
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        padding: 0 1.2rem;
    }

    .grid-item img {
        width: 85%;
        margin: 0 auto;
    }

    .grid-item p {
        text-align: center;
    }

    #refresh-prompts-container {
        margin-top: 1rem;
        text-align: center;
        display: flex;
        justify-content: center;
    }

    .text-container {
        padding: 0 1.2rem;
    }
}

@media (max-width: 640px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 1rem;
    }

    .grid-item img {
        width: 85%;
        margin: 0 auto;
    }

    .grid-item p {
        text-align: center;
    }

    #refresh-prompts-container {
        margin-top: 1rem;
        text-align: center;
        display: flex;
        justify-content: center;
    }

    .text-container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: repeat(1, 1fr);
        padding: 0 0.8rem;
    }

    .grid-item img {
        width: 85%;
        margin: 0 auto;
    }

    .grid-item p {
        text-align: center;
    }

    #refresh-prompts-container {
        margin-top: 1rem;
        text-align: center;
        display: flex;
        justify-content: center;
    }

    .text-container {
        padding: 0 0.8rem;
    }
}
