/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Base styles for the voice assistant */
#voice-assistant {
    font-family: 'Roboto', Arial, sans-serif;
    
    margin: 30px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#voice-assistant:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Header style */
#voice-assistant h1 {
    font-size: 28px;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 500;
}

/* Input styles */
#voice-assistant input[type="text"],
#voice-assistant select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
position:relative;
z-index:4;
}

#voice-assistant input[type="text"]:focus,
#voice-assistant select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}

/* Button styles */
#voice-assistant button {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
z-index: 10;
position:relative;
}

#voice-assistant button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Audio player style */
#voice-assistant #audioPlayer {
    width: 100%;
    margin-top: 20px;
}

/* Video and live view container styles */
#voice-assistant #webcam,
#voice-assistant {
    
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

#voice-assistant #webcam {
    position: relative;
    z-index: 1;
}

#voice-assistant #liveView {
    position: absolute;
    width: 70%;
    height: 50%; /* Ensure height is set */
    z-index: 2;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
    bottom: 20%;
margin-left:100px;
}


/* YouTube results section */
#voice-assistant #youtube-results {
    margin-top: 30px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

#voice-assistant #youtube-results h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.youtube-video {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.youtube-video:hover {
    background-color: #f2f2f2;
    transform: translateY(-2px);
}

.youtube-video h4 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.youtube-video iframe {
    width: 100%;
    height: 315px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.youtube-video p {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
}

/* Responsive design */
@media (max-width: 640px) {
    #voice-assistant {
        padding: 20px;
        margin: 15px;
    }

    #voice-assistant h1 {
        font-size: 24px;
    }

    .youtube-video iframe {
        height: 200px;
    }
}

/* Animation for new content */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.text-response, .youtube-video {
    animation: fadeIn 0.5s ease-out;
}

/* Highlighter for object detection */
.highlighter {
    position: absolute;
    border: 2px solid #e74c3c;
    background-color: rgba(231, 76, 60, 0.2);
    transition: all 0.3s ease;
    pointer-events: none;
    box-sizing: border-box;
    z-index: 10; /* Ensure it's on top */

}

/* Info text for object detection */
.info {
    position: absolute;
    background-color: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.3s ease;
    pointer-events: none;
    max-width: 200px;
    word-wrap: break-word;
}
