/* SethAI Styles */
#sethAI-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    z-index: 9999;
}

/* Floating Button */
#sethAI-button {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #1e90ff 0%, #0066cc 100%);
    color: white;
    padding: 12px 18px;
    border-radius: 30px;
    box-shadow: 0 4px 16px rgba(30, 144, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    user-select: none;
    z-index: 9999;
    animation: sethAI-pulse 2s infinite;
    border: 2px solid transparent;
    background-clip: padding-box;
    white-space: nowrap;
}

#sethAI-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #1e90ff, #00bfff, #1e90ff, #00bfff);
    background-size: 300% 300%;
    border-radius: 30px;
    z-index: -1;
    animation: sethAI-lightning 3s linear infinite;
    opacity: 0.8;
}

@keyframes sethAI-lightning {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes sethAI-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

#sethAI-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(30, 144, 255, 0.6);
}

#sethAI-button:active {
    transform: scale(0.95);
}

#sethAI-button svg {
    width: 20px;
    height: 20px;
    animation: sethAI-rotate 3s linear infinite;
    flex-shrink: 0;
}

@keyframes sethAI-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Chat Window */
#sethAI-chat {
    position: fixed;
    bottom: 30px;
    left: 20px;
    width: 420px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 80px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9998;
    border: 2px solid #1e90ff;
}

#sethAI-chat.sethAI-hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}

/* Header */
.sethAI-header {
    background: linear-gradient(135deg, #1e90ff 0%, #0066cc 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 18px 18px 0 0;
}

.sethAI-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sethAI-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.sethAI-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.sethAI-status {
    margin: 4px 0 0 0;
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sethAI-status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: sethAI-blink 2s infinite;
}

@keyframes sethAI-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.sethAI-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sethAI-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Messages */
.sethAI-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8fafc;
}

.sethAI-messages::-webkit-scrollbar {
    width: 6px;
}

.sethAI-messages::-webkit-scrollbar-track {
    background: transparent;
}

.sethAI-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.sethAI-message {
    display: flex;
    gap: 10px;
    animation: sethAI-slideIn 0.3s ease;
}

@keyframes sethAI-slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sethAI-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sethAI-bot .sethAI-message-avatar {
    background: linear-gradient(135deg, #1e90ff 0%, #0066cc 100%);
}

.sethAI-user .sethAI-message-avatar {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    order: 2;
}

.sethAI-message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 16px;
    max-width: 75%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sethAI-user .sethAI-message-content {
    background: linear-gradient(135deg, #1e90ff 0%, #0066cc 100%);
    color: white;
    margin-left: auto;
}

.sethAI-message-content p {
    margin: 0 0 8px 0;
    line-height: 1.5;
    font-size: 14px;
}

.sethAI-message-content p:last-child {
    margin-bottom: 0;
}

.sethAI-message-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

.sethAI-message-content li {
    margin: 4px 0;
    font-size: 14px;
    line-height: 1.5;
}

.sethAI-message-content strong {
    font-weight: 600;
    color: #1e90ff;
}

.sethAI-user .sethAI-message-content strong {
    color: white;
}

/* Typing Indicator */
.sethAI-typing {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.sethAI-typing span {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: sethAI-typing 1.4s infinite;
}

.sethAI-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.sethAI-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes sethAI-typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Suggestions */
.sethAI-suggestions {
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.sethAI-suggestion-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.sethAI-suggestion-btn:hover {
    background: #1e90ff;
    color: white;
    border-color: #1e90ff;
    transform: translateY(-2px);
}

/* Input */
.sethAI-input-container {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
}

#sethAI-input {
    flex: 1;
    border: 2px solid #e2e8f0;
    border-radius: 24px;
    padding: 12px 20px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

#sethAI-input:focus {
    border-color: #1e90ff;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
}

.sethAI-send-btn {
    background: linear-gradient(135deg, #1e90ff 0%, #0066cc 100%);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.sethAI-send-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.4);
}

.sethAI-send-btn:active {
    transform: scale(0.95);
}

.sethAI-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    #sethAI-button {
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        padding: 10px 16px;
        font-size: 13px;
    }

    #sethAI-button svg {
        width: 18px;
        height: 18px;
    }

    #sethAI-chat {
        bottom: 80px;
        right: 10px;
        left: 10px;
        width: auto;
        height: 500px;
    }
}

@media (max-width: 480px) {
    #sethAI-button {
        padding: 10px 14px;
        font-size: 12px;
        gap: 6px;
    }

    #sethAI-button svg {
        width: 16px;
        height: 16px;
    }

    .sethAI-message-content {
        max-width: 85%;
    }
}