html {
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(135deg, #0a2f56, #2d7fba);
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: #c0e5f3;
}

/* Code block styling */
pre, code {
    background-color: #2e2e2e;
    color: #dcdcdc;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 4px 0;
    font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

pre {
    text-align: left;
    margin: 5px 0;
}

code {
    white-space: pre-wrap;
}

.footer {
    color: white;
    text-align: center;
    width: 100%;
}

.custom-navbar {
    backdrop-filter: blur(6px);
    background-color: rgba(10, 47, 86, 0.85);
    background: linear-gradient(135deg, #0a2f56, #154a7f);
    border-bottom: 1px solid #c0e5f3;
}

.custom-navbar a {
    color: white !important;
    font-weight: bold;
}

.custom-navbar a:hover {
    color: #007bff !important;
}

.input-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 900px;
    padding: 12px;
    background-color: #2d7fba;
    border-radius: 24px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    gap: 12px;
}

#user-input {
flex: 1;
resize: none;
border: none;
padding: 12px 16px;
font-size: 16px;
border-radius: 16px;
background-color: #2d7fba;
color: #c0e5f3;
outline: none;
height: auto;
line-height: 1.4;
overflow-y: hidden;
max-height: 200px;
width: 100%;
}

#user-input::placeholder {
color: #c0e5f3;
opacity: 0.9;
}

.input-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.input-buttons .btn {
    border-radius: 50%;
    padding: 10px;
    min-width: 44px;
    text-align: center;
}

#send-btn {
background-color: #2d7fba;
color: #c0e5f3;
border: none;
border-radius: 50%;
padding: 10px;
margin-left: 5px;
cursor: pointer;
transition: background-color 0.3s;
}

#send-btn:hover {
background-color: #2d7fba;
}

#send-btn:active {
background-color: #2d7fba;
}

#chat-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 95;
width: 100%;
}

#chat-messages {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
width: 75%;
max-width: 900px;
height: 80vh;
overflow-y: auto;
padding: 10px;
}

.message {
    margin: 8px 0;
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 80%;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.user-message {
    background-color: #2d7fba;
    color: #c0e5f3;
    align-self: flex-end;
}

.bot-typing {
    opacity: 0.8;
    font-style: italic;
}

.bot-message {
    background-color: transparent;
    color: #c0e5f3;
    align-self: flex-start;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.error {
    color: red;
}

.typing-indicator {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    vertical-align: middle;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: typing-blink 1s infinite ease-in-out;
    opacity: 0.4;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-blink {
    0%, 80%, 100% { opacity: 0.4; transform: translateY(0); }
    40%          { opacity: 1;   transform: translateY(-1px); }
}

/* 🔹 Brain Pulse Animation for Thinking State */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.brain-icon {
    animation: pulse 1.5s infinite;
    display: inline-block;
    vertical-align: middle;
}

.bot-typing {
    opacity: 0.9;
    font-style: italic;
}
