/* Gradient Descent Visualizer - Localized CSS */
.gradient-descent-simulation {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-sizing: border-box;
}

.gradient-descent-simulation * {
    box-sizing: border-box;
}

.gradient-descent-simulation .simulation-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gradient-descent-simulation .controls-panel {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.gradient-descent-simulation .controls-panel h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
}

.gradient-descent-simulation .control-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.gradient-descent-simulation .control-label {
    min-width: 120px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.gradient-descent-simulation .control-select,
.gradient-descent-simulation .control-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.gradient-descent-simulation .control-select:hover,
.gradient-descent-simulation .control-input:hover {
    border-color: #667eea;
}

.gradient-descent-simulation .control-select:focus,
.gradient-descent-simulation .control-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.gradient-descent-simulation .slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.gradient-descent-simulation .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: background 0.2s;
}

.gradient-descent-simulation .slider::-webkit-slider-thumb:hover {
    background: #764ba2;
}

.gradient-descent-simulation .slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.gradient-descent-simulation .slider::-moz-range-thumb:hover {
    background: #764ba2;
}

.gradient-descent-simulation .value-display {
    min-width: 60px;
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #495057;
    font-size: 13px;
}

.gradient-descent-simulation .button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.gradient-descent-simulation .btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.gradient-descent-simulation .btn-primary {
    background: #667eea;
    color: white;
}

.gradient-descent-simulation .btn-primary:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.gradient-descent-simulation .btn-secondary {
    background: #6c757d;
    color: white;
}

.gradient-descent-simulation .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.gradient-descent-simulation .btn-danger {
    background: #dc3545;
    color: white;
}

.gradient-descent-simulation .btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.gradient-descent-simulation .info-panel {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
    font-size: 13px;
    line-height: 1.8;
}

.gradient-descent-simulation .info-panel div {
    margin-bottom: 5px;
}

.gradient-descent-simulation .info-panel strong {
    color: #495057;
}

.gradient-descent-simulation .visualization-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.gradient-descent-simulation .plot-container {
    background: white;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex: 1;
    aspect-ratio: 1;
    min-width: 0;
    position: relative;
}

.gradient-descent-simulation .plot {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.gradient-descent-simulation .plot {
    width: 100%;
    height: 100%;
}

@media (max-width: 1200px) {
    .gradient-descent-simulation .visualization-container {
        flex-direction: column;
    }
    
    .gradient-descent-simulation .plot-container {
        height: 400px;
    }
}

