:root {
    --primary: #000000;
    --secondary: #ffffff;
    --accent: #ff6b35;
    --accent-light: #ff8c61;
    --text: #0f0f0f;
    --text-secondary: #525252;
    --text-light: #737373;
    --background: #fafafa;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --border: #e4e4e7;
    --border-light: #f4f4f5;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius: 16px;
    --radius-lg: 20px;
    --radius-sm: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-premium: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2d2d2d 100%);
}

* {
    box-sizing: border-box;
}

.ai-notifications {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
}

.ai-notification {
    background: var(--surface-elevated);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    transform: translateX(100%);
    transition: var(--transition);
    opacity: 0;
    overflow: hidden;
}

.ai-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.ai-notification-content {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ai-notification-content span {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    line-height: 1.4;
}

.ai-notification-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.ai-notification-close:hover {
    background: var(--border-light);
    color: var(--text-secondary);
}

.ai-notification-info {
    border-left: 4px solid var(--accent);
}

.ai-notification-success {
    border-left: 4px solid #10b981;
}

.ai-notification-warning {
    border-left: 4px solid #f59e0b;
}

.ai-notification-error {
    border-left: 4px solid #ef4444;
}

.ai-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ai-chat-trigger {
    width: 64px;
    height: 64px;
    background: var(--gradient-premium);
    border-radius: 50%;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    box-shadow: var(--shadow-2xl);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.ai-chat-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.3);
}

.ai-chat-trigger.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    transform: scale(0.95);
}

.ai-trigger-icon {
    transition: var(--transition);
}

.ai-chat-trigger.active .ai-trigger-icon {
    transform: rotate(180deg);
}

.ai-trigger-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

.ai-chat-widget {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.ai-chat-widget.active {
    display: flex;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ai-chat-header {
    background: var(--gradient-premium);
    color: var(--secondary);
    padding: 24px;
    position: relative;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.ai-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ai-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    opacity: 0.9;
}

.ai-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ai-chat-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.ai-chat-header p {
    margin: 8px 0 0 0;
    font-size: 14px;
    opacity: 0.8;
}

.ai-chat-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    backdrop-filter: blur(10px);
}

.ai-chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: var(--background);
    position: relative;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.ai-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.ai-welcome-message {
    padding: 32px 24px;
    text-align: center;
    background: var(--surface);
    margin: 0;
    border-bottom: 1px solid var(--border-light);
}

.ai-welcome-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-premium);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--secondary);
}

.ai-welcome-message h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.ai-welcome-message p {
    margin: 0 0 20px 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.ai-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.ai-quick-action {
    background: var(--background);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    text-align: left;
}

.ai-quick-action:hover {
    background: var(--border-light);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.ai-quick-action span {
    font-size: 16px;
}

.ai-message {
    padding: 16px 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
}

.ai-message.user {
    flex-direction: row-reverse;
    background: var(--background);
}

.ai-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-message-avatar.ai-user {
    background: var(--gradient-premium);
    color: var(--secondary);
}

.ai-message-avatar.ai-assistant {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--secondary);
}

.ai-message-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-message-bubble {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: transparent;
    word-wrap: break-word;
}

.ai-message.user .ai-message-bubble {
    background: var(--primary);
    color: var(--secondary);
    border-radius: var(--radius) var(--radius) 4px var(--radius);
}

.ai-message.assistant .ai-message-bubble {
    background: var(--border-light);
    border-radius: var(--radius) var(--radius) var(--radius) 4px;
}

.ai-message-time {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

.ai-message.user .ai-message-time {
    text-align: right;
}

.ai-typing-indicator {
    display: none;
    padding: 16px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
}

.ai-typing-indicator.active {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ai-typing-bubble {
    background: var(--border-light);
    border-radius: var(--radius) var(--radius) var(--radius) 4px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
}

.ai-typing-dots {
    display: flex;
    gap: 4px;
}

.ai-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-light);
    animation: typing 1.4s infinite ease-in-out;
}

.ai-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dot:nth-child(2) { animation-delay: -0.16s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typing {
    0%, 80%, 100% { 
        transform: scale(0.8); 
        opacity: 0.5; 
    }
    40% { 
        transform: scale(1.2); 
        opacity: 1; 
    }
}

.ai-chat-footer {
    background: var(--surface);
    padding: 20px 24px;
    border-top: 1px solid var(--border-light);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.ai-input-container {
    display: flex;
    align-items: flex-end;
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: 4px;
    border: 2px solid var(--border-light);
    transition: var(--transition-fast);
}

.ai-input-container.focused {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.ai-message-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 16px;
    background: transparent;
    font-size: 14px;
    resize: none;
    min-height: 20px;
    max-height: 120px;
    line-height: 1.4;
    font-family: inherit;
    color: var(--text);
}

.ai-message-input::placeholder {
    color: var(--text-light);
}

.ai-send-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-premium);
    color: var(--secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    margin: 2px;
}

.ai-send-button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.ai-send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.ai-footer-text {
    margin-top: 12px;
    text-align: center;
}

.ai-footer-text span {
    font-size: 11px;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .ai-chat-widget {
        width: 320px;
        height: 500px;
        bottom: 80px;
        right: -10px;
    }
    
    .ai-chat-container {
        bottom: 20px;
        right: 20px;
    }
    
    .ai-chat-trigger {
        width: 60px;
        height: 60px;
    }
    
    .ai-notifications {
        bottom: 90px;
        right: 20px;
        max-width: 280px;
    }
    
    .ai-message {
        padding: 12px 20px;
    }
    
    .ai-typing-indicator {
        padding: 12px 20px;
    }
    
    .ai-welcome-message {
        padding: 24px 20px;
    }
}