/* Interactive Explorer Styles */

.explorer-container {
    background: var(--color-bg);
    padding: 3rem;
    border-radius: 1rem;
}

/* Control Panel */
.control-panel {
    background: rgba(1, 115, 178, 0.1);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(1, 115, 178, 0.3);
}

.control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.control-header h3 {
    font-size: 1.5rem;
    margin: 0;
}

.current-timestep {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: 'Fira Code', monospace;
}

#current-t-value {
    font-size: 1.5rem;
}

/* Slider */
.slider-container {
    position: relative;
    padding: 1rem 0 2rem;
}

.timestep-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, 
        rgba(1, 115, 178, 0.3) 0%, 
        rgba(1, 115, 178, 0.8) 50%, 
        rgba(1, 115, 178, 0.3) 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.timestep-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(1, 115, 178, 0.5);
    transition: all 0.3s ease;
}

.timestep-slider::-webkit-slider-thumb:hover {
    width: 28px;
    height: 28px;
    box-shadow: 0 0 20px rgba(1, 115, 178, 0.8);
}

.timestep-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(1, 115, 178, 0.5);
    transition: all 0.3s ease;
}

.timestep-slider::-moz-range-thumb:hover {
    width: 28px;
    height: 28px;
    box-shadow: 0 0 20px rgba(1, 115, 178, 0.8);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--color-text-dim);
    margin-top: 0.5rem;
}

.timestep-hint {
    text-align: center;
    color: var(--color-text-dim);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Chart Panels */
.chart-panel {
    background: var(--color-bg-light);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.chart-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

#distribution-chart,
#roc-chart {
    width: 100%;
    min-height: 400px;
}

/* Chart Legend */
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-item span {
    font-size: 0.9rem;
    color: var(--color-text-dim);
}

/* Separability Metric */
.separability-metric {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(1, 115, 178, 0.1);
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

#current-auc {
    color: var(--color-primary);
    font-size: 1.3rem;
}

/* ROC Metrics */
.roc-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.roc-metric {
    background: rgba(1, 115, 178, 0.1);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
}

.roc-metric .metric-label {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-dim);
    margin-bottom: 0.5rem;
}

.roc-metric .metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* D3 Chart Styles */
.axis text {
    fill: var(--color-text-dim);
    font-size: 12px;
}

.axis line,
.axis path {
    stroke: rgba(255, 255, 255, 0.2);
}

.grid line {
    stroke: rgba(255, 255, 255, 0.05);
}

.histogram-bar {
    transition: opacity 0.3s ease;
}

.histogram-bar:hover {
    opacity: 0.8;
}

.roc-line {
    fill: none;
    stroke-width: 3;
    transition: stroke-width 0.3s ease;
}

.roc-line:hover {
    stroke-width: 4;
}

.roc-point {
    fill: var(--color-primary);
    stroke: var(--color-bg);
    stroke-width: 2;
    cursor: pointer;
    transition: r 0.3s ease;
}

.roc-point:hover {
    r: 8;
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: var(--color-text);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tooltip.visible {
    opacity: 1;
}

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

.chart-panel {
    animation: fadeIn 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .explorer-container {
        padding: 1.5rem;
    }
    
    .control-panel {
        padding: 1.5rem;
    }
    
    .chart-legend {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .roc-metrics {
        grid-template-columns: 1fr;
    }
}

