/* --- NEW METRICS PHYSICS (Base) --- */
#metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    flex: 1;
    margin-top: 20px;
}
.metric-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    cursor: help;
}
.metric-unit label { font-size: 0.7rem; font-weight: 900; margin-bottom: 5px; opacity: 0.8; }
.metric-num { font-size: 0.8rem; font-weight: 900; margin-top: 5px; }

/* Tooltip Logic */
.metric-tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 180px;
    padding: 10px;
    background: #000;
    color: #fff;
    font-size: 0.65rem;
    border-radius: 8px;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s;
    z-index: 1000;
    pointer-events: none;
    line-height: 1.3;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid var(--teal, #008080);
}
.metric-unit:hover .metric-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Gauge Visuals */
.rail-container { width: 100%; height: 10px; background: rgba(128,128,128,0.1); border-radius: 5px; overflow: hidden; }
.rail-fill { height: 100%; width: 0%; transition: width 1s cubic-bezier(0.19, 1, 0.22, 1); background: var(--tf-color, #008080); }

.pillar-container { width: 12px; height: 50px; background: rgba(128,128,128,0.1); border-radius: 3px; display: flex; align-items: flex-end; overflow: hidden; }
.pillar-fill { width: 100%; height: 0%; transition: height 1s cubic-bezier(0.19, 1, 0.22, 1); background: var(--er-color, #ff007f); }

.speedo-svg, .heart-svg { width: 50px; height: 50px; }
.speedo-bg { opacity: 0.1; stroke: #888; }
.speedo-fill { stroke: var(--aip-color, #48cae4); transition: stroke-dashoffset 1s ease-out; stroke-linecap: round; }
.heart-outline { stroke: #888; opacity: 0.3; }
.heart-shape { transition: all 1s ease-out; }

/* --- FIFI STATUS INDICATORS & AI THEMES --- */
#fifi-status-msg {
    position: absolute;
    top: 15px;
    width: 100%;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--teal, #008080);
    z-index: 1000;
    display: none;
}

/* RESTORATION: General AI Mode Colors */
#fifi-hub.general-ai-mode { border-color: #f0ad4e !important; }
#fifi-hub.general-ai-mode #speech-overlay { background: #4a3516 !important; }
#fifi-hub.general-ai-mode .dot { color: #f0ad4e !important; }

.fifi-loader {
    display: none;
    align-items: center;
    padding: 10px 18px;
    width: fit-content;
    margin: 5px 0 15px 15px;
    border-radius: 20px;
    background: rgba(128,128,128,0.1);
}

.dot {
    width: 6px;
    height: 6px;
    margin: 0 3px;
    background: currentColor;
    border-radius: 50%;
    opacity: 0.3;
    animation: dotPulse 1.2s infinite ease-in-out;
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}
