* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
}

.calculator-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.input-section {
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.input-with-slider {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.input-with-slider input[type="number"] {
    width: 120px;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.input-with-slider input[type="number"]:focus {
    outline: none;
    border-color: #4CAF50;
}

.percentage {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-left: -10px;
}

.input-with-slider input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.input-with-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-with-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.results-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 4px solid #4CAF50;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.highlight {
    background: rgba(76, 175, 80, 0.1);
    margin: 0 -20px;
    padding: 12px 20px;
    border-radius: 6px;
}

.result-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.result-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.result-item.highlight .result-value {
    color: #4CAF50;
}

.chart-section {
    text-align: center;
}

.chart-container {
    max-width: 300px;
    max-height: 300px;
    margin: 0 auto 20px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-color.principal {
    background-color: #4CAF50;
}

.legend-color.returns {
    background-color: #2196F3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-container {
        margin: 10px;
        padding: 20px;
    }
    
    .input-with-slider {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .input-with-slider input[type="number"] {
        width: 100%;
    }
    
    .chart-legend {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}
