:root {
    --primary-color: #4a6bff;
    --primary-light: #e7ebff;
    --primary-dark: #354ebb;
    --background-color: #f8f9fc;
    --chat-bg: #ffffff;
    --user-message-bg: #4a6bff;
    --user-message-text: #ffffff;
    --bot-message-bg: #f2f3f8;
    --bot-message-text: #3a3a3a;
    --text-color: #3a3a3a;
    --light-text: #7a7a7a;
    --border-radius: 18px;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --input-border: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.chat-container {
    max-width: 1200px;
    margin: 1rem auto;
    background: var(--chat-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 2rem);
    width: 90%;
    overflow: hidden;
    transition: var(--transition);
}

.chat-header {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chat-header i {
    font-size: 1.5rem;
}

.chat-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.install-app-button {
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border-radius: 999px;
    padding: 0.5rem 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.install-app-button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: var(--primary-light);
    border-radius: 20px;
}

.message {
    max-width: 70%;
    padding: 1rem 1.2rem;
    padding-bottom: 1.6rem;
    border-radius: var(--border-radius);
    position: relative;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message .timestamp {
    font-size: 0.65rem;
    position: absolute;
    bottom: 0.3rem;
    right: 0.8rem;
    opacity: 0.7;
    font-style: italic;
    background-color: inherit;
    padding: 1px 4px;
    border-radius: 4px;
}

.user-message {
    background: var(--user-message-bg);
    color: var(--user-message-text);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.user-message .timestamp {
    color: rgba(255, 255, 255, 0.9);
}

.bot-message {
    background: var(--bot-message-bg);
    color: var(--bot-message-text);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.welcome-message {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--primary-light);
    border: 1px solid rgba(74, 107, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 1.2rem 1.5rem;
    max-width: 90%;
    margin: 0 auto 1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(74, 107, 255, 0.1);
}

.chat-input {
    padding: 1.25rem;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.input-container {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

#message-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) inset;
}

#message-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.2);
}

#send-button {
    padding: 0.9rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(74, 107, 255, 0.2);
}

#send-button span {
    display: none;
}

#send-button i {
    font-size: 1.1rem;
}

#send-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 107, 255, 0.3);
}

#send-button:active {
    transform: translateY(0);
}

#send-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.typing-indicator {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bot-message-bg);
    border-radius: var(--border-radius);
    align-self: flex-start;
    margin-top: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
    opacity: 0.7;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Responsive Design */
@media (max-width: 992px) {
    .message {
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    html, body {
        height: 100%;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }
    
    body {
        background-color: var(--background-color) !important;
        position: relative;
        display: flex;
        flex-direction: column;
    }
    
    .chat-container {
        margin: 0 0 20px 0;
        height: calc(100% - 20px);
        width: 100%;
        border-radius: 0;
        flex: 1;
    }

    .chat-header {
        border-radius: 0;
        padding: 1rem 1.25rem;
    }

    .chat-header h1 {
        font-size: 1.3rem;
    }

    .install-app-button span {
        display: none;
    }

    .install-app-button {
        padding: 0.5rem 0.65rem;
    }

    .chat-messages {
        padding: 1.25rem;
    }

    .message {
        max-width: 85%;
        padding: 0.9rem 1.1rem;
        padding-bottom: 1.5rem;
    }

    .message .timestamp {
        font-size: 0.6rem;
        bottom: 0.25rem;
        right: 0.6rem;
    }

    .input-container {
        gap: 0.5rem;
    }

    .chat-input {
        padding: 0.875rem 1.25rem;
    }

    #send-button {
        padding: 0.9rem 1.25rem;
    }

    #send-button span {
        display: none;
    }

    .contact-footer {
        font-size: 0.65rem;
        padding: 0.15rem;
        height: 20px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        background-color: var(--background-color);
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        margin: 0;
        z-index: 100;
        box-shadow: 0 -1px 2px rgba(0,0,0,0.05);
    }
}

@media (max-width: 480px) {
    .chat-header {
        padding: 0.8rem 1rem;
    }

    .header-logo {
        width: 36px;
        height: 36px;
    }

    .chat-header h1 {
        font-size: 1.1rem;
    }

    .install-app-button {
        padding: 0.45rem 0.6rem;
    }

    .chat-messages {
        padding: 1rem;
    }

    .message {
        max-width: 90%;
        padding: 0.8rem 1rem;
        padding-bottom: 1.4rem;
        font-size: 0.95rem;
    }

    .message .timestamp {
        font-size: 0.55rem;
        bottom: 0.2rem;
        right: 0.5rem;
    }

    .welcome-message {
        font-size: 1rem;
        padding: 1rem;
    }

    #message-input {
        padding: 0.8rem 1rem;
    }

    #send-button {
        padding: 0.8rem;
    }
}

.message-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
}

.message pre {
    margin: 8px 0;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
}

.message code {
    font-family: 'Consolas', 'Monaco', monospace;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.message a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(74, 107, 255, 0.3);
    transition: border-color 0.2s ease;
}

.message a:hover {
    border-bottom-color: var(--primary-color);
}

.bot-message a {
    color: var(--primary-color);
}

.user-message a {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.4);
}

.user-message a:hover {
    border-bottom-color: white;
}

.message.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Footer styles */
.contact-footer {
    text-align: center;
    padding: 0.25rem;
    font-size: 0.7rem;
    color: var(--text-color);
    opacity: 0.65; /* Setting opacity to 65% as requested */
    margin-top: 0;
    position: relative;
    z-index: 50;
    background-color: var(--background-color);
}

.contact-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.contact-footer a:hover {
    text-decoration: underline;
}