:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --accent-color: #3b82f6; /* Blue-ish */
    --secondary-text: #94a3b8;
    --bubble-opsway-bg: #1e293b;
    --bubble-user-bg: #3b82f6;
    --font-family: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Background Particles */
canvas#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Logo Overlay - Top Left or Center Top? Let's put it top left for branding */
.logo-overlay {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 10;
    opacity: 0.8;
}

.brand-logo {
    height: 2rem; /* Keep it subtle */
    width: auto;
}

/* Chat Container */
.chat-container {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 400px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px; /* Ensure space for messages */
}

.chat-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

/* Message Styles */
.message-row {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInSlideUp 0.4s ease forwards;
}

.message-row.user {
    flex-direction: row-reverse;
}

.profile-pic {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.bubble {
    padding: 0.75rem 1rem;
    border-radius: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 80%;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
}

.bubble.opsway {
    background-color: var(--bubble-opsway-bg);
    color: var(--text-color);
    border-bottom-left-radius: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bubble.user {
    background-color: var(--bubble-user-bg);
    color: white;
    border-bottom-right-radius: 0.25rem;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3); /* Glow effect */
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.75rem 1rem;
    background-color: var(--bubble-opsway-bg);
    border-radius: 1.25rem;
    border-bottom-left-radius: 0.25rem;
    width: fit-content;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--secondary-text);
    border-radius: 50%;
    animation: typingBounce 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; }

/* Input Area */
.user-input-area {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-input-area.visible {
    opacity: 1;
}

.reply-btn {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.reply-btn:hover {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.hidden {
    display: none;
}

/* Animations */
@keyframes fadeInSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Responsive */
@media (max-width: 480px) {
    .chat-container {
        padding: 1rem;
    }
    .bubble {
        font-size: 0.9rem;
    }
}
