
  :root {
        --chat-bg: #ffffff;
        --text-color: #333333;
        --user-bg: #e6f2ff;
        --assistant-bg: #f0f0f0;
        --input-bg: #ffffff;
        --button-bg: #007bff;
        --button-text: #ffffff;
        --border-color: #cccccc;
    }

    .chat-wrapper.dark-mode {
        --chat-bg: #0A1B2A;
        --text-color: #a8becd;
        --user-bg: #1e3a5f;
        --assistant-bg: #071019;
        --input-bg: #49555d;
        --button-bg: #086A87;
        --button-text: #ffffff;
        --border-color: #afc8d8;
    }

    body, html {
        margin: 0;
        padding: 0;
        height: 90%;
        font-family: Arial, sans-serif;
    }

    .chat-wrapper {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 90%;
        max-width: 400px;
        height: 90%;
        max-height: 600px;
        display: flex;
        flex-direction: column;
        z-index: 1000;
    }

    #chat-container {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        overflow: hidden;
        background-color: var(--chat-bg);
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
        transition: background-color 0.3s, color 0.3s;
    }

    #chat-messages {
        flex-grow: 1;
        overflow-y: auto;
        padding: 10px;
        color: var(--text-color);
    }

    #input-container {
        display: flex;
        border-top: 1px solid var(--border-color);
    }

    #user-input {
        flex-grow: 1;
        padding: 10px;
        border: none;
        font-size: 16px;
        outline: none;
        background-color: var(--input-bg);
        color: var(--text-color);
    }

    #user-input:focus {
        outline: 1px solid var(--border-color);
    }

    #send-button {
        padding: 10px 20px;
        background-color: var(--button-bg);
        color: var(--button-text);
        border: none;
        cursor: pointer;
        font-size: 16px;
        white-space: nowrap;
    }

    .message {
        margin-bottom: 10px;
        padding: 8px;
        border-radius: 5px;
        max-width: 80%;
    }

    .user {
        background-color: var(--user-bg);
        align-self: flex-end;
        margin-left: auto;
    }

    .assistant {
        background-color: var(--assistant-bg);
        align-self: flex-start;
    }

    .assistant a {
        color: var(--button-bg);
        text-decoration: none;
    }

    .assistant a:hover {
        text-decoration: underline;
    }

    #loading {
        display: none;
        text-align: center;
        padding: 10px;
    }

    #chat-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        padding: 12px 24px;
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 30px;
        cursor: pointer;
        font-size: 16px;
        font-weight: bold;
        z-index: 1001;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        animation: attention 8s infinite;
    }

    @keyframes attention {
        0%, 100% {
            transform: scale(1);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        50% {
            transform: scale(1.05);
            box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15), 0 0 0 15px rgba(0, 123, 255, 0.5);
        }
    }

    #chat-button:hover {
        animation: none;
        transform: scale(1.05);
        box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    }

    #theme-toggle {
        position: absolute;
        top: 10px;
        right: 10px;
        background: none;
        border: none;
        cursor: pointer;
        font-size: 20px;
        z-index: 1002;
    }

    @media (max-width: 600px) {
        .chat-wrapper {
            width: 80%;
            height: 60%;
            max-width: none;
            max-height: none;
            bottom: 20px;
            right: 10px;
        }
        #chat-container {
            border-radius: 10px;
        }
        #chat-button {
            bottom: 10px;
            right: 10px;
        }
        #user-input {
            width: calc(100% - 80px);
        }
        #send-button {
            width: 80px;
            padding: 10px;
        }
    }
