 /* Chat Toggle Button */
#gemini-chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #1a73e8;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 9998;
}
#gemini-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
#gemini-chat-toggle.hidden { display: none; }

/* Chat Window */
#gemini-chat-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 370px;
    max-width: 90vw;
     height: 550px;
     max-height: 85vh;
     background-color: #ffffff;
     border-radius: 16px;
     box-shadow: 0 8px 24px rgba(0,0,0,0.2);
     display: flex;
     flex-direction: column;
     overflow: hidden;
     z-index: 9999;
     transition: opacity 0.3s ease, transform 0.3s ease;
     transform-origin: bottom right;
 }
 #gemini-chat-window.hidden {
     opacity: 0;
     transform: scale(0.5);
     pointer-events: none;
 }

 /* Chat Header */
 .chat-header {
     background-color: #1a73e8;
     color: white;
     padding: 12px 20px;
     display: flex;
     justify-content: space-between;
     align-items: center;
     flex-shrink: 0;
 }
 .chat-header h3 { margin: 0; font-size: 16px; font-weight: 500; }
 #gemini-chat-close { background: none; border: none; color: white; font-size: 28px; cursor:
 pointer; opacity: 0.8; }
 #gemini-chat-close:hover { opacity: 1; }

 /* Messages Area */
 #gemini-chat-messages {
     flex-grow: 1;
     padding: 20px;
     overflow-y: auto;
     background-color: #f5f5f5;
     display: flex;
     flex-direction: column;
     gap: 12px;
 }
 .chat-message {
     padding: 10px 15px;
     border-radius: 20px;
     max-width: 85%;
     line-height: 1.5;
     word-wrap: break-word;
 }
 .user-message {
     background-color: #d1e7fd;
     color: #0d47a1;
     align-self: flex-end;
     border-bottom-right-radius: 5px;
 }
 .model-message {
     background-color: #e9ecef;
     color: #343a40;
     align-self: flex-start;
     border-bottom-left-radius: 5px;
 }

 /* Typing Indicator */
 #gemini-typing-indicator { padding: 10px 20px; align-self: flex-start; }
 #gemini-typing-indicator.hidden { display: none; }
 #gemini-typing-indicator span {
     height: 9px; width: 9px; background-color: #adb5bd; border-radius: 50%;
     display: inline-block; animation: bounce 1.4s infinite ease-in-out both;
 }
 #gemini-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
 #gemini-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
 @keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1.0); } }

 /* Input Form */
 #gemini-chat-form {
     display: flex;
     padding: 15px;
     border-top: 1px solid #dee2e6;
     background-color: #ffffff;
     align-items: center;
 }
 #gemini-chat-input {
     flex-grow: 1;
     border: 1px solid #ced4da;
     border-radius: 20px;
     padding: 10px 18px;
     font-size: 15px;
     background-color: #f8f9fa;
 }
 #gemini-chat-input:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 2px rgba(26
 , 115, 232, 0.2); }
 #gemini-chat-form button {
     background-color: #1a73e8;
     color: white;
     border: none;
     border-radius: 50%;
     width: 40px;
     height: 40px;
     margin-left: 10px;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: background-color 0.2s ease;
 }
 #gemini-chat-form button:hover { background-color: #1765cc; }