:root {
            --card-bg: rgba(255, 255, 255, 0.1); --input-bg: rgba(255, 255, 255, 0.2);
            --text-color: #ffffff; --accent-color: #ffd700; --button-text-color: #4b0082;
            --name-color: #c1c1ff;

            /* --- CHATBOT COLOR VARIABLES --- */
            --primary-bg-chat: #0f111a; /* Dark background */
            --card-bg-chat: #1c1f2a; /* Input/button background */
            --support-color: #4a90e2; /* Blue for user messages/send button */
            --highlight-color: #50e3c2; /* Teal for bot messages/accents */
            --text-color-chat: #e4e6eb;
            --subheading-color-chat: #a0a3b1;
            --border-radius-chat: 12px;
            --close-btn-color: #a0a3b1; /* A muted color for the close button */
        }
        body {
            font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
            background: url('login.jpg') no-repeat center center fixed;
            background-size: cover; height: 100vh; display: grid; place-items: center; margin: 0;
        }
        .auth-container {
            width: 360px; background: var(--card-bg); padding: 40px; border-radius: 20px;
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5); backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.3);
            color: var(--text-color); box-sizing: border-box;
        }
        .auth-title { font-size: 28px; font-weight: 600; text-align: center; margin: 0 0 5px 0; line-height: 1.2; }
        .auth-fullname { font-size: 16px; font-weight: 400; text-align: center; color: var(--name-color); margin: 0 0 20px 0; height: 18px; }
        .sliding-viewport { position: relative; width: 100%; overflow: hidden; }
        .auth-screens-wrapper { display: flex; width: 200%; position: relative; left: 0; transition: left 0.4s ease-in-out; }
        .screen { width: 50%; flex-shrink: 0; display: flex; flex-direction: column; box-sizing: border-box; }
        .auth-screens-wrapper.slide-to-password { left: -100%; }
        .input-field { width: 100%; padding: 12px 15px; margin-bottom: 10px; background: var(--input-bg); color: var(--text-color); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 10px; font-size: 16px; outline: none; box-sizing: border-box; }
        .input-field::placeholder { color: rgba(255, 255, 255, 0.8); }
        .auth-button { width: 100%; padding: 12px; margin-top: 15px; border: none; border-radius: 10px; background: var(--text-color); color: var(--button-text-color); font-size: 18px; font-weight: bold; cursor: pointer; transition: transform 0.2s ease; position: relative; }
        .auth-button:hover { transform: translateY(-2px); }
        .separator { margin: 20px 0; display: flex; align-items: center; text-align: center; color: rgba(255, 255, 255, 0.8); }
        .separator::before, .separator::after { content: ''; flex: 1; border-bottom: 1px solid rgba(255, 255, 255, 0.5); }
        .separator:not(:empty)::before { margin-right: .5em; }
        .separator:not(:empty)::after { margin-left: .5em; }
        .google-btn { width: 50px; height: 50px; border-radius: 50%; border: none; background: white; cursor: pointer; display: flex; justify-content: center; align-items: center; margin: 0 auto; }
        .google-icon { width: 25px; height: 25px; }
        .switch-link { text-align: center; margin-top: 20px; font-size: 14px; }
        .switch-link a { color: var(--accent-color); text-decoration: none; font-weight: bold; }
        .error-message { color: var(--accent-color); font-size: 13px; height: 18px; text-align: left; width: 100%; margin: 0 0 5px 0; }
        .password-screen { position: relative; }
        .back-btn { position: absolute; top: -5px; left: -10px; background: none; border: none; color: white; cursor: pointer; font-size: 24px; padding: 0; margin-left: 8px;}
        .profile-header { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 15px; }
        
        /* === CSS REVERTED === */
        #profile-pic { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, 0.5); background-color: var(--input-bg); }

        #user-email-display { font-size: 14px; padding: 4px 12px; background: var(--input-bg); border-radius: 15px; }
        .forgot-password-link { align-self: flex-end; font-size: 13px; color: white; text-decoration: none; margin-top: 5px; }
        .hidden { display: none; }
        .auth-button.loading span { visibility: hidden; }
        .auth-button .spinner { visibility: hidden; width: 20px; height: 20px; border: 3px solid rgba(75, 0, 130, 0.3); border-top-color: var(--button-text-color); border-radius: 50%; animation: spin 1s linear infinite; position: absolute; top: 50%; left: 50%; margin-top: -10px; margin-left: -10px; }
        .auth-button.loading .spinner { visibility: visible; }
        @keyframes spin { to { transform: rotate(360deg); } }
        /* ---------------------------------------------------------------------- */
/* --- HELP BUTTON & FLOATING CHAT STYLES --- */
/* ---------------------------------------------------------------------- */

/* Keyframes for the slide-up animation */
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Keyframes for the attention pulse */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(121, 82, 179, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(121, 82, 179, 0); }
    100% { box-shadow: 0 0 0 0 rgba(121, 82, 179, 0); }
}

.help-popup-container {
    position: fixed;
    bottom: 30px; 
    right: 30px; 
    z-index: 1000;
    opacity: 0; 
    animation: slideInUp 0.6s ease-out forwards;
    animation-delay: 1.5s; 
}

.help-button {
    background-color: #7952b3; 
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none; 
    font-size: 16px;
    animation: pulse 2s infinite; 
}

.help-button:hover {
    background-color: #6c47a3; 
    transform: scale(1.03);
    animation: none;
}
.material-symbols-rounded {
    font-size: 24px;
}

/* --- FLOATING CHAT WINDOW CONTAINER --- */
.floating-chat-window {
    position: fixed;
    bottom: 110px; 
    right: 30px;
    left: initial;
    width: 320px; 
    height: 500px;
    background: rgba(25, 11, 11, 0.8); 
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    z-index: 999; 
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    transform-origin: bottom right;
    opacity: 1;
    transform: scale(1);
    overflow: hidden; 
    display: flex;
    flex-direction: column; 
    padding: 15px; 
    box-sizing: border-box;
}
.floating-chat-window.hidden {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

/* --- CHATBOT INNER UI --- */
.floating-chat-window .container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.app-header {
    position: relative;
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    flex-shrink: 0;
}

/* NEW: Close Button Style */
.app-header .close-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--close-btn-color);
    padding: 5px;
    border-radius: 50%;
    transition: color 0.2s, background-color 0.2s;
    font-size: 20px;
}
.app-header .close-btn:hover {
    color: var(--text-color-chat);
    background-color: var(--card-bg-chat);
}

.app-header .heading {
    font-size: 1.5rem; 
    background: linear-gradient(to right, var(--support-color), var(--highlight-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-header .subheading { font-size:0.8rem; color: var(--subheading-color-chat); }

.support-label {
    display: block;
    font-size: 0.7rem;
    color: var(--highlight-color);
    font-weight: 600;
    margin-top: 5px;
}

/* --- CHAT MESSAGES CONTAINER (Bubble Chat) --- */
.chats-container { 
    display: flex; 
    flex-direction: column; 
    padding: 10px 0; 
    height: 100%; 
    flex-grow: 1;
    overflow-y: auto; 
    color: var(--text-color-chat);
    scroll-behavior: smooth; 
    gap: 10px; /* Space between messages */
}
.chats-container::-webkit-scrollbar {
    width: 6px;
}
.chats-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

/* NEW: Message Wrapper for Bubble Layout */
.message-wrapper {
    display: flex;
    align-items: flex-end; /* Align avatar and message bubble */
    gap: 8px; /* Space between avatar and message */
}
.user-wrapper {
    justify-content: flex-end; /* Push user messages to the right */
}
.bot-wrapper {
    justify-content: flex-start; /* Keep bot messages on the left */
}

/* NEW: Avatar Style for Bot Messages */
.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--card-bg-chat);
    color: var(--highlight-color);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0; 
    font-size: 18px; 
    order: 1; 
}
.user-wrapper .message-avatar {
    /* User message has no avatar */
    display: none; 
}

.message { 
    max-width: 85%; 
    margin: 0; /* Important to override old margins */
    padding: 10px 15px; 
    font-size: 0.9rem; 
    border-radius: 18px; 
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    order: 2; 
}

.user-message { 
    background-color: var(--support-color); 
    color: white;
    border-bottom-right-radius: 4px; /* Pointy end for the user side */
}

.bot-message { 
    background-color: var(--highlight-color); 
    color: black;
    border-bottom-left-radius: 4px; /* Pointy end for the bot side */
}

/* --- PROMPT AND ACTIONS CONTAINER --- */
.prompt-container { 
    display:flex; 
    justify-content:center; 
    align-items:center; 
    gap:8px; 
    margin-top:10px; 
    padding-bottom: 5px;
    flex-shrink: 0;
}
.prompt-form { display:flex; align-items:center; gap:8px; flex:1; }
.prompt-input { 
    flex:1; 
    padding:8px 12px; 
    border:none; 
    border-radius: var(--border-radius-chat); 
    background-color: rgb(103, 43, 40); 
    color: var(--text-color-chat); 
    outline:none; 
    font-size: 0.9rem;
}
.promt-actions { display:flex; gap:5px; align-items:center; }
.extra-actions { display:flex; gap:5px; align-items:center; }

/* Styles for action buttons */
#send-prompt-btn, #clear-history-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--support-color); 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

#clear-history-btn {
    font-size: 20px;
    padding: 8px;
    border-radius: var(--border-radius-chat);
    background-color: var(--card-bg-chat);
    color: var(--subheading-color-chat);
    transition: background 0.3s, color 0.3s;
}

#clear-history-btn:hover { 
    background-color: var(--highlight-color); 
    color: var(--primary-bg-chat); /* Dark text on hover */
}

#send-prompt-btn:hover {
    color: var(--highlight-color);
}

.disclaimer { text-align:center; font-size:0.7rem; color: var(--subheading-color-chat); margin-top:5px; }
/* --- CHAT END BUTTON STYLES (NEW) --- */
.chat-end-button {
    /* Using variables for a unified theme */
    background-color: var(--highlight-color); /* Teal color */
    color: var(--primary-bg-chat); /* Dark text */
    padding: 8px 15px;
    border: none;
    border-radius: var(--border-radius-chat);
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.chat-end-button:hover {
    background-color: #43b098; /* Darker teal on hover */
    transform: translateY(-1px);

}

