﻿body {
    font-family: 'Open Sans', Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

#selection-container, #chat-container {
    text-align: center;
    margin: 20px;
    width: 100%;
    max-width: 800px;
    background-color: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.logo {
    width: 80px;
    margin-bottom: 20px;
}

#intro-text-container {
    margin-bottom: 30px;
}

#intro-text {
    font-size: 18px;
    color: #234667;
    line-height: 1.4;
}

#category-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    justify-items: center;
}

.category-button {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #234667;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 120px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .category-button:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    }

    .category-button p {
        margin: 0;
        font-size: 14px;
        color: #ffffff;
    }

#loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #5094da;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#chat-container {
    display: none;
    max-width: 600px;
    position: relative;
}

#selected-category {
    color: #234667;
    font-size: 24px;
    margin-bottom: 20px;
}

#input-container {
    display: flex;
    margin-bottom: 20px;
}

#question-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px 0 0 20px;
    font-size: 12px;
}

#ask-button {
    background-color: #5094da;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    font-size: 14px;
}

#conversation {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    text-align: left;
}

.message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
}

    .message.user {
        background-color: #e6f3ff;
        text-align: right;
    }

    .message.assistant {
        background-color: #f0f0f0;
    }

.loading-bar {
    height: 4px;
    width: 100%;
    background: linear-gradient(to right, #e0f7fa, #5094da, #387bbf, #234667);
    background-size: 200% 100%;
    animation: loading 4s ease-in-out infinite;
    border-radius: 4px;
    margin-top: 10px;
    display: none;
}

@keyframes loading {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@media (max-width: 768px) {
    #category-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    #category-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}
