/* AGG Command Hub & Global Glassmorphism Overhaul */
/* Designed for ACGI Master Control - BA & AGG */

:root {
    --agg-primary: #d4af37; /* AGG Gold */
    --agg-secondary: #60a5fa; /* Sentinel Blue */
    --agg-accent: #ef4444; /* Alert Red */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --glass-blur: blur(12px);
}

/* Global Scrollbar Widening (AGG/BA Directive) */
::-webkit-scrollbar {
    width: 18px !important;
    height: 18px !important;
}

::-webkit-scrollbar-thumb {
    background: var(--agg-primary) !important;
    border: 4px solid #0f172a !important; /* Creates a handle effect */
    border-radius: 10px !important;
}

::-webkit-scrollbar-track {
    background: #0f172a !important;
}

html {
    scrollbar-width: auto !important;
    scrollbar-color: var(--agg-primary) #0f172a !important;
}


/* Global Glassmorphism Overhaul */
body.agg-glass-mode {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    background-attachment: fixed;
    color: #f8fafc;
}

body.agg-glass-mode::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    z-index: -1;
    animation: move-glow 20s linear infinite;
}

@keyframes move-glow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.agg-glass-mode .card, 
.agg-glass-mode .sidebar,
.agg-glass-mode .step-item {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow) !important;
}

.agg-glass-mode .sidebar {
    border-right: 1px solid var(--glass-border) !important;
}

.agg-glass-mode .nav-link:hover,
.agg-glass-mode .nav-link.active {
    background: rgba(212, 175, 55, 0.15) !important;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.agg-glass-mode h1, 
.agg-glass-mode h2, 
.agg-glass-mode h3 {
    color: #f8fafc !important;
}

/* AGG COMMAND BAR - FIXED BOTTOM */
#agg-command-hub {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 900px;
    z-index: 10000;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.command-bar-wrapper {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 20px;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.2);
}

.agg-logo-glow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--agg-primary);
    box-shadow: 0 0 15px var(--agg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #000;
    font-size: 0.8rem;
    flex-shrink: 0;
    animation: pulse-gold 2s infinite;
}

@keyframes pulse-gold {
    0% { transform: scale(1); box-shadow: 0 0 10px var(--agg-primary); }
    50% { transform: scale(1.05); box-shadow: 0 0 25px var(--agg-primary); }
    100% { transform: scale(1); box-shadow: 0 0 10px var(--agg-primary); }
}

#agg-query-input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    width: 100%;
    outline: none;
}

#agg-query-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.agent-status-pills {
    display: flex;
    gap: 0.5rem;
}

.status-pill {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80; /* Green by default */
    box-shadow: 0 0 5px #4ade80;
}

.status-pill.offline {
    background: #64748b;
    box-shadow: none;
}

.status-pill.alert {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

/* Response HUD */
#agg-response-hud {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    margin-bottom: 1rem;
    padding: 1.5rem;
    display: none;
    animation: slideUp 0.3s ease-out;
    max-height: 400px;
    overflow-y: auto;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hud-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--agg-primary);
    margin-bottom: 0.5rem;
}

.hud-content {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.hud-line {
    margin-bottom: 0.5rem;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ba-tag {
    color: var(--agg-primary);
    font-weight: 800;
    margin-right: 8px;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.4);
}

.agg-tag {
    color: var(--agg-secondary);
    font-weight: 800;
    margin-right: 8px;
    text-shadow: 0 0 5px rgba(96, 165, 250, 0.4);
}

.pulse-glow {
    animation: text-pulse 2s infinite;
}

@keyframes text-pulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; text-shadow: 0 0 10px rgba(96, 165, 250, 0.6); }
    100% { opacity: 0.8; }
}

/* Loading Bar Hud */
.loading-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: var(--agg-primary);
    box-shadow: 0 0 10px var(--agg-primary);
    transition: width 0.8s ease-in-out;
}

#agg-response-hud.pulse-active {
    border-color: var(--agg-primary);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

/* MINI HOME LOGO FLOATING BUTTON */
#agg-mini-home-btn {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem !important;
    left: auto !important;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: #000000; /* High-contrast black background */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

#agg-mini-home-btn:hover {
    transform: scale(1.08) translateY(-5px);
    border-color: var(--agg-primary);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(212, 175, 55, 0.4);
}

#agg-mini-home-btn .back-arrow {
    font-size: 1rem;
    line-height: 1;
}

#agg-mini-home-btn img {
    height: 35px; /* Adjusting for prominence as requested */
    width: auto;
    object-fit: contain;
    filter: none;
}

#agg-mini-home-btn .back-text {
    font-size: 0.95rem;
    letter-spacing: 1px;
}

#agg-mini-home-btn::after {
    content: "TOP OF LANDING PAGE";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--agg-primary);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 1.5px;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

#agg-mini-home-btn:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

#agg-mini-home-btn:hover::after {
    bottom: 5px;
    opacity: 1;
}

@media (max-width: 768px) {
    #agg-mini-home-btn {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
    
    #agg-command-hub {
        width: 95%;
        bottom: 1rem;
    }
}


