* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0f172a;
    color: white;
    font-family: Arial, sans-serif;
    height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    height: 100vh;

    display: flex;
    flex-direction: column;

    padding: 0 24px;
}

.chat-header {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #1e293b;
}

.chat-header h1 {
    font-size: 2rem;
    color: #60a5fa;
}

.chat-header p {
    color: #94a3b8;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;

    display: flex;
    flex-direction: column;
    gap: 14px;
}

.user-message,
.bot-message {

    max-width: 68%;
    width: fit-content;

    padding: 18px 22px;

    border-radius: 22px;

    line-height: 1.8;

    word-wrap: break-word;

    font-size: 1rem;

    animation: fadeIn 0.25s ease;
}

.user-message {

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #3b82f6
        );

    color: white;

    align-self: flex-end;

    border-bottom-right-radius: 8px;

    padding: 18px 22px;

    min-width: 120px;

    text-align: left;
}

.bot-message {

    background: #1e293b;

    align-self: flex-start;

    border-bottom-left-radius: 8px;

    border: 1px solid
        rgba(255,255,255,0.06);
}

.chat-input-container {
    display: flex;
    padding: 20px;
    border-top: 1px solid #1e293b;
    background: #111827;
}

#user-input {
    flex: 1;
    padding: 16px;
    border-radius: 12px;
    border: none;
    outline: none;
    background: #1e293b;
    color: white;
    font-size: 1rem;
}

#send-btn {
    margin-left: 10px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

#send-btn:hover {
    background: #1d4ed8;
}

.loading {

    color: #94a3b8;

    font-style: italic;

    animation:
        pulse 1s infinite;
}

@keyframes pulse {

    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.4;
    }
}

@keyframes fadeIn {

    from {
        opacity: 0;
        transform:
            translateY(10px);
    }

    to {
        opacity: 1;
        transform:
            translateY(0);
    }
}

.timestamp {

    margin-top: 8px;

    font-size: 0.75rem;

    opacity: 0.6;

    text-align: right;
}

.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 10px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

.loading-message {

    opacity: 0.95;
}

.thinking {

    display: flex;
    align-items: center;
    gap: 3px;
}

.dot {

    animation:
        blink 1.4s infinite;
}

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

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

#send-btn:disabled {

    opacity: 0.7;
    cursor: not-allowed;
}

#send-btn {

    transition:
        all 0.25s ease;
}

#send-btn:hover {

    transform:
        translateY(-1px);
}

#user-input:focus {

    box-shadow:
        0 0 0 2px
        rgba(59,130,246,0.2);
}

@keyframes blink {

    0%, 100% {
        opacity: 0.2;
    }

    50% {
        opacity: 1;
    }
}