body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #71b7e6, #9b59b6);
    /* margin: 0;
    padding: 0;
    display: flex; */
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.container {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 30px;
    width: 800px;
    text-align: center;
    transition: all 0.3s ease;
    position: absolute;
    /* margin-top: 10%; */
    top: 5%;
    height: auto;
    /* left: 50%;
    transform: translate(-50%, -50%); */
}

.container:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

h1 {
    color: #333333;
    font-size: 24px;
}

h2 {
    color: #555555;
    margin-bottom: 10px;
    font-size: 18px;
}

.form {
    margin-bottom: 20px;
}

.input-file,
.input-text {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.input-file:focus,
.input-text:focus {
    border-color: #007bff;
    outline: none;
}

.btn {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
}

.answer-section {
    margin-top: 20px;
    margin-bottom: 10px;
}

.answer-box {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    min-height: 50px;
    text-align: left;
    color: #333333;
    font-size: 14px;
    max-height: 450px;
    overflow-x: auto;
}
.show {
    display: inline-block;
}
.hide {
    display: none;
}
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 2px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    top: 20px;
    right: 20px;
    font-size: 17px;
    opacity: 0;
    transition: opacity 0.5s, top 0.5s;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    top: 40px;
}

.toast.hide {
    opacity: 0;
    top: 20px;
}

.loading {
    position: relative;
    pointer-events: none;
}
.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
button:disabled {
    background-color: #cccccc; /* Example of disabled state */
    color: #666666;
    cursor: not-allowed;
}
.bg-black {
    background-color: #000 !important;
}
.flex-column {
    flex-direction: column !important;
}
.d-flex {
    display: flex !important;
}

.navbar-brand {
    display: inline-block;
    font-size: 1.25rem;
    line-height: inherit;
    margin-right: 1rem;
    padding-bottom: .3125rem;
    padding-top: .3125rem;
    white-space: nowrap;
}
.logo {
    height: 46px;
    margin-right: 10px;
}
.container {
    position: relative;
    text-align: center;
}
.bottom-left {
    position: absolute;
    bottom: 8px;
    left: 16px;
}
.top-left {
    position: absolute;
    top: 8px;
    left: 16px;
}
.top-right {
    position: absolute;
    top: 8px;
    right: 16px;
}
.bottom-right {
    position: absolute;
    bottom: 8px;
    right: 16px;
}
.centered {
    margin: auto;
}
.topnav {
    overflow: hidden;
}
.topnav a {
    float: left;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
}
.success-message {
    font-size: 14px;
    color: green;
}
.error-message {
    font-size: 14px;
    color: red;
}
.mic-indicator {
    margin-top: 10px;
    font-size: 16px;
    color: red;
    font-weight: bold;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.input-with-mic {
    position: relative;
    display: inline-block;
    width: 100%;
}

.input-with-mic input {
    width: 100%;
    padding-right: 40px; /* Space for mic icon */
    box-sizing: border-box;
}

.mic-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
}

.mic-icon:hover {
    color: red;
}

.mic-indicator {
    margin-top: 8px;
    font-size: 14px;
    font-weight: bold;
    color: red;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}
.input-container {
    position: relative;
    width: 91%;
}
.chat-input {
    width: 100%;
    padding: 10px 40px 10px 12px; /* right padding for mic */
    font-size: 16px;
    border-radius: 20px;
    border: 1px solid #ccc;
    outline: none;
}
.mic-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}
.mic-icon svg {
    width: 20px;
    height: 20px;
    fill: #666;
}
.mic-icon.listening svg {
    fill: red;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
#ask-section{
    display: none; /* hidden until file uploaded */
    margin-top: 20px;
}
#chatHistory {
    border: 1px solid #ccc;
    padding: 10px;
    margin: 15px 0;
    height: 200px;
    overflow-y: auto;
}
.user { color: blue; font-weight: bold; }
.bot { color: green; font-weight: bold; }
