/* Spring-Mass System Simulation - CSS */

#springMassContainer {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
    color: #333;
    font-family: 'Courier New', monospace;
}

.control-panel {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.control-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
}

.control-row:last-child {
    margin-bottom: 0;
}

.control-row label {
    min-width: auto;
    font-size: 11px;
    color: #555;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    margin-right: 2px;
    flex-shrink: 0;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.toggle-label input[type="checkbox"] {
    cursor: pointer;
    width: auto;
    min-width: auto;
    max-width: none;
    flex: 0 0 auto;
}

.control-row input[type="number"],
.control-row input[type="range"],
.control-row select {
    flex: 1 1 auto;
    min-width: 60px;
    max-width: 120px;
    padding: 5px;
    background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.control-row input[type="range"] {
    height: 6px;
    -webkit-appearance: none;
    background: #ddd;
}

.control-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
}

.control-row input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.btn {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    transition: background-color 0.2s;
    min-width: 80px;
}

.btn:hover:not(:disabled) {
    background-color: #45a049;
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-danger {
    background-color: #f44336;
}

.btn-danger:hover:not(:disabled) {
    background-color: #da190b;
}

.info-display {
    background-color: #e8f5e9;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 11px;
    color: #2e7d32;
    font-family: 'Courier New', monospace;
}

.control-row span {
    min-width: 35px;
    font-size: 11px;
    color: #333;
    font-family: 'Courier New', monospace;
    text-align: left;
    margin-left: 2px;
    flex-shrink: 0;
}

.simulation-area {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.simulation-title {
    color: #2e7d32;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.springmass-canvas {
    width: 100%;
    height: 200px;
    display: block;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #fafafa;
}

.plot-container {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.plot-canvas {
    width: 100%;
    height: 150px;
    display: block;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #fafafa;
}

/* Motor Control Panel */
.motor-panel {
    background: linear-gradient(135deg, #fff5f7 0%, #fff 100%);
    border: 1px solid #E91E63;
    border-left: 4px solid #E91E63;
}

.motor-title {
    color: #C2185B;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.motor-panel select {
    flex: 1 1 auto;
    min-width: 80px;
    max-width: 100px;
    padding: 5px;
    background-color: #fff;
    color: #333;
    border: 1px solid #E91E63;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    cursor: pointer;
}

.motor-panel select:focus {
    outline: none;
    border-color: #C2185B;
    box-shadow: 0 0 3px rgba(233, 30, 99, 0.3);
}

.motor-panel input[type="range"]::-webkit-slider-thumb {
    background: #E91E63;
}

.motor-panel input[type="range"]::-moz-range-thumb {
    background: #E91E63;
}

.btn-primary {
    background-color: #2196F3;
}

.btn-primary:hover:not(:disabled) {
    background-color: #1976D2;
}

.btn-secondary {
    background-color: #607D8B;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #455A64;
}

/* Preset dropdown */
.preset-select {
    padding: 6px 10px;
    background-color: #fff;
    color: #333;
    border: 2px solid #9C27B0;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    cursor: pointer;
    min-width: 180px;
}

.preset-select:focus {
    outline: none;
    border-color: #7B1FA2;
    box-shadow: 0 0 5px rgba(156, 39, 176, 0.4);
}

.preset-select:hover {
    border-color: #7B1FA2;
}
