:root {
    --ai-primary: #00a8cc;
    --ai-secondary: #0f172a;
    --ai-accent: #38bdf8;
    --ai-bg: rgba(15, 23, 42, 0.9);
    --ai-glass: rgba(255, 255, 255, 0.1);
    --ai-text: #f8fafc;
    --ai-text-dim: #cbd5e1;
    --wa-green: #25d366;
}

/* Communication Hub Container */
.comm-hub {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
    align-items: flex-end;
}

/* Base Launcher Style */
.hub-launcher {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.hub-launcher:hover {
    transform: scale(1.15) translateY(-5px);
}

.hub-launcher i {
    color: #fff;
    font-size: 26px;
}

/* WhatsApp Launcher */
.wa-launcher {
    background: var(--wa-green);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.wa-launcher:hover {
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
}

/* AI Launcher (Futuristic) */
.ai-launcher {
    background: linear-gradient(135deg, var(--ai-primary), #0056b3);
    box-shadow: 0 10px 25px rgba(0, 168, 204, 0.4);
    overflow: hidden;
}

.ai-launcher::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0.5;
}

.ai-launcher i {
    z-index: 2;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}

.ai-launcher.active i {
    transform: rotate(90deg);
}

/* Cyber Glow Animation */
.ai-launcher .glow-ring {
    position: absolute;
    inset: -2px;
    border: 2px solid rgba(56, 189, 248, 0.5);
    border-radius: 50%;
    animation: hub-rotate 4s linear infinite;
}

@keyframes hub-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Tooltips */
.hub-launcher .tooltip {
    position: absolute;
    right: 75px;
    background: var(--ai-secondary);
    color: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.hub-launcher:hover .tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Chat Window */
.ai-window {
    position: fixed;
    bottom: 30px;
    right: 110px;
    width: 380px;
    height: 550px;
    background: var(--ai-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--ai-glass);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    transform: translateX(20px) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.ai-window.active {
    transform: translateX(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

/* Header */
.ai-header {
    padding: 25px;
    background: linear-gradient(135deg, rgba(0, 168, 204, 0.25), rgba(15, 23, 42, 0));
    border-bottom: 1px solid var(--ai-glass);
    display: flex;
    align-items: center;
    gap: 15px;
}

.ai-logo-circle {
    width: 48px;
    height: 48px;
    background: var(--ai-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 168, 204, 0.4);
    position: relative;
}

.ai-header-info h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 700;
}

.ai-header-info span {
    font-size: 0.8rem;
    color: var(--ai-accent);
    display: flex;
    align-items: center;
    gap: 5px;
}

.ai-header-info span::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}

/* Body */
.ai-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: ai-fade-in 0.4s ease forwards;
}

.message.ai {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ai-text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.message.user {
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-accent));
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 168, 204, 0.2);
}

/* Quick Actions */
.ai-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px 20px;
    border-top: 1px solid var(--ai-glass);
}

.action-chip {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ai-glass);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--ai-text-dim);
    cursor: pointer;
    transition: all 0.2s;
}

.action-chip:hover {
    background: var(--ai-glass);
    border-color: var(--ai-accent);
    color: #fff;
}

/* Footer Input */
.ai-footer {
    padding: 15px 20px 25px;
    display: flex;
    gap: 10px;
}

.ai-input-wrapper {
    flex: 1;
    position: relative;
}

.ai-input-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ai-glass);
    border-radius: 50px;
    padding: 12px 20px;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
}

.ai-input-wrapper input:focus {
    border-color: var(--ai-primary);
    background: rgba(255, 255, 255, 0.1);
}

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

.ai-send-btn:hover {
    transform: scale(1.05);
    background: var(--ai-accent);
}

/* Animations */
@keyframes ai-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ai-pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.2; }
    100% { transform: scale(1); opacity: 0.5; }
}

/* Responsive Fixes */
@media (max-width: 600px) {
    .ai-window {
        width: calc(100vw - 40px);
        height: 70vh;
        right: 20px;
        bottom: 100px;
    }
    .comm-hub {
        bottom: 20px;
        right: 20px;
    }
}
