﻿html, body {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

/* Background container */
.bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/media/global/Legionauts logo black.svg');
    background-size: 80vh;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    animation: pulse 6s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.85;
        transform: scale(1.02);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Top-right icons */
.top-right {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    font-size: 24px;
    color: black;
    cursor: pointer;
    z-index: 1;
}

/* Bottom-right text */
.bottom-right {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: black;
    font-size: 18px;
    z-index: 1;
}

/* Bottom-right text */
.bottom-left {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: black;
    font-size: 18px;
    z-index: 1;
}

.ai-fact {
    position: absolute;
    left: 20px;
    width: 20vw;
    color: black;
    font-size: 18px;
    z-index: 1;
}

/* Overlay styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    display: none;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    z-index: 1000;
}

.overlay-header {
    font-size: 24px;
    margin-bottom: 15px;
}

.overlay-content {
    font-size: 18px;
    flex-grow: 1;
}

.close-btn {
    align-self: flex-end;
    font-size: 20px;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
}

/* Chat container */
.bottom-chat {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 360px;
    height: 500px;
    z-index: 1000;
}

/* Main chat window */
.chat-window {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-family: Arial, sans-serif;
}

/* Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: #2563eb;
    color: #ffffff;
}

    .chat-header h2 {
        margin: 0 0 4px;
        font-size: 17px;
        font-weight: 600;
    }

.chat-status {
    font-size: 12px;
    color: #dbeafe;
}

.chat-close {
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

/* Message area */
.chat-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    overflow-y: auto;
    background: #f8fafc;
}

/* Individual messages */
.message {
    display: flex;
    max-width: 85%;
}

.message-content {
    padding: 10px 13px;
    border-radius: 14px;
}

    .message-content p {
        margin: 0;
        font-size: 14px;
        line-height: 1.45;
    }

.message-time {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    opacity: 0.6;
}

/* Bot messages */
.message-bot {
    align-self: flex-start;
    align-items: flex-end;
    gap: 8px;
}

    .message-bot .message-content {
        background: #ffffff;
        color: #1f2937;
        border: 1px solid #e5e7eb;
        border-bottom-left-radius: 4px;
    }

.message-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
}

/* User messages */
.message-user {
    align-self: flex-end;
}

    .message-user .message-content {
        background: #2563eb;
        color: #ffffff;
        border-bottom-right-radius: 4px;
    }

/* Input area */
.chat-input {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

    .chat-input input {
        flex: 1;
        min-width: 0;
        padding: 11px 13px;
        border: 1px solid #d1d5db;
        border-radius: 10px;
        outline: none;
        font-size: 14px;
    }

        .chat-input input:focus {
            border-color: #2563eb;
            box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
        }

    .chat-input button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        border: 0;
        border-radius: 10px;
        background: #2563eb;
        color: #ffffff;
        cursor: pointer;
    }

        .chat-input button:hover {
            background: #1d4ed8;
        }

/* Mobile */
@media (max-width: 500px) {
    .bottom-chat {
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
        height: 70vh;
    }
}
