/* EVA Assistant - Enhanced Styling */

.eva-assistant-container {
    display: grid;
    grid-template-columns: 500px 1fr;
    height: calc(100vh - 100px);
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* === 3D Section === */
.eva-3d-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.eva-3d-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.eva-avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.eva-header-info {
    flex: 1;
}

.eva-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.eva-subtitle {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #666;
}

.eva-info-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 20px;
}

.eva-info-btn:hover {
    border-color: #667eea;
    background: #f0f0f0;
    transform: scale(1.05);
}

/* === 3D Viewer === */
.eva-viewer {
    flex: 1;
    width: 100%;
    min-height: 400px;
    border-radius: 15px;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

/* === Speech Bubble === */
.speech-bubble-container {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    max-width: 90%;
}

.speech-bubble-container.bounce {
    animation: bubbleBounce 0.5s ease-out;
}

.speech-bubble-container.slide-in {
    animation: slideIn 0.4s ease-out;
}

.speech-bubble {
    background: white;
    border-radius: 18px;
    padding: 15px 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    border: 2px solid #667eea;
}

.speech-content {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}

.speech-content p {
    margin: 0;
}

.speech-arrow {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid white;
}

.speech-arrow::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: -14px;
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 14px solid #667eea;
}

/* === Typing Indicator === */
.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 5px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: typingDot 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* === Status === */
.eva-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: pulse 2s infinite;
}

.status-dot.thinking {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.status-dot.alert {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* === Animation Controls === */
.animation-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
}

.anim-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.anim-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.anim-btn:hover .anim-icon {
    transform: scale(1.2);
}

.anim-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* === Chat Section === */
.chat-section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.eva-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.chat-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.subtitle {
    margin: 5px 0 0 0;
    font-size: 13px;
    opacity: 0.9;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* === Messages === */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    background: #f8f9fa;
}

.welcome-message {
    text-align: center;
    padding: 40px 20px;
}

.welcome-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.welcome-message h4 {
    font-size: 24px;
    color: #333;
    margin: 0 0 10px 0;
}

.welcome-message > p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto 30px auto;
}

.suggested-questions {
    max-width: 600px;
    margin: 0 auto;
}

.suggestion-label {
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
}

.suggestion-btn {
    display: block;
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    color: #333;
    transition: all 0.3s ease;
}

.suggestion-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateX(5px);
}

/* === Message Bubbles === */
.message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.message-avatar.user {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
}

.message-content {
    flex: 1;
    max-width: 70%;
}

.message-bubble {
    padding: 12px 18px;
    border-radius: 18px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 15px;
    line-height: 1.5;
    color: #333;
}

.user-message .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
    padding: 0 5px;
}

.message-bubble.typing {
    padding: 15px 20px;
}

.typing-dots {
    display: flex;
    gap: 6px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: typingDot 1.4s infinite;
}

/* === Input === */
.chat-input {
    padding: 20px 25px;
    background: white;
    border-top: 2px solid #e0e0e0;
}

.input-wrapper {
    display: flex;
    gap: 12px;
}

.message-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.message-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.send-button {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.send-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-hint {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
    text-align: center;
}

/* === Animations === */
@keyframes bubbleBounce {
    0% {
        transform: translateX(-50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translateX(-50%) scale(1.1);
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* === Responsive === */
@media (max-width: 1200px) {
    .eva-assistant-container {
        grid-template-columns: 400px 1fr;
    }
}

@media (max-width: 992px) {
    .eva-assistant-container {
        grid-template-columns: 1fr;
        grid-template-rows: 500px 1fr;
    }
    
    .speech-bubble-container {
        top: 80px;
    }
}

@media (max-width: 768px) {
    .eva-assistant-container {
        grid-template-rows: 400px 1fr;
        padding: 10px;
        gap: 10px;
    }
    
    .message-content {
        max-width: 85%;
    }
}
