/* AgriMind v2.0 - Liquid Glass Theme */

:root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: 20px;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-blue: #4285F4;
    --accent-red: #DB4437;
    --accent-yellow: #F4B400;
    --accent-green: #0F9D58;
}

body {
    background: #000;
    /* Fallback */
}

#agrimind-agent-container {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    font-family: 'Google Sans', 'Inter', sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 700px;
    transition: all 0.5s ease;
}

/* Header */
.agrimind-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agrimind-header h3 {
    margin: 0;
    font-weight: 500;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-red), var(--accent-yellow), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
}

/* Chat Window */
#agrimind-chat-window {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.agrimind-message {
    max-width: 80%;
    padding: 15px 20px;
    border-radius: 18px;
    line-height: 1.6;
    font-size: 1rem;
    animation: slideUp 0.4s ease;
    position: relative;
}

.agrimind-message.system {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.agrimind-message.user {
    align-self: flex-end;
    background: var(--accent-blue);
    /* Google Blue */
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}

/* Input Area */
.agrimind-input-area {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 15px;
    align-items: center;
}

#agrimind-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 15px 20px;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

#agrimind-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

/* Buttons */
button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

#agrimind-send-btn {
    background: var(--accent-blue);
    color: #fff;
}

#agrimind-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dynamic Layout for Big Content */
.mode-immersive #agrimind-agent-container {
    max-width: 1200px;
    height: 800px;
}

.tool-output {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 12px;
    font-family: monospace;
    font-size: 0.9rem;
    margin-top: 10px;
    border-left: 3px solid var(--accent-green);
}

/* Voice Pulse Animation */
.listening {
    animation: pulse-red 1.5s infinite;
    color: var(--accent-red);
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(219, 68, 55, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(219, 68, 55, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(219, 68, 55, 0);
    }
}