/* Chatbot Styles for GameLiminals website */

:root {
    --chat-primary: #4a6fff;
    --chat-accent: #00d4aa;
    --chat-bg: rgba(255, 255, 255, 0.85);
    --chat-text: #333;
    --chat-border: rgba(255, 255, 255, 0.3);
    --chat-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Floating Chat Button */
.chat-widget-launcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: var(--chat-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(74, 111, 255, 0.4);
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.chat-widget-launcher:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 30px rgba(74, 111, 255, 0.5);
}

.chat-widget-launcher i {
    transition: transform 0.4s ease;
}

.chat-widget-launcher.active i {
    transform: rotate(180deg);
}

/* Pulsing effect */
.chat-widget-launcher::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--chat-primary);
    border-radius: 50%;
    z-index: -1;
    animation: chatPulse 2s infinite;
    opacity: 0.5;
}

@keyframes chatPulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Chat Window */
.chat-widget-container {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: var(--chat-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--chat-shadow);
    z-index: 9998;
    border: 1px solid var(--chat-border);
    transform: translateY(30px) scale(0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.chat-widget-container.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Chat Header */
.chat-widget-header {
    padding: 24px;
    background: linear-gradient(135deg, var(--chat-primary), #6366f1);
    color: white;
    border-radius: 24px 24px 0 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.chat-info h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin: 0;
}

.chat-status {
    font-size: 0.8rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00d4aa;
    border-radius: 50%;
    box-shadow: 0 0 5px #00d4aa;
}

/* Chat Body */
.chat-widget-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--chat-primary) transparent;
}

.chat-widget-body::-webkit-scrollbar {
    width: 6px;
}

.chat-widget-body::-webkit-scrollbar-thumb {
    background-color: var(--chat-primary);
    border-radius: 10px;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: messageReveal 0.3s ease-out;
}

@keyframes messageReveal {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bot-message {
    align-self: flex-start;
    background: white;
    color: var(--chat-text);
    border-bottom-left-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.user-message {
    align-self: flex-end;
    background: var(--chat-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Suggestions */
.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.suggestion-btn {
    background: rgba(74, 111, 255, 0.1);
    border: 1px solid rgba(74, 111, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--chat-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-btn:hover {
    background: var(--chat-primary);
    color: white;
}

/* Chat Input */
.chat-widget-input {
    padding: 20px;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 10px;
}

.chat-widget-input input {
    flex: 1;
    border: 1px solid #eee;
    padding: 12px 18px;
    border-radius: 25px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.chat-widget-input input:focus {
    border-color: var(--chat-primary);
}

.send-btn {
    width: 45px;
    height: 45px;
    background: var(--chat-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.1) rotate(10deg);
}

/* Typing Indicator */
.typing {
    display: flex;
    gap: 4px;
    padding: 10px 15px;
}

.typing span {
    width: 6px;
    height: 6px;
    background: #bbb;
    border-radius: 50%;
    animation: typingPulse 1.5s infinite;
}

.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.3); opacity: 1; }
}

/* Responsive */
@media (max-width: 480px) {
    .chat-widget-container {
        bottom: 0px;
        right: 0px;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .chat-widget-header {
        border-radius: 0;
    }
    
    .chat-widget-launcher {
        bottom: 20px;
        right: 20px;
    }
}
