/* General UI and Overlays */
#intensity-float { 
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    z-index: 2000; background: rgba(0, 0, 0, 0.85); color: white;
    padding: 6px 15px; border-radius: 20px; display: none;
    pointer-events: none; font-size: 14px; font-family: monospace;
    text-align: center; border: 1px solid #0078AA; box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

#time-display { 
    position: absolute; top: 4px; left: 4px; z-index: 1500;
    background: rgba(255, 255, 255, 0.95); padding: 6px 8px; border-radius: 8px;
    text-align: center; font-family: monospace; min-width: 40px; 
    border-left: 4px solid #0078AA; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

#date-part { font-size: 11px; color: #666; }
#hour-part { font-size: 16px; font-weight: bold; color: #0078AA; }
#predict-badge { display: none; background: #ff9800; color: white; font-size: 9px; padding: 1px 4px; border-radius: 3px; text-transform: uppercase; margin-top: 2px;}

#controls {
    position: absolute; top: 4px; right: 4px; z-index: 1500;
    background: rgba(255, 255, 255, 0.95); border-radius: 8px; width: 280px;
    padding: 12px; box-sizing: border-box; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#controls.minimized { 
    transform: translateX(calc(100% + 4px)); 
}

#toggle-btn { 
    position: absolute; left: -35px; top: 0px; width: 34px; height: 34px; 
    background: #f8f8f8; border-radius: 4px; border: 1px solid #ddd; 
    cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center;
    box-shadow: -2px 2px 5px rgba(0,0,0,0.1); color: #333; z-index: 10;
}

.menu-title { 
    font-size: 16px; font-weight: bold; margin: 0 0 10px 0; padding-bottom: 5px; 
    color: #0078AA; border-bottom: 1px solid #eee; 
}

.control-group { margin-bottom: 10px; }
.control-group label { display: block; font-size: 11px; font-weight: bold; margin-bottom: 2px; color: #333; }

input[type="range"] { -webkit-appearance: none; height: 4px; border-radius: 2px; background: #ddd; width: 100%; margin: 6px 0; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #0078AA; cursor: pointer; }
input[type="range"]:disabled { opacity: 0.5; cursor: not-allowed; }
input[type="range"]:disabled::-webkit-slider-thumb { border-color: #999; background: #eee; }

input[type="datetime-local"] { 
    width: 100%; padding: 4px; margin-bottom: 4px; border: 1px solid #ccc; 
    border-radius: 4px; box-sizing: border-box; font-family: monospace; font-size: 12px;
}

button.btn-primary, button#calc-btn { 
    width: 100%; padding: 6px; background: #0078AA; color: white; border: none; 
    border-radius: 4px; font-weight: bold; cursor: pointer; margin-top: 5px; transition: background 0.2s;
}
button.btn-primary:hover, button#calc-btn:hover { background: #005a80; }
button#calc-btn:disabled { background: #ccc; cursor: not-allowed; }

.tabs { display: flex; background: #eee; border-radius: 4px 4px 0 0; overflow: hidden; margin-bottom: 10px; }
.tab-btn { flex: 1; padding: 8px; border: none; cursor: pointer; font-weight: bold; font-size: 11px; color: #666; background: #eee; transition: all 0.2s; }
.tab-btn.active { background: white; color: #0078AA; border-bottom: 2px solid #0078AA; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.mode-toggle { display: flex; background: #ddd; border-radius: 4px; overflow: hidden; margin-bottom: 10px; margin-top: 10px; }
.mode-toggle label { flex: 1; text-align: center; font-size: 11px; font-weight: bold; padding: 6px 0; margin: 0; cursor: pointer; transition: background 0.2s; }
.mode-toggle input { display: none; }
.mode-toggle input:checked + label { background: #0078AA; color: white; }

.checkbox-group { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: bold; cursor: pointer; margin-bottom: 6px; margin-top: 6px;}

#dynamic-legend-bar { height: 10px; width: 100%; margin-top: 5px; border-radius: 2px; border: 1px solid #ccc; }
.legend-labels { display: flex; justify-content: space-between; font-size: 9px; margin-top: 2px; color: #444; font-weight: bold; }

.common-settings { border-top: 1px solid #eee; padding-top: 8px; margin-top: 8px; }
.footer { margin-top: 10px; padding-top: 8px; border-top: 1px solid #eee; font-size: 10px; color: #666; }
#status-msg, .loading-spinner { 
    font-size: 11px; color: #0078AA; margin-top: 5px; 
    text-align: center; font-weight: bold; 
    height: 16px; line-height: 16px; 
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.loading-spinner {
    display: none;
}
