:root {
    --primary-color: #007bff;
    /* Example blue, adjust to brand */
    --primary-gradient: linear-gradient(135deg, #007bff, #00d2ff);
    --bg-color: #f0f2f5;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-color: #333;
    --text-light: #777;
    --bot-msg-bg: #f1f1f1;
    --user-msg-bg: #007bff;
    --user-msg-text: #fff;
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

body {
    font-family: 'Outfit', sans-serif;
    background: url('https://images.unsplash.com/photo-1645811791231-279658fb46dc?q=80&w=1738&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Full Page Chat Container */
.chat-container {
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.chat-header {
    background: var(--primary-gradient);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Ensure image stays within circle */
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #2ecc71;
    border-radius: 50%;
    margin-right: 4px;
}

.status-text {
    font-size: 12px;
    opacity: 0.9;
}

/* Messages Area */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

.message {
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

.bot-message {
    align-self: flex-start;
}

.bot-message .message-content {
    background: var(--bot-msg-bg);
    color: var(--text-color);
    border-bottom-left-radius: 4px;
}

.user-message {
    align-self: flex-end;
}

.user-message .message-content {
    background: var(--primary-gradient);
    color: var(--user-msg-text);
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
}

.message-time {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 4px;
    margin-left: 4px;
}

.user-message .message-time {
    text-align: right;
    margin-right: 4px;
}

/* Input Area */
.chat-input-area {
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

textarea {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    outline: none;
    max-height: 100px;
    transition: border-color 0.2s;
}

textarea:focus {
    border-color: #007bff;
}

#send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--primary-gradient);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, opacity 0.2s;
}

#send-btn:hover:not(:disabled) {
    transform: scale(1.05);
}

#send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--bot-msg-bg);
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    margin-bottom: 10px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #aaa;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .chat-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}