/* Real-Time Comparison Styles */
.realtime-comparison {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    margin: 20px 0;
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-header h3 {
    color: #ffd700;
    margin: 0;
    font-size: 1.4em;
}

.header-controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.refresh-control {
    display: flex;
    gap: 10px;
    align-items: center;
}

.control-btn {
    background: rgba(52, 152, 219, 0.2);
    border: 1px solid rgba(52, 152, 219, 0.5);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.control-btn:hover {
    background: rgba(52, 152, 219, 0.4);
}

.auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ccc;
    font-size: 0.9em;
}

.scenario-selector label {
    color: #ccc;
    margin-right: 10px;
}

.scenario-selector select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
}

.scenario-description {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.description-text h4 {
    color: #ffd700;
    margin-top: 0;
}

.data-sources-info {
    margin-top: 10px;
}

.source-badge {
    display: inline-block;
    padding: 4px 8px;
    margin: 2px 4px;
    border-radius: 4px;
    font-size: 0.8em;
    color: white;
}

.panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.data-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.panel-header {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
}

.panel-header h4 {
    margin: 0 0 10px 0;
    color: white;
}

.source-info {
    display: flex;
    gap: 15px;
    font-size: 0.8em;
    color: #ccc;
}

.resolution, .update-freq {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

.panel-content {
    padding: 15px;
}

.data-display {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.moisture-display, .vegetation-display, .precipitation-display {
    width: 100%;
}

.moisture-gauge {
    position: relative;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.gauge-background {
    width: 100%;
    height: 100%;
    position: relative;
}

.gauge-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.8em;
}

.moisture-level, .vegetation-health, .precip-intensity {
    text-align: center;
    padding: 5px;
    border-radius: 5px;
    margin: 10px 0;
    font-weight: bold;
}

.moisture-level.very.dry { background: rgba(211, 47, 47, 0.3); }
.moisture-level.dry { background: rgba(245, 124, 0, 0.3); }
.moisture-level.moderate { background: rgba(251, 192, 45, 0.3); }
.moisture-level.moist { background: rgba(104, 159, 56, 0.3); }
.moisture-level.wet { background: rgba(25, 118, 210, 0.3); }

.ndvi-indicator {
    margin: 15px 0;
}

.ndvi-scale {
    position: relative;
    height: 20px;
    background: linear-gradient(to right, #D32F2F, #FFC107, #4CAF50);
    border-radius: 10px;
    margin: 10px 0;
}

.ndvi-marker {
    position: absolute;
    top: -5px;
    width: 4px;
    height: 30px;
    background: white;
    border-radius: 2px;
    transform: translateX(-50%);
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7em;
    color: #ccc;
    margin-top: 5px;
}

.precip-bars {
    display: flex;
    align-items: end;
    justify-content: center;
    height: 60px;
    margin: 10px 0;
}

.precip-bar {
    width: 20px;
    border-radius: 2px 2px 0 0;
    transition: height 0.5s ease;
}

.panel-footer {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: #ccc;
}

.quality-indicator {
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.analysis-section {
    margin: 30px 0;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.temporal-chart {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
}

.temporal-chart h4 {
    color: #ffd700;
    margin-top: 0;
}

.chart-controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chart-controls select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
}

.correlation-analysis {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
}

.correlation-analysis h4 {
    color: #ffd700;
    margin-top: 0;
}

.correlation-matrix {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.correlation-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 5px;
    padding: 10px;
}

.correlation-pair {
    font-weight: bold;
    margin-bottom: 5px;
}

.correlation-value {
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    margin: 5px 0;
}

.correlation-value.strong { color: #4CAF50; }
.correlation-value.moderate { color: #FFC107; }
.correlation-value.weak { color: #FF9800; }

.correlation-interpretation {
    font-size: 0.8em;
    color: #ccc;
    font-style: italic;
}

.comparison-insights {
    margin: 30px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
}

.comparison-insights h4 {
    color: #ffd700;
    margin-top: 0;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.insight-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid;
}

.insight-card.moisture { border-left-color: #2196F3; }
.insight-card.irrigation { border-left-color: #4CAF50; }
.insight-card.vegetation { border-left-color: #8BC34A; }
.insight-card.monitoring { border-left-color: #FF9800; }
.insight-card.relationship { border-left-color: #9C27B0; }
.insight-card.comprehensive { border-left-color: #00BCD4; }
.insight-card.forecast { border-left-color: #E91E63; }

.insight-icon {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.insight-content h5 {
    margin: 0 0 10px 0;
    color: white;
}

.insight-content p {
    margin: 0 0 10px 0;
    color: #ccc;
    font-size: 0.9em;
}

.insight-confidence {
    font-size: 0.8em;
    color: #ffd700;
    text-align: right;
}

.educational-section {
    margin: 30px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
}

.educational-section h4 {
    color: #ffd700;
    margin-top: 0;
}

.objectives-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.objective-item {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 15px;
}

.objective-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.objective-content h5 {
    margin: 0 0 10px 0;
    color: white;
}

.objective-content p {
    margin: 0 0 10px 0;
    color: #ccc;
    font-size: 0.9em;
}

.objective-tasks ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.objective-tasks li {
    margin: 5px 0;
    color: #ccc;
    font-size: 0.8em;
}

.error-display {
    text-align: center;
    padding: 20px;
    color: #ff6b6b;
}

.error-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.educational-note {
    font-size: 0.8em;
    color: #999;
    margin-top: 10px;
    font-style: italic;
}