/* AgriNovel Voice Expert Styles (v2.0) */
:root {
    --ave-bg: #000;
    --ave-accent: #00ff9d;
    --ave-secondary: #00b8ff;
    --ave-text: #fff;
}

#ave-voice-expert {
    background: var(--ave-bg);
    color: var(--ave-text);
    padding: 40px 20px;
    border-radius: 24px;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Glowing Orb Container */
.ave-orb-container {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 30px;
}

/* The Orb */
.ave-orb {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--ave-accent), #000);
    box-shadow:
        0 0 30px var(--ave-accent),
        0 0 60px var(--ave-secondary),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Orb States */
.ave-orb.listening {
    transform: scale(1.1);
    animation: breathe 2s infinite ease-in-out;
    background: radial-gradient(circle at 30% 30%, #ff0055, #000);
    /* Red for listening */
    box-shadow: 0 0 40px #ff0055, 0 0 80px #ff0055;
}

.ave-orb.thinking {
    animation: spin 1s infinite linear;
    background: radial-gradient(circle at 30% 30%, #fff, var(--ave-secondary));
    box-shadow: 0 0 50px #fff;
}

.ave-orb.speaking {
    animation: pulse-speak 0.5s infinite alternate;
    background: radial-gradient(circle at 30% 30%, var(--ave-secondary), var(--ave-accent));
}

/* Visualizer Ring */
#ave-visualizer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    z-index: 1;
    opacity: 0.6;
    pointer-events: none;
}

/* Status Text */
.ave-status {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
    height: 20px;
}

/* Transcript Overlay */
.ave-transcript-overlay {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

/* Animations */
@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
        box-shadow: 0 0 30px var(--ave-accent);
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
        box-shadow: 0 0 50px var(--ave-accent), 0 0 100px rgba(0, 255, 157, 0.3);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse-speak {
    0% {
        transform: scale(1);
        box-shadow: 0 0 30px var(--ave-secondary);
    }

    100% {
        transform: scale(1.2);
        box-shadow: 0 0 60px var(--ave-secondary), 0 0 120px rgba(0, 184, 255, 0.4);
    }
}

/* Widget Mode */
.ave-widget-mode {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    z-index: 9999;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    transform-origin: bottom right;
    animation: slideIn 0.3s ease-out;
}

.ave-widget-mode .ave-orb-container {
    height: 150px;
}

.ave-widget-mode .ave-orb {
    width: 80px;
    height: 80px;
}

@keyframes slideIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Hero Mode (Below Slider) */
.ave-hero-mode {
    max-width: 100% !important;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    padding: 60px 20px;
    border-radius: 0;
    border: none;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.ave-hero-mode .ave-orb-container {
    height: 300px;
    width: 100%;
}

.ave-hero-mode .ave-orb {
    width: 150px;
    height: 150px;
    box-shadow:
        0 0 50px var(--ave-accent),
        0 0 100px var(--ave-secondary),
        inset 0 0 40px rgba(255, 255, 255, 0.8);
}

.ave-hero-mode .ave-status {
    font-size: 18px;
    letter-spacing: 4px;
    margin-bottom: 40px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, #aaa, #fff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: shine 3s linear infinite;
}

.ave-hero-mode .ave-transcript-overlay {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 800px;
    font-size: 18px;
    padding: 30px;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* Enhanced Ripple for Hero */
.ave-hero-mode .ave-orb::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    animation: ripple 2s infinite;
    z-index: -1;
}

@keyframes ripple {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }

    100% {
        width: 300%;
        height: 300%;
        opacity: 0;
    }
}